mais ajustes

This commit is contained in:
Luiz Silva 2025-10-27 12:39:58 -03:00
parent 14396d5ec5
commit 10a3312418
7 changed files with 59 additions and 39 deletions

26
dist/index.cjs vendored
View file

@ -1,7 +1,7 @@
'use strict'; 'use strict';
const z = require('zod'); const z = require('zod');
const dayjsbr = require('dayjs'); const dayjs = require('dayjs');
const duration = require('dayjs/plugin/duration.js'); const duration = require('dayjs/plugin/duration.js');
const isSameOrAfter = require('dayjs/plugin/isSameOrAfter.js'); const isSameOrAfter = require('dayjs/plugin/isSameOrAfter.js');
const isSameOrBefore = require('dayjs/plugin/isSameOrBefore.js'); const isSameOrBefore = require('dayjs/plugin/isSameOrBefore.js');
@ -10,13 +10,14 @@ const relativeTime = require('dayjs/plugin/relativeTime.js');
const timezone = require('dayjs/plugin/timezone.js'); const timezone = require('dayjs/plugin/timezone.js');
const utc = require('dayjs/plugin/utc.js'); const utc = require('dayjs/plugin/utc.js');
const weekOfYear = require('dayjs/plugin/weekOfYear.js'); const weekOfYear = require('dayjs/plugin/weekOfYear.js');
require('dayjs/locale/pt-br.js');
const crossFetch = require('cross-fetch'); const crossFetch = require('cross-fetch');
const uuid$1 = require('uuid'); const uuid$1 = require('uuid');
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; } function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
const z__default = /*#__PURE__*/_interopDefaultCompat(z); const z__default = /*#__PURE__*/_interopDefaultCompat(z);
const dayjsbr__default = /*#__PURE__*/_interopDefaultCompat(dayjsbr); const dayjs__default = /*#__PURE__*/_interopDefaultCompat(dayjs);
const duration__default = /*#__PURE__*/_interopDefaultCompat(duration); const duration__default = /*#__PURE__*/_interopDefaultCompat(duration);
const isSameOrAfter__default = /*#__PURE__*/_interopDefaultCompat(isSameOrAfter); const isSameOrAfter__default = /*#__PURE__*/_interopDefaultCompat(isSameOrAfter);
const isSameOrBefore__default = /*#__PURE__*/_interopDefaultCompat(isSameOrBefore); const isSameOrBefore__default = /*#__PURE__*/_interopDefaultCompat(isSameOrBefore);
@ -100,14 +101,16 @@ const zFiltro = z__default.object({
ou: z__default.boolean().optional() ou: z__default.boolean().optional()
}); });
dayjsbr__default.extend(utc__default); dayjs__default.locale("pt-br");
dayjsbr__default.extend(timezone__default); dayjs__default.extend(utc__default);
dayjsbr__default.extend(weekOfYear__default); dayjs__default.extend(timezone__default);
dayjsbr__default.extend(isSameOrBefore__default); dayjs__default.extend(weekOfYear__default);
dayjsbr__default.extend(isSameOrAfter__default); dayjs__default.extend(isSameOrBefore__default);
dayjsbr__default.extend(minMax__default); dayjs__default.extend(isSameOrAfter__default);
dayjsbr__default.extend(relativeTime__default); dayjs__default.extend(minMax__default);
dayjsbr__default.extend(duration__default); dayjs__default.extend(relativeTime__default);
dayjs__default.extend(duration__default);
const dayjsbr = dayjs__default;
const cdn_carro_de_boi = "https://carro-de-boi-idz-one.b-cdn.net"; const cdn_carro_de_boi = "https://carro-de-boi-idz-one.b-cdn.net";
@ -558,7 +561,7 @@ const uuidV3 = (chave, grupo) => {
const uuidV4 = uuid$1.v4; const uuidV4 = uuid$1.v4;
const uuid = uuidV4; const uuid = uuidV4;
exports.dayjsbr = dayjsbr__default; exports.dayjs = dayjs__default;
exports.TipagemRotas = TipagemRotas; exports.TipagemRotas = TipagemRotas;
exports.aleatorio = aleatorio; exports.aleatorio = aleatorio;
exports.cacheM = cacheM; exports.cacheM = cacheM;
@ -566,6 +569,7 @@ exports.cacheMFixo = cacheMFixo;
exports.cacheMemoria = cacheMemoria; exports.cacheMemoria = cacheMemoria;
exports.camposComuns = camposComuns; exports.camposComuns = camposComuns;
exports.cdn_carro_de_boi = cdn_carro_de_boi; exports.cdn_carro_de_boi = cdn_carro_de_boi;
exports.dayjsbr = dayjsbr;
exports.defineCwd = defineCwd; exports.defineCwd = defineCwd;
exports.erUuid = erUuid; exports.erUuid = erUuid;
exports.esperar = esperar; exports.esperar = esperar;

7
dist/index.d.cts vendored
View file

@ -1,5 +1,6 @@
import z from 'zod'; import z from 'zod';
export { ManipulateType, default as dayjsbr } from 'dayjs'; import dayjs from 'dayjs';
export { ManipulateType, default as dayjs } from 'dayjs';
import { v4 } from 'uuid'; import { v4 } from 'uuid';
declare const aleatorio: (tamanho?: number) => string; declare const aleatorio: (tamanho?: number) => string;
@ -89,6 +90,8 @@ declare const zFiltro: z.ZodObject<{
ou: z.ZodOptional<z.ZodBoolean>; ou: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>; }, z.core.$strip>;
declare const dayjsbr: 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,5 +311,5 @@ declare const nomeVariavel: (v: {
[key: string]: any; [key: string]: any;
}) => string; }) => string;
export { TipagemRotas, aleatorio, cacheM, cacheMFixo, cacheMemoria, camposComuns, cdn_carro_de_boi, defineCwd, erUuid, esperar, extensoes, graficos_pilao, localValor, logger, nomeVariavel, objetoPg, operadores, paraObjetoRegistroPg, pgObjeto, postLogger, siglas_unidades_medida, texto_busca, tipoArquivo, tipoUsuarioResiduos, tx, umaFuncao, umaVariavel, unidades_medida, uuid, uuidV3, uuidV4, uuid_null, validarUuid, verCacheM, zFiltro, zOperadores }; export { TipagemRotas, aleatorio, cacheM, cacheMFixo, cacheMemoria, camposComuns, cdn_carro_de_boi, dayjsbr, defineCwd, erUuid, esperar, extensoes, graficos_pilao, localValor, logger, nomeVariavel, objetoPg, operadores, paraObjetoRegistroPg, pgObjeto, postLogger, siglas_unidades_medida, texto_busca, tipoArquivo, tipoUsuarioResiduos, tx, umaFuncao, umaVariavel, unidades_medida, uuid, uuidV3, uuidV4, uuid_null, validarUuid, verCacheM, zFiltro, zOperadores };
export type { TipoLoggerSessao, interfaceConsulta, tipoFiltro, tipoLogger, tipoLoggerLog, tipoLokiObjeto }; export type { TipoLoggerSessao, interfaceConsulta, tipoFiltro, tipoLogger, tipoLoggerLog, tipoLokiObjeto };

7
dist/index.d.mts vendored
View file

@ -1,5 +1,6 @@
import z from 'zod'; import z from 'zod';
export { ManipulateType, default as dayjsbr } from 'dayjs'; import dayjs from 'dayjs';
export { ManipulateType, default as dayjs } from 'dayjs';
import { v4 } from 'uuid'; import { v4 } from 'uuid';
declare const aleatorio: (tamanho?: number) => string; declare const aleatorio: (tamanho?: number) => string;
@ -89,6 +90,8 @@ declare const zFiltro: z.ZodObject<{
ou: z.ZodOptional<z.ZodBoolean>; ou: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>; }, z.core.$strip>;
declare const dayjsbr: 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,5 +311,5 @@ declare const nomeVariavel: (v: {
[key: string]: any; [key: string]: any;
}) => string; }) => string;
export { TipagemRotas, aleatorio, cacheM, cacheMFixo, cacheMemoria, camposComuns, cdn_carro_de_boi, defineCwd, erUuid, esperar, extensoes, graficos_pilao, localValor, logger, nomeVariavel, objetoPg, operadores, paraObjetoRegistroPg, pgObjeto, postLogger, siglas_unidades_medida, texto_busca, tipoArquivo, tipoUsuarioResiduos, tx, umaFuncao, umaVariavel, unidades_medida, uuid, uuidV3, uuidV4, uuid_null, validarUuid, verCacheM, zFiltro, zOperadores }; export { TipagemRotas, aleatorio, cacheM, cacheMFixo, cacheMemoria, camposComuns, cdn_carro_de_boi, dayjsbr, defineCwd, erUuid, esperar, extensoes, graficos_pilao, localValor, logger, nomeVariavel, objetoPg, operadores, paraObjetoRegistroPg, pgObjeto, postLogger, siglas_unidades_medida, texto_busca, tipoArquivo, tipoUsuarioResiduos, tx, umaFuncao, umaVariavel, unidades_medida, uuid, uuidV3, uuidV4, uuid_null, validarUuid, verCacheM, zFiltro, zOperadores };
export type { TipoLoggerSessao, interfaceConsulta, tipoFiltro, tipoLogger, tipoLoggerLog, tipoLokiObjeto }; export type { TipoLoggerSessao, interfaceConsulta, tipoFiltro, tipoLogger, tipoLoggerLog, tipoLokiObjeto };

7
dist/index.d.ts vendored
View file

@ -1,5 +1,6 @@
import z from 'zod'; import z from 'zod';
export { ManipulateType, default as dayjsbr } from 'dayjs'; import dayjs from 'dayjs';
export { ManipulateType, default as dayjs } from 'dayjs';
import { v4 } from 'uuid'; import { v4 } from 'uuid';
declare const aleatorio: (tamanho?: number) => string; declare const aleatorio: (tamanho?: number) => string;
@ -89,6 +90,8 @@ declare const zFiltro: z.ZodObject<{
ou: z.ZodOptional<z.ZodBoolean>; ou: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>; }, z.core.$strip>;
declare const dayjsbr: 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,5 +311,5 @@ declare const nomeVariavel: (v: {
[key: string]: any; [key: string]: any;
}) => string; }) => string;
export { TipagemRotas, aleatorio, cacheM, cacheMFixo, cacheMemoria, camposComuns, cdn_carro_de_boi, defineCwd, erUuid, esperar, extensoes, graficos_pilao, localValor, logger, nomeVariavel, objetoPg, operadores, paraObjetoRegistroPg, pgObjeto, postLogger, siglas_unidades_medida, texto_busca, tipoArquivo, tipoUsuarioResiduos, tx, umaFuncao, umaVariavel, unidades_medida, uuid, uuidV3, uuidV4, uuid_null, validarUuid, verCacheM, zFiltro, zOperadores }; export { TipagemRotas, aleatorio, cacheM, cacheMFixo, cacheMemoria, camposComuns, cdn_carro_de_boi, dayjsbr, defineCwd, erUuid, esperar, extensoes, graficos_pilao, localValor, logger, nomeVariavel, objetoPg, operadores, paraObjetoRegistroPg, pgObjeto, postLogger, siglas_unidades_medida, texto_busca, tipoArquivo, tipoUsuarioResiduos, tx, umaFuncao, umaVariavel, unidades_medida, uuid, uuidV3, uuidV4, uuid_null, validarUuid, verCacheM, zFiltro, zOperadores };
export type { TipoLoggerSessao, interfaceConsulta, tipoFiltro, tipoLogger, tipoLoggerLog, tipoLokiObjeto }; export type { TipoLoggerSessao, interfaceConsulta, tipoFiltro, tipoLogger, tipoLoggerLog, tipoLokiObjeto };

25
dist/index.mjs vendored
View file

@ -1,6 +1,6 @@
import z from 'zod'; import z from 'zod';
import dayjsbr from 'dayjs'; import dayjs from 'dayjs';
export { default as dayjsbr } from 'dayjs'; export { default as dayjs } from 'dayjs';
import duration from 'dayjs/plugin/duration.js'; import duration from 'dayjs/plugin/duration.js';
import isSameOrAfter from 'dayjs/plugin/isSameOrAfter.js'; import isSameOrAfter from 'dayjs/plugin/isSameOrAfter.js';
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore.js'; import isSameOrBefore from 'dayjs/plugin/isSameOrBefore.js';
@ -9,6 +9,7 @@ import relativeTime from 'dayjs/plugin/relativeTime.js';
import timezone from 'dayjs/plugin/timezone.js'; import timezone from 'dayjs/plugin/timezone.js';
import utc from 'dayjs/plugin/utc.js'; import utc from 'dayjs/plugin/utc.js';
import weekOfYear from 'dayjs/plugin/weekOfYear.js'; import weekOfYear from 'dayjs/plugin/weekOfYear.js';
import 'dayjs/locale/pt-br.js';
import crossFetch from 'cross-fetch'; import crossFetch from 'cross-fetch';
import { v4, v3, NIL } from 'uuid'; import { v4, v3, NIL } from 'uuid';
@ -85,14 +86,16 @@ const zFiltro = z.object({
ou: z.boolean().optional() ou: z.boolean().optional()
}); });
dayjsbr.extend(utc); dayjs.locale("pt-br");
dayjsbr.extend(timezone); dayjs.extend(utc);
dayjsbr.extend(weekOfYear); dayjs.extend(timezone);
dayjsbr.extend(isSameOrBefore); dayjs.extend(weekOfYear);
dayjsbr.extend(isSameOrAfter); dayjs.extend(isSameOrBefore);
dayjsbr.extend(minMax); dayjs.extend(isSameOrAfter);
dayjsbr.extend(relativeTime); dayjs.extend(minMax);
dayjsbr.extend(duration); dayjs.extend(relativeTime);
dayjs.extend(duration);
const dayjsbr = dayjs;
const cdn_carro_de_boi = "https://carro-de-boi-idz-one.b-cdn.net"; const cdn_carro_de_boi = "https://carro-de-boi-idz-one.b-cdn.net";
@ -543,4 +546,4 @@ const uuidV3 = (chave, grupo) => {
const uuidV4 = v4; const uuidV4 = v4;
const uuid = uuidV4; const uuid = uuidV4;
export { TipagemRotas, aleatorio, cacheM, cacheMFixo, cacheMemoria, camposComuns, cdn_carro_de_boi, defineCwd, erUuid, esperar, extensoes, graficos_pilao, localValor, logger, nomeVariavel, objetoPg, operadores, paraObjetoRegistroPg, pgObjeto, postLogger, siglas_unidades_medida, texto_busca, tipoArquivo, tipoUsuarioResiduos, tx, umaFuncao, umaVariavel, unidades_medida, uuid, uuidV3, uuidV4, uuid_null, validarUuid, verCacheM, zFiltro, zOperadores }; export { TipagemRotas, aleatorio, cacheM, cacheMFixo, cacheMemoria, camposComuns, cdn_carro_de_boi, dayjsbr, defineCwd, erUuid, esperar, extensoes, graficos_pilao, localValor, logger, nomeVariavel, objetoPg, operadores, paraObjetoRegistroPg, pgObjeto, postLogger, siglas_unidades_medida, texto_busca, tipoArquivo, tipoUsuarioResiduos, tx, umaFuncao, umaVariavel, unidades_medida, uuid, uuidV3, uuidV4, uuid_null, validarUuid, verCacheM, zFiltro, zOperadores };

View file

@ -1,6 +1,6 @@
{ {
"name": "p-comuns", "name": "p-comuns",
"version": "0.274.0", "version": "0.275.0",
"description": "", "description": "",
"main": "./dist/index.cjs", "main": "./dist/index.cjs",
"module": "./dist/index.mjs", "module": "./dist/index.mjs",

View file

@ -1,4 +1,4 @@
import dayjsbr from "dayjs" import dayjs from "dayjs"
export type { ManipulateType } from "dayjs" export type { ManipulateType } from "dayjs"
@ -10,14 +10,18 @@ import relativeTime from "dayjs/plugin/relativeTime.js"
import timezone from "dayjs/plugin/timezone.js" import timezone from "dayjs/plugin/timezone.js"
import utc from "dayjs/plugin/utc.js" import utc from "dayjs/plugin/utc.js"
import weekOfYear from "dayjs/plugin/weekOfYear.js" import weekOfYear from "dayjs/plugin/weekOfYear.js"
import "dayjs/locale/pt-br.js"
dayjs.locale("pt-br")
dayjsbr.extend(utc) dayjs.extend(utc)
dayjsbr.extend(timezone) dayjs.extend(timezone)
dayjsbr.extend(weekOfYear) dayjs.extend(weekOfYear)
dayjsbr.extend(isSameOrBefore) dayjs.extend(isSameOrBefore)
dayjsbr.extend(isSameOrAfter) dayjs.extend(isSameOrAfter)
dayjsbr.extend(minMax) dayjs.extend(minMax)
dayjsbr.extend(relativeTime) dayjs.extend(relativeTime)
dayjsbr.extend(duration) dayjs.extend(duration)
export { dayjsbr } export const dayjsbr = dayjs
export { dayjs }