implementado tsup
This commit is contained in:
parent
7bddbd5c72
commit
8efeb59716
131 changed files with 2216 additions and 1476 deletions
54
bun.lock
54
bun.lock
|
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
"lockfileVersion": 1,
|
||||
"workspaces": {
|
||||
"": {
|
||||
"name": "p-comuns",
|
||||
"dependencies": {
|
||||
"cross-fetch": "4.1.0",
|
||||
"zod": "3.24.1",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.0.6",
|
||||
"@types/node": "^20.19.8",
|
||||
"typescript": "^5.8.3",
|
||||
},
|
||||
},
|
||||
},
|
||||
"packages": {
|
||||
"@biomejs/biome": ["@biomejs/biome@2.0.6", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.0.6", "@biomejs/cli-darwin-x64": "2.0.6", "@biomejs/cli-linux-arm64": "2.0.6", "@biomejs/cli-linux-arm64-musl": "2.0.6", "@biomejs/cli-linux-x64": "2.0.6", "@biomejs/cli-linux-x64-musl": "2.0.6", "@biomejs/cli-win32-arm64": "2.0.6", "@biomejs/cli-win32-x64": "2.0.6" }, "bin": { "biome": "bin/biome" } }, "sha512-RRP+9cdh5qwe2t0gORwXaa27oTOiQRQvrFf49x2PA1tnpsyU7FIHX4ZOFMtBC4QNtyWsN7Dqkf5EDbg4X+9iqA=="],
|
||||
|
||||
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.0.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-AzdiNNjNzsE6LfqWyBvcL29uWoIuZUkndu+wwlXW13EKcBHbbKjNQEZIJKYDc6IL+p7bmWGx3v9ZtcRyIoIz5A=="],
|
||||
|
||||
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.0.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-wJjjP4E7bO4WJmiQaLnsdXMa516dbtC6542qeRkyJg0MqMXP0fvs4gdsHhZ7p9XWTAmGIjZHFKXdsjBvKGIJJQ=="],
|
||||
|
||||
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.0.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-ZSVf6TYo5rNMUHIW1tww+rs/krol7U5A1Is/yzWyHVZguuB0lBnIodqyFuwCNqG9aJGyk7xIMS8HG0qGUPz0SA=="],
|
||||
|
||||
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.0.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-CVPEMlin3bW49sBqLBg2x016Pws7eUXA27XYDFlEtponD0luYjg2zQaMJ2nOqlkKG9fqzzkamdYxHdMDc2gZFw=="],
|
||||
|
||||
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.0.6", "", { "os": "linux", "cpu": "x64" }, "sha512-geM1MkHTV1Kh2Cs/Xzot9BOF3WBacihw6bkEmxkz4nSga8B9/hWy5BDiOG3gHDGIBa8WxT0nzsJs2f/hPqQIQw=="],
|
||||
|
||||
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.0.6", "", { "os": "linux", "cpu": "x64" }, "sha512-mKHE/e954hR/hSnAcJSjkf4xGqZc/53Kh39HVW1EgO5iFi0JutTN07TSjEMg616julRtfSNJi0KNyxvc30Y4rQ=="],
|
||||
|
||||
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.0.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-290V4oSFoKaprKE1zkYVsDfAdn0An5DowZ+GIABgjoq1ndhvNxkJcpxPsiYtT7slbVe3xmlT0ncdfOsN7KruzA=="],
|
||||
|
||||
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.0.6", "", { "os": "win32", "cpu": "x64" }, "sha512-bfM1Bce0d69Ao7pjTjUS+AWSZ02+5UHdiAP85Th8e9yV5xzw6JrHXbL5YWlcEKQ84FIZMdDc7ncuti1wd2sdbw=="],
|
||||
|
||||
"@types/node": ["@types/node@20.19.8", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-HzbgCY53T6bfu4tT7Aq3TvViJyHjLjPNaAS3HOuMc9pw97KHsUtXNX4L+wu59g1WnjsZSko35MbEqnO58rihhw=="],
|
||||
|
||||
"cross-fetch": ["cross-fetch@4.1.0", "", { "dependencies": { "node-fetch": "^2.7.0" } }, "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw=="],
|
||||
|
||||
"node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="],
|
||||
|
||||
"tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="],
|
||||
|
||||
"typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="],
|
||||
|
||||
"undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
|
||||
|
||||
"webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="],
|
||||
|
||||
"whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="],
|
||||
|
||||
"zod": ["zod@3.24.1", "", {}, "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A=="],
|
||||
}
|
||||
}
|
||||
30
dist-back/aleatorio.cjs
Normal file
30
dist-back/aleatorio.cjs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var aleatorio_exports = {};
|
||||
__export(aleatorio_exports, {
|
||||
aleatorio: () => aleatorio
|
||||
});
|
||||
module.exports = __toCommonJS(aleatorio_exports);
|
||||
const alfabeto = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
|
||||
const aleatorio = (tamanho) => `eli-${Array.from({ length: tamanho || 8 }).map(() => alfabeto[(999 * Math.random() | 0) % alfabeto.length]).join("")}`;
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
aleatorio
|
||||
});
|
||||
//# sourceMappingURL=aleatorio.cjs.map
|
||||
1
dist-back/aleatorio.cjs.map
Normal file
1
dist-back/aleatorio.cjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/aleatorio.ts"],"sourcesContent":["const alfabeto = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".split(\"\")\n\nexport const aleatorio = (tamanho?: number) =>\n `eli-${Array.from({ length: tamanho || 8 })\n .map(() => alfabeto[((999 * Math.random()) | 0) % alfabeto.length])\n .join(\"\")}`\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAM,WAAW,6BAA6B,MAAM,EAAE;AAE/C,MAAM,YAAY,CAAC,YACxB,OAAO,MAAM,KAAK,EAAE,QAAQ,WAAW,EAAE,CAAC,EACvC,IAAI,MAAM,UAAW,MAAM,KAAK,OAAO,IAAK,KAAK,SAAS,MAAM,CAAC,EACjE,KAAK,EAAE,CAAC;","names":[]}
|
||||
54
dist-back/constantes.cjs
Normal file
54
dist-back/constantes.cjs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var constantes_exports = {};
|
||||
__export(constantes_exports, {
|
||||
camposComuns: () => camposComuns,
|
||||
tipoUsuarioResiduos: () => tipoUsuarioResiduos,
|
||||
tx: () => tx,
|
||||
uuid_null: () => uuid_null
|
||||
});
|
||||
module.exports = __toCommonJS(constantes_exports);
|
||||
const uuid_null = "00000000-0000-0000-0000-000000000000";
|
||||
var camposComuns = /* @__PURE__ */ ((camposComuns2) => {
|
||||
camposComuns2["codigo"] = "codigo";
|
||||
camposComuns2["excluido"] = "excluido";
|
||||
camposComuns2["data_hora_criacao"] = "data_hora_criacao";
|
||||
camposComuns2["data_hora_atualizacao"] = "data_hora_atualizacao";
|
||||
camposComuns2["codigo_usuario_criacao"] = "codigo_usuario_criacao";
|
||||
camposComuns2["codigo_usuario_atualizacao"] = "codigo_usuario_atualizacao";
|
||||
camposComuns2["versao"] = "versao";
|
||||
return camposComuns2;
|
||||
})(camposComuns || {});
|
||||
var tx = /* @__PURE__ */ ((tx2) => {
|
||||
tx2["token"] = "token";
|
||||
return tx2;
|
||||
})(tx || {});
|
||||
var tipoUsuarioResiduos = /* @__PURE__ */ ((tipoUsuarioResiduos2) => {
|
||||
tipoUsuarioResiduos2["Usuario"] = "usuario";
|
||||
tipoUsuarioResiduos2["Fornecedor"] = "fornecedor";
|
||||
return tipoUsuarioResiduos2;
|
||||
})(tipoUsuarioResiduos || {});
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
camposComuns,
|
||||
tipoUsuarioResiduos,
|
||||
tx,
|
||||
uuid_null
|
||||
});
|
||||
//# sourceMappingURL=constantes.cjs.map
|
||||
1
dist-back/constantes.cjs.map
Normal file
1
dist-back/constantes.cjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/constantes.ts"],"sourcesContent":["export const uuid_null = \"00000000-0000-0000-0000-000000000000\"\n\n/** Colunas Presentes n maioria das tabelas */\nexport enum camposComuns {\n codigo = \"codigo\",\n excluido = \"excluido\",\n data_hora_criacao = \"data_hora_criacao\",\n data_hora_atualizacao = \"data_hora_atualizacao\",\n codigo_usuario_criacao = \"codigo_usuario_criacao\",\n codigo_usuario_atualizacao = \"codigo_usuario_atualizacao\",\n versao = \"versao\",\n}\n\n/** Palavras comumente usadas */\nexport enum tx {\n token = \"token\",\n}\n\nexport enum tipoUsuarioResiduos {\n Usuario = \"usuario\",\n Fornecedor = \"fornecedor\",\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,YAAY;AAGlB,IAAK,eAAL,kBAAKA,kBAAL;AACL,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,cAAW;AACX,EAAAA,cAAA,uBAAoB;AACpB,EAAAA,cAAA,2BAAwB;AACxB,EAAAA,cAAA,4BAAyB;AACzB,EAAAA,cAAA,gCAA6B;AAC7B,EAAAA,cAAA,YAAS;AAPC,SAAAA;AAAA,GAAA;AAWL,IAAK,KAAL,kBAAKC,QAAL;AACL,EAAAA,IAAA,WAAQ;AADE,SAAAA;AAAA,GAAA;AAIL,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,gBAAa;AAFH,SAAAA;AAAA,GAAA;","names":["camposComuns","tx","tipoUsuarioResiduos"]}
|
||||
39
dist-back/consulta.cjs
Normal file
39
dist-back/consulta.cjs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var consulta_exports = {};
|
||||
__export(consulta_exports, {
|
||||
operadores: () => operadores
|
||||
});
|
||||
module.exports = __toCommonJS(consulta_exports);
|
||||
var operadores = /* @__PURE__ */ ((operadores2) => {
|
||||
operadores2["="] = "=";
|
||||
operadores2["!="] = "!=";
|
||||
operadores2[">"] = ">";
|
||||
operadores2[">="] = ">=";
|
||||
operadores2["<"] = "<";
|
||||
operadores2["<="] = "<=";
|
||||
operadores2["like"] = "like";
|
||||
operadores2["in"] = "in";
|
||||
return operadores2;
|
||||
})(operadores || {});
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
operadores
|
||||
});
|
||||
//# sourceMappingURL=consulta.cjs.map
|
||||
1
dist-back/consulta.cjs.map
Normal file
1
dist-back/consulta.cjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/consulta.ts"],"sourcesContent":["export enum operadores {\n \"=\" = \"=\",\n \"!=\" = \"!=\",\n \">\" = \">\",\n \">=\" = \">=\",\n \"<\" = \"<\",\n \"<=\" = \"<=\",\n like = \"like\",\n in = \"in\",\n}\n\nexport type tipoFiltro = {\n coluna: string\n valor: any\n operador: keyof typeof operadores | operadores\n ou?: boolean\n}\n\nexport type interfaceConsulta = {\n offset?: number\n limit?: number\n filtros?: tipoFiltro[]\n ordem?: string\n ordemTipo?: \"asc\" | \"desc\"\n colunas?: string[]\n apenasConsulta?: boolean\n apenasContagem?: boolean\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAK,aAAL,kBAAKA,gBAAL;AACL,EAAAA,YAAA,OAAM;AACN,EAAAA,YAAA,QAAO;AACP,EAAAA,YAAA,OAAM;AACN,EAAAA,YAAA,QAAO;AACP,EAAAA,YAAA,OAAM;AACN,EAAAA,YAAA,QAAO;AACP,EAAAA,YAAA,UAAO;AACP,EAAAA,YAAA,QAAK;AARK,SAAAA;AAAA,GAAA;","names":["operadores"]}
|
||||
23
dist-back/ecosistema/index.cjs
Normal file
23
dist-back/ecosistema/index.cjs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var ecosistema_exports = {};
|
||||
module.exports = __toCommonJS(ecosistema_exports);
|
||||
__reExport(ecosistema_exports, require("./urls"), module.exports);
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
...require("./urls")
|
||||
});
|
||||
//# sourceMappingURL=index.cjs.map
|
||||
1
dist-back/ecosistema/index.cjs.map
Normal file
1
dist-back/ecosistema/index.cjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../src/ecosistema/index.ts"],"sourcesContent":["export * from \"./urls\"\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+BAAc,mBAAd;","names":[]}
|
||||
29
dist-back/ecosistema/urls.cjs
Normal file
29
dist-back/ecosistema/urls.cjs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var urls_exports = {};
|
||||
__export(urls_exports, {
|
||||
cdn_carro_de_boi: () => cdn_carro_de_boi
|
||||
});
|
||||
module.exports = __toCommonJS(urls_exports);
|
||||
const cdn_carro_de_boi = "https://carro-de-boi-idz-one.b-cdn.net";
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
cdn_carro_de_boi
|
||||
});
|
||||
//# sourceMappingURL=urls.cjs.map
|
||||
1
dist-back/ecosistema/urls.cjs.map
Normal file
1
dist-back/ecosistema/urls.cjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../src/ecosistema/urls.ts"],"sourcesContent":["export const cdn_carro_de_boi = \"https://carro-de-boi-idz-one.b-cdn.net\"\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,mBAAmB;","names":[]}
|
||||
187
dist-back/extensoes.cjs
Normal file
187
dist-back/extensoes.cjs
Normal file
|
|
@ -0,0 +1,187 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var extensoes_exports = {};
|
||||
__export(extensoes_exports, {
|
||||
extensoes: () => extensoes,
|
||||
tipoArquivo: () => tipoArquivo
|
||||
});
|
||||
module.exports = __toCommonJS(extensoes_exports);
|
||||
const extensoes = [
|
||||
{
|
||||
ext: "gif",
|
||||
tipo: "imagem",
|
||||
mime: "image/gif"
|
||||
},
|
||||
{
|
||||
ext: "jpg",
|
||||
tipo: "imagem",
|
||||
mime: "image/jpeg"
|
||||
},
|
||||
{
|
||||
ext: "jpeg",
|
||||
tipo: "imagem",
|
||||
mime: "image/jpeg"
|
||||
},
|
||||
{
|
||||
ext: "png",
|
||||
tipo: "imagem",
|
||||
mime: "image/png"
|
||||
},
|
||||
{
|
||||
ext: "bmp",
|
||||
tipo: "imagem",
|
||||
mime: "image/bmp"
|
||||
},
|
||||
{
|
||||
ext: "webp",
|
||||
tipo: "imagem",
|
||||
mime: "image/webp"
|
||||
},
|
||||
{
|
||||
ext: "tiff",
|
||||
tipo: "imagem",
|
||||
mime: "image/tiff"
|
||||
},
|
||||
{
|
||||
ext: "svg",
|
||||
tipo: "imagem",
|
||||
mime: "image/svg+xml"
|
||||
},
|
||||
{
|
||||
ext: "ico",
|
||||
tipo: "imagem",
|
||||
mime: "image/x-icon"
|
||||
},
|
||||
{
|
||||
ext: "pdf",
|
||||
tipo: "documento",
|
||||
mime: "application/pdf"
|
||||
},
|
||||
{
|
||||
ext: "doc",
|
||||
tipo: "documento",
|
||||
mime: "application/msword"
|
||||
},
|
||||
{
|
||||
ext: "docx",
|
||||
tipo: "documento",
|
||||
mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
||||
},
|
||||
{
|
||||
ext: "xls",
|
||||
tipo: "documento",
|
||||
mime: "application/vnd.ms-excel"
|
||||
},
|
||||
{
|
||||
ext: "xlsx",
|
||||
tipo: "documento",
|
||||
mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
},
|
||||
{
|
||||
ext: "ppt",
|
||||
tipo: "documento",
|
||||
mime: "application/vnd.ms-powerpoint"
|
||||
},
|
||||
{
|
||||
ext: "pptx",
|
||||
tipo: "documento",
|
||||
mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
||||
},
|
||||
{
|
||||
ext: "txt",
|
||||
tipo: "documento",
|
||||
mime: "text/plain"
|
||||
},
|
||||
{
|
||||
ext: "odt",
|
||||
tipo: "documento",
|
||||
mime: "application/vnd.oasis.opendocument.text"
|
||||
},
|
||||
{
|
||||
ext: "ods",
|
||||
tipo: "documento",
|
||||
mime: "application/vnd.oasis.opendocument.spreadsheet"
|
||||
},
|
||||
{
|
||||
ext: "rtf",
|
||||
tipo: "documento",
|
||||
mime: "application/rtf"
|
||||
},
|
||||
{
|
||||
ext: "csv",
|
||||
tipo: "documento",
|
||||
mime: "text/csv"
|
||||
},
|
||||
{
|
||||
ext: "mp4",
|
||||
tipo: "v\xEDdeo",
|
||||
mime: "video/mp4"
|
||||
},
|
||||
{
|
||||
ext: "avi",
|
||||
tipo: "v\xEDdeo",
|
||||
mime: "video/x-msvideo"
|
||||
},
|
||||
{
|
||||
ext: "mkv",
|
||||
tipo: "v\xEDdeo",
|
||||
mime: "video/x-matroska"
|
||||
},
|
||||
{
|
||||
ext: "mov",
|
||||
tipo: "v\xEDdeo",
|
||||
mime: "video/quicktime"
|
||||
},
|
||||
{
|
||||
ext: "wmv",
|
||||
tipo: "v\xEDdeo",
|
||||
mime: "video/x-ms-wmv"
|
||||
},
|
||||
{
|
||||
ext: "flv",
|
||||
tipo: "v\xEDdeo",
|
||||
mime: "video/x-flv"
|
||||
},
|
||||
{
|
||||
ext: "webm",
|
||||
tipo: "v\xEDdeo",
|
||||
mime: "video/webm"
|
||||
},
|
||||
{
|
||||
ext: "3gp",
|
||||
tipo: "v\xEDdeo",
|
||||
mime: "video/3gpp"
|
||||
},
|
||||
{
|
||||
ext: "mpeg",
|
||||
tipo: "v\xEDdeo",
|
||||
mime: "video/mpeg"
|
||||
}
|
||||
];
|
||||
const tipoArquivo = (nomeArquivo) => {
|
||||
const extArquivo = String(nomeArquivo || "").toLocaleLowerCase().split(".").pop();
|
||||
const extensao = extensoes.find((extensao2) => extensao2.ext === extArquivo);
|
||||
return extensao?.tipo || "outros";
|
||||
};
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
extensoes,
|
||||
tipoArquivo
|
||||
});
|
||||
//# sourceMappingURL=extensoes.cjs.map
|
||||
1
dist-back/extensoes.cjs.map
Normal file
1
dist-back/extensoes.cjs.map
Normal file
File diff suppressed because one or more lines are too long
43
dist-back/index.cjs
Normal file
43
dist-back/index.cjs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var index_exports = {};
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
__reExport(index_exports, require("./aleatorio"), module.exports);
|
||||
__reExport(index_exports, require("./constantes"), module.exports);
|
||||
__reExport(index_exports, require("./consulta"), module.exports);
|
||||
__reExport(index_exports, require("./ecosistema"), module.exports);
|
||||
__reExport(index_exports, require("./extensoes"), module.exports);
|
||||
__reExport(index_exports, require("./logger"), module.exports);
|
||||
__reExport(index_exports, require("./texto_busca"), 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);
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
...require("./aleatorio"),
|
||||
...require("./constantes"),
|
||||
...require("./consulta"),
|
||||
...require("./ecosistema"),
|
||||
...require("./extensoes"),
|
||||
...require("./logger"),
|
||||
...require("./texto_busca"),
|
||||
...require("./tipagemRotas"),
|
||||
...require("./unidades_medida"),
|
||||
...require("./uuid"),
|
||||
...require("./variaveisComuns")
|
||||
});
|
||||
//# sourceMappingURL=index.cjs.map
|
||||
1
dist-back/index.cjs.map
Normal file
1
dist-back/index.cjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./aleatorio\"\nexport * from \"./constantes\"\nexport * from \"./consulta\"\nexport * from \"./ecosistema\"\nexport * from \"./extensoes\"\nexport * from \"./logger\"\nexport * from \"./texto_busca\"\nexport * from \"./tipagemRotas\"\nexport * from \"./unidades_medida\"\nexport * from \"./uuid\"\nexport * from \"./variaveisComuns\"\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,wBAAd;AACA,0BAAc,yBADd;AAEA,0BAAc,uBAFd;AAGA,0BAAc,yBAHd;AAIA,0BAAc,wBAJd;AAKA,0BAAc,qBALd;AAMA,0BAAc,0BANd;AAOA,0BAAc,2BAPd;AAQA,0BAAc,8BARd;AASA,0BAAc,mBATd;AAUA,0BAAc,8BAVd;","names":[]}
|
||||
107
dist-back/logger.cjs
Normal file
107
dist-back/logger.cjs
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
"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)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
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 logger_exports = {};
|
||||
__export(logger_exports, {
|
||||
defineCwd: () => defineCwd,
|
||||
logger: () => logger,
|
||||
postLogger: () => postLogger
|
||||
});
|
||||
module.exports = __toCommonJS(logger_exports);
|
||||
var import_cross_fetch = __toESM(require("cross-fetch"));
|
||||
var import_variaveisComuns = require("./variaveisComuns");
|
||||
const LOKI_BASE_URL = "https://log.idz.one";
|
||||
const LOKI_ENDPOINT = "/loki/api/v1/push";
|
||||
const postLogger = async ({
|
||||
objeto
|
||||
}) => {
|
||||
const response = await (0, import_cross_fetch.default)(`${LOKI_BASE_URL}${LOKI_ENDPOINT}`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(objeto)
|
||||
}).catch((a) => a);
|
||||
if (!response.ok) {
|
||||
return [objeto, `Erro ${response.status}: ${await response?.text?.()}`];
|
||||
}
|
||||
return [objeto];
|
||||
};
|
||||
let cwd = "";
|
||||
const defineCwd = (novoCwd) => {
|
||||
cwd = novoCwd;
|
||||
};
|
||||
const logger = ({ app: app_e, eProducao, parametros: parametrosAmbiente }) => ({ inquilino, usuario, parametros: parametrosSessao }) => async (level, mensagem, op_tipoLog) => {
|
||||
let {
|
||||
__filename,
|
||||
detalhes,
|
||||
local,
|
||||
parametros: parametrosLog
|
||||
} = op_tipoLog || {};
|
||||
const app = `${eProducao ? "" : "DEV-"}${app_e}`;
|
||||
if (cwd && __filename) {
|
||||
__filename = __filename.replace(cwd, "");
|
||||
}
|
||||
if (local) {
|
||||
detalhes = [`${(0, import_variaveisComuns.nomeVariavel)({ local })}="${local}"`, ...detalhes || []];
|
||||
}
|
||||
if (__filename) {
|
||||
detalhes = [
|
||||
`${(0, import_variaveisComuns.nomeVariavel)({ __filename })}="${__filename}"`,
|
||||
...detalhes || []
|
||||
];
|
||||
}
|
||||
const timestamp = `${Date.now()}000000`;
|
||||
const mainLog = detalhes?.length ? `${mensagem} | ${detalhes.map((d) => JSON.stringify(d)).join(" | ")}` : mensagem;
|
||||
const payload = {
|
||||
stream: {
|
||||
app,
|
||||
inquilino,
|
||||
usuario,
|
||||
level,
|
||||
...parametrosAmbiente || {},
|
||||
...parametrosSessao || {},
|
||||
...parametrosLog || {}
|
||||
},
|
||||
values: [
|
||||
[
|
||||
timestamp,
|
||||
mainLog
|
||||
// Linha de log direta
|
||||
]
|
||||
]
|
||||
};
|
||||
const objeto = { streams: [payload] };
|
||||
const response = await postLogger({ objeto });
|
||||
return response;
|
||||
};
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
defineCwd,
|
||||
logger,
|
||||
postLogger
|
||||
});
|
||||
//# sourceMappingURL=logger.cjs.map
|
||||
1
dist-back/logger.cjs.map
Normal file
1
dist-back/logger.cjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/logger.ts"],"sourcesContent":["import crossFetch from \"cross-fetch\"\nimport { nomeVariavel } from \"./variaveisComuns\"\n\nconst LOKI_BASE_URL = \"https://log.idz.one\"\nconst LOKI_ENDPOINT = \"/loki/api/v1/push\"\nexport type tipoLokiObjeto = {\n streams: {\n stream: {\n [k: string]: string\n }\n values: [string, string][]\n }[]\n}\n\nexport const postLogger = async ({\n objeto,\n}: {\n objeto: tipoLokiObjeto\n}): Promise<[objeto: tipoLokiObjeto, erro?: string]> => {\n const response = await crossFetch(`${LOKI_BASE_URL}${LOKI_ENDPOINT}`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(objeto),\n }).catch((a) => a)\n if (!response.ok) {\n return [objeto, `Erro ${response.status}: ${await response?.text?.()}`]\n }\n return [objeto]\n}\n\nlet cwd = \"\"\n\n/** define a localização da pasta do projeto */\nexport const defineCwd = (novoCwd: string) => {\n cwd = novoCwd\n}\n\ntype tipoLevel = \"info\" | \"warn\" | \"error\"\n\ntype tipoOpSessao = {\n inquilino: string\n usuario: string\n parametros?: { [k: string]: string }\n}\n\ntype tipoLog = {\n detalhes?: unknown[]\n __filename?: string\n local?: string\n parametros?: { [k: string]: string }\n}\n\nexport type tipoLoggerLog = (\n level: tipoLevel,\n mensagem: string,\n op_tipoLog?: tipoLog,\n) => Promise<[objeto: tipoLokiObjeto, erro?: string]>\n\nexport type TipoLoggerSessao = (sess: tipoOpSessao) => tipoLoggerLog\n\nexport type tipoLogger = (amb: {\n app: string\n eProducao: boolean\n parametros?: {\n [k: string]: string\n }\n}) => TipoLoggerSessao\n\nexport const logger: tipoLogger =\n ({ app: app_e, eProducao, parametros: parametrosAmbiente }) =>\n ({ inquilino, usuario, parametros: parametrosSessao }) =>\n async (level, mensagem, op_tipoLog) => {\n let {\n __filename,\n detalhes,\n local,\n parametros: parametrosLog,\n } = op_tipoLog || {}\n\n const app = `${eProducao ? \"\" : \"DEV-\"}${app_e}`\n\n if (cwd && __filename) {\n __filename = __filename.replace(cwd, \"\")\n }\n\n if (local) {\n detalhes = [`${nomeVariavel({ local })}=\"${local}\"`, ...(detalhes || [])]\n }\n\n if (__filename) {\n detalhes = [\n `${nomeVariavel({ __filename })}=\"${__filename}\"`,\n ...(detalhes || []),\n ]\n }\n\n const timestamp = `${Date.now()}000000`\n\n const mainLog = detalhes?.length\n ? `${mensagem} | ${detalhes.map((d) => JSON.stringify(d)).join(\" | \")}`\n : mensagem\n\n const payload: tipoLokiObjeto[\"streams\"][number] = {\n stream: {\n app,\n inquilino,\n usuario,\n level,\n ...(parametrosAmbiente || {}),\n ...(parametrosSessao || {}),\n ...(parametrosLog || {}),\n },\n values: [\n [\n timestamp,\n mainLog, // Linha de log direta\n ],\n ],\n }\n\n const objeto: tipoLokiObjeto = { streams: [payload] }\n\n const response = await postLogger({ objeto })\n\n return response\n }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAuB;AACvB,6BAA6B;AAE7B,MAAM,gBAAgB;AACtB,MAAM,gBAAgB;AAUf,MAAM,aAAa,OAAO;AAAA,EAC/B;AACF,MAEwD;AACtD,QAAM,WAAW,UAAM,mBAAAA,SAAW,GAAG,aAAa,GAAG,aAAa,IAAI;AAAA,IACpE,QAAQ;AAAA,IACR,SAAS,EAAE,gBAAgB,mBAAmB;AAAA,IAC9C,MAAM,KAAK,UAAU,MAAM;AAAA,EAC7B,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC;AACjB,MAAI,CAAC,SAAS,IAAI;AAChB,WAAO,CAAC,QAAQ,QAAQ,SAAS,MAAM,KAAK,MAAM,UAAU,OAAO,CAAC,EAAE;AAAA,EACxE;AACA,SAAO,CAAC,MAAM;AAChB;AAEA,IAAI,MAAM;AAGH,MAAM,YAAY,CAAC,YAAoB;AAC5C,QAAM;AACR;AAiCO,MAAM,SACX,CAAC,EAAE,KAAK,OAAO,WAAW,YAAY,mBAAmB,MACzD,CAAC,EAAE,WAAW,SAAS,YAAY,iBAAiB,MACpD,OAAO,OAAO,UAAU,eAAe;AACrC,MAAI;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,EACd,IAAI,cAAc,CAAC;AAEnB,QAAM,MAAM,GAAG,YAAY,KAAK,MAAM,GAAG,KAAK;AAE9C,MAAI,OAAO,YAAY;AACrB,iBAAa,WAAW,QAAQ,KAAK,EAAE;AAAA,EACzC;AAEA,MAAI,OAAO;AACT,eAAW,CAAC,OAAG,qCAAa,EAAE,MAAM,CAAC,CAAC,KAAK,KAAK,KAAK,GAAI,YAAY,CAAC,CAAE;AAAA,EAC1E;AAEA,MAAI,YAAY;AACd,eAAW;AAAA,MACT,OAAG,qCAAa,EAAE,WAAW,CAAC,CAAC,KAAK,UAAU;AAAA,MAC9C,GAAI,YAAY,CAAC;AAAA,IACnB;AAAA,EACF;AAEA,QAAM,YAAY,GAAG,KAAK,IAAI,CAAC;AAE/B,QAAM,UAAU,UAAU,SACtB,GAAG,QAAQ,MAAM,SAAS,IAAI,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,KACnE;AAEJ,QAAM,UAA6C;AAAA,IACjD,QAAQ;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAI,sBAAsB,CAAC;AAAA,MAC3B,GAAI,oBAAoB,CAAC;AAAA,MACzB,GAAI,iBAAiB,CAAC;AAAA,IACxB;AAAA,IACA,QAAQ;AAAA,MACN;AAAA,QACE;AAAA,QACA;AAAA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,QAAM,SAAyB,EAAE,SAAS,CAAC,OAAO,EAAE;AAEpD,QAAM,WAAW,MAAM,WAAW,EAAE,OAAO,CAAC;AAE5C,SAAO;AACT;","names":["crossFetch"]}
|
||||
12
dist-back/teste.cjs
Normal file
12
dist-back/teste.cjs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
"use strict";
|
||||
var import_logger = require("./logger");
|
||||
const l = (0, import_logger.logger)({ app: "teste", eProducao: true });
|
||||
const lg = l({
|
||||
inquilino: "conta_1",
|
||||
usuario: "pedrinho"
|
||||
});
|
||||
lg("error", "Deu Ruim").then((a) => console.log(JSON.stringify(a)));
|
||||
lg("info", "Deu Bom", { __filename }).then(
|
||||
(a) => console.log(JSON.stringify(a))
|
||||
);
|
||||
//# sourceMappingURL=teste.cjs.map
|
||||
1
dist-back/teste.cjs.map
Normal file
1
dist-back/teste.cjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/teste.ts"],"sourcesContent":["import { logger } from \"./logger\"\n\nconst l = logger({ app: \"teste\", eProducao: true })\n\nconst lg = l({\n inquilino: \"conta_1\",\n usuario: \"pedrinho\",\n})\n\nlg(\"error\", \"Deu Ruim\").then((a) => console.log(JSON.stringify(a)))\nlg(\"info\", \"Deu Bom\", { __filename }).then((a) =>\n console.log(JSON.stringify(a)),\n)\n"],"mappings":";AAAA,oBAAuB;AAEvB,MAAM,QAAI,sBAAO,EAAE,KAAK,SAAS,WAAW,KAAK,CAAC;AAElD,MAAM,KAAK,EAAE;AAAA,EACX,WAAW;AAAA,EACX,SAAS;AACX,CAAC;AAED,GAAG,SAAS,UAAU,EAAE,KAAK,CAAC,MAAM,QAAQ,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC;AAClE,GAAG,QAAQ,WAAW,EAAE,WAAW,CAAC,EAAE;AAAA,EAAK,CAAC,MAC1C,QAAQ,IAAI,KAAK,UAAU,CAAC,CAAC;AAC/B;","names":[]}
|
||||
31
dist-back/texto_busca.cjs
Normal file
31
dist-back/texto_busca.cjs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var texto_busca_exports = {};
|
||||
__export(texto_busca_exports, {
|
||||
texto_busca: () => texto_busca
|
||||
});
|
||||
module.exports = __toCommonJS(texto_busca_exports);
|
||||
const texto_busca = (...texto) => texto.map(
|
||||
(txt) => txt === null || txt === void 0 ? "" : String(txt).normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/\s+/g, " ").toLowerCase()
|
||||
).join(" ");
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
texto_busca
|
||||
});
|
||||
//# sourceMappingURL=texto_busca.cjs.map
|
||||
1
dist-back/texto_busca.cjs.map
Normal file
1
dist-back/texto_busca.cjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/texto_busca.ts"],"sourcesContent":["/** gerar o texto de busca removendo caracteres especies e caixa alta */\n\nexport const texto_busca = (...texto: any[]): string =>\n texto\n .map((txt) =>\n txt === null || txt === undefined\n ? \"\"\n : String(txt)\n .normalize(\"NFD\")\n .replace(/[\\u0300-\\u036f]/g, \"\")\n .replace(/\\s+/g, \" \")\n .toLowerCase(),\n )\n .join(\" \")\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,cAAc,IAAI,UAC7B,MACG;AAAA,EAAI,CAAC,QACJ,QAAQ,QAAQ,QAAQ,SACpB,KACA,OAAO,GAAG,EACP,UAAU,KAAK,EACf,QAAQ,oBAAoB,EAAE,EAC9B,QAAQ,QAAQ,GAAG,EACnB,YAAY;AACrB,EACC,KAAK,GAAG;","names":[]}
|
||||
113
dist-back/tipagemRotas.cjs
Normal file
113
dist-back/tipagemRotas.cjs
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var tipagemRotas_exports = {};
|
||||
__export(tipagemRotas_exports, {
|
||||
TipagemRotas: () => TipagemRotas
|
||||
});
|
||||
module.exports = __toCommonJS(tipagemRotas_exports);
|
||||
class TipagemRotas {
|
||||
/** Ao criar novo obijeto de tipagem de rota é necessário passar o caminho parcial
|
||||
** export const mCaminho = new TipagemRotas<{q:string}>("aplicacao","funcionalidade")
|
||||
*/
|
||||
constructor({
|
||||
caminho,
|
||||
acaoIr
|
||||
}) {
|
||||
this._partesCaminho = [];
|
||||
this._acaoIr = acaoIr;
|
||||
this._partesCaminho = (Array.isArray(caminho) ? caminho : [caminho]).flatMap((a) => a.split("/")).filter(Boolean);
|
||||
}
|
||||
/** Retorna o caminho completo da rota
|
||||
** console.log(mCaminho.caminho)
|
||||
** "/caminho"
|
||||
*/
|
||||
get caminho() {
|
||||
const ret = `/${this._partesCaminho.join("/")}`;
|
||||
return ret;
|
||||
}
|
||||
/** Define o caminho completo da rota
|
||||
** mCaminho.caminho = "/novoCaminho"
|
||||
** console.log(mCaminho.caminho)
|
||||
** "/novoCaminho"
|
||||
** */
|
||||
set caminho(caminhoParcial) {
|
||||
this._partesCaminho = caminhoParcial.split("/").filter((parte) => parte);
|
||||
}
|
||||
/** Retorna o caminho completo da rota com a query
|
||||
** console.log(mCaminho.resolve({q:"query"}))
|
||||
** "http://localhost:3000/caminho?q=query"
|
||||
*/
|
||||
endereco(query, usarComoHash) {
|
||||
const url = new URL(
|
||||
typeof window !== "undefined" ? window.location.href : "http://localhost"
|
||||
);
|
||||
url.pathname = this.caminho;
|
||||
url.search = "";
|
||||
const queryKeys = Object.entries(query);
|
||||
for (const [key, value] of queryKeys) {
|
||||
url.searchParams.set(
|
||||
String(key),
|
||||
value === void 0 || value === null ? "" : value
|
||||
);
|
||||
}
|
||||
url.hash = "";
|
||||
if (usarComoHash) {
|
||||
url.hash = `#${url.search}`;
|
||||
url.search = "";
|
||||
}
|
||||
return url.href;
|
||||
}
|
||||
/** Vai para a url
|
||||
** mCaminho.ir({q:"query"})
|
||||
** window.location.href = "http://localhost:3000/caminho?q=query"
|
||||
*/
|
||||
ir(query) {
|
||||
if (this._acaoIr) {
|
||||
this._acaoIr(this.endereco(query));
|
||||
} else {
|
||||
if (typeof window != "undefined") {
|
||||
window.location.href = this.endereco(query);
|
||||
}
|
||||
}
|
||||
}
|
||||
/** Retorna os parametros da url
|
||||
** console.log(mCaminho.parametros())
|
||||
** {q:"query"}
|
||||
*/
|
||||
get parametros() {
|
||||
const url = new URL(
|
||||
typeof window !== "undefined" ? window.location.href : "http://localhost"
|
||||
);
|
||||
const query = url.searchParams;
|
||||
const queryObj = Object.fromEntries(query.entries());
|
||||
const hash = url.hash;
|
||||
if (hash) {
|
||||
const hashObj = Object.fromEntries(
|
||||
new URLSearchParams(hash.slice(1)).entries()
|
||||
);
|
||||
return { ...queryObj, ...hashObj };
|
||||
}
|
||||
return queryObj;
|
||||
}
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
TipagemRotas
|
||||
});
|
||||
//# sourceMappingURL=tipagemRotas.cjs.map
|
||||
1
dist-back/tipagemRotas.cjs.map
Normal file
1
dist-back/tipagemRotas.cjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/tipagemRotas.ts"],"sourcesContent":["/** Gerar uma classe que facilita a gestão de rotas com a tipagem das querys\n *\n * Definições:\n *\n * caminho = \"/aplicacao/funcionalidade\"\n *\n * endereco = \"http://localhost:3000/aplicacao/funcionalidade\"\n *\n * parametros = {nome:\"José\"}\n */\n\nexport class TipagemRotas<T extends { [q: string]: string | undefined }> {\n _partesCaminho: string[] = []\n _acaoIr?: (endereco: string) => undefined\n\n /** Ao criar novo obijeto de tipagem de rota é necessário passar o caminho parcial\n ** export const mCaminho = new TipagemRotas<{q:string}>(\"aplicacao\",\"funcionalidade\")\n */\n constructor({\n caminho,\n acaoIr,\n }: {\n caminho: string[] | string\n acaoIr?: undefined | ((endereco: string) => undefined)\n }) {\n this._acaoIr = acaoIr\n\n this._partesCaminho = (Array.isArray(caminho) ? caminho : [caminho])\n .flatMap((a) => a.split(\"/\"))\n .filter(Boolean)\n }\n\n /** Retorna o caminho completo da rota\n ** console.log(mCaminho.caminho)\n ** \"/caminho\"\n */\n get caminho() {\n const ret = `/${this._partesCaminho.join(\"/\")}`\n return ret\n }\n /** Define o caminho completo da rota\n ** mCaminho.caminho = \"/novoCaminho\"\n ** console.log(mCaminho.caminho)\n ** \"/novoCaminho\"\n ** */\n set caminho(caminhoParcial: string) {\n this._partesCaminho = caminhoParcial.split(\"/\").filter((parte) => parte)\n }\n\n /** Retorna o caminho completo da rota com a query\n ** console.log(mCaminho.resolve({q:\"query\"}))\n ** \"http://localhost:3000/caminho?q=query\"\n */\n\n endereco(query: T, usarComoHash?: boolean) {\n const url = new URL(\n typeof window !== \"undefined\" ? window.location.href : \"http://localhost\",\n )\n\n url.pathname = this.caminho\n\n url.search = \"\"\n\n const queryKeys = Object.entries(query)\n\n for (const [key, value] of queryKeys) {\n url.searchParams.set(\n String(key),\n value === undefined || value === null ? \"\" : value,\n )\n }\n\n url.hash = \"\"\n\n if (usarComoHash) {\n url.hash = `#${url.search}`\n url.search = \"\"\n }\n\n return url.href\n }\n\n /** Vai para a url\n ** mCaminho.ir({q:\"query\"})\n ** window.location.href = \"http://localhost:3000/caminho?q=query\"\n */\n ir(query: T) {\n if (this._acaoIr) {\n this._acaoIr(this.endereco(query))\n } else {\n if (typeof window != \"undefined\") {\n window.location.href = this.endereco(query)\n }\n }\n }\n\n /** Retorna os parametros da url\n ** console.log(mCaminho.parametros())\n ** {q:\"query\"}\n */\n\n get parametros() {\n const url = new URL(\n typeof window !== \"undefined\" ? window.location.href : \"http://localhost\",\n )\n const query = url.searchParams\n const queryObj = Object.fromEntries(query.entries())\n\n // pegar hash\n const hash = url.hash\n if (hash) {\n const hashObj = Object.fromEntries(\n new URLSearchParams(hash.slice(1)).entries(),\n )\n return { ...queryObj, ...hashObj } as T\n }\n\n return queryObj as Partial<T>\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWO,MAAM,aAA4D;AAAA;AAAA;AAAA;AAAA,EAOvE,YAAY;AAAA,IACV;AAAA,IACA;AAAA,EACF,GAGG;AAZH,0BAA2B,CAAC;AAa1B,SAAK,UAAU;AAEf,SAAK,kBAAkB,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,GAC/D,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,EAC3B,OAAO,OAAO;AAAA,EACnB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,UAAU;AACZ,UAAM,MAAM,IAAI,KAAK,eAAe,KAAK,GAAG,CAAC;AAC7C,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,QAAQ,gBAAwB;AAClC,SAAK,iBAAiB,eAAe,MAAM,GAAG,EAAE,OAAO,CAAC,UAAU,KAAK;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAS,OAAU,cAAwB;AACzC,UAAM,MAAM,IAAI;AAAA,MACd,OAAO,WAAW,cAAc,OAAO,SAAS,OAAO;AAAA,IACzD;AAEA,QAAI,WAAW,KAAK;AAEpB,QAAI,SAAS;AAEb,UAAM,YAAY,OAAO,QAAQ,KAAK;AAEtC,eAAW,CAAC,KAAK,KAAK,KAAK,WAAW;AACpC,UAAI,aAAa;AAAA,QACf,OAAO,GAAG;AAAA,QACV,UAAU,UAAa,UAAU,OAAO,KAAK;AAAA,MAC/C;AAAA,IACF;AAEA,QAAI,OAAO;AAEX,QAAI,cAAc;AAChB,UAAI,OAAO,IAAI,IAAI,MAAM;AACzB,UAAI,SAAS;AAAA,IACf;AAEA,WAAO,IAAI;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,GAAG,OAAU;AACX,QAAI,KAAK,SAAS;AAChB,WAAK,QAAQ,KAAK,SAAS,KAAK,CAAC;AAAA,IACnC,OAAO;AACL,UAAI,OAAO,UAAU,aAAa;AAChC,eAAO,SAAS,OAAO,KAAK,SAAS,KAAK;AAAA,MAC5C;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,IAAI,aAAa;AACf,UAAM,MAAM,IAAI;AAAA,MACd,OAAO,WAAW,cAAc,OAAO,SAAS,OAAO;AAAA,IACzD;AACA,UAAM,QAAQ,IAAI;AAClB,UAAM,WAAW,OAAO,YAAY,MAAM,QAAQ,CAAC;AAGnD,UAAM,OAAO,IAAI;AACjB,QAAI,MAAM;AACR,YAAM,UAAU,OAAO;AAAA,QACrB,IAAI,gBAAgB,KAAK,MAAM,CAAC,CAAC,EAAE,QAAQ;AAAA,MAC7C;AACA,aAAO,EAAE,GAAG,UAAU,GAAG,QAAQ;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AACF;","names":[]}
|
||||
55
dist-back/tsup/tsup.config.back.cjs
Normal file
55
dist-back/tsup/tsup.config.back.cjs
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var tsup_config_back_exports = {};
|
||||
__export(tsup_config_back_exports, {
|
||||
default: () => tsup_config_back_default,
|
||||
tsup_config_back: () => tsup_config_back
|
||||
});
|
||||
module.exports = __toCommonJS(tsup_config_back_exports);
|
||||
var import_tsup = require("tsup");
|
||||
const tsup_config_back = {
|
||||
entry: ["src/**/*.ts"],
|
||||
// Inclui todos os arquivos TypeScript na pasta src
|
||||
format: "cjs",
|
||||
// Gera módulos CommonJS, padrão para Node.js
|
||||
target: "node20",
|
||||
// Compila para o ambiente Node.js versão 20 (ou sua versão alvo)
|
||||
outDir: "dist-back",
|
||||
// Diretório de saída para os arquivos transpilados
|
||||
clean: true,
|
||||
// Limpa o diretório de saída antes de cada build
|
||||
bundle: false,
|
||||
// ESSENCIAL: Mantém a estrutura de arquivos e pastas original
|
||||
splitting: false,
|
||||
// Desnecessário quando bundle é false
|
||||
dts: false,
|
||||
// RECOMENDADO: Gera arquivos de declaração TypeScript (.d.ts)
|
||||
// legacyOutput e outExtension foram removidos por não serem necessários
|
||||
sourcemap: true,
|
||||
// Recomendado para depuração
|
||||
minify: false,
|
||||
// Geralmente não minificamos o código do backend em produção, mas você pode mudar
|
||||
outExtension: () => ({ js: ".cjs" })
|
||||
};
|
||||
var tsup_config_back_default = (0, import_tsup.defineConfig)(tsup_config_back);
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
tsup_config_back
|
||||
});
|
||||
//# sourceMappingURL=tsup.config.back.cjs.map
|
||||
1
dist-back/tsup/tsup.config.back.cjs.map
Normal file
1
dist-back/tsup/tsup.config.back.cjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../src/tsup/tsup.config.back.ts"],"sourcesContent":["// tsup.config.ts (Configuração Ajustada para Back-end)\nimport { defineConfig, type Options } from \"tsup\"\n\n// Definimos as opções em uma constante para clareza, como você fez.\n// Exportamos para que possam ser reutilizadas ou inspecionadas.\nexport const tsup_config_back: Options = {\n entry: [\"src/**/*.ts\"], // Inclui todos os arquivos TypeScript na pasta src\n format: \"cjs\", // Gera módulos CommonJS, padrão para Node.js\n target: \"node20\", // Compila para o ambiente Node.js versão 20 (ou sua versão alvo)\n outDir: \"dist-back\", // Diretório de saída para os arquivos transpilados\n clean: true, // Limpa o diretório de saída antes de cada build\n bundle: false, // ESSENCIAL: Mantém a estrutura de arquivos e pastas original\n splitting: false, // Desnecessário quando bundle é false\n dts: false, // RECOMENDADO: Gera arquivos de declaração TypeScript (.d.ts)\n // legacyOutput e outExtension foram removidos por não serem necessários\n sourcemap: true, // Recomendado para depuração\n minify: false, // Geralmente não minificamos o código do backend em produção, mas você pode mudar\n outExtension: () => ({ js: \".cjs\" }),\n}\n\n// Exporta a configuração padrão usando defineConfig\nexport default defineConfig(tsup_config_back)\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAA2C;AAIpC,MAAM,mBAA4B;AAAA,EACvC,OAAO,CAAC,aAAa;AAAA;AAAA,EACrB,QAAQ;AAAA;AAAA,EACR,QAAQ;AAAA;AAAA,EACR,QAAQ;AAAA;AAAA,EACR,OAAO;AAAA;AAAA,EACP,QAAQ;AAAA;AAAA,EACR,WAAW;AAAA;AAAA,EACX,KAAK;AAAA;AAAA;AAAA,EAEL,WAAW;AAAA;AAAA,EACX,QAAQ;AAAA;AAAA,EACR,cAAc,OAAO,EAAE,IAAI,OAAO;AACpC;AAGA,IAAO,+BAAQ,0BAAa,gBAAgB;","names":[]}
|
||||
28
dist-back/tsup/tsup.config.cjs
Normal file
28
dist-back/tsup/tsup.config.cjs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var tsup_config_exports = {};
|
||||
__export(tsup_config_exports, {
|
||||
default: () => tsup_config_default
|
||||
});
|
||||
module.exports = __toCommonJS(tsup_config_exports);
|
||||
var import_tsup = require("tsup");
|
||||
var import_tsup_config = require("./tsup.config.back");
|
||||
var import_tsup_config2 = require("./tsup.config.front");
|
||||
var tsup_config_default = (0, import_tsup.defineConfig)([import_tsup_config.tsup_config_back, import_tsup_config2.tsup_config_front]);
|
||||
//# sourceMappingURL=tsup.config.cjs.map
|
||||
1
dist-back/tsup/tsup.config.cjs.map
Normal file
1
dist-back/tsup/tsup.config.cjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../src/tsup/tsup.config.ts"],"sourcesContent":["// tsup.config.ts (Configuração Ajustada para Back-end)\nimport { defineConfig, type Options } from \"tsup\"\nimport { tsup_config_back } from \"./tsup.config.back\"\nimport { tsup_config_front } from \"./tsup.config.front\"\n\n// Exporta a configuração padrão usando defineConfig\nexport default defineConfig([tsup_config_back, tsup_config_front])\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAA2C;AAC3C,yBAAiC;AACjC,IAAAA,sBAAkC;AAGlC,IAAO,0BAAQ,0BAAa,CAAC,qCAAkB,qCAAiB,CAAC;","names":["import_tsup_config"]}
|
||||
55
dist-back/tsup/tsup.config.front.cjs
Normal file
55
dist-back/tsup/tsup.config.front.cjs
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var tsup_config_front_exports = {};
|
||||
__export(tsup_config_front_exports, {
|
||||
default: () => tsup_config_front_default,
|
||||
tsup_config_front: () => tsup_config_front
|
||||
});
|
||||
module.exports = __toCommonJS(tsup_config_front_exports);
|
||||
var import_tsup = require("tsup");
|
||||
const tsup_config_front = {
|
||||
entry: ["src/**/*.ts", "src/**/*.tsx"],
|
||||
// Adicionado .tsx para compatibilidade, se aplicável
|
||||
format: "esm",
|
||||
// Gera módulos ES para import/export no navegador
|
||||
target: "es2022",
|
||||
// Ou 'esnext' para os recursos mais recentes
|
||||
outDir: "dist-front",
|
||||
// Diretório de saída para os arquivos transpilados
|
||||
clean: true,
|
||||
// Limpa o diretório de saída antes de cada build
|
||||
bundle: false,
|
||||
// ESSENCIAL: Mantém a estrutura de arquivos e pastas original
|
||||
splitting: false,
|
||||
// Desnecessário quando bundle é false
|
||||
dts: false,
|
||||
// Não gera arquivos de declaração TypeScript (.d.ts) para uso em front-end JS
|
||||
// legacyOutput e outExtension foram removidos por não serem necessários
|
||||
sourcemap: true,
|
||||
// Recomendado para depuração no navegador
|
||||
minify: true,
|
||||
// Recomendado para builds de produção
|
||||
outExtension: () => ({ js: ".mjs" })
|
||||
};
|
||||
var tsup_config_front_default = (0, import_tsup.defineConfig)(tsup_config_front);
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
tsup_config_front
|
||||
});
|
||||
//# sourceMappingURL=tsup.config.front.cjs.map
|
||||
1
dist-back/tsup/tsup.config.front.cjs.map
Normal file
1
dist-back/tsup/tsup.config.front.cjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../src/tsup/tsup.config.front.ts"],"sourcesContent":["// tsup.config.ts (Configuração Ajustada para Back-end)\nimport { defineConfig, type Options } from \"tsup\"\n\n// Definimos as opções em uma constante para clareza, como você fez.\n// Exportamos para que possam ser reutilizadas ou inspecionadas.\nexport const tsup_config_front: Options = {\n entry: [\"src/**/*.ts\", \"src/**/*.tsx\"], // Adicionado .tsx para compatibilidade, se aplicável\n format: \"esm\", // Gera módulos ES para import/export no navegador\n target: \"es2022\", // Ou 'esnext' para os recursos mais recentes\n outDir: \"dist-front\", // Diretório de saída para os arquivos transpilados\n clean: true, // Limpa o diretório de saída antes de cada build\n bundle: false, // ESSENCIAL: Mantém a estrutura de arquivos e pastas original\n splitting: false, // Desnecessário quando bundle é false\n dts: false, // Não gera arquivos de declaração TypeScript (.d.ts) para uso em front-end JS\n // legacyOutput e outExtension foram removidos por não serem necessários\n sourcemap: true, // Recomendado para depuração no navegador\n minify: true, // Recomendado para builds de produção\n outExtension: () => ({ js: \".mjs\" }),\n}\n\n// Exporta a configuração padrão usando defineConfig\nexport default defineConfig(tsup_config_front)\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAA2C;AAIpC,MAAM,oBAA6B;AAAA,EACxC,OAAO,CAAC,eAAe,cAAc;AAAA;AAAA,EACrC,QAAQ;AAAA;AAAA,EACR,QAAQ;AAAA;AAAA,EACR,QAAQ;AAAA;AAAA,EACR,OAAO;AAAA;AAAA,EACP,QAAQ;AAAA;AAAA,EACR,WAAW;AAAA;AAAA,EACX,KAAK;AAAA;AAAA;AAAA,EAEL,WAAW;AAAA;AAAA,EACX,QAAQ;AAAA;AAAA,EACR,cAAc,OAAO,EAAE,IAAI,OAAO;AACpC;AAGA,IAAO,gCAAQ,0BAAa,iBAAiB;","names":[]}
|
||||
83
dist-back/unidades_medida.cjs
Normal file
83
dist-back/unidades_medida.cjs
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var unidades_medida_exports = {};
|
||||
__export(unidades_medida_exports, {
|
||||
siglas_unidades_medida: () => siglas_unidades_medida,
|
||||
unidades_medida: () => unidades_medida
|
||||
});
|
||||
module.exports = __toCommonJS(unidades_medida_exports);
|
||||
var siglas_unidades_medida = /* @__PURE__ */ ((siglas_unidades_medida2) => {
|
||||
siglas_unidades_medida2["UN"] = "UN";
|
||||
siglas_unidades_medida2["KG"] = "KG";
|
||||
siglas_unidades_medida2["TON"] = "TON";
|
||||
siglas_unidades_medida2["g"] = "g";
|
||||
siglas_unidades_medida2["M\xB3"] = "M\xB3";
|
||||
siglas_unidades_medida2["Lt"] = "Lt";
|
||||
return siglas_unidades_medida2;
|
||||
})(siglas_unidades_medida || {});
|
||||
const unidades_medida = [
|
||||
{
|
||||
sigla_unidade: "KG",
|
||||
nome: "Quilograma",
|
||||
sigla_normalizada: "KG",
|
||||
normalizar: (valor) => valor,
|
||||
tipo: "massa"
|
||||
},
|
||||
{
|
||||
sigla_unidade: "g",
|
||||
nome: "Grama",
|
||||
sigla_normalizada: "KG",
|
||||
normalizar: (valor) => valor / 1e3,
|
||||
tipo: "massa"
|
||||
},
|
||||
{
|
||||
sigla_unidade: "TON",
|
||||
nome: "Tonelada",
|
||||
sigla_normalizada: "KG",
|
||||
normalizar: (valor) => valor * 1e3,
|
||||
tipo: "massa"
|
||||
},
|
||||
{
|
||||
sigla_unidade: "Lt",
|
||||
nome: "Litro",
|
||||
sigla_normalizada: "Lt",
|
||||
normalizar: (valor) => valor,
|
||||
tipo: "volume"
|
||||
},
|
||||
{
|
||||
sigla_unidade: "M\xB3",
|
||||
nome: "Metro C\xFAbico",
|
||||
sigla_normalizada: "Lt",
|
||||
normalizar: (valor) => valor * 1e3,
|
||||
tipo: "volume"
|
||||
},
|
||||
{
|
||||
sigla_unidade: "UN",
|
||||
nome: "Unidade",
|
||||
sigla_normalizada: "UN",
|
||||
normalizar: (valor) => valor,
|
||||
tipo: "unidade"
|
||||
}
|
||||
];
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
siglas_unidades_medida,
|
||||
unidades_medida
|
||||
});
|
||||
//# sourceMappingURL=unidades_medida.cjs.map
|
||||
1
dist-back/unidades_medida.cjs.map
Normal file
1
dist-back/unidades_medida.cjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/unidades_medida.ts"],"sourcesContent":["/**\n * Essa variável se conecta a tabela_lidades\n *\n * onde sigla se conecta com sigla\n *\n * Usuário terá mais opções de unidades, quando fazer o envio para o mtr, usar a opção fornecida pelo usuarios, caso não tenha\n * usar a normalizada\n */\n\nexport enum siglas_unidades_medida {\n UN = \"UN\",\n\n KG = \"KG\",\n TON = \"TON\",\n g = \"g\",\n\n \"M³\" = \"M³\",\n Lt = \"Lt\",\n}\n\nexport const unidades_medida: {\n sigla_unidade: keyof typeof siglas_unidades_medida\n nome: string\n sigla_normalizada: keyof typeof siglas_unidades_medida\n normalizar: (valor: number) => number\n tipo: \"massa\" | \"volume\" | \"comprimento\" | \"unidade\"\n}[] = [\n {\n sigla_unidade: \"KG\",\n nome: \"Quilograma\",\n sigla_normalizada: \"KG\",\n normalizar: (valor: number) => valor,\n tipo: \"massa\",\n },\n {\n sigla_unidade: \"g\",\n nome: \"Grama\",\n sigla_normalizada: \"KG\",\n normalizar: (valor: number) => valor / 1000,\n tipo: \"massa\",\n },\n {\n sigla_unidade: \"TON\",\n nome: \"Tonelada\",\n sigla_normalizada: \"KG\",\n normalizar: (valor: number) => valor * 1000,\n tipo: \"massa\",\n },\n {\n sigla_unidade: \"Lt\",\n nome: \"Litro\",\n sigla_normalizada: \"Lt\",\n normalizar: (valor: number) => valor,\n tipo: \"volume\",\n },\n {\n sigla_unidade: \"M³\",\n nome: \"Metro Cúbico\",\n sigla_normalizada: \"Lt\",\n normalizar: (valor: number) => valor * 1000,\n tipo: \"volume\",\n },\n {\n sigla_unidade: \"UN\",\n nome: \"Unidade\",\n sigla_normalizada: \"UN\",\n normalizar: (valor: number) => valor,\n tipo: \"unidade\",\n },\n]\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASO,IAAK,yBAAL,kBAAKA,4BAAL;AACL,EAAAA,wBAAA,QAAK;AAEL,EAAAA,wBAAA,QAAK;AACL,EAAAA,wBAAA,SAAM;AACN,EAAAA,wBAAA,OAAI;AAEJ,EAAAA,wBAAA,WAAO;AACP,EAAAA,wBAAA,QAAK;AARK,SAAAA;AAAA,GAAA;AAWL,MAAM,kBAMP;AAAA,EACJ;AAAA,IACE,eAAe;AAAA,IACf,MAAM;AAAA,IACN,mBAAmB;AAAA,IACnB,YAAY,CAAC,UAAkB;AAAA,IAC/B,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,eAAe;AAAA,IACf,MAAM;AAAA,IACN,mBAAmB;AAAA,IACnB,YAAY,CAAC,UAAkB,QAAQ;AAAA,IACvC,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,eAAe;AAAA,IACf,MAAM;AAAA,IACN,mBAAmB;AAAA,IACnB,YAAY,CAAC,UAAkB,QAAQ;AAAA,IACvC,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,eAAe;AAAA,IACf,MAAM;AAAA,IACN,mBAAmB;AAAA,IACnB,YAAY,CAAC,UAAkB;AAAA,IAC/B,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,eAAe;AAAA,IACf,MAAM;AAAA,IACN,mBAAmB;AAAA,IACnB,YAAY,CAAC,UAAkB,QAAQ;AAAA,IACvC,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,eAAe;AAAA,IACf,MAAM;AAAA,IACN,mBAAmB;AAAA,IACnB,YAAY,CAAC,UAAkB;AAAA,IAC/B,MAAM;AAAA,EACR;AACF;","names":["siglas_unidades_medida"]}
|
||||
37
dist-back/uuid.cjs
Normal file
37
dist-back/uuid.cjs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var uuid_exports = {};
|
||||
__export(uuid_exports, {
|
||||
uuid: () => uuid
|
||||
});
|
||||
module.exports = __toCommonJS(uuid_exports);
|
||||
const letras = "0123456789abcdef".split("");
|
||||
const uuid = () => {
|
||||
letras.sort(() => Math.random() - 0.5);
|
||||
const modelo = "xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx".split("");
|
||||
const retorno = modelo.map(
|
||||
(letra) => letra === "x" ? letras[(1e3 * Math.random() | 0) % letras.length] : letra
|
||||
).join("");
|
||||
return retorno;
|
||||
};
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
uuid
|
||||
});
|
||||
//# sourceMappingURL=uuid.cjs.map
|
||||
1
dist-back/uuid.cjs.map
Normal file
1
dist-back/uuid.cjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/uuid.ts"],"sourcesContent":["//Gerar uma uuid V4\nconst letras = \"0123456789abcdef\".split(\"\")\nexport const uuid = () => {\n letras.sort(() => Math.random() - 0.5)\n const modelo = \"xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx\".split(\"\")\n const retorno = modelo\n .map((letra) =>\n letra === \"x\"\n ? letras[((1000 * Math.random()) | 0) % letras.length]\n : letra,\n )\n .join(\"\")\n\n return retorno\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,MAAM,SAAS,mBAAmB,MAAM,EAAE;AACnC,MAAM,OAAO,MAAM;AACxB,SAAO,KAAK,MAAM,KAAK,OAAO,IAAI,GAAG;AACrC,QAAM,SAAS,uCAAuC,MAAM,EAAE;AAC9D,QAAM,UAAU,OACb;AAAA,IAAI,CAAC,UACJ,UAAU,MACN,QAAS,MAAO,KAAK,OAAO,IAAK,KAAK,OAAO,MAAM,IACnD;AAAA,EACN,EACC,KAAK,EAAE;AAEV,SAAO;AACT;","names":[]}
|
||||
34
dist-back/variaveisComuns.cjs
Normal file
34
dist-back/variaveisComuns.cjs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var variaveisComuns_exports = {};
|
||||
__export(variaveisComuns_exports, {
|
||||
esperar: () => esperar,
|
||||
nomeVariavel: () => nomeVariavel
|
||||
});
|
||||
module.exports = __toCommonJS(variaveisComuns_exports);
|
||||
const esperar = (ms) => new Promise(
|
||||
(resolve) => setTimeout(() => resolve(true), ms)
|
||||
);
|
||||
const nomeVariavel = (v) => Object.keys(v).join("/");
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
esperar,
|
||||
nomeVariavel
|
||||
});
|
||||
//# sourceMappingURL=variaveisComuns.cjs.map
|
||||
1
dist-back/variaveisComuns.cjs.map
Normal file
1
dist-back/variaveisComuns.cjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/variaveisComuns.ts"],"sourcesContent":["export const esperar = (ms: number): Promise<true> =>\n new Promise((resolve: (r: true) => void) =>\n setTimeout(() => resolve(true), ms),\n )\n/**\n * Usado para retronat o no de uma variável, deve ser usado dentro de um objeto\n * const nomex = {a: 1, b: 2}\n * nomeVariavel({nomex}) // retorna \"nomex\"\n * @param v\n * @returns\n */\nexport const nomeVariavel = (v: { [key: string]: any }) =>\n Object.keys(v).join(\"/\")\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,UAAU,CAAC,OACtB,IAAI;AAAA,EAAQ,CAAC,YACX,WAAW,MAAM,QAAQ,IAAI,GAAG,EAAE;AACpC;AAQK,MAAM,eAAe,CAAC,MAC3B,OAAO,KAAK,CAAC,EAAE,KAAK,GAAG;","names":[]}
|
||||
2
dist-front/aleatorio.mjs
Normal file
2
dist-front/aleatorio.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
const o="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),a=t=>`eli-${Array.from({length:t||8}).map(()=>o[(999*Math.random()|0)%o.length]).join("")}`;export{a as aleatorio};
|
||||
//# sourceMappingURL=aleatorio.mjs.map
|
||||
1
dist-front/aleatorio.mjs.map
Normal file
1
dist-front/aleatorio.mjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/aleatorio.ts"],"sourcesContent":["const alfabeto = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".split(\"\")\n\nexport const aleatorio = (tamanho?: number) =>\n `eli-${Array.from({ length: tamanho || 8 })\n .map(() => alfabeto[((999 * Math.random()) | 0) % alfabeto.length])\n .join(\"\")}`\n"],"mappings":"AAAA,MAAMA,EAAW,6BAA6B,MAAM,EAAE,EAEzCC,EAAaC,GACxB,OAAO,MAAM,KAAK,CAAE,OAAQA,GAAW,CAAE,CAAC,EACvC,IAAI,IAAMF,GAAW,IAAM,KAAK,OAAO,EAAK,GAAKA,EAAS,MAAM,CAAC,EACjE,KAAK,EAAE,CAAC","names":["alfabeto","aleatorio","tamanho"]}
|
||||
2
dist-front/constantes.mjs
Normal file
2
dist-front/constantes.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
const e="00000000-0000-0000-0000-000000000000";var i=(a=>(a.codigo="codigo",a.excluido="excluido",a.data_hora_criacao="data_hora_criacao",a.data_hora_atualizacao="data_hora_atualizacao",a.codigo_usuario_criacao="codigo_usuario_criacao",a.codigo_usuario_atualizacao="codigo_usuario_atualizacao",a.versao="versao",a))(i||{}),_=(r=>(r.token="token",r))(_||{}),c=(o=>(o.Usuario="usuario",o.Fornecedor="fornecedor",o))(c||{});export{i as camposComuns,c as tipoUsuarioResiduos,_ as tx,e as uuid_null};
|
||||
//# sourceMappingURL=constantes.mjs.map
|
||||
1
dist-front/constantes.mjs.map
Normal file
1
dist-front/constantes.mjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/constantes.ts"],"sourcesContent":["export const uuid_null = \"00000000-0000-0000-0000-000000000000\"\n\n/** Colunas Presentes n maioria das tabelas */\nexport enum camposComuns {\n codigo = \"codigo\",\n excluido = \"excluido\",\n data_hora_criacao = \"data_hora_criacao\",\n data_hora_atualizacao = \"data_hora_atualizacao\",\n codigo_usuario_criacao = \"codigo_usuario_criacao\",\n codigo_usuario_atualizacao = \"codigo_usuario_atualizacao\",\n versao = \"versao\",\n}\n\n/** Palavras comumente usadas */\nexport enum tx {\n token = \"token\",\n}\n\nexport enum tipoUsuarioResiduos {\n Usuario = \"usuario\",\n Fornecedor = \"fornecedor\",\n}\n"],"mappings":"AAAO,MAAMA,EAAY,uCAGlB,IAAKC,OACVA,EAAA,OAAS,SACTA,EAAA,SAAW,WACXA,EAAA,kBAAoB,oBACpBA,EAAA,sBAAwB,wBACxBA,EAAA,uBAAyB,yBACzBA,EAAA,2BAA6B,6BAC7BA,EAAA,OAAS,SAPCA,OAAA,IAWAC,OACVA,EAAA,MAAQ,QADEA,OAAA,IAIAC,OACVA,EAAA,QAAU,UACVA,EAAA,WAAa,aAFHA,OAAA","names":["uuid_null","camposComuns","tx","tipoUsuarioResiduos"]}
|
||||
2
dist-front/consulta.mjs
Normal file
2
dist-front/consulta.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
var t=(n=>(n["="]="=",n["!="]="!=",n[">"]=">",n[">="]=">=",n["<"]="<",n["<="]="<=",n.like="like",n.in="in",n))(t||{});export{t as operadores};
|
||||
//# sourceMappingURL=consulta.mjs.map
|
||||
1
dist-front/consulta.mjs.map
Normal file
1
dist-front/consulta.mjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/consulta.ts"],"sourcesContent":["export enum operadores {\n \"=\" = \"=\",\n \"!=\" = \"!=\",\n \">\" = \">\",\n \">=\" = \">=\",\n \"<\" = \"<\",\n \"<=\" = \"<=\",\n like = \"like\",\n in = \"in\",\n}\n\nexport type tipoFiltro = {\n coluna: string\n valor: any\n operador: keyof typeof operadores | operadores\n ou?: boolean\n}\n\nexport type interfaceConsulta = {\n offset?: number\n limit?: number\n filtros?: tipoFiltro[]\n ordem?: string\n ordemTipo?: \"asc\" | \"desc\"\n colunas?: string[]\n apenasConsulta?: boolean\n apenasContagem?: boolean\n}\n"],"mappings":"AAAO,IAAKA,OACVA,EAAA,KAAM,IACNA,EAAA,MAAO,KACPA,EAAA,KAAM,IACNA,EAAA,MAAO,KACPA,EAAA,KAAM,IACNA,EAAA,MAAO,KACPA,EAAA,KAAO,OACPA,EAAA,GAAK,KARKA,OAAA","names":["operadores"]}
|
||||
2
dist-front/ecosistema/index.mjs
Normal file
2
dist-front/ecosistema/index.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export*from"./urls";
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
dist-front/ecosistema/index.mjs.map
Normal file
1
dist-front/ecosistema/index.mjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../src/ecosistema/index.ts"],"sourcesContent":["export * from \"./urls\"\n"],"mappings":"AAAA,WAAc","names":[]}
|
||||
2
dist-front/ecosistema/urls.mjs
Normal file
2
dist-front/ecosistema/urls.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
const o="https://carro-de-boi-idz-one.b-cdn.net";export{o as cdn_carro_de_boi};
|
||||
//# sourceMappingURL=urls.mjs.map
|
||||
1
dist-front/ecosistema/urls.mjs.map
Normal file
1
dist-front/ecosistema/urls.mjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../src/ecosistema/urls.ts"],"sourcesContent":["export const cdn_carro_de_boi = \"https://carro-de-boi-idz-one.b-cdn.net\"\n"],"mappings":"AAAO,MAAMA,EAAmB","names":["cdn_carro_de_boi"]}
|
||||
2
dist-front/extensoes.mjs
Normal file
2
dist-front/extensoes.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
const t=[{ext:"gif",tipo:"imagem",mime:"image/gif"},{ext:"jpg",tipo:"imagem",mime:"image/jpeg"},{ext:"jpeg",tipo:"imagem",mime:"image/jpeg"},{ext:"png",tipo:"imagem",mime:"image/png"},{ext:"bmp",tipo:"imagem",mime:"image/bmp"},{ext:"webp",tipo:"imagem",mime:"image/webp"},{ext:"tiff",tipo:"imagem",mime:"image/tiff"},{ext:"svg",tipo:"imagem",mime:"image/svg+xml"},{ext:"ico",tipo:"imagem",mime:"image/x-icon"},{ext:"pdf",tipo:"documento",mime:"application/pdf"},{ext:"doc",tipo:"documento",mime:"application/msword"},{ext:"docx",tipo:"documento",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{ext:"xls",tipo:"documento",mime:"application/vnd.ms-excel"},{ext:"xlsx",tipo:"documento",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{ext:"ppt",tipo:"documento",mime:"application/vnd.ms-powerpoint"},{ext:"pptx",tipo:"documento",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{ext:"txt",tipo:"documento",mime:"text/plain"},{ext:"odt",tipo:"documento",mime:"application/vnd.oasis.opendocument.text"},{ext:"ods",tipo:"documento",mime:"application/vnd.oasis.opendocument.spreadsheet"},{ext:"rtf",tipo:"documento",mime:"application/rtf"},{ext:"csv",tipo:"documento",mime:"text/csv"},{ext:"mp4",tipo:"v\xEDdeo",mime:"video/mp4"},{ext:"avi",tipo:"v\xEDdeo",mime:"video/x-msvideo"},{ext:"mkv",tipo:"v\xEDdeo",mime:"video/x-matroska"},{ext:"mov",tipo:"v\xEDdeo",mime:"video/quicktime"},{ext:"wmv",tipo:"v\xEDdeo",mime:"video/x-ms-wmv"},{ext:"flv",tipo:"v\xEDdeo",mime:"video/x-flv"},{ext:"webm",tipo:"v\xEDdeo",mime:"video/webm"},{ext:"3gp",tipo:"v\xEDdeo",mime:"video/3gpp"},{ext:"mpeg",tipo:"v\xEDdeo",mime:"video/mpeg"}],p=e=>{const o=String(e||"").toLocaleLowerCase().split(".").pop();return t.find(i=>i.ext===o)?.tipo||"outros"};export{t as extensoes,p as tipoArquivo};
|
||||
//# sourceMappingURL=extensoes.mjs.map
|
||||
1
dist-front/extensoes.mjs.map
Normal file
1
dist-front/extensoes.mjs.map
Normal file
File diff suppressed because one or more lines are too long
2
dist-front/index.mjs
Normal file
2
dist-front/index.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export*from"./aleatorio";export*from"./constantes";export*from"./consulta";export*from"./ecosistema";export*from"./extensoes";export*from"./logger";export*from"./texto_busca";export*from"./tipagemRotas";export*from"./unidades_medida";export*from"./uuid";export*from"./variaveisComuns";
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
dist-front/index.mjs.map
Normal file
1
dist-front/index.mjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./aleatorio\"\nexport * from \"./constantes\"\nexport * from \"./consulta\"\nexport * from \"./ecosistema\"\nexport * from \"./extensoes\"\nexport * from \"./logger\"\nexport * from \"./texto_busca\"\nexport * from \"./tipagemRotas\"\nexport * from \"./unidades_medida\"\nexport * from \"./uuid\"\nexport * from \"./variaveisComuns\"\n"],"mappings":"AAAA,WAAc,cACd,WAAc,eACd,WAAc,aACd,WAAc,eACd,WAAc,cACd,WAAc,WACd,WAAc,gBACd,WAAc,iBACd,WAAc,oBACd,WAAc,SACd,WAAc","names":[]}
|
||||
2
dist-front/logger.mjs
Normal file
2
dist-front/logger.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import d from"cross-fetch";import{nomeVariavel as n}from"./variaveisComuns";const f="https://log.idz.one",j="/loki/api/v1/push",h=async({objeto:o})=>{const r=await d(`${f}${j}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)}).catch(s=>s);return r.ok?[o]:[o,`Erro ${r.status}: ${await r?.text?.()}`]};let p="";const v=o=>{p=o},P=({app:o,eProducao:r,parametros:s})=>({inquilino:g,usuario:m,parametros:l})=>async(L,a,c)=>{let{__filename:t,detalhes:e,local:i,parametros:y}=c||{};const O=`${r?"":"DEV-"}${o}`;p&&t&&(t=t.replace(p,"")),i&&(e=[`${n({local:i})}="${i}"`,...e||[]]),t&&(e=[`${n({__filename:t})}="${t}"`,...e||[]]);const k=`${Date.now()}000000`,u=e?.length?`${a} | ${e.map(b=>JSON.stringify(b)).join(" | ")}`:a,$={streams:[{stream:{app:O,inquilino:g,usuario:m,level:L,...s||{},...l||{},...y||{}},values:[[k,u]]}]};return await h({objeto:$})};export{v as defineCwd,P as logger,h as postLogger};
|
||||
//# sourceMappingURL=logger.mjs.map
|
||||
1
dist-front/logger.mjs.map
Normal file
1
dist-front/logger.mjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/logger.ts"],"sourcesContent":["import crossFetch from \"cross-fetch\"\nimport { nomeVariavel } from \"./variaveisComuns\"\n\nconst LOKI_BASE_URL = \"https://log.idz.one\"\nconst LOKI_ENDPOINT = \"/loki/api/v1/push\"\nexport type tipoLokiObjeto = {\n streams: {\n stream: {\n [k: string]: string\n }\n values: [string, string][]\n }[]\n}\n\nexport const postLogger = async ({\n objeto,\n}: {\n objeto: tipoLokiObjeto\n}): Promise<[objeto: tipoLokiObjeto, erro?: string]> => {\n const response = await crossFetch(`${LOKI_BASE_URL}${LOKI_ENDPOINT}`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(objeto),\n }).catch((a) => a)\n if (!response.ok) {\n return [objeto, `Erro ${response.status}: ${await response?.text?.()}`]\n }\n return [objeto]\n}\n\nlet cwd = \"\"\n\n/** define a localização da pasta do projeto */\nexport const defineCwd = (novoCwd: string) => {\n cwd = novoCwd\n}\n\ntype tipoLevel = \"info\" | \"warn\" | \"error\"\n\ntype tipoOpSessao = {\n inquilino: string\n usuario: string\n parametros?: { [k: string]: string }\n}\n\ntype tipoLog = {\n detalhes?: unknown[]\n __filename?: string\n local?: string\n parametros?: { [k: string]: string }\n}\n\nexport type tipoLoggerLog = (\n level: tipoLevel,\n mensagem: string,\n op_tipoLog?: tipoLog,\n) => Promise<[objeto: tipoLokiObjeto, erro?: string]>\n\nexport type TipoLoggerSessao = (sess: tipoOpSessao) => tipoLoggerLog\n\nexport type tipoLogger = (amb: {\n app: string\n eProducao: boolean\n parametros?: {\n [k: string]: string\n }\n}) => TipoLoggerSessao\n\nexport const logger: tipoLogger =\n ({ app: app_e, eProducao, parametros: parametrosAmbiente }) =>\n ({ inquilino, usuario, parametros: parametrosSessao }) =>\n async (level, mensagem, op_tipoLog) => {\n let {\n __filename,\n detalhes,\n local,\n parametros: parametrosLog,\n } = op_tipoLog || {}\n\n const app = `${eProducao ? \"\" : \"DEV-\"}${app_e}`\n\n if (cwd && __filename) {\n __filename = __filename.replace(cwd, \"\")\n }\n\n if (local) {\n detalhes = [`${nomeVariavel({ local })}=\"${local}\"`, ...(detalhes || [])]\n }\n\n if (__filename) {\n detalhes = [\n `${nomeVariavel({ __filename })}=\"${__filename}\"`,\n ...(detalhes || []),\n ]\n }\n\n const timestamp = `${Date.now()}000000`\n\n const mainLog = detalhes?.length\n ? `${mensagem} | ${detalhes.map((d) => JSON.stringify(d)).join(\" | \")}`\n : mensagem\n\n const payload: tipoLokiObjeto[\"streams\"][number] = {\n stream: {\n app,\n inquilino,\n usuario,\n level,\n ...(parametrosAmbiente || {}),\n ...(parametrosSessao || {}),\n ...(parametrosLog || {}),\n },\n values: [\n [\n timestamp,\n mainLog, // Linha de log direta\n ],\n ],\n }\n\n const objeto: tipoLokiObjeto = { streams: [payload] }\n\n const response = await postLogger({ objeto })\n\n return response\n }\n"],"mappings":"AAAA,OAAOA,MAAgB,cACvB,OAAS,gBAAAC,MAAoB,oBAE7B,MAAMC,EAAgB,sBAChBC,EAAgB,oBAUTC,EAAa,MAAO,CAC/B,OAAAC,CACF,IAEwD,CACtD,MAAMC,EAAW,MAAMN,EAAW,GAAGE,CAAa,GAAGC,CAAa,GAAI,CACpE,OAAQ,OACR,QAAS,CAAE,eAAgB,kBAAmB,EAC9C,KAAM,KAAK,UAAUE,CAAM,CAC7B,CAAC,EAAE,MAAOE,GAAMA,CAAC,EACjB,OAAKD,EAAS,GAGP,CAACD,CAAM,EAFL,CAACA,EAAQ,QAAQC,EAAS,MAAM,KAAK,MAAMA,GAAU,OAAO,CAAC,EAAE,CAG1E,EAEA,IAAIE,EAAM,GAGH,MAAMC,EAAaC,GAAoB,CAC5CF,EAAME,CACR,EAiCaC,EACX,CAAC,CAAE,IAAKC,EAAO,UAAAC,EAAW,WAAYC,CAAmB,IACzD,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,WAAYC,CAAiB,IACpD,MAAOC,EAAOC,EAAUC,IAAe,CACrC,GAAI,CACF,WAAAC,EACA,SAAAC,EACA,MAAAC,EACA,WAAYC,CACd,EAAIJ,GAAc,CAAC,EAEnB,MAAMK,EAAM,GAAGZ,EAAY,GAAK,MAAM,GAAGD,CAAK,GAE1CJ,GAAOa,IACTA,EAAaA,EAAW,QAAQb,EAAK,EAAE,GAGrCe,IACFD,EAAW,CAAC,GAAGrB,EAAa,CAAE,MAAAsB,CAAM,CAAC,CAAC,KAAKA,CAAK,IAAK,GAAID,GAAY,CAAC,CAAE,GAGtED,IACFC,EAAW,CACT,GAAGrB,EAAa,CAAE,WAAAoB,CAAW,CAAC,CAAC,KAAKA,CAAU,IAC9C,GAAIC,GAAY,CAAC,CACnB,GAGF,MAAMI,EAAY,GAAG,KAAK,IAAI,CAAC,SAEzBC,EAAUL,GAAU,OACtB,GAAGH,CAAQ,MAAMG,EAAS,IAAKM,GAAM,KAAK,UAAUA,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,GACnET,EAoBEd,EAAyB,CAAE,QAAS,CAlBS,CACjD,OAAQ,CACN,IAAAoB,EACA,UAAAV,EACA,QAAAC,EACA,MAAAE,EACA,GAAIJ,GAAsB,CAAC,EAC3B,GAAIG,GAAoB,CAAC,EACzB,GAAIO,GAAiB,CAAC,CACxB,EACA,OAAQ,CACN,CACEE,EACAC,CACF,CACF,CACF,CAEkD,CAAE,EAIpD,OAFiB,MAAMvB,EAAW,CAAE,OAAAC,CAAO,CAAC,CAG9C","names":["crossFetch","nomeVariavel","LOKI_BASE_URL","LOKI_ENDPOINT","postLogger","objeto","response","a","cwd","defineCwd","novoCwd","logger","app_e","eProducao","parametrosAmbiente","inquilino","usuario","parametrosSessao","level","mensagem","op_tipoLog","__filename","detalhes","local","parametrosLog","app","timestamp","mainLog","d"]}
|
||||
2
dist-front/teste.mjs
Normal file
2
dist-front/teste.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import{logger as n}from"./logger";const i=n({app:"teste",eProducao:!0}),e=i({inquilino:"conta_1",usuario:"pedrinho"});e("error","Deu Ruim").then(o=>console.log(JSON.stringify(o))),e("info","Deu Bom",{__filename}).then(o=>console.log(JSON.stringify(o)));
|
||||
//# sourceMappingURL=teste.mjs.map
|
||||
1
dist-front/teste.mjs.map
Normal file
1
dist-front/teste.mjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/teste.ts"],"sourcesContent":["import { logger } from \"./logger\"\n\nconst l = logger({ app: \"teste\", eProducao: true })\n\nconst lg = l({\n inquilino: \"conta_1\",\n usuario: \"pedrinho\",\n})\n\nlg(\"error\", \"Deu Ruim\").then((a) => console.log(JSON.stringify(a)))\nlg(\"info\", \"Deu Bom\", { __filename }).then((a) =>\n console.log(JSON.stringify(a)),\n)\n"],"mappings":"AAAA,OAAS,UAAAA,MAAc,WAEvB,MAAMC,EAAID,EAAO,CAAE,IAAK,QAAS,UAAW,EAAK,CAAC,EAE5CE,EAAKD,EAAE,CACX,UAAW,UACX,QAAS,UACX,CAAC,EAEDC,EAAG,QAAS,UAAU,EAAE,KAAMC,GAAM,QAAQ,IAAI,KAAK,UAAUA,CAAC,CAAC,CAAC,EAClED,EAAG,OAAQ,UAAW,CAAE,UAAW,CAAC,EAAE,KAAMC,GAC1C,QAAQ,IAAI,KAAK,UAAUA,CAAC,CAAC,CAC/B","names":["logger","l","lg","a"]}
|
||||
2
dist-front/texto_busca.mjs
Normal file
2
dist-front/texto_busca.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
const a=(...n)=>n.map(e=>e==null?"":String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").toLowerCase()).join(" ");export{a as texto_busca};
|
||||
//# sourceMappingURL=texto_busca.mjs.map
|
||||
1
dist-front/texto_busca.mjs.map
Normal file
1
dist-front/texto_busca.mjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/texto_busca.ts"],"sourcesContent":["/** gerar o texto de busca removendo caracteres especies e caixa alta */\n\nexport const texto_busca = (...texto: any[]): string =>\n texto\n .map((txt) =>\n txt === null || txt === undefined\n ? \"\"\n : String(txt)\n .normalize(\"NFD\")\n .replace(/[\\u0300-\\u036f]/g, \"\")\n .replace(/\\s+/g, \" \")\n .toLowerCase(),\n )\n .join(\" \")\n"],"mappings":"AAEO,MAAMA,EAAc,IAAIC,IAC7BA,EACG,IAAKC,GACJA,GAAQ,KACJ,GACA,OAAOA,CAAG,EACP,UAAU,KAAK,EACf,QAAQ,mBAAoB,EAAE,EAC9B,QAAQ,OAAQ,GAAG,EACnB,YAAY,CACrB,EACC,KAAK,GAAG","names":["texto_busca","texto","txt"]}
|
||||
2
dist-front/tipagemRotas.mjs
Normal file
2
dist-front/tipagemRotas.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
class o{constructor({caminho:e,acaoIr:n}){this._partesCaminho=[];this._acaoIr=n,this._partesCaminho=(Array.isArray(e)?e:[e]).flatMap(t=>t.split("/")).filter(Boolean)}get caminho(){return`/${this._partesCaminho.join("/")}`}set caminho(e){this._partesCaminho=e.split("/").filter(n=>n)}endereco(e,n){const t=new URL(typeof window<"u"?window.location.href:"http://localhost");t.pathname=this.caminho,t.search="";const r=Object.entries(e);for(const[s,a]of r)t.searchParams.set(String(s),a??"");return t.hash="",n&&(t.hash=`#${t.search}`,t.search=""),t.href}ir(e){this._acaoIr?this._acaoIr(this.endereco(e)):typeof window<"u"&&(window.location.href=this.endereco(e))}get parametros(){const e=new URL(typeof window<"u"?window.location.href:"http://localhost"),n=e.searchParams,t=Object.fromEntries(n.entries()),r=e.hash;if(r){const s=Object.fromEntries(new URLSearchParams(r.slice(1)).entries());return{...t,...s}}return t}}export{o as TipagemRotas};
|
||||
//# sourceMappingURL=tipagemRotas.mjs.map
|
||||
1
dist-front/tipagemRotas.mjs.map
Normal file
1
dist-front/tipagemRotas.mjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/tipagemRotas.ts"],"sourcesContent":["/** Gerar uma classe que facilita a gestão de rotas com a tipagem das querys\n *\n * Definições:\n *\n * caminho = \"/aplicacao/funcionalidade\"\n *\n * endereco = \"http://localhost:3000/aplicacao/funcionalidade\"\n *\n * parametros = {nome:\"José\"}\n */\n\nexport class TipagemRotas<T extends { [q: string]: string | undefined }> {\n _partesCaminho: string[] = []\n _acaoIr?: (endereco: string) => undefined\n\n /** Ao criar novo obijeto de tipagem de rota é necessário passar o caminho parcial\n ** export const mCaminho = new TipagemRotas<{q:string}>(\"aplicacao\",\"funcionalidade\")\n */\n constructor({\n caminho,\n acaoIr,\n }: {\n caminho: string[] | string\n acaoIr?: undefined | ((endereco: string) => undefined)\n }) {\n this._acaoIr = acaoIr\n\n this._partesCaminho = (Array.isArray(caminho) ? caminho : [caminho])\n .flatMap((a) => a.split(\"/\"))\n .filter(Boolean)\n }\n\n /** Retorna o caminho completo da rota\n ** console.log(mCaminho.caminho)\n ** \"/caminho\"\n */\n get caminho() {\n const ret = `/${this._partesCaminho.join(\"/\")}`\n return ret\n }\n /** Define o caminho completo da rota\n ** mCaminho.caminho = \"/novoCaminho\"\n ** console.log(mCaminho.caminho)\n ** \"/novoCaminho\"\n ** */\n set caminho(caminhoParcial: string) {\n this._partesCaminho = caminhoParcial.split(\"/\").filter((parte) => parte)\n }\n\n /** Retorna o caminho completo da rota com a query\n ** console.log(mCaminho.resolve({q:\"query\"}))\n ** \"http://localhost:3000/caminho?q=query\"\n */\n\n endereco(query: T, usarComoHash?: boolean) {\n const url = new URL(\n typeof window !== \"undefined\" ? window.location.href : \"http://localhost\",\n )\n\n url.pathname = this.caminho\n\n url.search = \"\"\n\n const queryKeys = Object.entries(query)\n\n for (const [key, value] of queryKeys) {\n url.searchParams.set(\n String(key),\n value === undefined || value === null ? \"\" : value,\n )\n }\n\n url.hash = \"\"\n\n if (usarComoHash) {\n url.hash = `#${url.search}`\n url.search = \"\"\n }\n\n return url.href\n }\n\n /** Vai para a url\n ** mCaminho.ir({q:\"query\"})\n ** window.location.href = \"http://localhost:3000/caminho?q=query\"\n */\n ir(query: T) {\n if (this._acaoIr) {\n this._acaoIr(this.endereco(query))\n } else {\n if (typeof window != \"undefined\") {\n window.location.href = this.endereco(query)\n }\n }\n }\n\n /** Retorna os parametros da url\n ** console.log(mCaminho.parametros())\n ** {q:\"query\"}\n */\n\n get parametros() {\n const url = new URL(\n typeof window !== \"undefined\" ? window.location.href : \"http://localhost\",\n )\n const query = url.searchParams\n const queryObj = Object.fromEntries(query.entries())\n\n // pegar hash\n const hash = url.hash\n if (hash) {\n const hashObj = Object.fromEntries(\n new URLSearchParams(hash.slice(1)).entries(),\n )\n return { ...queryObj, ...hashObj } as T\n }\n\n return queryObj as Partial<T>\n }\n}\n"],"mappings":"AAWO,MAAMA,CAA4D,CAOvE,YAAY,CACV,QAAAC,EACA,OAAAC,CACF,EAGG,CAZH,oBAA2B,CAAC,EAa1B,KAAK,QAAUA,EAEf,KAAK,gBAAkB,MAAM,QAAQD,CAAO,EAAIA,EAAU,CAACA,CAAO,GAC/D,QAASE,GAAMA,EAAE,MAAM,GAAG,CAAC,EAC3B,OAAO,OAAO,CACnB,CAMA,IAAI,SAAU,CAEZ,MADY,IAAI,KAAK,eAAe,KAAK,GAAG,CAAC,EAE/C,CAMA,IAAI,QAAQC,EAAwB,CAClC,KAAK,eAAiBA,EAAe,MAAM,GAAG,EAAE,OAAQC,GAAUA,CAAK,CACzE,CAOA,SAASC,EAAUC,EAAwB,CACzC,MAAMC,EAAM,IAAI,IACd,OAAO,OAAW,IAAc,OAAO,SAAS,KAAO,kBACzD,EAEAA,EAAI,SAAW,KAAK,QAEpBA,EAAI,OAAS,GAEb,MAAMC,EAAY,OAAO,QAAQH,CAAK,EAEtC,SAAW,CAACI,EAAKC,CAAK,IAAKF,EACzBD,EAAI,aAAa,IACf,OAAOE,CAAG,EACaC,GAAiB,EAC1C,EAGF,OAAAH,EAAI,KAAO,GAEPD,IACFC,EAAI,KAAO,IAAIA,EAAI,MAAM,GACzBA,EAAI,OAAS,IAGRA,EAAI,IACb,CAMA,GAAGF,EAAU,CACP,KAAK,QACP,KAAK,QAAQ,KAAK,SAASA,CAAK,CAAC,EAE7B,OAAO,OAAU,MACnB,OAAO,SAAS,KAAO,KAAK,SAASA,CAAK,EAGhD,CAOA,IAAI,YAAa,CACf,MAAME,EAAM,IAAI,IACd,OAAO,OAAW,IAAc,OAAO,SAAS,KAAO,kBACzD,EACMF,EAAQE,EAAI,aACZI,EAAW,OAAO,YAAYN,EAAM,QAAQ,CAAC,EAG7CO,EAAOL,EAAI,KACjB,GAAIK,EAAM,CACR,MAAMC,EAAU,OAAO,YACrB,IAAI,gBAAgBD,EAAK,MAAM,CAAC,CAAC,EAAE,QAAQ,CAC7C,EACA,MAAO,CAAE,GAAGD,EAAU,GAAGE,CAAQ,CACnC,CAEA,OAAOF,CACT,CACF","names":["TipagemRotas","caminho","acaoIr","a","caminhoParcial","parte","query","usarComoHash","url","queryKeys","key","value","queryObj","hash","hashObj"]}
|
||||
2
dist-front/tsup/tsup.config.back.mjs
Normal file
2
dist-front/tsup/tsup.config.back.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import{defineConfig as t}from"tsup";const e={entry:["src/**/*.ts"],format:"cjs",target:"node20",outDir:"dist-back",clean:!0,bundle:!1,splitting:!1,dts:!1,sourcemap:!0,minify:!1,outExtension:()=>({js:".cjs"})};var o=t(e);export{o as default,e as tsup_config_back};
|
||||
//# sourceMappingURL=tsup.config.back.mjs.map
|
||||
1
dist-front/tsup/tsup.config.back.mjs.map
Normal file
1
dist-front/tsup/tsup.config.back.mjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../src/tsup/tsup.config.back.ts"],"sourcesContent":["// tsup.config.ts (Configuração Ajustada para Back-end)\nimport { defineConfig, type Options } from \"tsup\"\n\n// Definimos as opções em uma constante para clareza, como você fez.\n// Exportamos para que possam ser reutilizadas ou inspecionadas.\nexport const tsup_config_back: Options = {\n entry: [\"src/**/*.ts\"], // Inclui todos os arquivos TypeScript na pasta src\n format: \"cjs\", // Gera módulos CommonJS, padrão para Node.js\n target: \"node20\", // Compila para o ambiente Node.js versão 20 (ou sua versão alvo)\n outDir: \"dist-back\", // Diretório de saída para os arquivos transpilados\n clean: true, // Limpa o diretório de saída antes de cada build\n bundle: false, // ESSENCIAL: Mantém a estrutura de arquivos e pastas original\n splitting: false, // Desnecessário quando bundle é false\n dts: false, // RECOMENDADO: Gera arquivos de declaração TypeScript (.d.ts)\n // legacyOutput e outExtension foram removidos por não serem necessários\n sourcemap: true, // Recomendado para depuração\n minify: false, // Geralmente não minificamos o código do backend em produção, mas você pode mudar\n outExtension: () => ({ js: \".cjs\" }),\n}\n\n// Exporta a configuração padrão usando defineConfig\nexport default defineConfig(tsup_config_back)\n"],"mappings":"AACA,OAAS,gBAAAA,MAAkC,OAIpC,MAAMC,EAA4B,CACvC,MAAO,CAAC,aAAa,EACrB,OAAQ,MACR,OAAQ,SACR,OAAQ,YACR,MAAO,GACP,OAAQ,GACR,UAAW,GACX,IAAK,GAEL,UAAW,GACX,OAAQ,GACR,aAAc,KAAO,CAAE,GAAI,MAAO,EACpC,EAGA,IAAOC,EAAQF,EAAaC,CAAgB","names":["defineConfig","tsup_config_back","tsup_config_back_default"]}
|
||||
2
dist-front/tsup/tsup.config.front.mjs
Normal file
2
dist-front/tsup/tsup.config.front.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import{defineConfig as t}from"tsup";const e={entry:["src/**/*.ts","src/**/*.tsx"],format:"esm",target:"es2022",outDir:"dist-front",clean:!0,bundle:!1,splitting:!1,dts:!1,sourcemap:!0,minify:!0,outExtension:()=>({js:".mjs"})};var o=t(e);export{o as default,e as tsup_config_front};
|
||||
//# sourceMappingURL=tsup.config.front.mjs.map
|
||||
1
dist-front/tsup/tsup.config.front.mjs.map
Normal file
1
dist-front/tsup/tsup.config.front.mjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../src/tsup/tsup.config.front.ts"],"sourcesContent":["// tsup.config.ts (Configuração Ajustada para Back-end)\nimport { defineConfig, type Options } from \"tsup\"\n\n// Definimos as opções em uma constante para clareza, como você fez.\n// Exportamos para que possam ser reutilizadas ou inspecionadas.\nexport const tsup_config_front: Options = {\n entry: [\"src/**/*.ts\", \"src/**/*.tsx\"], // Adicionado .tsx para compatibilidade, se aplicável\n format: \"esm\", // Gera módulos ES para import/export no navegador\n target: \"es2022\", // Ou 'esnext' para os recursos mais recentes\n outDir: \"dist-front\", // Diretório de saída para os arquivos transpilados\n clean: true, // Limpa o diretório de saída antes de cada build\n bundle: false, // ESSENCIAL: Mantém a estrutura de arquivos e pastas original\n splitting: false, // Desnecessário quando bundle é false\n dts: false, // Não gera arquivos de declaração TypeScript (.d.ts) para uso em front-end JS\n // legacyOutput e outExtension foram removidos por não serem necessários\n sourcemap: true, // Recomendado para depuração no navegador\n minify: true, // Recomendado para builds de produção\n outExtension: () => ({ js: \".mjs\" }),\n}\n\n// Exporta a configuração padrão usando defineConfig\nexport default defineConfig(tsup_config_front)\n"],"mappings":"AACA,OAAS,gBAAAA,MAAkC,OAIpC,MAAMC,EAA6B,CACxC,MAAO,CAAC,cAAe,cAAc,EACrC,OAAQ,MACR,OAAQ,SACR,OAAQ,aACR,MAAO,GACP,OAAQ,GACR,UAAW,GACX,IAAK,GAEL,UAAW,GACX,OAAQ,GACR,aAAc,KAAO,CAAE,GAAI,MAAO,EACpC,EAGA,IAAOC,EAAQF,EAAaC,CAAiB","names":["defineConfig","tsup_config_front","tsup_config_front_default"]}
|
||||
2
dist-front/tsup/tsup.config.mjs
Normal file
2
dist-front/tsup/tsup.config.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import{defineConfig as o}from"tsup";import{tsup_config_back as t}from"./tsup.config.back";import{tsup_config_front as f}from"./tsup.config.front";var m=o([t,f]);export{m as default};
|
||||
//# sourceMappingURL=tsup.config.mjs.map
|
||||
1
dist-front/tsup/tsup.config.mjs.map
Normal file
1
dist-front/tsup/tsup.config.mjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../src/tsup/tsup.config.ts"],"sourcesContent":["// tsup.config.ts (Configuração Ajustada para Back-end)\nimport { defineConfig, type Options } from \"tsup\"\nimport { tsup_config_back } from \"./tsup.config.back\"\nimport { tsup_config_front } from \"./tsup.config.front\"\n\n// Exporta a configuração padrão usando defineConfig\nexport default defineConfig([tsup_config_back, tsup_config_front])\n"],"mappings":"AACA,OAAS,gBAAAA,MAAkC,OAC3C,OAAS,oBAAAC,MAAwB,qBACjC,OAAS,qBAAAC,MAAyB,sBAGlC,IAAOC,EAAQH,EAAa,CAACC,EAAkBC,CAAiB,CAAC","names":["defineConfig","tsup_config_back","tsup_config_front","tsup_config_default"]}
|
||||
2
dist-front/unidades_medida.mjs
Normal file
2
dist-front/unidades_medida.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
var n=(o=>(o.UN="UN",o.KG="KG",o.TON="TON",o.g="g",o["M\xB3"]="M\xB3",o.Lt="Lt",o))(n||{});const i=[{sigla_unidade:"KG",nome:"Quilograma",sigla_normalizada:"KG",normalizar:a=>a,tipo:"massa"},{sigla_unidade:"g",nome:"Grama",sigla_normalizada:"KG",normalizar:a=>a/1e3,tipo:"massa"},{sigla_unidade:"TON",nome:"Tonelada",sigla_normalizada:"KG",normalizar:a=>a*1e3,tipo:"massa"},{sigla_unidade:"Lt",nome:"Litro",sigla_normalizada:"Lt",normalizar:a=>a,tipo:"volume"},{sigla_unidade:"M\xB3",nome:"Metro C\xFAbico",sigla_normalizada:"Lt",normalizar:a=>a*1e3,tipo:"volume"},{sigla_unidade:"UN",nome:"Unidade",sigla_normalizada:"UN",normalizar:a=>a,tipo:"unidade"}];export{n as siglas_unidades_medida,i as unidades_medida};
|
||||
//# sourceMappingURL=unidades_medida.mjs.map
|
||||
1
dist-front/unidades_medida.mjs.map
Normal file
1
dist-front/unidades_medida.mjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/unidades_medida.ts"],"sourcesContent":["/**\n * Essa variável se conecta a tabela_lidades\n *\n * onde sigla se conecta com sigla\n *\n * Usuário terá mais opções de unidades, quando fazer o envio para o mtr, usar a opção fornecida pelo usuarios, caso não tenha\n * usar a normalizada\n */\n\nexport enum siglas_unidades_medida {\n UN = \"UN\",\n\n KG = \"KG\",\n TON = \"TON\",\n g = \"g\",\n\n \"M³\" = \"M³\",\n Lt = \"Lt\",\n}\n\nexport const unidades_medida: {\n sigla_unidade: keyof typeof siglas_unidades_medida\n nome: string\n sigla_normalizada: keyof typeof siglas_unidades_medida\n normalizar: (valor: number) => number\n tipo: \"massa\" | \"volume\" | \"comprimento\" | \"unidade\"\n}[] = [\n {\n sigla_unidade: \"KG\",\n nome: \"Quilograma\",\n sigla_normalizada: \"KG\",\n normalizar: (valor: number) => valor,\n tipo: \"massa\",\n },\n {\n sigla_unidade: \"g\",\n nome: \"Grama\",\n sigla_normalizada: \"KG\",\n normalizar: (valor: number) => valor / 1000,\n tipo: \"massa\",\n },\n {\n sigla_unidade: \"TON\",\n nome: \"Tonelada\",\n sigla_normalizada: \"KG\",\n normalizar: (valor: number) => valor * 1000,\n tipo: \"massa\",\n },\n {\n sigla_unidade: \"Lt\",\n nome: \"Litro\",\n sigla_normalizada: \"Lt\",\n normalizar: (valor: number) => valor,\n tipo: \"volume\",\n },\n {\n sigla_unidade: \"M³\",\n nome: \"Metro Cúbico\",\n sigla_normalizada: \"Lt\",\n normalizar: (valor: number) => valor * 1000,\n tipo: \"volume\",\n },\n {\n sigla_unidade: \"UN\",\n nome: \"Unidade\",\n sigla_normalizada: \"UN\",\n normalizar: (valor: number) => valor,\n tipo: \"unidade\",\n },\n]\n"],"mappings":"AASO,IAAKA,OACVA,EAAA,GAAK,KAELA,EAAA,GAAK,KACLA,EAAA,IAAM,MACNA,EAAA,EAAI,IAEJA,EAAA,SAAO,QACPA,EAAA,GAAK,KARKA,OAAA,IAWL,MAAMC,EAMP,CACJ,CACE,cAAe,KACf,KAAM,aACN,kBAAmB,KACnB,WAAaC,GAAkBA,EAC/B,KAAM,OACR,EACA,CACE,cAAe,IACf,KAAM,QACN,kBAAmB,KACnB,WAAaA,GAAkBA,EAAQ,IACvC,KAAM,OACR,EACA,CACE,cAAe,MACf,KAAM,WACN,kBAAmB,KACnB,WAAaA,GAAkBA,EAAQ,IACvC,KAAM,OACR,EACA,CACE,cAAe,KACf,KAAM,QACN,kBAAmB,KACnB,WAAaA,GAAkBA,EAC/B,KAAM,QACR,EACA,CACE,cAAe,QACf,KAAM,kBACN,kBAAmB,KACnB,WAAaA,GAAkBA,EAAQ,IACvC,KAAM,QACR,EACA,CACE,cAAe,KACf,KAAM,UACN,kBAAmB,KACnB,WAAaA,GAAkBA,EAC/B,KAAM,SACR,CACF","names":["siglas_unidades_medida","unidades_medida","valor"]}
|
||||
2
dist-front/uuid.mjs
Normal file
2
dist-front/uuid.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
const x="0123456789abcdef".split(""),r=()=>(x.sort(()=>Math.random()-.5),"xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx".split("").map(o=>o==="x"?x[(1e3*Math.random()|0)%x.length]:o).join(""));export{r as uuid};
|
||||
//# sourceMappingURL=uuid.mjs.map
|
||||
1
dist-front/uuid.mjs.map
Normal file
1
dist-front/uuid.mjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/uuid.ts"],"sourcesContent":["//Gerar uma uuid V4\nconst letras = \"0123456789abcdef\".split(\"\")\nexport const uuid = () => {\n letras.sort(() => Math.random() - 0.5)\n const modelo = \"xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx\".split(\"\")\n const retorno = modelo\n .map((letra) =>\n letra === \"x\"\n ? letras[((1000 * Math.random()) | 0) % letras.length]\n : letra,\n )\n .join(\"\")\n\n return retorno\n}\n"],"mappings":"AACA,MAAMA,EAAS,mBAAmB,MAAM,EAAE,EAC7BC,EAAO,KAClBD,EAAO,KAAK,IAAM,KAAK,OAAO,EAAI,EAAG,EACtB,uCAAuC,MAAM,EAAE,EAE3D,IAAKE,GACJA,IAAU,IACNF,GAAS,IAAO,KAAK,OAAO,EAAK,GAAKA,EAAO,MAAM,EACnDE,CACN,EACC,KAAK,EAAE","names":["letras","uuid","letra"]}
|
||||
2
dist-front/variaveisComuns.mjs
Normal file
2
dist-front/variaveisComuns.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
const t=e=>new Promise(r=>setTimeout(()=>r(!0),e)),o=e=>Object.keys(e).join("/");export{t as esperar,o as nomeVariavel};
|
||||
//# sourceMappingURL=variaveisComuns.mjs.map
|
||||
1
dist-front/variaveisComuns.mjs.map
Normal file
1
dist-front/variaveisComuns.mjs.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../src/variaveisComuns.ts"],"sourcesContent":["export const esperar = (ms: number): Promise<true> =>\n new Promise((resolve: (r: true) => void) =>\n setTimeout(() => resolve(true), ms),\n )\n/**\n * Usado para retronat o no de uma variável, deve ser usado dentro de um objeto\n * const nomex = {a: 1, b: 2}\n * nomeVariavel({nomex}) // retorna \"nomex\"\n * @param v\n * @returns\n */\nexport const nomeVariavel = (v: { [key: string]: any }) =>\n Object.keys(v).join(\"/\")\n"],"mappings":"AAAO,MAAMA,EAAWC,GACtB,IAAI,QAASC,GACX,WAAW,IAAMA,EAAQ,EAAI,EAAGD,CAAE,CACpC,EAQWE,EAAgBC,GAC3B,OAAO,KAAKA,CAAC,EAAE,KAAK,GAAG","names":["esperar","ms","resolve","nomeVariavel","v"]}
|
||||
1
dist-import/aleatorio.d.ts
vendored
1
dist-import/aleatorio.d.ts
vendored
|
|
@ -1 +0,0 @@
|
|||
export declare const aleatorio: (tamanho?: number) => string;
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
const alfabeto = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
|
||||
export const aleatorio = (tamanho) => `eli-${Array.from({ length: tamanho || 8 })
|
||||
.map(() => alfabeto[((999 * Math.random()) | 0) % alfabeto.length])
|
||||
.join("")}`;
|
||||
19
dist-import/constantes.d.ts
vendored
19
dist-import/constantes.d.ts
vendored
|
|
@ -1,19 +0,0 @@
|
|||
export declare const uuid_null = "00000000-0000-0000-0000-000000000000";
|
||||
/** Colunas Presentes n maioria das tabelas */
|
||||
export declare enum camposComuns {
|
||||
codigo = "codigo",
|
||||
excluido = "excluido",
|
||||
data_hora_criacao = "data_hora_criacao",
|
||||
data_hora_atualizacao = "data_hora_atualizacao",
|
||||
codigo_usuario_criacao = "codigo_usuario_criacao",
|
||||
codigo_usuario_atualizacao = "codigo_usuario_atualizacao",
|
||||
versao = "versao"
|
||||
}
|
||||
/** Palavras comumente usadas */
|
||||
export declare enum tx {
|
||||
token = "token"
|
||||
}
|
||||
export declare enum tipoUsuarioResiduos {
|
||||
Usuario = "usuario",
|
||||
Fornecedor = "fornecedor"
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
export const uuid_null = "00000000-0000-0000-0000-000000000000";
|
||||
/** Colunas Presentes n maioria das tabelas */
|
||||
export var camposComuns;
|
||||
(function (camposComuns) {
|
||||
camposComuns["codigo"] = "codigo";
|
||||
camposComuns["excluido"] = "excluido";
|
||||
camposComuns["data_hora_criacao"] = "data_hora_criacao";
|
||||
camposComuns["data_hora_atualizacao"] = "data_hora_atualizacao";
|
||||
camposComuns["codigo_usuario_criacao"] = "codigo_usuario_criacao";
|
||||
camposComuns["codigo_usuario_atualizacao"] = "codigo_usuario_atualizacao";
|
||||
camposComuns["versao"] = "versao";
|
||||
})(camposComuns || (camposComuns = {}));
|
||||
/** Palavras comumente usadas */
|
||||
export var tx;
|
||||
(function (tx) {
|
||||
tx["token"] = "token";
|
||||
})(tx || (tx = {}));
|
||||
export var tipoUsuarioResiduos;
|
||||
(function (tipoUsuarioResiduos) {
|
||||
tipoUsuarioResiduos["Usuario"] = "usuario";
|
||||
tipoUsuarioResiduos["Fornecedor"] = "fornecedor";
|
||||
})(tipoUsuarioResiduos || (tipoUsuarioResiduos = {}));
|
||||
26
dist-import/consulta.d.ts
vendored
26
dist-import/consulta.d.ts
vendored
|
|
@ -1,26 +0,0 @@
|
|||
export declare enum operadores {
|
||||
"=" = "=",
|
||||
"!=" = "!=",
|
||||
">" = ">",
|
||||
">=" = ">=",
|
||||
"<" = "<",
|
||||
"<=" = "<=",
|
||||
like = "like",
|
||||
in = "in"
|
||||
}
|
||||
export type tipoFiltro = {
|
||||
coluna: string;
|
||||
valor: any;
|
||||
operador: keyof typeof operadores | operadores;
|
||||
ou?: boolean;
|
||||
};
|
||||
export type interfaceConsulta = {
|
||||
offset?: number;
|
||||
limit?: number;
|
||||
filtros?: tipoFiltro[];
|
||||
ordem?: string;
|
||||
ordemTipo?: "asc" | "desc";
|
||||
colunas?: string[];
|
||||
apenasConsulta?: boolean;
|
||||
apenasContagem?: boolean;
|
||||
};
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
export var operadores;
|
||||
(function (operadores) {
|
||||
operadores["="] = "=";
|
||||
operadores["!="] = "!=";
|
||||
operadores[">"] = ">";
|
||||
operadores[">="] = ">=";
|
||||
operadores["<"] = "<";
|
||||
operadores["<="] = "<=";
|
||||
operadores["like"] = "like";
|
||||
operadores["in"] = "in";
|
||||
})(operadores || (operadores = {}));
|
||||
1
dist-import/ecosistema/index.d.ts
vendored
1
dist-import/ecosistema/index.d.ts
vendored
|
|
@ -1 +0,0 @@
|
|||
export * from "./urls";
|
||||
|
|
@ -1 +0,0 @@
|
|||
export * from "./urls";
|
||||
1
dist-import/ecosistema/urls.d.ts
vendored
1
dist-import/ecosistema/urls.d.ts
vendored
|
|
@ -1 +0,0 @@
|
|||
export declare const cdn_carro_de_boi = "https://carro-de-boi-idz-one.b-cdn.net";
|
||||
|
|
@ -1 +0,0 @@
|
|||
export const cdn_carro_de_boi = "https://carro-de-boi-idz-one.b-cdn.net";
|
||||
13
dist-import/extensoes.d.ts
vendored
13
dist-import/extensoes.d.ts
vendored
|
|
@ -1,13 +0,0 @@
|
|||
type tiposArquivo = "imagem" | "documento" | "vídeo" | "outros";
|
||||
export declare const extensoes: {
|
||||
ext: string;
|
||||
tipo: tiposArquivo;
|
||||
mime: string;
|
||||
}[];
|
||||
/**
|
||||
* Função que retorna o tipo do arquivo
|
||||
* @param nomeArquivo
|
||||
* @returns
|
||||
*/
|
||||
export declare const tipoArquivo: (nomeArquivo: string | null | undefined) => tiposArquivo;
|
||||
export {};
|
||||
|
|
@ -1,168 +0,0 @@
|
|||
export const extensoes = [
|
||||
{
|
||||
ext: "gif",
|
||||
tipo: "imagem",
|
||||
mime: "image/gif",
|
||||
},
|
||||
{
|
||||
ext: "jpg",
|
||||
tipo: "imagem",
|
||||
mime: "image/jpeg",
|
||||
},
|
||||
{
|
||||
ext: "jpeg",
|
||||
tipo: "imagem",
|
||||
mime: "image/jpeg",
|
||||
},
|
||||
{
|
||||
ext: "png",
|
||||
tipo: "imagem",
|
||||
mime: "image/png",
|
||||
},
|
||||
{
|
||||
ext: "bmp",
|
||||
tipo: "imagem",
|
||||
mime: "image/bmp",
|
||||
},
|
||||
{
|
||||
ext: "webp",
|
||||
tipo: "imagem",
|
||||
mime: "image/webp",
|
||||
},
|
||||
{
|
||||
ext: "tiff",
|
||||
tipo: "imagem",
|
||||
mime: "image/tiff",
|
||||
},
|
||||
{
|
||||
ext: "svg",
|
||||
tipo: "imagem",
|
||||
mime: "image/svg+xml",
|
||||
},
|
||||
{
|
||||
ext: "ico",
|
||||
tipo: "imagem",
|
||||
mime: "image/x-icon",
|
||||
},
|
||||
{
|
||||
ext: "pdf",
|
||||
tipo: "documento",
|
||||
mime: "application/pdf",
|
||||
},
|
||||
{
|
||||
ext: "doc",
|
||||
tipo: "documento",
|
||||
mime: "application/msword",
|
||||
},
|
||||
{
|
||||
ext: "docx",
|
||||
tipo: "documento",
|
||||
mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
},
|
||||
{
|
||||
ext: "xls",
|
||||
tipo: "documento",
|
||||
mime: "application/vnd.ms-excel",
|
||||
},
|
||||
{
|
||||
ext: "xlsx",
|
||||
tipo: "documento",
|
||||
mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
},
|
||||
{
|
||||
ext: "ppt",
|
||||
tipo: "documento",
|
||||
mime: "application/vnd.ms-powerpoint",
|
||||
},
|
||||
{
|
||||
ext: "pptx",
|
||||
tipo: "documento",
|
||||
mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
||||
},
|
||||
{
|
||||
ext: "txt",
|
||||
tipo: "documento",
|
||||
mime: "text/plain",
|
||||
},
|
||||
{
|
||||
ext: "odt",
|
||||
tipo: "documento",
|
||||
mime: "application/vnd.oasis.opendocument.text",
|
||||
},
|
||||
{
|
||||
ext: "ods",
|
||||
tipo: "documento",
|
||||
mime: "application/vnd.oasis.opendocument.spreadsheet",
|
||||
},
|
||||
{
|
||||
ext: "rtf",
|
||||
tipo: "documento",
|
||||
mime: "application/rtf",
|
||||
},
|
||||
{
|
||||
ext: "csv",
|
||||
tipo: "documento",
|
||||
mime: "text/csv",
|
||||
},
|
||||
{
|
||||
ext: "mp4",
|
||||
tipo: "vídeo",
|
||||
mime: "video/mp4",
|
||||
},
|
||||
{
|
||||
ext: "avi",
|
||||
tipo: "vídeo",
|
||||
mime: "video/x-msvideo",
|
||||
},
|
||||
{
|
||||
ext: "mkv",
|
||||
tipo: "vídeo",
|
||||
mime: "video/x-matroska",
|
||||
},
|
||||
{
|
||||
ext: "mov",
|
||||
tipo: "vídeo",
|
||||
mime: "video/quicktime",
|
||||
},
|
||||
{
|
||||
ext: "wmv",
|
||||
tipo: "vídeo",
|
||||
mime: "video/x-ms-wmv",
|
||||
},
|
||||
{
|
||||
ext: "flv",
|
||||
tipo: "vídeo",
|
||||
mime: "video/x-flv",
|
||||
},
|
||||
{
|
||||
ext: "webm",
|
||||
tipo: "vídeo",
|
||||
mime: "video/webm",
|
||||
},
|
||||
{
|
||||
ext: "3gp",
|
||||
tipo: "vídeo",
|
||||
mime: "video/3gpp",
|
||||
},
|
||||
{
|
||||
ext: "mpeg",
|
||||
tipo: "vídeo",
|
||||
mime: "video/mpeg",
|
||||
},
|
||||
];
|
||||
/**
|
||||
* Função que retorna o tipo do arquivo
|
||||
* @param nomeArquivo
|
||||
* @returns
|
||||
*/
|
||||
export const tipoArquivo = (nomeArquivo) => {
|
||||
// extenssão do arquivo
|
||||
const extArquivo = String(nomeArquivo || "")
|
||||
.toLocaleLowerCase()
|
||||
.split(".")
|
||||
.pop();
|
||||
// procura a extensão do arquivo na lista de extensões
|
||||
const extensao = extensoes.find((extensao) => extensao.ext === extArquivo);
|
||||
// retorna o tipo do arquivo
|
||||
return extensao?.tipo || "outros";
|
||||
};
|
||||
11
dist-import/index.d.ts
vendored
11
dist-import/index.d.ts
vendored
|
|
@ -1,11 +0,0 @@
|
|||
export * from "./aleatorio";
|
||||
export * from "./constantes";
|
||||
export * from "./consulta";
|
||||
export * from "./ecosistema";
|
||||
export * from "./extensoes";
|
||||
export * from "./logger";
|
||||
export * from "./texto_busca";
|
||||
export * from "./tipagemRotas";
|
||||
export * from "./unidades_medida";
|
||||
export * from "./uuid";
|
||||
export * from "./variaveisComuns";
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
export * from "./aleatorio";
|
||||
export * from "./constantes";
|
||||
export * from "./consulta";
|
||||
export * from "./ecosistema";
|
||||
export * from "./extensoes";
|
||||
export * from "./logger";
|
||||
export * from "./texto_busca";
|
||||
export * from "./tipagemRotas";
|
||||
export * from "./unidades_medida";
|
||||
export * from "./uuid";
|
||||
export * from "./variaveisComuns";
|
||||
40
dist-import/logger.d.ts
vendored
40
dist-import/logger.d.ts
vendored
|
|
@ -1,40 +0,0 @@
|
|||
export type tipoLokiObjeto = {
|
||||
streams: {
|
||||
stream: {
|
||||
[k: string]: string;
|
||||
};
|
||||
values: [string, string][];
|
||||
}[];
|
||||
};
|
||||
export declare const postLogger: ({ objeto, }: {
|
||||
objeto: tipoLokiObjeto;
|
||||
}) => Promise<[objeto: tipoLokiObjeto, erro?: string]>;
|
||||
/** define a localização da pasta do projeto */
|
||||
export declare const defineCwd: (novoCwd: string) => void;
|
||||
type tipoLevel = "info" | "warn" | "error";
|
||||
type tipoOpSessao = {
|
||||
inquilino: string;
|
||||
usuario: string;
|
||||
parametros?: {
|
||||
[k: string]: string;
|
||||
};
|
||||
};
|
||||
type tipoLog = {
|
||||
detalhes?: unknown[];
|
||||
__filename?: string;
|
||||
local?: string;
|
||||
parametros?: {
|
||||
[k: string]: string;
|
||||
};
|
||||
};
|
||||
export type tipoLoggerLog = (level: tipoLevel, mensagem: string, op_tipoLog?: tipoLog) => Promise<[objeto: tipoLokiObjeto, erro?: string]>;
|
||||
export type TipoLoggerSessao = (sess: tipoOpSessao) => tipoLoggerLog;
|
||||
export type tipoLogger = (amb: {
|
||||
app: string;
|
||||
eProducao: boolean;
|
||||
parametros?: {
|
||||
[k: string]: string;
|
||||
};
|
||||
}) => TipoLoggerSessao;
|
||||
export declare const logger: tipoLogger;
|
||||
export {};
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
import crossFetch from "cross-fetch";
|
||||
import { nomeVariavel } from "./variaveisComuns";
|
||||
const LOKI_BASE_URL = "https://log.idz.one";
|
||||
const LOKI_ENDPOINT = "/loki/api/v1/push";
|
||||
export const postLogger = async ({ objeto, }) => {
|
||||
const response = await crossFetch(`${LOKI_BASE_URL}${LOKI_ENDPOINT}`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(objeto),
|
||||
}).catch((a) => a);
|
||||
if (!response.ok) {
|
||||
return [objeto, `Erro ${response.status}: ${await response?.text?.()}`];
|
||||
}
|
||||
return [objeto];
|
||||
};
|
||||
let cwd = "";
|
||||
/** define a localização da pasta do projeto */
|
||||
export const defineCwd = (novoCwd) => {
|
||||
cwd = novoCwd;
|
||||
};
|
||||
export const logger = ({ app: app_e, eProducao, parametros: parametrosAmbiente }) => ({ inquilino, usuario, parametros: parametrosSessao }) => async (level, mensagem, op_tipoLog) => {
|
||||
let { __filename, detalhes, local, parametros: parametrosLog, } = op_tipoLog || {};
|
||||
const app = `${eProducao ? "" : "DEV-"}${app_e}`;
|
||||
if (cwd && __filename) {
|
||||
__filename = __filename.replace(cwd, "");
|
||||
}
|
||||
if (local) {
|
||||
detalhes = [`${nomeVariavel({ local })}="${local}"`, ...(detalhes || [])];
|
||||
}
|
||||
if (__filename) {
|
||||
detalhes = [
|
||||
`${nomeVariavel({ __filename })}="${__filename}"`,
|
||||
...(detalhes || []),
|
||||
];
|
||||
}
|
||||
const timestamp = `${Date.now()}000000`;
|
||||
const mainLog = detalhes?.length
|
||||
? `${mensagem} | ${detalhes.map((d) => JSON.stringify(d)).join(" | ")}`
|
||||
: mensagem;
|
||||
const payload = {
|
||||
stream: {
|
||||
app,
|
||||
inquilino,
|
||||
usuario,
|
||||
level,
|
||||
...(parametrosAmbiente || {}),
|
||||
...(parametrosSessao || {}),
|
||||
...(parametrosLog || {}),
|
||||
},
|
||||
values: [
|
||||
[
|
||||
timestamp,
|
||||
mainLog, // Linha de log direta
|
||||
],
|
||||
],
|
||||
};
|
||||
const objeto = { streams: [payload] };
|
||||
const response = await postLogger({ objeto });
|
||||
return response;
|
||||
};
|
||||
1
dist-import/teste.d.ts
vendored
1
dist-import/teste.d.ts
vendored
|
|
@ -1 +0,0 @@
|
|||
export {};
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
import { logger } from "./logger";
|
||||
const l = logger({ app: "teste", eProducao: true });
|
||||
const lg = l({
|
||||
inquilino: "conta_1",
|
||||
usuario: "pedrinho",
|
||||
});
|
||||
lg("error", "Deu Ruim").then((a) => console.log(JSON.stringify(a)));
|
||||
lg("info", "Deu Bom", { __filename }).then((a) => console.log(JSON.stringify(a)));
|
||||
2
dist-import/texto_busca.d.ts
vendored
2
dist-import/texto_busca.d.ts
vendored
|
|
@ -1,2 +0,0 @@
|
|||
/** gerar o texto de busca removendo caracteres especies e caixa alta */
|
||||
export declare const texto_busca: (...texto: any[]) => string;
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
/** gerar o texto de busca removendo caracteres especies e caixa alta */
|
||||
export const texto_busca = (...texto) => texto
|
||||
.map((txt) => txt === null || txt === undefined
|
||||
? ""
|
||||
: String(txt)
|
||||
.normalize("NFD")
|
||||
.replace(/[\u0300-\u036f]/g, "")
|
||||
.replace(/\s+/g, " ")
|
||||
.toLowerCase())
|
||||
.join(" ");
|
||||
49
dist-import/tipagemRotas.d.ts
vendored
49
dist-import/tipagemRotas.d.ts
vendored
|
|
@ -1,49 +0,0 @@
|
|||
/** Gerar uma classe que facilita a gestão de rotas com a tipagem das querys
|
||||
*
|
||||
* Definições:
|
||||
*
|
||||
* caminho = "/aplicacao/funcionalidade"
|
||||
*
|
||||
* endereco = "http://localhost:3000/aplicacao/funcionalidade"
|
||||
*
|
||||
* parametros = {nome:"José"}
|
||||
*/
|
||||
export declare class TipagemRotas<T extends {
|
||||
[q: string]: string | undefined;
|
||||
}> {
|
||||
_partesCaminho: string[];
|
||||
_acaoIr?: (endereco: string) => undefined;
|
||||
/** Ao criar novo obijeto de tipagem de rota é necessário passar o caminho parcial
|
||||
** export const mCaminho = new TipagemRotas<{q:string}>("aplicacao","funcionalidade")
|
||||
*/
|
||||
constructor({ caminho, acaoIr, }: {
|
||||
caminho: string[] | string;
|
||||
acaoIr?: undefined | ((endereco: string) => undefined);
|
||||
});
|
||||
/** Retorna o caminho completo da rota
|
||||
** console.log(mCaminho.caminho)
|
||||
** "/caminho"
|
||||
*/
|
||||
get caminho(): string;
|
||||
/** Define o caminho completo da rota
|
||||
** mCaminho.caminho = "/novoCaminho"
|
||||
** console.log(mCaminho.caminho)
|
||||
** "/novoCaminho"
|
||||
** */
|
||||
set caminho(caminhoParcial: string);
|
||||
/** Retorna o caminho completo da rota com a query
|
||||
** console.log(mCaminho.resolve({q:"query"}))
|
||||
** "http://localhost:3000/caminho?q=query"
|
||||
*/
|
||||
endereco(query: T, usarComoHash?: boolean): string;
|
||||
/** Vai para a url
|
||||
** mCaminho.ir({q:"query"})
|
||||
** window.location.href = "http://localhost:3000/caminho?q=query"
|
||||
*/
|
||||
ir(query: T): void;
|
||||
/** Retorna os parametros da url
|
||||
** console.log(mCaminho.parametros())
|
||||
** {q:"query"}
|
||||
*/
|
||||
get parametros(): Partial<T>;
|
||||
}
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
/** Gerar uma classe que facilita a gestão de rotas com a tipagem das querys
|
||||
*
|
||||
* Definições:
|
||||
*
|
||||
* caminho = "/aplicacao/funcionalidade"
|
||||
*
|
||||
* endereco = "http://localhost:3000/aplicacao/funcionalidade"
|
||||
*
|
||||
* parametros = {nome:"José"}
|
||||
*/
|
||||
export class TipagemRotas {
|
||||
/** Ao criar novo obijeto de tipagem de rota é necessário passar o caminho parcial
|
||||
** export const mCaminho = new TipagemRotas<{q:string}>("aplicacao","funcionalidade")
|
||||
*/
|
||||
constructor({ caminho, acaoIr, }) {
|
||||
this._partesCaminho = [];
|
||||
this._acaoIr = acaoIr;
|
||||
this._partesCaminho = (Array.isArray(caminho) ? caminho : [caminho])
|
||||
.flatMap((a) => a.split("/"))
|
||||
.filter(Boolean);
|
||||
}
|
||||
/** Retorna o caminho completo da rota
|
||||
** console.log(mCaminho.caminho)
|
||||
** "/caminho"
|
||||
*/
|
||||
get caminho() {
|
||||
const ret = `/${this._partesCaminho.join("/")}`;
|
||||
return ret;
|
||||
}
|
||||
/** Define o caminho completo da rota
|
||||
** mCaminho.caminho = "/novoCaminho"
|
||||
** console.log(mCaminho.caminho)
|
||||
** "/novoCaminho"
|
||||
** */
|
||||
set caminho(caminhoParcial) {
|
||||
this._partesCaminho = caminhoParcial.split("/").filter((parte) => parte);
|
||||
}
|
||||
/** Retorna o caminho completo da rota com a query
|
||||
** console.log(mCaminho.resolve({q:"query"}))
|
||||
** "http://localhost:3000/caminho?q=query"
|
||||
*/
|
||||
endereco(query, usarComoHash) {
|
||||
const url = new URL(typeof window !== "undefined" ? window.location.href : "http://localhost");
|
||||
url.pathname = this.caminho;
|
||||
url.search = "";
|
||||
const queryKeys = Object.entries(query);
|
||||
for (const [key, value] of queryKeys) {
|
||||
url.searchParams.set(String(key), value === undefined || value === null ? "" : value);
|
||||
}
|
||||
url.hash = "";
|
||||
if (usarComoHash) {
|
||||
url.hash = `#${url.search}`;
|
||||
url.search = "";
|
||||
}
|
||||
return url.href;
|
||||
}
|
||||
/** Vai para a url
|
||||
** mCaminho.ir({q:"query"})
|
||||
** window.location.href = "http://localhost:3000/caminho?q=query"
|
||||
*/
|
||||
ir(query) {
|
||||
if (this._acaoIr) {
|
||||
this._acaoIr(this.endereco(query));
|
||||
}
|
||||
else {
|
||||
if (typeof window != "undefined") {
|
||||
window.location.href = this.endereco(query);
|
||||
}
|
||||
}
|
||||
}
|
||||
/** Retorna os parametros da url
|
||||
** console.log(mCaminho.parametros())
|
||||
** {q:"query"}
|
||||
*/
|
||||
get parametros() {
|
||||
const url = new URL(typeof window !== "undefined" ? window.location.href : "http://localhost");
|
||||
const query = url.searchParams;
|
||||
const queryObj = Object.fromEntries(query.entries());
|
||||
// pegar hash
|
||||
const hash = url.hash;
|
||||
if (hash) {
|
||||
const hashObj = Object.fromEntries(new URLSearchParams(hash.slice(1)).entries());
|
||||
return { ...queryObj, ...hashObj };
|
||||
}
|
||||
return queryObj;
|
||||
}
|
||||
}
|
||||
23
dist-import/unidades_medida.d.ts
vendored
23
dist-import/unidades_medida.d.ts
vendored
|
|
@ -1,23 +0,0 @@
|
|||
/**
|
||||
* Essa variável se conecta a tabela_lidades
|
||||
*
|
||||
* onde sigla se conecta com sigla
|
||||
*
|
||||
* Usuário terá mais opções de unidades, quando fazer o envio para o mtr, usar a opção fornecida pelo usuarios, caso não tenha
|
||||
* usar a normalizada
|
||||
*/
|
||||
export declare enum siglas_unidades_medida {
|
||||
UN = "UN",
|
||||
KG = "KG",
|
||||
TON = "TON",
|
||||
g = "g",
|
||||
"M³" = "M\u00B3",
|
||||
Lt = "Lt"
|
||||
}
|
||||
export declare const unidades_medida: {
|
||||
sigla_unidade: keyof typeof siglas_unidades_medida;
|
||||
nome: string;
|
||||
sigla_normalizada: keyof typeof siglas_unidades_medida;
|
||||
normalizar: (valor: number) => number;
|
||||
tipo: "massa" | "volume" | "comprimento" | "unidade";
|
||||
}[];
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
/**
|
||||
* Essa variável se conecta a tabela_lidades
|
||||
*
|
||||
* onde sigla se conecta com sigla
|
||||
*
|
||||
* Usuário terá mais opções de unidades, quando fazer o envio para o mtr, usar a opção fornecida pelo usuarios, caso não tenha
|
||||
* usar a normalizada
|
||||
*/
|
||||
export var siglas_unidades_medida;
|
||||
(function (siglas_unidades_medida) {
|
||||
siglas_unidades_medida["UN"] = "UN";
|
||||
siglas_unidades_medida["KG"] = "KG";
|
||||
siglas_unidades_medida["TON"] = "TON";
|
||||
siglas_unidades_medida["g"] = "g";
|
||||
siglas_unidades_medida["M\u00B3"] = "M\u00B3";
|
||||
siglas_unidades_medida["Lt"] = "Lt";
|
||||
})(siglas_unidades_medida || (siglas_unidades_medida = {}));
|
||||
export const unidades_medida = [
|
||||
{
|
||||
sigla_unidade: "KG",
|
||||
nome: "Quilograma",
|
||||
sigla_normalizada: "KG",
|
||||
normalizar: (valor) => valor,
|
||||
tipo: "massa",
|
||||
},
|
||||
{
|
||||
sigla_unidade: "g",
|
||||
nome: "Grama",
|
||||
sigla_normalizada: "KG",
|
||||
normalizar: (valor) => valor / 1000,
|
||||
tipo: "massa",
|
||||
},
|
||||
{
|
||||
sigla_unidade: "TON",
|
||||
nome: "Tonelada",
|
||||
sigla_normalizada: "KG",
|
||||
normalizar: (valor) => valor * 1000,
|
||||
tipo: "massa",
|
||||
},
|
||||
{
|
||||
sigla_unidade: "Lt",
|
||||
nome: "Litro",
|
||||
sigla_normalizada: "Lt",
|
||||
normalizar: (valor) => valor,
|
||||
tipo: "volume",
|
||||
},
|
||||
{
|
||||
sigla_unidade: "M³",
|
||||
nome: "Metro Cúbico",
|
||||
sigla_normalizada: "Lt",
|
||||
normalizar: (valor) => valor * 1000,
|
||||
tipo: "volume",
|
||||
},
|
||||
{
|
||||
sigla_unidade: "UN",
|
||||
nome: "Unidade",
|
||||
sigla_normalizada: "UN",
|
||||
normalizar: (valor) => valor,
|
||||
tipo: "unidade",
|
||||
},
|
||||
];
|
||||
1
dist-import/uuid.d.ts
vendored
1
dist-import/uuid.d.ts
vendored
|
|
@ -1 +0,0 @@
|
|||
export declare const uuid: () => string;
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
//Gerar uma uuid V4
|
||||
const letras = "0123456789abcdef".split("");
|
||||
export const uuid = () => {
|
||||
letras.sort(() => Math.random() - 0.5);
|
||||
const modelo = "xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx".split("");
|
||||
const retorno = modelo
|
||||
.map((letra) => letra === "x"
|
||||
? letras[((1000 * Math.random()) | 0) % letras.length]
|
||||
: letra)
|
||||
.join("");
|
||||
return retorno;
|
||||
};
|
||||
11
dist-import/variaveisComuns.d.ts
vendored
11
dist-import/variaveisComuns.d.ts
vendored
|
|
@ -1,11 +0,0 @@
|
|||
export declare const esperar: (ms: number) => Promise<true>;
|
||||
/**
|
||||
* Usado para retronat o no de uma variável, deve ser usado dentro de um objeto
|
||||
* const nomex = {a: 1, b: 2}
|
||||
* nomeVariavel({nomex}) // retorna "nomex"
|
||||
* @param v
|
||||
* @returns
|
||||
*/
|
||||
export declare const nomeVariavel: (v: {
|
||||
[key: string]: any;
|
||||
}) => string;
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
export const esperar = (ms) => new Promise((resolve) => setTimeout(() => resolve(true), ms));
|
||||
/**
|
||||
* Usado para retronat o no de uma variável, deve ser usado dentro de um objeto
|
||||
* const nomex = {a: 1, b: 2}
|
||||
* nomeVariavel({nomex}) // retorna "nomex"
|
||||
* @param v
|
||||
* @returns
|
||||
*/
|
||||
export const nomeVariavel = (v) => Object.keys(v).join("/");
|
||||
1
dist-require/aleatorio.d.ts
vendored
1
dist-require/aleatorio.d.ts
vendored
|
|
@ -1 +0,0 @@
|
|||
export declare const aleatorio: (tamanho?: number) => string;
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.aleatorio = void 0;
|
||||
const alfabeto = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
|
||||
const aleatorio = (tamanho) => `eli-${Array.from({ length: tamanho || 8 })
|
||||
.map(() => alfabeto[((999 * Math.random()) | 0) % alfabeto.length])
|
||||
.join("")}`;
|
||||
exports.aleatorio = aleatorio;
|
||||
19
dist-require/constantes.d.ts
vendored
19
dist-require/constantes.d.ts
vendored
|
|
@ -1,19 +0,0 @@
|
|||
export declare const uuid_null = "00000000-0000-0000-0000-000000000000";
|
||||
/** Colunas Presentes n maioria das tabelas */
|
||||
export declare enum camposComuns {
|
||||
codigo = "codigo",
|
||||
excluido = "excluido",
|
||||
data_hora_criacao = "data_hora_criacao",
|
||||
data_hora_atualizacao = "data_hora_atualizacao",
|
||||
codigo_usuario_criacao = "codigo_usuario_criacao",
|
||||
codigo_usuario_atualizacao = "codigo_usuario_atualizacao",
|
||||
versao = "versao"
|
||||
}
|
||||
/** Palavras comumente usadas */
|
||||
export declare enum tx {
|
||||
token = "token"
|
||||
}
|
||||
export declare enum tipoUsuarioResiduos {
|
||||
Usuario = "usuario",
|
||||
Fornecedor = "fornecedor"
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue