orimização e testes de build hibrido

This commit is contained in:
Luiz Silva 2025-07-18 13:36:46 -03:00
parent 17aee620b3
commit 40dca15bff
53 changed files with 2944 additions and 697 deletions

View file

@ -22,6 +22,7 @@ __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("./testes-de-variaveis"), 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);
@ -36,6 +37,7 @@ __reExport(index_exports, require("./variaveisComuns"), module.exports);
...require("./ecosistema"),
...require("./extensoes"),
...require("./logger"),
...require("./testes-de-variaveis"),
...require("./texto_busca"),
...require("./tipagemRotas"),
...require("./unidades_medida"),

View file

@ -33,7 +33,7 @@ __export(logger_exports, {
postLogger: () => postLogger
});
module.exports = __toCommonJS(logger_exports);
var import_cross_fetch = __toESM(require("cross-fetch"));
var import_cross_fetch = __toESM(require("cross-fetch"), 1);
var import_variaveisComuns = require("./variaveisComuns");
const LOKI_BASE_URL = "https://log.idz.one";
const LOKI_ENDPOINT = "/loki/api/v1/push";

View file

@ -0,0 +1,24 @@
"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 testes_de_variaveis_exports = {};
module.exports = __toCommonJS(testes_de_variaveis_exports);
__reExport(testes_de_variaveis_exports, require("./umaFuncao"), module.exports);
__reExport(testes_de_variaveis_exports, require("./umaVariavel"), module.exports);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
...require("./umaFuncao"),
...require("./umaVariavel")
});

View file

@ -16,12 +16,13 @@ var __copyProps = (to, from, except, desc) => {
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var tsup_config_exports = {};
__export(tsup_config_exports, {
default: () => tsup_config_default
var umaFuncao_exports = {};
__export(umaFuncao_exports, {
umaFuncao: () => umaFuncao
});
module.exports = __toCommonJS(umaFuncao_exports);
const umaFuncao = () => "Ol\xE1 Mundo! (fun\xE7\xE3o)";
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
umaFuncao
});
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]);

View 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 umaVariavel_exports = {};
__export(umaVariavel_exports, {
umaVariavel: () => umaVariavel
});
module.exports = __toCommonJS(umaVariavel_exports);
const umaVariavel = "Ol\xE1 Mundo! (vari\xE1vel)";
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
umaVariavel
});

View file

@ -1,54 +0,0 @@
"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 = {
/** Não mecher aqui */
entry: ["src/**/*.ts", "src/**/*.tsx"],
// Adicionado .tsx para compatibilidade, se aplicável
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: false,
minify: false,
// Geralmente não minificamos o código do backend em produção, mas você pode mudar
outExtension: () => ({ js: ".js" })
};
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
});

View file

@ -1,53 +0,0 @@
"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: false,
minify: false,
// Recomendado para builds de produção
outExtension: () => ({ js: ".js" })
};
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
});