Compare commits

..

No commits in common. "2df6b6a418fa9e2809b0415c6ddb614e9ca0650b" and "2cac8492fa548d5f3055a72a6e46d9355a87d25c" have entirely different histories.

7 changed files with 105 additions and 78 deletions

View file

@ -1,9 +1,7 @@
"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)
@ -17,40 +15,25 @@ var __copyProps = (to, from, except, desc) => {
}
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
criarDayjsbr: () => criarDayjsbr
});
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");
const criarDayjsbr = (edayjs, op) => {
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;
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
dayjsbr
criarDayjsbr
});

View file

@ -1,5 +1,13 @@
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';
declare const aleatorio: (tamanho?: number) => string;
@ -89,6 +97,33 @@ declare const zFiltro: z.ZodObject<{
ou: z.ZodOptional<z.ZodBoolean>;
}, 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";
type tiposArquivo = "imagem" | "documento" | "vídeo" | "outros";
@ -308,4 +343,4 @@ declare const nomeVariavel: (v: {
[key: string]: any;
}) => 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

View file

@ -1,6 +1,6 @@
{
"name": "p-comuns",
"version": "0.261.0",
"version": "0.258.0",
"description": "",
"main": "./dist-back/index.js",
"module": "./dist-front/index.mjs",

Binary file not shown.

View file

@ -1,24 +1,54 @@
import dayjsbr from "dayjs"
// dayjsbr.ts
import type dayjs 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"
import type duration from "dayjs/plugin/duration"
//import "dayjs/locale/pt-br"
import type isSameOrAfter from "dayjs/plugin/isSameOrAfter"
import type isSameOrBefore from "dayjs/plugin/isSameOrBefore"
import type minMax from "dayjs/plugin/minMax"
import type relativeTime from "dayjs/plugin/relativeTime"
import type timezone from "dayjs/plugin/timezone"
import type utc from "dayjs/plugin/utc"
import type 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")
/**
*
* 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"
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
}

View file

@ -17,7 +17,7 @@ export const tsup_config_front: Options = {
minify: true, // Recomendado para builds de produção
platform: "browser",
outExtension: () => ({ js: ".mjs" }),
noExternal: [/./]
external: ["dayjs"],
}
// Exporta a configuração padrão usando defineConfig