dayjs
This commit is contained in:
parent
bb1dbd3b0b
commit
722c065be0
8 changed files with 97 additions and 4 deletions
56
dist-back/dayjs.js
Normal file
56
dist-back/dayjs.js
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
"use strict";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var dayjs_exports = {};
|
||||
__export(dayjs_exports, {
|
||||
dayjsbr: () => import_dayjs.default
|
||||
});
|
||||
module.exports = __toCommonJS(dayjs_exports);
|
||||
var import_dayjs = __toESM(require("dayjs"));
|
||||
var import_pt_br = require("dayjs/locale/pt-br");
|
||||
var import_duration = __toESM(require("dayjs/plugin/duration"));
|
||||
var import_isSameOrAfter = __toESM(require("dayjs/plugin/isSameOrAfter"));
|
||||
var import_isSameOrBefore = __toESM(require("dayjs/plugin/isSameOrBefore"));
|
||||
var import_minMax = __toESM(require("dayjs/plugin/minMax"));
|
||||
var import_relativeTime = __toESM(require("dayjs/plugin/relativeTime"));
|
||||
var import_timezone = __toESM(require("dayjs/plugin/timezone"));
|
||||
var import_utc = __toESM(require("dayjs/plugin/utc"));
|
||||
var import_weekOfYear = __toESM(require("dayjs/plugin/weekOfYear"));
|
||||
import_dayjs.default.extend(import_utc.default);
|
||||
import_dayjs.default.extend(import_timezone.default);
|
||||
import_dayjs.default.extend(import_weekOfYear.default);
|
||||
import_dayjs.default.extend(import_isSameOrBefore.default);
|
||||
import_dayjs.default.extend(import_isSameOrAfter.default);
|
||||
import_dayjs.default.extend(import_minMax.default);
|
||||
import_dayjs.default.extend(import_relativeTime.default);
|
||||
import_dayjs.default.extend(import_duration.default);
|
||||
import_dayjs.default.locale("pt-br");
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
dayjsbr
|
||||
});
|
||||
|
|
@ -19,6 +19,7 @@ __reExport(index_exports, require("./aleatorio"), module.exports);
|
|||
__reExport(index_exports, require("./cacheMemoria"), module.exports);
|
||||
__reExport(index_exports, require("./constantes"), module.exports);
|
||||
__reExport(index_exports, require("./consulta"), module.exports);
|
||||
__reExport(index_exports, require("./dayjs"), module.exports);
|
||||
__reExport(index_exports, require("./ecosistema"), module.exports);
|
||||
__reExport(index_exports, require("./extensoes"), module.exports);
|
||||
__reExport(index_exports, require("./logger"), module.exports);
|
||||
|
|
@ -34,6 +35,7 @@ __reExport(index_exports, require("./variaveisComuns"), module.exports);
|
|||
...require("./cacheMemoria"),
|
||||
...require("./constantes"),
|
||||
...require("./consulta"),
|
||||
...require("./dayjs"),
|
||||
...require("./ecosistema"),
|
||||
...require("./extensoes"),
|
||||
...require("./logger"),
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "p-comuns",
|
||||
"version": "0.203.0",
|
||||
"version": "0.206.0",
|
||||
"description": "",
|
||||
"main": "./dist-back/index.js",
|
||||
"module": "./dist-front/index.mjs",
|
||||
|
|
@ -14,7 +14,8 @@
|
|||
},
|
||||
"scripts": {
|
||||
"biome": "npx @biomejs/biome check --write ./src",
|
||||
"build": "npm --no-git-tag-version version minor && pnpm run biome && tsup --config ./tsup/tsup.config.ts"
|
||||
"check": "pnpm run biome && npx tsc --noEmit",
|
||||
"build": "npm --no-git-tag-version version minor && pnpm run check && tsup --config ./tsup/tsup.config.ts"
|
||||
},
|
||||
"author": {
|
||||
"name": "AZTECA SOFTWARE LTDA",
|
||||
|
|
@ -24,6 +25,7 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"cross-fetch": "4.1.0",
|
||||
"dayjs": "^1.11.13",
|
||||
"zod": "3.24.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
|
|
@ -11,6 +11,9 @@ importers:
|
|||
cross-fetch:
|
||||
specifier: 4.1.0
|
||||
version: 4.1.0
|
||||
dayjs:
|
||||
specifier: ^1.11.13
|
||||
version: 1.11.13
|
||||
zod:
|
||||
specifier: 3.24.1
|
||||
version: 3.24.1
|
||||
|
|
@ -435,6 +438,9 @@ packages:
|
|||
resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==}
|
||||
engines: {node: '>= 8'}
|
||||
|
||||
dayjs@1.11.13:
|
||||
resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==}
|
||||
|
||||
debug@4.4.1:
|
||||
resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==}
|
||||
engines: {node: '>=6.0'}
|
||||
|
|
@ -993,6 +999,8 @@ snapshots:
|
|||
shebang-command: 2.0.0
|
||||
which: 2.0.2
|
||||
|
||||
dayjs@1.11.13: {}
|
||||
|
||||
debug@4.4.1:
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
|
|
|
|||
24
src/dayjs.ts
Normal file
24
src/dayjs.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import dayjsbr from "dayjs"
|
||||
|
||||
export type { ManipulateType } from "dayjs"
|
||||
import "dayjs/locale/pt-br"
|
||||
import duration from "dayjs/plugin/duration"
|
||||
import isSameOrAfter from "dayjs/plugin/isSameOrAfter"
|
||||
import isSameOrBefore from "dayjs/plugin/isSameOrBefore"
|
||||
import minMax from "dayjs/plugin/minMax"
|
||||
import relativeTime from "dayjs/plugin/relativeTime"
|
||||
import timezone from "dayjs/plugin/timezone"
|
||||
import utc from "dayjs/plugin/utc"
|
||||
import weekOfYear from "dayjs/plugin/weekOfYear"
|
||||
|
||||
dayjsbr.extend(utc)
|
||||
dayjsbr.extend(timezone)
|
||||
dayjsbr.extend(weekOfYear)
|
||||
dayjsbr.extend(isSameOrBefore)
|
||||
dayjsbr.extend(isSameOrAfter)
|
||||
dayjsbr.extend(minMax)
|
||||
dayjsbr.extend(relativeTime)
|
||||
dayjsbr.extend(duration)
|
||||
dayjsbr.locale("pt-br")
|
||||
|
||||
export { dayjsbr }
|
||||
|
|
@ -2,6 +2,7 @@ export * from "./aleatorio"
|
|||
export * from "./cacheMemoria"
|
||||
export * from "./constantes"
|
||||
export * from "./consulta"
|
||||
export * from "./dayjs"
|
||||
export * from "./ecosistema"
|
||||
export * from "./extensoes"
|
||||
export * from "./logger"
|
||||
|
|
|
|||
|
|
@ -21,5 +21,5 @@
|
|||
"strict": true, /* Habilita todas as opções de verificação estrita de tipos. */
|
||||
"skipLibCheck": true /* Ignora a verificação de tipos em arquivos de declaração de bibliotecas. */
|
||||
},
|
||||
"include": ["src/**/*", "tsup"] /* Inclui todos os arquivos TypeScript dentro da pasta src. */
|
||||
"include": ["src/**/*"] /* Inclui todos os arquivos TypeScript dentro da pasta src. */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue