Compare commits
66 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 | |||
| b3057a7638 | |||
| 7ca0c11f6c | |||
| 4b7fe02ead | |||
| e24312ce83 | |||
| 2df6b6a418 | |||
| 42d5e978c9 | |||
| 2cac8492fa | |||
| 1d969c9b0d | |||
| 7e40a6e6c3 | |||
| 16706f7438 | |||
| d9c2b3580e | |||
| fa4b956698 | |||
| cb63a087fe | |||
| 428e82e14d | |||
| 9f17c1adba | |||
| d19d61dfc3 | |||
| 7f3c28ca1b | |||
| 8c8802d6f7 | |||
| 9dd2c4025b | |||
| 889148eb42 | |||
| 9a332853b6 | |||
| d5237fbf6e | |||
| 988466ef96 | |||
| 8952d472c4 | |||
| 5f32d43559 | |||
| 743539b7b6 | |||
| 064523b2bd | |||
| 4c2fc54be1 |
21 changed files with 1193 additions and 94 deletions
2
.env
2
.env
|
|
@ -1,2 +0,0 @@
|
||||||
PORTA = '5020'
|
|
||||||
PREFIXO = '/estaticos'
|
|
||||||
1
.npmignore
Normal file
1
.npmignore
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
*.tgz
|
||||||
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["<="] = "<=";
|
||||||
operadores2["like"] = "like";
|
operadores2["like"] = "like";
|
||||||
operadores2["in"] = "in";
|
operadores2["in"] = "in";
|
||||||
|
operadores2["isNull"] = "isNull";
|
||||||
return operadores2;
|
return operadores2;
|
||||||
})(operadores || {});
|
})(operadores || {});
|
||||||
const zOperadores = import_zod.default.enum([
|
const zOperadores = import_zod.default.enum([
|
||||||
|
|
@ -53,7 +54,8 @@ const zOperadores = import_zod.default.enum([
|
||||||
"<",
|
"<",
|
||||||
"<=",
|
"<=",
|
||||||
"like",
|
"like",
|
||||||
"in"
|
"in",
|
||||||
|
"isNull"
|
||||||
]);
|
]);
|
||||||
const zFiltro = import_zod.default.object({
|
const zFiltro = import_zod.default.object({
|
||||||
coluna: import_zod.default.string(),
|
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||||
var dayjs_exports = {};
|
var dayjs_exports = {};
|
||||||
__export(dayjs_exports, {
|
__export(dayjs_exports, {
|
||||||
dayjsbr: () => import_dayjs.default
|
dayjsbr: () => dayjsbr
|
||||||
});
|
});
|
||||||
module.exports = __toCommonJS(dayjs_exports);
|
module.exports = __toCommonJS(dayjs_exports);
|
||||||
var import_dayjs = __toESM(require("dayjs"));
|
var import_dayjs = __toESM(require("dayjs"));
|
||||||
var import_pt_br = require("dayjs/locale/pt-br");
|
var import_duration = __toESM(require("dayjs/plugin/duration.js"));
|
||||||
var import_duration = __toESM(require("dayjs/plugin/duration"));
|
var import_isSameOrAfter = __toESM(require("dayjs/plugin/isSameOrAfter.js"));
|
||||||
var import_isSameOrAfter = __toESM(require("dayjs/plugin/isSameOrAfter"));
|
var import_isSameOrBefore = __toESM(require("dayjs/plugin/isSameOrBefore.js"));
|
||||||
var import_isSameOrBefore = __toESM(require("dayjs/plugin/isSameOrBefore"));
|
var import_minMax = __toESM(require("dayjs/plugin/minMax.js"));
|
||||||
var import_minMax = __toESM(require("dayjs/plugin/minMax"));
|
var import_relativeTime = __toESM(require("dayjs/plugin/relativeTime.js"));
|
||||||
var import_relativeTime = __toESM(require("dayjs/plugin/relativeTime"));
|
var import_timezone = __toESM(require("dayjs/plugin/timezone.js"));
|
||||||
var import_timezone = __toESM(require("dayjs/plugin/timezone"));
|
var import_utc = __toESM(require("dayjs/plugin/utc.js"));
|
||||||
var import_utc = __toESM(require("dayjs/plugin/utc"));
|
var import_weekOfYear = __toESM(require("dayjs/plugin/weekOfYear.js"));
|
||||||
var import_weekOfYear = __toESM(require("dayjs/plugin/weekOfYear"));
|
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_utc.default);
|
||||||
import_dayjs.default.extend(import_timezone.default);
|
import_dayjs.default.extend(import_timezone.default);
|
||||||
import_dayjs.default.extend(import_weekOfYear.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_minMax.default);
|
||||||
import_dayjs.default.extend(import_relativeTime.default);
|
import_dayjs.default.extend(import_relativeTime.default);
|
||||||
import_dayjs.default.extend(import_duration.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:
|
// Annotate the CommonJS export names for ESM import in node:
|
||||||
0 && (module.exports = {
|
0 && (module.exports = {
|
||||||
dayjsbr
|
dayjsbr
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,16 @@ __reExport(index_exports, require("./consulta"), module.exports);
|
||||||
__reExport(index_exports, require("./dayjs"), module.exports);
|
__reExport(index_exports, require("./dayjs"), module.exports);
|
||||||
__reExport(index_exports, require("./ecosistema"), module.exports);
|
__reExport(index_exports, require("./ecosistema"), module.exports);
|
||||||
__reExport(index_exports, require("./extensoes"), 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("./local"), module.exports);
|
||||||
__reExport(index_exports, require("./logger"), 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("./postgres"), module.exports);
|
||||||
|
__reExport(index_exports, require("./produtos"), module.exports);
|
||||||
__reExport(index_exports, require("./testes-de-variaveis"), module.exports);
|
__reExport(index_exports, require("./testes-de-variaveis"), module.exports);
|
||||||
__reExport(index_exports, require("./texto_busca"), 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("./tipagemRotas"), module.exports);
|
||||||
__reExport(index_exports, require("./unidades_medida"), module.exports);
|
__reExport(index_exports, require("./unidades_medida"), module.exports);
|
||||||
__reExport(index_exports, require("./uuid"), module.exports);
|
__reExport(index_exports, require("./uuid"), module.exports);
|
||||||
__reExport(index_exports, require("./variaveisComuns"), module.exports);
|
__reExport(index_exports, require("./variaveisComuns"), module.exports);
|
||||||
|
|
@ -41,13 +44,16 @@ __reExport(index_exports, require("./variaveisComuns"), module.exports);
|
||||||
...require("./dayjs"),
|
...require("./dayjs"),
|
||||||
...require("./ecosistema"),
|
...require("./ecosistema"),
|
||||||
...require("./extensoes"),
|
...require("./extensoes"),
|
||||||
...require("./graficosPilao"),
|
...require("./extensoes"),
|
||||||
...require("./local"),
|
...require("./local"),
|
||||||
...require("./logger"),
|
...require("./logger"),
|
||||||
|
...require("./logger"),
|
||||||
...require("./postgres"),
|
...require("./postgres"),
|
||||||
|
...require("./produtos"),
|
||||||
...require("./testes-de-variaveis"),
|
...require("./testes-de-variaveis"),
|
||||||
...require("./texto_busca"),
|
...require("./texto_busca"),
|
||||||
...require("./tipagemRotas"),
|
...require("./tipagemRotas"),
|
||||||
|
...require("./tipagemRotas"),
|
||||||
...require("./unidades_medida"),
|
...require("./unidades_medida"),
|
||||||
...require("./uuid"),
|
...require("./uuid"),
|
||||||
...require("./variaveisComuns")
|
...require("./variaveisComuns")
|
||||||
|
|
|
||||||
|
|
@ -16,22 +16,17 @@ var __copyProps = (to, from, except, desc) => {
|
||||||
return to;
|
return to;
|
||||||
};
|
};
|
||||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||||
var graficosPilao_exports = {};
|
var produtos_exports = {};
|
||||||
__export(graficosPilao_exports, {
|
__export(produtos_exports, {
|
||||||
graficos_pilao: () => graficos_pilao
|
Produtos: () => Produtos
|
||||||
});
|
});
|
||||||
module.exports = __toCommonJS(graficosPilao_exports);
|
module.exports = __toCommonJS(produtos_exports);
|
||||||
const graficos_pilao = {
|
var Produtos = /* @__PURE__ */ ((Produtos2) => {
|
||||||
Condicionantes: {
|
Produtos2["e-licencie"] = "e-licencie";
|
||||||
grafico: "condicionantes-criadas",
|
Produtos2["gov.e-licencie"] = "gov.e-licencie";
|
||||||
titulo: "Condicionantes Criadas"
|
return Produtos2;
|
||||||
},
|
})(Produtos || {});
|
||||||
Licen\u00E7as: {
|
|
||||||
grafico: "licencas-criadas",
|
|
||||||
titulo: "Licen\xE7as Criadas"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// 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 = {
|
||||||
graficos_pilao
|
Produtos
|
||||||
});
|
});
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import z from 'zod';
|
import z from 'zod';
|
||||||
export { ManipulateType, default as dayjsbr } from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
export { Dayjs, ManipulateType } from 'dayjs';
|
||||||
import { v4 } from 'uuid';
|
import { v4 } from 'uuid';
|
||||||
|
|
||||||
declare const aleatorio: (tamanho?: number) => string;
|
declare const aleatorio: (tamanho?: number) => string;
|
||||||
|
|
@ -45,7 +46,8 @@ declare enum operadores {
|
||||||
"<" = "<",
|
"<" = "<",
|
||||||
"<=" = "<=",
|
"<=" = "<=",
|
||||||
like = "like",
|
like = "like",
|
||||||
in = "in"
|
in = "in",
|
||||||
|
isNull = "isNull"
|
||||||
}
|
}
|
||||||
type tipoFiltro = {
|
type tipoFiltro = {
|
||||||
coluna: string;
|
coluna: string;
|
||||||
|
|
@ -72,6 +74,7 @@ declare const zOperadores: z.ZodEnum<{
|
||||||
"<=": "<=";
|
"<=": "<=";
|
||||||
like: "like";
|
like: "like";
|
||||||
in: "in";
|
in: "in";
|
||||||
|
isNull: "isNull";
|
||||||
}>;
|
}>;
|
||||||
declare const zFiltro: z.ZodObject<{
|
declare const zFiltro: z.ZodObject<{
|
||||||
coluna: z.ZodString;
|
coluna: z.ZodString;
|
||||||
|
|
@ -85,10 +88,13 @@ declare const zFiltro: z.ZodObject<{
|
||||||
"<=": "<=";
|
"<=": "<=";
|
||||||
like: "like";
|
like: "like";
|
||||||
in: "in";
|
in: "in";
|
||||||
|
isNull: "isNull";
|
||||||
}>;
|
}>;
|
||||||
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";
|
||||||
|
|
@ -104,13 +110,6 @@ declare const extensoes: {
|
||||||
*/
|
*/
|
||||||
declare const tipoArquivo: (nomeArquivo: string | null | undefined) => tiposArquivo;
|
declare const tipoArquivo: (nomeArquivo: string | null | undefined) => tiposArquivo;
|
||||||
|
|
||||||
declare const graficos_pilao: {
|
|
||||||
[k: string]: {
|
|
||||||
grafico: string;
|
|
||||||
titulo: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LocalStorage Tipado
|
* LocalStorage Tipado
|
||||||
* Lê ou grava um valor no localStorage, mantendo o tipo genérico <T>.
|
* 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;
|
[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 umaFuncao: () => string;
|
||||||
|
|
||||||
declare const umaVariavel = "Ol\u00E1 Mundo! (vari\u00E1vel)";
|
declare const umaVariavel = "Ol\u00E1 Mundo! (vari\u00E1vel)";
|
||||||
|
|
@ -308,4 +312,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 { 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
16
package.json
16
package.json
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"name": "p-comuns",
|
"name": "p-comuns",
|
||||||
"version": "0.246.0",
|
"version": "0.296.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "./dist-back/index.js",
|
"main": "./dist-front/index.mjs",
|
||||||
"module": "./dist-front/index.mjs",
|
"module": "./dist-front/index.mjs",
|
||||||
"types": "./dist-front/index.d.mts",
|
"types": "./dist-front/index.d.mts",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|
@ -15,8 +15,9 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"biome": "pnpm exec biome check --write",
|
"biome": "pnpm exec biome check --write",
|
||||||
"check": "pnpm run biome && npx tsc --noEmit",
|
"check": "pnpm run biome && npx tsc --noEmit",
|
||||||
"build": "npm --no-git-tag-version version minor && pnpm run biome && tsup --config ./tsup/tsup.config.ts",
|
"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"
|
"teste": "npx vitest run src/testes/TipagemRotas.test.ts",
|
||||||
|
"pacote": "npm pack && npm pack && mv $(npm pack --silent) pacote.tgz"
|
||||||
},
|
},
|
||||||
"author": {
|
"author": {
|
||||||
"name": "AZTECA SOFTWARE LTDA",
|
"name": "AZTECA SOFTWARE LTDA",
|
||||||
|
|
@ -35,6 +36,13 @@
|
||||||
"@types/node": "^20.19.22",
|
"@types/node": "^20.19.22",
|
||||||
"tsup": "8.5.0",
|
"tsup": "8.5.0",
|
||||||
"typescript": "~5.9.3",
|
"typescript": "~5.9.3",
|
||||||
|
"unbuild": "^3.6.1",
|
||||||
"vitest": "^3.2.4"
|
"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
Normal file
BIN
pacote.tgz
Normal file
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",
|
like = "like",
|
||||||
in = "in",
|
in = "in",
|
||||||
|
isNull = "isNull",
|
||||||
}
|
}
|
||||||
|
|
||||||
export type tipoFiltro = {
|
export type tipoFiltro = {
|
||||||
|
|
@ -38,6 +39,7 @@ export const zOperadores = z.enum([
|
||||||
"<=",
|
"<=",
|
||||||
"like",
|
"like",
|
||||||
"in",
|
"in",
|
||||||
|
"isNull",
|
||||||
])
|
])
|
||||||
|
|
||||||
export const zFiltro = z.object({
|
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"
|
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)
|
import duration from "dayjs/plugin/duration.js"
|
||||||
dayjsbr.extend(timezone)
|
import isSameOrAfter from "dayjs/plugin/isSameOrAfter.js"
|
||||||
dayjsbr.extend(weekOfYear)
|
import isSameOrBefore from "dayjs/plugin/isSameOrBefore.js"
|
||||||
dayjsbr.extend(isSameOrBefore)
|
import minMax from "dayjs/plugin/minMax.js"
|
||||||
dayjsbr.extend(isSameOrAfter)
|
import relativeTime from "dayjs/plugin/relativeTime.js"
|
||||||
dayjsbr.extend(minMax)
|
import timezone from "dayjs/plugin/timezone.js"
|
||||||
dayjsbr.extend(relativeTime)
|
import utc from "dayjs/plugin/utc.js"
|
||||||
dayjsbr.extend(duration)
|
import weekOfYear from "dayjs/plugin/weekOfYear.js"
|
||||||
dayjsbr.locale("pt-br")
|
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 "./dayjs"
|
||||||
export * from "./ecosistema"
|
export * from "./ecosistema"
|
||||||
export * from "./extensoes"
|
export * from "./extensoes"
|
||||||
export * from "./graficosPilao"
|
export * from "./extensoes"
|
||||||
export * from "./local"
|
export * from "./local"
|
||||||
export * from "./logger"
|
export * from "./logger"
|
||||||
|
export * from "./logger"
|
||||||
export * from "./postgres"
|
export * from "./postgres"
|
||||||
|
export * from "./produtos"
|
||||||
export * from "./testes-de-variaveis"
|
export * from "./testes-de-variaveis"
|
||||||
export * from "./texto_busca"
|
export * from "./texto_busca"
|
||||||
export * from "./tipagemRotas"
|
export * from "./tipagemRotas"
|
||||||
|
export * from "./tipagemRotas"
|
||||||
export * from "./unidades_medida"
|
export * from "./unidades_medida"
|
||||||
export * from "./uuid"
|
export * from "./uuid"
|
||||||
export * from "./variaveisComuns"
|
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",
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
|
||||||
/* Linguagem e Ambiente */
|
/* Linguagem e Ambiente */
|
||||||
"target": "ES2020" /* Define a versão do JavaScript para o código emitido. */,
|
"target": "ES2020" /* Define a versão do JavaScript para o código emitido. */,
|
||||||
"lib": [
|
"lib": [
|
||||||
|
|
@ -16,7 +19,6 @@
|
||||||
"declaration": true /* Gera arquivos .d.ts para os arquivos TypeScript. */,
|
"declaration": true /* Gera arquivos .d.ts para os arquivos TypeScript. */,
|
||||||
|
|
||||||
/* Interoperabilidade de Módulos */
|
/* Interoperabilidade de Módulos */
|
||||||
"esModuleInterop": true /* Habilita a compatibilidade com módulos CommonJS ao importar. */,
|
|
||||||
"forceConsistentCasingInFileNames": true /* Garante consistência na diferenciação entre maiúsculas e minúsculas em nomes de arquivos. */,
|
"forceConsistentCasingInFileNames": true /* Garante consistência na diferenciação entre maiúsculas e minúsculas em nomes de arquivos. */,
|
||||||
|
|
||||||
/* Verificação de Tipos */
|
/* Verificação de Tipos */
|
||||||
|
|
|
||||||
10
tsup/tsup.config.front.interno.ts
Normal file
10
tsup/tsup.config.front.interno.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
// tsup.config.ts (Configuração Ajustada para Back-end)
|
||||||
|
import { defineConfig, type Options } from "tsup"
|
||||||
|
import { tsup_config_front } from "./tsup.config.front"
|
||||||
|
|
||||||
|
tsup_config_front. noExternal= [/./]
|
||||||
|
|
||||||
|
export {tsup_config_front}
|
||||||
|
|
||||||
|
// Exporta a configuração padrão usando defineConfig
|
||||||
|
export default defineConfig(tsup_config_front)
|
||||||
|
|
@ -16,7 +16,9 @@ export const tsup_config_front: Options = {
|
||||||
sourcemap: false,
|
sourcemap: false,
|
||||||
minify: true, // Recomendado para builds de produção
|
minify: true, // Recomendado para builds de produção
|
||||||
platform: "browser",
|
platform: "browser",
|
||||||
|
external: ['dayjs'],
|
||||||
outExtension: () => ({ js: ".mjs" }),
|
outExtension: () => ({ js: ".mjs" }),
|
||||||
|
shims: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exporta a configuração padrão usando defineConfig
|
// Exporta a configuração padrão usando defineConfig
|
||||||
|
|
|
||||||
7
tsup/tsup.config.interno.ts
Normal file
7
tsup/tsup.config.interno.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
// tsup.config.ts (Configuração Ajustada para Back-end)
|
||||||
|
import { defineConfig } from "tsup"
|
||||||
|
import { tsup_config_back } from "./tsup.config.back"
|
||||||
|
import { tsup_config_front } from "./tsup.config.front.interno"
|
||||||
|
|
||||||
|
// Exporta a configuração padrão usando defineConfig
|
||||||
|
export default defineConfig([tsup_config_back, tsup_config_front])
|
||||||
Loading…
Add table
Add a link
Reference in a new issue