Compare commits
38 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d0d99faa50 | |||
| e1694195cc | |||
| 59576cef8b | |||
| 2ead837b0a | |||
| 6b8d30fb30 | |||
| c8bc47d515 | |||
| 0cbe901499 | |||
| 84880fff0c | |||
| 5b1b6e3c25 | |||
| 3f8faa35a2 | |||
| dff25ab347 | |||
| 83f5d5353c | |||
| 55be0a0712 | |||
| 326aea91a6 | |||
| 484f2f4593 | |||
| ef34df1657 | |||
| 01bc1d0eec | |||
| ac08b31b3d | |||
| 30a28b7ecc | |||
| db39ae48f0 | |||
| 24407479cf | |||
| e6fa9640bc | |||
| 8674c1b8da | |||
| 61fcd8be82 | |||
| a88b53e460 | |||
| 10a3312418 | |||
| 14396d5ec5 | |||
| 2157b5d8b5 | |||
| 5dfc211852 | |||
| 4daa78f698 | |||
| da38648a35 | |||
| 68a4d2a496 | |||
| 8eafd7c943 | |||
| f02f1029b3 | |||
| bdab1f75b1 | |||
| a75b70dddd | |||
| 3b37c764bd | |||
| d9dec53a66 |
16 changed files with 1170 additions and 112 deletions
12
build.config.ts
Normal file
12
build.config.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { defineBuildConfig } from 'unbuild'
|
||||
|
||||
// pnpm exec unbuild
|
||||
|
||||
export default defineBuildConfig({
|
||||
entries: ['src/index'],
|
||||
clean: true,
|
||||
declaration: true,
|
||||
rollup: {
|
||||
emitCJS: true,
|
||||
},
|
||||
})
|
||||
|
|
@ -43,6 +43,7 @@ var operadores = /* @__PURE__ */ ((operadores2) => {
|
|||
operadores2["<="] = "<=";
|
||||
operadores2["like"] = "like";
|
||||
operadores2["in"] = "in";
|
||||
operadores2["isNull"] = "isNull";
|
||||
return operadores2;
|
||||
})(operadores || {});
|
||||
const zOperadores = import_zod.default.enum([
|
||||
|
|
@ -53,7 +54,8 @@ const zOperadores = import_zod.default.enum([
|
|||
"<",
|
||||
"<=",
|
||||
"like",
|
||||
"in"
|
||||
"in",
|
||||
"isNull"
|
||||
]);
|
||||
const zFiltro = import_zod.default.object({
|
||||
coluna: import_zod.default.string(),
|
||||
|
|
|
|||
|
|
@ -28,19 +28,20 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var dayjs_exports = {};
|
||||
__export(dayjs_exports, {
|
||||
dayjsbr: () => import_dayjs.default
|
||||
dayjsbr: () => dayjsbr
|
||||
});
|
||||
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"));
|
||||
var import_duration = __toESM(require("dayjs/plugin/duration.js"));
|
||||
var import_isSameOrAfter = __toESM(require("dayjs/plugin/isSameOrAfter.js"));
|
||||
var import_isSameOrBefore = __toESM(require("dayjs/plugin/isSameOrBefore.js"));
|
||||
var import_minMax = __toESM(require("dayjs/plugin/minMax.js"));
|
||||
var import_relativeTime = __toESM(require("dayjs/plugin/relativeTime.js"));
|
||||
var import_timezone = __toESM(require("dayjs/plugin/timezone.js"));
|
||||
var import_utc = __toESM(require("dayjs/plugin/utc.js"));
|
||||
var import_weekOfYear = __toESM(require("dayjs/plugin/weekOfYear.js"));
|
||||
var import_pt_br = require("dayjs/locale/pt-br.js");
|
||||
import_dayjs.default.locale("pt-br");
|
||||
import_dayjs.default.extend(import_utc.default);
|
||||
import_dayjs.default.extend(import_timezone.default);
|
||||
import_dayjs.default.extend(import_weekOfYear.default);
|
||||
|
|
@ -49,7 +50,7 @@ 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 dayjsbr = import_dayjs.default;
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
dayjsbr
|
||||
|
|
|
|||
|
|
@ -22,13 +22,16 @@ __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("./graficosPilao"), module.exports);
|
||||
__reExport(index_exports, require("./extensoes"), module.exports);
|
||||
__reExport(index_exports, require("./local"), module.exports);
|
||||
__reExport(index_exports, require("./logger"), module.exports);
|
||||
__reExport(index_exports, require("./logger"), module.exports);
|
||||
__reExport(index_exports, require("./postgres"), module.exports);
|
||||
__reExport(index_exports, require("./produtos"), module.exports);
|
||||
__reExport(index_exports, require("./testes-de-variaveis"), module.exports);
|
||||
__reExport(index_exports, require("./texto_busca"), module.exports);
|
||||
__reExport(index_exports, require("./tipagemRotas"), module.exports);
|
||||
__reExport(index_exports, require("./tipagemRotas"), module.exports);
|
||||
__reExport(index_exports, require("./unidades_medida"), module.exports);
|
||||
__reExport(index_exports, require("./uuid"), module.exports);
|
||||
__reExport(index_exports, require("./variaveisComuns"), module.exports);
|
||||
|
|
@ -41,13 +44,16 @@ __reExport(index_exports, require("./variaveisComuns"), module.exports);
|
|||
...require("./dayjs"),
|
||||
...require("./ecosistema"),
|
||||
...require("./extensoes"),
|
||||
...require("./graficosPilao"),
|
||||
...require("./extensoes"),
|
||||
...require("./local"),
|
||||
...require("./logger"),
|
||||
...require("./logger"),
|
||||
...require("./postgres"),
|
||||
...require("./produtos"),
|
||||
...require("./testes-de-variaveis"),
|
||||
...require("./texto_busca"),
|
||||
...require("./tipagemRotas"),
|
||||
...require("./tipagemRotas"),
|
||||
...require("./unidades_medida"),
|
||||
...require("./uuid"),
|
||||
...require("./variaveisComuns")
|
||||
|
|
|
|||
|
|
@ -16,22 +16,17 @@ var __copyProps = (to, from, except, desc) => {
|
|||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var graficosPilao_exports = {};
|
||||
__export(graficosPilao_exports, {
|
||||
graficos_pilao: () => graficos_pilao
|
||||
var produtos_exports = {};
|
||||
__export(produtos_exports, {
|
||||
Produtos: () => Produtos
|
||||
});
|
||||
module.exports = __toCommonJS(graficosPilao_exports);
|
||||
const graficos_pilao = {
|
||||
Condicionantes: {
|
||||
grafico: "condicionantes-criadas",
|
||||
titulo: "Condicionantes Criadas"
|
||||
},
|
||||
Licen\u00E7as: {
|
||||
grafico: "licencas-criadas",
|
||||
titulo: "Licen\xE7as Criadas"
|
||||
}
|
||||
};
|
||||
module.exports = __toCommonJS(produtos_exports);
|
||||
var Produtos = /* @__PURE__ */ ((Produtos2) => {
|
||||
Produtos2["e-licencie"] = "e-licencie";
|
||||
Produtos2["gov.e-licencie"] = "gov.e-licencie";
|
||||
return Produtos2;
|
||||
})(Produtos || {});
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
graficos_pilao
|
||||
Produtos
|
||||
});
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
import z from 'zod';
|
||||
export { ManipulateType, default as dayjsbr } from 'dayjs';
|
||||
import dayjs from 'dayjs';
|
||||
export { Dayjs, ManipulateType } from 'dayjs';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
declare const aleatorio: (tamanho?: number) => string;
|
||||
|
|
@ -45,7 +46,8 @@ declare enum operadores {
|
|||
"<" = "<",
|
||||
"<=" = "<=",
|
||||
like = "like",
|
||||
in = "in"
|
||||
in = "in",
|
||||
isNull = "isNull"
|
||||
}
|
||||
type tipoFiltro = {
|
||||
coluna: string;
|
||||
|
|
@ -72,6 +74,7 @@ declare const zOperadores: z.ZodEnum<{
|
|||
"<=": "<=";
|
||||
like: "like";
|
||||
in: "in";
|
||||
isNull: "isNull";
|
||||
}>;
|
||||
declare const zFiltro: z.ZodObject<{
|
||||
coluna: z.ZodString;
|
||||
|
|
@ -85,10 +88,13 @@ declare const zFiltro: z.ZodObject<{
|
|||
"<=": "<=";
|
||||
like: "like";
|
||||
in: "in";
|
||||
isNull: "isNull";
|
||||
}>;
|
||||
ou: z.ZodOptional<z.ZodBoolean>;
|
||||
}, z.core.$strip>;
|
||||
|
||||
declare const dayjsbr: typeof dayjs;
|
||||
|
||||
declare const cdn_carro_de_boi = "https://carro-de-boi-idz-one.b-cdn.net";
|
||||
|
||||
type tiposArquivo = "imagem" | "documento" | "vídeo" | "outros";
|
||||
|
|
@ -104,13 +110,6 @@ declare const extensoes: {
|
|||
*/
|
||||
declare const tipoArquivo: (nomeArquivo: string | null | undefined) => tiposArquivo;
|
||||
|
||||
declare const graficos_pilao: {
|
||||
[k: string]: {
|
||||
grafico: string;
|
||||
titulo: string;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* LocalStorage Tipado
|
||||
* Lê ou grava um valor no localStorage, mantendo o tipo genérico <T>.
|
||||
|
|
@ -178,6 +177,11 @@ declare const objetoPg: (entrada: {
|
|||
[k: string]: string | boolean | null | undefined | number;
|
||||
};
|
||||
|
||||
declare enum Produtos {
|
||||
"e-licencie" = "e-licencie",
|
||||
"gov.e-licencie" = "gov.e-licencie"
|
||||
}
|
||||
|
||||
declare const umaFuncao: () => string;
|
||||
|
||||
declare const umaVariavel = "Ol\u00E1 Mundo! (vari\u00E1vel)";
|
||||
|
|
@ -308,4 +312,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 { Produtos, TipagemRotas, type TipoLoggerSessao, aleatorio, cacheM, cacheMFixo, cacheMemoria, camposComuns, cdn_carro_de_boi, dayjsbr, defineCwd, erUuid, esperar, extensoes, 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
13
package.json
13
package.json
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"name": "p-comuns",
|
||||
"version": "0.268.0",
|
||||
"version": "0.296.0",
|
||||
"description": "",
|
||||
"main": "./dist-back/index.js",
|
||||
"main": "./dist-front/index.mjs",
|
||||
"module": "./dist-front/index.mjs",
|
||||
"types": "./dist-front/index.d.mts",
|
||||
"exports": {
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"scripts": {
|
||||
"biome": "pnpm exec biome check --write",
|
||||
"check": "pnpm run biome && npx tsc --noEmit",
|
||||
"build": "npm --no-git-tag-version version minor && pnpm run biome && tsup --config ./tsup/tsup.config.interno.ts && pnpm run pacote",
|
||||
"build": "npm --no-git-tag-version version minor && pnpm run biome && tsup --config ./tsup/tsup.config.ts && pnpm run pacote",
|
||||
"teste": "npx vitest run src/testes/TipagemRotas.test.ts",
|
||||
"pacote": "npm pack && npm pack && mv $(npm pack --silent) pacote.tgz"
|
||||
},
|
||||
|
|
@ -36,6 +36,13 @@
|
|||
"@types/node": "^20.19.22",
|
||||
"tsup": "8.5.0",
|
||||
"typescript": "~5.9.3",
|
||||
"unbuild": "^3.6.1",
|
||||
"vitest": "^3.2.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"cross-fetch": "4.1.0",
|
||||
"dayjs": "^1.11.18",
|
||||
"uuid": "^11.1.0",
|
||||
"zod": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
BIN
pacote.tgz
BIN
pacote.tgz
Binary file not shown.
1079
pnpm-lock.yaml
generated
1079
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -9,6 +9,7 @@ export enum operadores {
|
|||
"<=" = "<=",
|
||||
like = "like",
|
||||
in = "in",
|
||||
isNull = "isNull",
|
||||
}
|
||||
|
||||
export type tipoFiltro = {
|
||||
|
|
@ -38,6 +39,7 @@ export const zOperadores = z.enum([
|
|||
"<=",
|
||||
"like",
|
||||
"in",
|
||||
"isNull",
|
||||
])
|
||||
|
||||
export const zFiltro = z.object({
|
||||
|
|
|
|||
43
src/dayjs.ts
43
src/dayjs.ts
|
|
@ -1,24 +1,27 @@
|
|||
import dayjsbr from "dayjs"
|
||||
import dayjs, { 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"
|
||||
|
||||
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")
|
||||
import duration from "dayjs/plugin/duration.js"
|
||||
import isSameOrAfter from "dayjs/plugin/isSameOrAfter.js"
|
||||
import isSameOrBefore from "dayjs/plugin/isSameOrBefore.js"
|
||||
import minMax from "dayjs/plugin/minMax.js"
|
||||
import relativeTime from "dayjs/plugin/relativeTime.js"
|
||||
import timezone from "dayjs/plugin/timezone.js"
|
||||
import utc from "dayjs/plugin/utc.js"
|
||||
import weekOfYear from "dayjs/plugin/weekOfYear.js"
|
||||
import "dayjs/locale/pt-br.js"
|
||||
dayjs.locale("pt-br")
|
||||
|
||||
export { dayjsbr }
|
||||
dayjs.extend(utc)
|
||||
dayjs.extend(timezone)
|
||||
dayjs.extend(weekOfYear)
|
||||
dayjs.extend(isSameOrBefore)
|
||||
dayjs.extend(isSameOrAfter)
|
||||
dayjs.extend(minMax)
|
||||
dayjs.extend(relativeTime)
|
||||
dayjs.extend(duration)
|
||||
|
||||
export const dayjsbr = dayjs
|
||||
|
||||
export type { Dayjs }
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
export const graficos_pilao: {
|
||||
[k: string]: { grafico: string; titulo: string }
|
||||
} = {
|
||||
Condicionantes: {
|
||||
grafico: "condicionantes-criadas",
|
||||
titulo: "Condicionantes Criadas",
|
||||
},
|
||||
Licenças: {
|
||||
grafico: "licencas-criadas",
|
||||
titulo: "Licenças Criadas",
|
||||
},
|
||||
}
|
||||
|
|
@ -5,13 +5,16 @@ export * from "./consulta"
|
|||
export * from "./dayjs"
|
||||
export * from "./ecosistema"
|
||||
export * from "./extensoes"
|
||||
export * from "./graficosPilao"
|
||||
export * from "./extensoes"
|
||||
export * from "./local"
|
||||
export * from "./logger"
|
||||
export * from "./logger"
|
||||
export * from "./postgres"
|
||||
export * from "./produtos"
|
||||
export * from "./testes-de-variaveis"
|
||||
export * from "./texto_busca"
|
||||
export * from "./tipagemRotas"
|
||||
export * from "./tipagemRotas"
|
||||
export * from "./unidades_medida"
|
||||
export * from "./uuid"
|
||||
export * from "./variaveisComuns"
|
||||
|
|
|
|||
4
src/produtos.ts
Normal file
4
src/produtos.ts
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
export enum Produtos {
|
||||
"e-licencie" = "e-licencie",
|
||||
"gov.e-licencie" = "gov.e-licencie",
|
||||
}
|
||||
|
|
@ -16,8 +16,9 @@ export const tsup_config_front: Options = {
|
|||
sourcemap: false,
|
||||
minify: true, // Recomendado para builds de produção
|
||||
platform: "browser",
|
||||
external: ["fs", "path", "os", "stream", "module", "util"],
|
||||
external: ['dayjs'],
|
||||
outExtension: () => ({ js: ".mjs" }),
|
||||
shims: false,
|
||||
}
|
||||
|
||||
// Exporta a configuração padrão usando defineConfig
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue