Compare commits
No commits in common. "2df6b6a418fa9e2809b0415c6ddb614e9ca0650b" and "2cac8492fa548d5f3055a72a6e46d9355a87d25c" have entirely different histories.
2df6b6a418
...
2cac8492fa
7 changed files with 105 additions and 78 deletions
|
|
@ -1,9 +1,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
var __create = Object.create;
|
|
||||||
var __defProp = Object.defineProperty;
|
var __defProp = Object.defineProperty;
|
||||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||||
var __getProtoOf = Object.getPrototypeOf;
|
|
||||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||||
var __export = (target, all) => {
|
var __export = (target, all) => {
|
||||||
for (var name in all)
|
for (var name in all)
|
||||||
|
|
@ -17,40 +15,25 @@ var __copyProps = (to, from, except, desc) => {
|
||||||
}
|
}
|
||||||
return to;
|
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||||
var dayjs_exports = {};
|
var dayjs_exports = {};
|
||||||
__export(dayjs_exports, {
|
__export(dayjs_exports, {
|
||||||
dayjsbr: () => import_dayjs.default
|
criarDayjsbr: () => criarDayjsbr
|
||||||
});
|
});
|
||||||
module.exports = __toCommonJS(dayjs_exports);
|
module.exports = __toCommonJS(dayjs_exports);
|
||||||
var import_dayjs = __toESM(require("dayjs"));
|
const criarDayjsbr = (edayjs, op) => {
|
||||||
var import_pt_br = require("dayjs/locale/pt-br");
|
edayjs.extend(op.utc);
|
||||||
var import_duration = __toESM(require("dayjs/plugin/duration"));
|
edayjs.extend(op.timezone);
|
||||||
var import_isSameOrAfter = __toESM(require("dayjs/plugin/isSameOrAfter"));
|
edayjs.extend(op.weekOfYear);
|
||||||
var import_isSameOrBefore = __toESM(require("dayjs/plugin/isSameOrBefore"));
|
edayjs.extend(op.isSameOrBefore);
|
||||||
var import_minMax = __toESM(require("dayjs/plugin/minMax"));
|
edayjs.extend(op.isSameOrAfter);
|
||||||
var import_relativeTime = __toESM(require("dayjs/plugin/relativeTime"));
|
edayjs.extend(op.minMax);
|
||||||
var import_timezone = __toESM(require("dayjs/plugin/timezone"));
|
edayjs.extend(op.relativeTime);
|
||||||
var import_utc = __toESM(require("dayjs/plugin/utc"));
|
edayjs.extend(op.duration);
|
||||||
var import_weekOfYear = __toESM(require("dayjs/plugin/weekOfYear"));
|
edayjs.locale("pt-br");
|
||||||
import_dayjs.default.extend(import_utc.default);
|
return edayjs;
|
||||||
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:
|
// Annotate the CommonJS export names for ESM import in node:
|
||||||
0 && (module.exports = {
|
0 && (module.exports = {
|
||||||
dayjsbr
|
criarDayjsbr
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,13 @@
|
||||||
import z from 'zod';
|
import z from 'zod';
|
||||||
export { ManipulateType, default as dayjsbr } from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
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';
|
||||||
import { v4 } from 'uuid';
|
import { v4 } from 'uuid';
|
||||||
|
|
||||||
declare const aleatorio: (tamanho?: number) => string;
|
declare const aleatorio: (tamanho?: number) => string;
|
||||||
|
|
@ -89,6 +97,33 @@ declare const zFiltro: z.ZodObject<{
|
||||||
ou: z.ZodOptional<z.ZodBoolean>;
|
ou: z.ZodOptional<z.ZodBoolean>;
|
||||||
}, z.core.$strip>;
|
}, z.core.$strip>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* dayjsbr.ts
|
||||||
|
*import dayjs 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"
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
declare const criarDayjsbr: (edayjs: typeof dayjs, op: {
|
||||||
|
duration: typeof duration;
|
||||||
|
isSameOrAfter: typeof isSameOrAfter;
|
||||||
|
isSameOrBefore: typeof isSameOrBefore;
|
||||||
|
minMax: typeof minMax;
|
||||||
|
relativeTime: typeof relativeTime;
|
||||||
|
timezone: typeof timezone;
|
||||||
|
utc: typeof utc;
|
||||||
|
weekOfYear: typeof weekOfYear;
|
||||||
|
}) => typeof dayjs;
|
||||||
|
|
||||||
declare const cdn_carro_de_boi = "https://carro-de-boi-idz-one.b-cdn.net";
|
declare const cdn_carro_de_boi = "https://carro-de-boi-idz-one.b-cdn.net";
|
||||||
|
|
||||||
type tiposArquivo = "imagem" | "documento" | "vídeo" | "outros";
|
type tiposArquivo = "imagem" | "documento" | "vídeo" | "outros";
|
||||||
|
|
@ -308,4 +343,4 @@ declare const nomeVariavel: (v: {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}) => string;
|
}) => string;
|
||||||
|
|
||||||
export { TipagemRotas, type TipoLoggerSessao, aleatorio, cacheM, cacheMFixo, cacheMemoria, camposComuns, cdn_carro_de_boi, defineCwd, erUuid, esperar, extensoes, graficos_pilao, type interfaceConsulta, localValor, logger, nomeVariavel, objetoPg, operadores, paraObjetoRegistroPg, pgObjeto, postLogger, siglas_unidades_medida, texto_busca, tipoArquivo, type tipoFiltro, type tipoLogger, type tipoLoggerLog, type tipoLokiObjeto, tipoUsuarioResiduos, tx, umaFuncao, umaVariavel, unidades_medida, uuid, uuidV3, uuidV4, uuid_null, validarUuid, verCacheM, zFiltro, zOperadores };
|
export { TipagemRotas, type TipoLoggerSessao, aleatorio, cacheM, cacheMFixo, cacheMemoria, camposComuns, cdn_carro_de_boi, criarDayjsbr, defineCwd, erUuid, esperar, extensoes, graficos_pilao, type interfaceConsulta, localValor, logger, nomeVariavel, objetoPg, operadores, paraObjetoRegistroPg, pgObjeto, postLogger, siglas_unidades_medida, texto_busca, tipoArquivo, type tipoFiltro, type tipoLogger, type tipoLoggerLog, type tipoLokiObjeto, tipoUsuarioResiduos, tx, umaFuncao, umaVariavel, unidades_medida, uuid, uuidV3, uuidV4, uuid_null, validarUuid, verCacheM, zFiltro, zOperadores };
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "p-comuns",
|
"name": "p-comuns",
|
||||||
"version": "0.261.0",
|
"version": "0.258.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "./dist-back/index.js",
|
"main": "./dist-back/index.js",
|
||||||
"module": "./dist-front/index.mjs",
|
"module": "./dist-front/index.mjs",
|
||||||
|
|
|
||||||
BIN
pacote.tgz
BIN
pacote.tgz
Binary file not shown.
72
src/dayjs.ts
72
src/dayjs.ts
|
|
@ -1,24 +1,54 @@
|
||||||
import dayjsbr from "dayjs"
|
// dayjsbr.ts
|
||||||
|
import type dayjs from "dayjs"
|
||||||
|
|
||||||
export type { ManipulateType } from "dayjs"
|
import type duration from "dayjs/plugin/duration"
|
||||||
import "dayjs/locale/pt-br"
|
//import "dayjs/locale/pt-br"
|
||||||
import duration from "dayjs/plugin/duration"
|
import type isSameOrAfter from "dayjs/plugin/isSameOrAfter"
|
||||||
import isSameOrAfter from "dayjs/plugin/isSameOrAfter"
|
import type isSameOrBefore from "dayjs/plugin/isSameOrBefore"
|
||||||
import isSameOrBefore from "dayjs/plugin/isSameOrBefore"
|
import type minMax from "dayjs/plugin/minMax"
|
||||||
import minMax from "dayjs/plugin/minMax"
|
import type relativeTime from "dayjs/plugin/relativeTime"
|
||||||
import relativeTime from "dayjs/plugin/relativeTime"
|
import type timezone from "dayjs/plugin/timezone"
|
||||||
import timezone from "dayjs/plugin/timezone"
|
import type utc from "dayjs/plugin/utc"
|
||||||
import utc from "dayjs/plugin/utc"
|
import type weekOfYear from "dayjs/plugin/weekOfYear"
|
||||||
import weekOfYear from "dayjs/plugin/weekOfYear"
|
|
||||||
|
|
||||||
dayjsbr.extend(utc)
|
/**
|
||||||
dayjsbr.extend(timezone)
|
*
|
||||||
dayjsbr.extend(weekOfYear)
|
* dayjsbr.ts
|
||||||
dayjsbr.extend(isSameOrBefore)
|
*import dayjs from "dayjs"
|
||||||
dayjsbr.extend(isSameOrAfter)
|
*import "dayjs/locale/pt-br"
|
||||||
dayjsbr.extend(minMax)
|
*import duration from "dayjs/plugin/duration"
|
||||||
dayjsbr.extend(relativeTime)
|
*import isSameOrAfter from "dayjs/plugin/isSameOrAfter"
|
||||||
dayjsbr.extend(duration)
|
*import isSameOrBefore from "dayjs/plugin/isSameOrBefore"
|
||||||
dayjsbr.locale("pt-br")
|
*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"
|
||||||
|
|
||||||
export { dayjsbr }
|
|
||||||
|
*/
|
||||||
|
export const criarDayjsbr = (
|
||||||
|
edayjs: typeof dayjs,
|
||||||
|
op: {
|
||||||
|
duration: typeof duration
|
||||||
|
isSameOrAfter: typeof isSameOrAfter
|
||||||
|
isSameOrBefore: typeof isSameOrBefore
|
||||||
|
minMax: typeof minMax
|
||||||
|
relativeTime: typeof relativeTime
|
||||||
|
timezone: typeof timezone
|
||||||
|
utc: typeof utc
|
||||||
|
weekOfYear: typeof weekOfYear
|
||||||
|
},
|
||||||
|
) => {
|
||||||
|
edayjs.extend(op.utc)
|
||||||
|
edayjs.extend(op.timezone)
|
||||||
|
edayjs.extend(op.weekOfYear)
|
||||||
|
edayjs.extend(op.isSameOrBefore)
|
||||||
|
edayjs.extend(op.isSameOrAfter)
|
||||||
|
edayjs.extend(op.minMax)
|
||||||
|
edayjs.extend(op.relativeTime)
|
||||||
|
edayjs.extend(op.duration)
|
||||||
|
edayjs.locale("pt-br")
|
||||||
|
|
||||||
|
return edayjs
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ export const tsup_config_front: Options = {
|
||||||
minify: true, // Recomendado para builds de produção
|
minify: true, // Recomendado para builds de produção
|
||||||
platform: "browser",
|
platform: "browser",
|
||||||
outExtension: () => ({ js: ".mjs" }),
|
outExtension: () => ({ js: ".mjs" }),
|
||||||
noExternal: [/./]
|
external: ["dayjs"],
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exporta a configuração padrão usando defineConfig
|
// Exporta a configuração padrão usando defineConfig
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue