diff --git a/bun.lock b/bun.lock deleted file mode 100644 index 80aa627..0000000 --- a/bun.lock +++ /dev/null @@ -1,94 +0,0 @@ -{ - "lockfileVersion": 1, - "workspaces": { - "": { - "name": "p-autenticacao-drive", - "dependencies": { - "cross-fetch": "4.1.0", - "node-cache": "^5.1.2", - "p-comuns": "git+https://git2.idz.one/publico/_comuns.git", - "p-respostas": "git+https://git2.idz.one/publico/_respostas.git", - "uuid": "11.1.0", - }, - "devDependencies": { - "@biomejs/biome": "2.0.6", - "@types/node": "^20.19.8", - "check-node-version": "^4.2.1", - "typescript": "5.5.4", - }, - }, - }, - "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=="], - - "ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], - - "chalk": ["chalk@3.0.0", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg=="], - - "check-node-version": ["check-node-version@4.2.1", "", { "dependencies": { "chalk": "^3.0.0", "map-values": "^1.0.1", "minimist": "^1.2.0", "object-filter": "^1.0.2", "run-parallel": "^1.1.4", "semver": "^6.3.0" }, "bin": { "check-node-version": "bin.js" } }, "sha512-YYmFYHV/X7kSJhuN/QYHUu998n/TRuDe8UenM3+m5NrkiH670lb9ILqHIvBencvJc4SDh+XcbXMR4b+TtubJiw=="], - - "clone": ["clone@2.1.2", "", {}, "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w=="], - - "color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="], - - "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="], - - "cross-fetch": ["cross-fetch@4.1.0", "", { "dependencies": { "node-fetch": "^2.7.0" } }, "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw=="], - - "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], - - "map-values": ["map-values@1.0.1", "", {}, "sha512-BbShUnr5OartXJe1GeccAWtfro11hhgNJg6G9/UtWKjVGvV5U4C09cg5nk8JUevhXODaXY+hQ3xxMUKSs62ONQ=="], - - "minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="], - - "node-cache": ["node-cache@5.1.2", "", { "dependencies": { "clone": "2.x" } }, "sha512-t1QzWwnk4sjLWaQAS8CHgOJ+RAfmHpxFWmc36IWTiWHQfs0w5JDMBS1b1ZxQteo0vVVuWJvIUKHDkkeK7vIGCg=="], - - "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=="], - - "object-filter": ["object-filter@1.0.2", "", {}, "sha512-NahvP2vZcy1ZiiYah30CEPw0FpDcSkSePJBMpzl5EQgCmISijiGuJm3SPYp7U+Lf2TljyaIw3E5EgkEx/TNEVA=="], - - "p-comuns": ["p-comuns@git+https://git2.idz.one/publico/_comuns.git#7bddbd5c7258cd903c3bd80de5293844057521a2", { "dependencies": { "cross-fetch": "4.1.0", "zod": "3.24.1" } }, "7bddbd5c7258cd903c3bd80de5293844057521a2"], - - "p-respostas": ["p-respostas@git+https://git2.idz.one/publico/_respostas.git#431364ade4bc85aa163b970e0a94807dcc73585c", { "dependencies": { "p-comuns": "git+https://git2.idz.one/publico/_comuns.git", "zod": "3.24.1" } }, "431364ade4bc85aa163b970e0a94807dcc73585c"], - - "queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="], - - "run-parallel": ["run-parallel@1.2.0", "", { "dependencies": { "queue-microtask": "^1.2.2" } }, "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA=="], - - "semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - - "supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], - - "tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="], - - "typescript": ["typescript@5.5.4", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q=="], - - "undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="], - - "uuid": ["uuid@11.1.0", "", { "bin": { "uuid": "dist/esm/bin/uuid" } }, "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A=="], - - "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=="], - } -} diff --git a/dist-back/autenticacao/_codigoContaSite.js b/dist-back/autenticacao/_codigoContaSite.js new file mode 100644 index 0000000..c1c74fb --- /dev/null +++ b/dist-back/autenticacao/_codigoContaSite.js @@ -0,0 +1,57 @@ +"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 codigoContaSite_exports = {}; +__export(codigoContaSite_exports, { + codigoContaSite: () => codigoContaSite +}); +module.exports = __toCommonJS(codigoContaSite_exports); +var import_p_respostas = require("p-respostas"); +var import_cross_fetch = __toESM(require("cross-fetch")); +const codigoContaSite = async ({ + url_api_autenticacao, + post +}) => { + const url = `${url_api_autenticacao}/api/codigo_prefeitura_site`; + try { + const resp = await (0, import_cross_fetch.default)(url, { + method: "POST", + body: JSON.stringify(post), + headers: { "Content-Type": "application/json" } + }).then((r) => r.json()).catch( + (e) => import_p_respostas.respostaComuns.erro("Erro ao enviar registros", [e.message]) + ).then((r) => r); + return resp; + } catch (e) { + return import_p_respostas.respostaComuns.erro(`erro ao buscar c\xF3digo do site: ${e}`); + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + codigoContaSite +}); diff --git a/dist-back/autenticacao/_usuarios_quipo.js b/dist-back/autenticacao/_usuarios_quipo.js new file mode 100644 index 0000000..4171ea8 --- /dev/null +++ b/dist-back/autenticacao/_usuarios_quipo.js @@ -0,0 +1,58 @@ +"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 usuarios_quipo_exports = {}; +__export(usuarios_quipo_exports, { + usuarios_quipo: () => usuarios_quipo +}); +module.exports = __toCommonJS(usuarios_quipo_exports); +var import_cross_fetch = __toESM(require("cross-fetch")); +var import_p_respostas = require("p-respostas"); +const usuarios_quipo = async ({ + token_produto, + url_api_autenticacao, + inquilino +}) => { + const url = `${url_api_autenticacao}/api/usuarios__listar`; + if (!token_produto) return import_p_respostas.respostaComuns.erro("token_produto n\xE3o informado"); + const headers = { + token: token_produto, + "Content-Type": "application/json" + }; + return (0, import_cross_fetch.default)(url, { + method: "POST", + body: JSON.stringify({ inquilino }), + headers + }).then((r) => r.json()).catch( + (e) => import_p_respostas.respostaComuns.erro(`Erro ao buscar usu\xE1rios quipo governo ${e.message}`) + ).then((r) => r); +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + usuarios_quipo +}); diff --git a/dist-back/autenticacao/_usuarios_quipo_vincular.js b/dist-back/autenticacao/_usuarios_quipo_vincular.js new file mode 100644 index 0000000..c3966e3 --- /dev/null +++ b/dist-back/autenticacao/_usuarios_quipo_vincular.js @@ -0,0 +1,65 @@ +"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 usuarios_quipo_vincular_exports = {}; +__export(usuarios_quipo_vincular_exports, { + usuarios_quipo_vincular: () => usuarios_quipo_vincular +}); +module.exports = __toCommonJS(usuarios_quipo_vincular_exports); +var import_cross_fetch = __toESM(require("cross-fetch")); +var import_p_respostas = require("p-respostas"); +const usuarios_quipo_vincular = async ({ + token_produto, + url_api_autenticacao, + inquilino_codigo, + vinculo, + usuario_codigo, + email +}) => { + const url = `${url_api_autenticacao}/api/vinculos__criar`; + if (!token_produto) return import_p_respostas.respostaComuns.erro("token_produto n\xE3o informado"); + const headers = { + token: token_produto, + "Content-Type": "application/json" + }; + const parametros = { + vinculos: { inquilino_codigo, usuario_codigo, vinculo }, + email + }; + return await (0, import_cross_fetch.default)(url, { + headers, + body: JSON.stringify(parametros), + method: "POST" + }).then(async (r) => await r.json()).catch( + (e) => import_p_respostas.respostaComuns.erro(`Erro ao criar vinculo de usuario ${e.message}`) + ); +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + usuarios_quipo_vincular +}); diff --git a/dist-back/autenticacao/_validarToken.js b/dist-back/autenticacao/_validarToken.js new file mode 100644 index 0000000..4898e64 --- /dev/null +++ b/dist-back/autenticacao/_validarToken.js @@ -0,0 +1,56 @@ +"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 validarToken_exports = {}; +__export(validarToken_exports, { + validarToken: () => validarToken +}); +module.exports = __toCommonJS(validarToken_exports); +var import_cross_fetch = __toESM(require("cross-fetch")); +const validarToken = async ({ + url_api_autenticacao, + post +}) => { + const url = `${url_api_autenticacao}/api/validar_token`; + try { + const resposta = await (0, import_cross_fetch.default)(url, { + method: "POST", + body: JSON.stringify(post), + headers: { "Content-Type": "application/json" } + }).then((r) => r.json()).then((r) => r).then( + (resposta2) => resposta2.eCerto ? "valido" : "erro" + ).catch(() => "erro"); + return resposta; + } catch (_e) { + return "erro"; + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + validarToken +}); diff --git a/dist-back/autenticacao/index.js b/dist-back/autenticacao/index.js new file mode 100644 index 0000000..b79d499 --- /dev/null +++ b/dist-back/autenticacao/index.js @@ -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 autenticacao_exports = {}; +__export(autenticacao_exports, { + pAutenticacao: () => pAutenticacao +}); +module.exports = __toCommonJS(autenticacao_exports); +var import_codigoContaSite = require("./_codigoContaSite"); +var import_usuarios_quipo = require("./_usuarios_quipo"); +var import_usuarios_quipo_vincular = require("./_usuarios_quipo_vincular"); +var import_validarToken = require("./_validarToken"); +const pAutenticacao = { + validarToken: import_validarToken.validarToken, + codigoContaSite: import_codigoContaSite.codigoContaSite, + usuarios_quipo: import_usuarios_quipo.usuarios_quipo, + usuarios_quipo_vincular: import_usuarios_quipo_vincular.usuarios_quipo_vincular +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + pAutenticacao +}); diff --git a/dist-back/index.js b/dist-back/index.js new file mode 100644 index 0000000..01a1de4 --- /dev/null +++ b/dist-back/index.js @@ -0,0 +1,32 @@ +"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("./autenticacao"), module.exports); +__reExport(index_exports, require("./lista-prefeituras"), module.exports); +__reExport(index_exports, require("./lista-usuarios"), module.exports); +__reExport(index_exports, require("./lista-vinculos"), module.exports); +__reExport(index_exports, require("./produtos"), module.exports); +__reExport(index_exports, require("./tokens"), module.exports); +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + ...require("./autenticacao"), + ...require("./lista-prefeituras"), + ...require("./lista-usuarios"), + ...require("./lista-vinculos"), + ...require("./produtos"), + ...require("./tokens") +}); diff --git a/dist-back/lista-prefeituras.js b/dist-back/lista-prefeituras.js new file mode 100644 index 0000000..96165f8 --- /dev/null +++ b/dist-back/lista-prefeituras.js @@ -0,0 +1,61 @@ +"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 lista_prefeituras_exports = {}; +__export(lista_prefeituras_exports, { + listarPrefeituras: () => listarPrefeituras, + tx_listar_prefeituras: () => tx_listar_prefeituras +}); +module.exports = __toCommonJS(lista_prefeituras_exports); +var import_cross_fetch = __toESM(require("cross-fetch")); +var import_p_respostas = require("p-respostas"); +const tx_listar_prefeituras = "listar_prefeituras"; +const listarPrefeituras = async ({ + url_api_autenticacao +}) => { + const url = `${url_api_autenticacao}/api/${tx_listar_prefeituras}`; + return (0, import_cross_fetch.default)(url).then(async (a) => { + const texto = await a.text(); + try { + const res = JSON.parse(texto); + return res; + } catch (error) { + return import_p_respostas.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [ + texto, + error + ]); + } + }).catch( + (error) => import_p_respostas.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [error]) + ); +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + listarPrefeituras, + tx_listar_prefeituras +}); diff --git a/dist-back/lista-usuarios.js b/dist-back/lista-usuarios.js new file mode 100644 index 0000000..953756c --- /dev/null +++ b/dist-back/lista-usuarios.js @@ -0,0 +1,66 @@ +"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 lista_usuarios_exports = {}; +__export(lista_usuarios_exports, { + listarUsuarios: () => listarUsuarios, + tx_usuarios__listar: () => tx_usuarios__listar +}); +module.exports = __toCommonJS(lista_usuarios_exports); +var import_cross_fetch = __toESM(require("cross-fetch")); +var import_p_respostas = require("p-respostas"); +const tx_usuarios__listar = "usuarios__listar"; +const listarUsuarios = async ({ + token, + url_api_autenticacao +}, parametros) => { + const url = `${url_api_autenticacao}/api/${tx_usuarios__listar}`; + return (0, import_cross_fetch.default)(url, { + headers: { token, "Content-Type": "application/json" }, + body: JSON.stringify(parametros), + method: "post" + }).then(async (a) => { + const texto = await a.text(); + try { + const res = JSON.parse(texto); + return res; + } catch (error) { + return import_p_respostas.respostaComuns.erro( + `Erro ao listar usu\xE1rios: ${error.message}`, + [texto, error] + ); + } + }).catch( + (error) => import_p_respostas.respostaComuns.erro(`Erro ao listar usu\xE1rios: ${error.message}`, [error]) + ); +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + listarUsuarios, + tx_usuarios__listar +}); diff --git a/dist-back/lista-vinculos.js b/dist-back/lista-vinculos.js new file mode 100644 index 0000000..0461e4f --- /dev/null +++ b/dist-back/lista-vinculos.js @@ -0,0 +1,89 @@ +"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 lista_vinculos_exports = {}; +__export(lista_vinculos_exports, { + listarVinculos: () => listarVinculos, + tx_vinculos__listar: () => tx_vinculos__listar +}); +module.exports = __toCommonJS(lista_vinculos_exports); +var import_cross_fetch = __toESM(require("cross-fetch")); +var import_p_comuns = require("p-comuns"); +var import_p_respostas = require("p-respostas"); +var import_uuid = require("./plugins/uuid"); +const tx_vinculos__listar = "vinculos__listar"; +const listarVinculos = async ({ + token, + url_api_autenticacao, + desativarCache +}) => { + const chaveCache = (0, import_uuid.uuidV3)({ token, url_api_autenticacao }); + if (!desativarCache) { + const valorCache = (0, import_p_comuns.cacheM)(chaveCache); + if (valorCache) return valorCache; + } + const res = (async () => { + const url = `${url_api_autenticacao}/api/${tx_vinculos__listar}`; + return (0, import_cross_fetch.default)(url, { + headers: { token, "Content-Type": "application/json" }, + body: "{}", + method: "post" + }).then(async (a) => { + const texto = await a.text(); + try { + const res2 = JSON.parse(texto); + return res2; + } catch (error) { + return import_p_respostas.respostaComuns.erro( + `Erro ao listar cidades: ${error.message}`, + [texto, error] + ); + } + }).catch( + (error) => import_p_respostas.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [ + error + ]) + ); + })(); + (0, import_p_comuns.cacheM)( + chaveCache, + res.then((a) => { + try { + } catch { + } + return a; + }), + 10 + ); + return res; +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + listarVinculos, + tx_vinculos__listar +}); diff --git a/dist-back/plugins/uuid.js b/dist-back/plugins/uuid.js new file mode 100644 index 0000000..d5200b2 --- /dev/null +++ b/dist-back/plugins/uuid.js @@ -0,0 +1,35 @@ +"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, { + uuidV3: () => uuidV3, + uuidV4: () => uuidV4 +}); +module.exports = __toCommonJS(uuid_exports); +var import_uuid = require("uuid"); +const uuidV3 = (qualquerCoisa) => (0, import_uuid.v3)( + typeof qualquerCoisa == "string" ? qualquerCoisa : typeof qualquerCoisa == "number" ? String(qualquerCoisa) : JSON.stringify(qualquerCoisa), + import_uuid.NIL +); +const uuidV4 = import_uuid.v4; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + uuidV3, + uuidV4 +}); diff --git a/dist-back/produtos/_betha-meio-ambiente.js b/dist-back/produtos/_betha-meio-ambiente.js new file mode 100644 index 0000000..2d6c382 --- /dev/null +++ b/dist-back/produtos/_betha-meio-ambiente.js @@ -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 betha_meio_ambiente_exports = {}; +__export(betha_meio_ambiente_exports, { + produto_betha_meio_ambiente: () => produto_betha_meio_ambiente +}); +module.exports = __toCommonJS(betha_meio_ambiente_exports); +var import_tipagem = require("./tipagem"); +const produto_betha_meio_ambiente = new import_tipagem.ProdutoQuipo({ + chave_produto: "betha-meio-ambiente", + titulo: "Betha Meio Ambiente", + descricao: "Betha Meio Ambiente: Software de gest\xE3o de processos ambientais para \xF3rg\xE3os p\xFAblicos da Betha Sistemas.", + url_produto: ({ inquilino, base_url, vinculo }) => `${base_url}/${inquilino}${vinculo == "anonimo" ? "" : `/${vinculo}#/admin`}` +}); +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + produto_betha_meio_ambiente +}); diff --git a/dist-back/produtos/_e-licencie-gov.js b/dist-back/produtos/_e-licencie-gov.js new file mode 100644 index 0000000..731e133 --- /dev/null +++ b/dist-back/produtos/_e-licencie-gov.js @@ -0,0 +1,35 @@ +"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 e_licencie_gov_exports = {}; +__export(e_licencie_gov_exports, { + produto_e_licencie_gov: () => produto_e_licencie_gov +}); +module.exports = __toCommonJS(e_licencie_gov_exports); +var import_betha_meio_ambiente = require("./_betha-meio-ambiente"); +var import_tipagem = require("./tipagem"); +const produto_e_licencie_gov = new import_tipagem.ProdutoQuipo({ + ...import_betha_meio_ambiente.produto_betha_meio_ambiente, + titulo: "e-Licencie Gov", + chave_produto: "e-licencie-gov", + url_produto: ({ inquilino, base_url, vinculo }) => `${base_url}/${inquilino}${vinculo == "anonimo" ? "" : `/${vinculo}#/admin`}` +}); +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + produto_e_licencie_gov +}); diff --git a/dist-back/produtos/_e-licencie.js b/dist-back/produtos/_e-licencie.js new file mode 100644 index 0000000..98874c7 --- /dev/null +++ b/dist-back/produtos/_e-licencie.js @@ -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 e_licencie_exports = {}; +__export(e_licencie_exports, { + produto_e_licencie: () => produto_e_licencie +}); +module.exports = __toCommonJS(e_licencie_exports); +var import_tipagem = require("./tipagem"); +const produto_e_licencie = new import_tipagem.Produto({ + chave_produto: "e-licencie", + titulo: "e-Licencie", + descricao: "e-Licencie: Software de gest\xE3o de processos e dados ambientais.", + url_produto: ({ base_url }) => base_url +}); +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + produto_e_licencie +}); diff --git a/dist-back/produtos/_suporte.js b/dist-back/produtos/_suporte.js new file mode 100644 index 0000000..519aa17 --- /dev/null +++ b/dist-back/produtos/_suporte.js @@ -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 suporte_exports = {}; +__export(suporte_exports, { + produto_suporte: () => produto_suporte +}); +module.exports = __toCommonJS(suporte_exports); +var import_tipagem = require("./tipagem"); +const produto_suporte = new import_tipagem.Produto({ + chave_produto: "suporte", + titulo: "Suporte", + descricao: "Gest\xE3o de contas e usu\xE1rios dos produtos da e-licencie", + url_produto: ({ base_url }) => base_url +}); +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + produto_suporte +}); diff --git a/dist-back/produtos/doc.js b/dist-back/produtos/doc.js new file mode 100644 index 0000000..3918c74 --- /dev/null +++ b/dist-back/produtos/doc.js @@ -0,0 +1 @@ +"use strict"; diff --git a/dist-back/produtos/index.js b/dist-back/produtos/index.js new file mode 100644 index 0000000..c05dd22 --- /dev/null +++ b/dist-back/produtos/index.js @@ -0,0 +1,58 @@ +"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 produtos_exports = {}; +__export(produtos_exports, { + Produto: () => import_tipagem.Produto, + chaves_produto: () => import_tipagem.chaves_produto, + listaProdutos: () => listaProdutos, + opcoesVinculos: () => import_tipagem.opcoesVinculos, + opcoesVinculosGov: () => import_tipagem.opcoesVinculosGov, + produto_betha_meio_ambiente: () => import_betha_meio_ambiente.produto_betha_meio_ambiente, + produto_e_licencie: () => import_e_licencie.produto_e_licencie, + produto_e_licencie_gov: () => import_e_licencie_gov.produto_e_licencie_gov, + produto_suporte: () => import_suporte.produto_suporte, + provedoresGov: () => import_tipagem.provedoresGov, + versao_usuarios: () => import_tipagem.versao_usuarios +}); +module.exports = __toCommonJS(produtos_exports); +var import_betha_meio_ambiente = require("./_betha-meio-ambiente"); +var import_e_licencie = require("./_e-licencie"); +var import_e_licencie_gov = require("./_e-licencie-gov"); +var import_suporte = require("./_suporte"); +var import_tipagem = require("./tipagem"); +const listaProdutos = { + "betha-meio-ambiente": import_betha_meio_ambiente.produto_betha_meio_ambiente, + "e-licencie": import_e_licencie.produto_e_licencie, + "e-licencie-gov": import_e_licencie_gov.produto_e_licencie_gov, + suporte: import_suporte.produto_suporte +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + Produto, + chaves_produto, + listaProdutos, + opcoesVinculos, + opcoesVinculosGov, + produto_betha_meio_ambiente, + produto_e_licencie, + produto_e_licencie_gov, + produto_suporte, + provedoresGov, + versao_usuarios +}); diff --git a/dist-back/produtos/tipagem.js b/dist-back/produtos/tipagem.js new file mode 100644 index 0000000..a63f656 --- /dev/null +++ b/dist-back/produtos/tipagem.js @@ -0,0 +1,92 @@ +"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 tipagem_exports = {}; +__export(tipagem_exports, { + Produto: () => Produto, + ProdutoQuipo: () => ProdutoQuipo, + chaves_produto: () => chaves_produto, + opcoesVinculos: () => opcoesVinculos, + opcoesVinculosGov: () => opcoesVinculosGov, + opcoesVinculosSuporte: () => opcoesVinculosSuporte, + provedoresGov: () => provedoresGov, + tiposAcesso: () => tiposAcesso, + versao_usuarios: () => versao_usuarios +}); +module.exports = __toCommonJS(tipagem_exports); +var chaves_produto = /* @__PURE__ */ ((chaves_produto2) => { + chaves_produto2["suporte"] = "suporte"; + chaves_produto2["betha-meio-ambiente"] = "betha-meio-ambiente"; + chaves_produto2["e-licencie-gov"] = "e-licencie-gov"; + chaves_produto2["e-licencie"] = "e-licencie"; + return chaves_produto2; +})(chaves_produto || {}); +const opcoesVinculosGov = { + governo: "Governo", + sociedade: "Sociedade", + anonimo: "An\xF4nimo" +}; +const opcoesVinculosSuporte = { + "suporte-1": "Suporte Prim\xE1rio" +}; +const opcoesVinculos = { + ["suporte" /* suporte */]: opcoesVinculosSuporte, + ["betha-meio-ambiente" /* betha-meio-ambiente */]: opcoesVinculosGov, + ["e-licencie-gov" /* e-licencie-gov */]: opcoesVinculosGov, + ["e-licencie" /* e-licencie */]: {} +}; +const tiposAcesso = opcoesVinculosGov; +const provedoresGov = { + /** Sistema de login da Beta */ + "betha-sistemas": "Betha Sistemas", + /** sistema de login do altenticado */ + "e-licencie": "e-licencie" +}; +class Produto { + constructor(_) { + this.chave_produto = _.chave_produto; + this.titulo = _.titulo; + this.descricao = _.descricao; + this.url_produto = _.url_produto; + } + extruturaToken(_) { + return { ..._, chave_produto: this.chave_produto }; + } +} +class ProdutoQuipo extends Produto { + extruturaToken(_) { + return { ..._, chave_produto: this.chave_produto }; + } +} +var versao_usuarios = /* @__PURE__ */ ((versao_usuarios2) => { + versao_usuarios2["versao_usuarios_autenticacao"] = "versao_usuarios_autenticacao"; + versao_usuarios2["versao_usuarios_quipo"] = "versao_usuarios_quipo"; + return versao_usuarios2; +})(versao_usuarios || {}); +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + Produto, + ProdutoQuipo, + chaves_produto, + opcoesVinculos, + opcoesVinculosGov, + opcoesVinculosSuporte, + provedoresGov, + tiposAcesso, + versao_usuarios +}); diff --git a/dist-back/tokens/index.js b/dist-back/tokens/index.js new file mode 100644 index 0000000..f990b9a --- /dev/null +++ b/dist-back/tokens/index.js @@ -0,0 +1,16 @@ +"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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var tokens_exports = {}; +module.exports = __toCommonJS(tokens_exports); diff --git a/dist-front/autenticacao/_codigoContaSite.js b/dist-front/autenticacao/_codigoContaSite.js new file mode 100644 index 0000000..fc62fbb --- /dev/null +++ b/dist-front/autenticacao/_codigoContaSite.js @@ -0,0 +1,23 @@ +import { respostaComuns } from "p-respostas"; +import node_fetch from "cross-fetch"; +const codigoContaSite = async ({ + url_api_autenticacao, + post +}) => { + const url = `${url_api_autenticacao}/api/codigo_prefeitura_site`; + try { + const resp = await node_fetch(url, { + method: "POST", + body: JSON.stringify(post), + headers: { "Content-Type": "application/json" } + }).then((r) => r.json()).catch( + (e) => respostaComuns.erro("Erro ao enviar registros", [e.message]) + ).then((r) => r); + return resp; + } catch (e) { + return respostaComuns.erro(`erro ao buscar c\xF3digo do site: ${e}`); + } +}; +export { + codigoContaSite +}; diff --git a/dist-front/autenticacao/_usuarios_quipo.js b/dist-front/autenticacao/_usuarios_quipo.js new file mode 100644 index 0000000..c950d7a --- /dev/null +++ b/dist-front/autenticacao/_usuarios_quipo.js @@ -0,0 +1,24 @@ +import node_fetch from "cross-fetch"; +import { respostaComuns } from "p-respostas"; +const usuarios_quipo = async ({ + token_produto, + url_api_autenticacao, + inquilino +}) => { + const url = `${url_api_autenticacao}/api/usuarios__listar`; + if (!token_produto) return respostaComuns.erro("token_produto n\xE3o informado"); + const headers = { + token: token_produto, + "Content-Type": "application/json" + }; + return node_fetch(url, { + method: "POST", + body: JSON.stringify({ inquilino }), + headers + }).then((r) => r.json()).catch( + (e) => respostaComuns.erro(`Erro ao buscar usu\xE1rios quipo governo ${e.message}`) + ).then((r) => r); +}; +export { + usuarios_quipo +}; diff --git a/dist-front/autenticacao/_usuarios_quipo_vincular.js b/dist-front/autenticacao/_usuarios_quipo_vincular.js new file mode 100644 index 0000000..6945698 --- /dev/null +++ b/dist-front/autenticacao/_usuarios_quipo_vincular.js @@ -0,0 +1,31 @@ +import node_fetch from "cross-fetch"; +import { respostaComuns } from "p-respostas"; +const usuarios_quipo_vincular = async ({ + token_produto, + url_api_autenticacao, + inquilino_codigo, + vinculo, + usuario_codigo, + email +}) => { + const url = `${url_api_autenticacao}/api/vinculos__criar`; + if (!token_produto) return respostaComuns.erro("token_produto n\xE3o informado"); + const headers = { + token: token_produto, + "Content-Type": "application/json" + }; + const parametros = { + vinculos: { inquilino_codigo, usuario_codigo, vinculo }, + email + }; + return await node_fetch(url, { + headers, + body: JSON.stringify(parametros), + method: "POST" + }).then(async (r) => await r.json()).catch( + (e) => respostaComuns.erro(`Erro ao criar vinculo de usuario ${e.message}`) + ); +}; +export { + usuarios_quipo_vincular +}; diff --git a/dist-front/autenticacao/_validarToken.js b/dist-front/autenticacao/_validarToken.js new file mode 100644 index 0000000..b95becc --- /dev/null +++ b/dist-front/autenticacao/_validarToken.js @@ -0,0 +1,22 @@ +import node_fetch from "cross-fetch"; +const validarToken = async ({ + url_api_autenticacao, + post +}) => { + const url = `${url_api_autenticacao}/api/validar_token`; + try { + const resposta = await node_fetch(url, { + method: "POST", + body: JSON.stringify(post), + headers: { "Content-Type": "application/json" } + }).then((r) => r.json()).then((r) => r).then( + (resposta2) => resposta2.eCerto ? "valido" : "erro" + ).catch(() => "erro"); + return resposta; + } catch (_e) { + return "erro"; + } +}; +export { + validarToken +}; diff --git a/dist-import/autenticacao/index.js b/dist-front/autenticacao/index.js similarity index 53% rename from dist-import/autenticacao/index.js rename to dist-front/autenticacao/index.js index 8e15e91..47c5092 100644 --- a/dist-import/autenticacao/index.js +++ b/dist-front/autenticacao/index.js @@ -2,10 +2,12 @@ import { codigoContaSite } from "./_codigoContaSite"; import { usuarios_quipo } from "./_usuarios_quipo"; import { usuarios_quipo_vincular } from "./_usuarios_quipo_vincular"; import { validarToken } from "./_validarToken"; -/** todas as rotas de comunicação com autenticador partem dessa variável */ -export const pAutenticacao = { - validarToken, - codigoContaSite, - usuarios_quipo, - usuarios_quipo_vincular, +const pAutenticacao = { + validarToken, + codigoContaSite, + usuarios_quipo, + usuarios_quipo_vincular +}; +export { + pAutenticacao }; diff --git a/dist-import/index.js b/dist-front/index.js similarity index 100% rename from dist-import/index.js rename to dist-front/index.js diff --git a/dist-front/lista-prefeituras.js b/dist-front/lista-prefeituras.js new file mode 100644 index 0000000..fec6e5c --- /dev/null +++ b/dist-front/lista-prefeituras.js @@ -0,0 +1,26 @@ +import cFetch from "cross-fetch"; +import { respostaComuns } from "p-respostas"; +const tx_listar_prefeituras = "listar_prefeituras"; +const listarPrefeituras = async ({ + url_api_autenticacao +}) => { + const url = `${url_api_autenticacao}/api/${tx_listar_prefeituras}`; + return cFetch(url).then(async (a) => { + const texto = await a.text(); + try { + const res = JSON.parse(texto); + return res; + } catch (error) { + return respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [ + texto, + error + ]); + } + }).catch( + (error) => respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [error]) + ); +}; +export { + listarPrefeituras, + tx_listar_prefeituras +}; diff --git a/dist-front/lista-usuarios.js b/dist-front/lista-usuarios.js new file mode 100644 index 0000000..ec6736f --- /dev/null +++ b/dist-front/lista-usuarios.js @@ -0,0 +1,31 @@ +import cFetch from "cross-fetch"; +import { respostaComuns } from "p-respostas"; +const tx_usuarios__listar = "usuarios__listar"; +const listarUsuarios = async ({ + token, + url_api_autenticacao +}, parametros) => { + const url = `${url_api_autenticacao}/api/${tx_usuarios__listar}`; + return cFetch(url, { + headers: { token, "Content-Type": "application/json" }, + body: JSON.stringify(parametros), + method: "post" + }).then(async (a) => { + const texto = await a.text(); + try { + const res = JSON.parse(texto); + return res; + } catch (error) { + return respostaComuns.erro( + `Erro ao listar usu\xE1rios: ${error.message}`, + [texto, error] + ); + } + }).catch( + (error) => respostaComuns.erro(`Erro ao listar usu\xE1rios: ${error.message}`, [error]) + ); +}; +export { + listarUsuarios, + tx_usuarios__listar +}; diff --git a/dist-front/lista-vinculos.js b/dist-front/lista-vinculos.js new file mode 100644 index 0000000..0a889f9 --- /dev/null +++ b/dist-front/lista-vinculos.js @@ -0,0 +1,54 @@ +import cFetch from "cross-fetch"; +import { cacheM } from "p-comuns"; +import { respostaComuns } from "p-respostas"; +import { uuidV3 } from "./plugins/uuid"; +const tx_vinculos__listar = "vinculos__listar"; +const listarVinculos = async ({ + token, + url_api_autenticacao, + desativarCache +}) => { + const chaveCache = uuidV3({ token, url_api_autenticacao }); + if (!desativarCache) { + const valorCache = cacheM(chaveCache); + if (valorCache) return valorCache; + } + const res = (async () => { + const url = `${url_api_autenticacao}/api/${tx_vinculos__listar}`; + return cFetch(url, { + headers: { token, "Content-Type": "application/json" }, + body: "{}", + method: "post" + }).then(async (a) => { + const texto = await a.text(); + try { + const res2 = JSON.parse(texto); + return res2; + } catch (error) { + return respostaComuns.erro( + `Erro ao listar cidades: ${error.message}`, + [texto, error] + ); + } + }).catch( + (error) => respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [ + error + ]) + ); + })(); + cacheM( + chaveCache, + res.then((a) => { + try { + } catch { + } + return a; + }), + 10 + ); + return res; +}; +export { + listarVinculos, + tx_vinculos__listar +}; diff --git a/dist-front/plugins/uuid.js b/dist-front/plugins/uuid.js new file mode 100644 index 0000000..4fc6d83 --- /dev/null +++ b/dist-front/plugins/uuid.js @@ -0,0 +1,10 @@ +import { NIL, v3, v4 } from "uuid"; +const uuidV3 = (qualquerCoisa) => v3( + typeof qualquerCoisa == "string" ? qualquerCoisa : typeof qualquerCoisa == "number" ? String(qualquerCoisa) : JSON.stringify(qualquerCoisa), + NIL +); +const uuidV4 = v4; +export { + uuidV3, + uuidV4 +}; diff --git a/dist-front/produtos/_betha-meio-ambiente.js b/dist-front/produtos/_betha-meio-ambiente.js new file mode 100644 index 0000000..1d14e99 --- /dev/null +++ b/dist-front/produtos/_betha-meio-ambiente.js @@ -0,0 +1,10 @@ +import { ProdutoQuipo } from "./tipagem"; +const produto_betha_meio_ambiente = new ProdutoQuipo({ + chave_produto: "betha-meio-ambiente", + titulo: "Betha Meio Ambiente", + descricao: "Betha Meio Ambiente: Software de gest\xE3o de processos ambientais para \xF3rg\xE3os p\xFAblicos da Betha Sistemas.", + url_produto: ({ inquilino, base_url, vinculo }) => `${base_url}/${inquilino}${vinculo == "anonimo" ? "" : `/${vinculo}#/admin`}` +}); +export { + produto_betha_meio_ambiente +}; diff --git a/dist-front/produtos/_e-licencie-gov.js b/dist-front/produtos/_e-licencie-gov.js new file mode 100644 index 0000000..73e19a4 --- /dev/null +++ b/dist-front/produtos/_e-licencie-gov.js @@ -0,0 +1,11 @@ +import { produto_betha_meio_ambiente } from "./_betha-meio-ambiente"; +import { ProdutoQuipo } from "./tipagem"; +const produto_e_licencie_gov = new ProdutoQuipo({ + ...produto_betha_meio_ambiente, + titulo: "e-Licencie Gov", + chave_produto: "e-licencie-gov", + url_produto: ({ inquilino, base_url, vinculo }) => `${base_url}/${inquilino}${vinculo == "anonimo" ? "" : `/${vinculo}#/admin`}` +}); +export { + produto_e_licencie_gov +}; diff --git a/dist-front/produtos/_e-licencie.js b/dist-front/produtos/_e-licencie.js new file mode 100644 index 0000000..d29725b --- /dev/null +++ b/dist-front/produtos/_e-licencie.js @@ -0,0 +1,10 @@ +import { Produto } from "./tipagem"; +const produto_e_licencie = new Produto({ + chave_produto: "e-licencie", + titulo: "e-Licencie", + descricao: "e-Licencie: Software de gest\xE3o de processos e dados ambientais.", + url_produto: ({ base_url }) => base_url +}); +export { + produto_e_licencie +}; diff --git a/dist-front/produtos/_suporte.js b/dist-front/produtos/_suporte.js new file mode 100644 index 0000000..dc7ca9f --- /dev/null +++ b/dist-front/produtos/_suporte.js @@ -0,0 +1,10 @@ +import { Produto } from "./tipagem"; +const produto_suporte = new Produto({ + chave_produto: "suporte", + titulo: "Suporte", + descricao: "Gest\xE3o de contas e usu\xE1rios dos produtos da e-licencie", + url_produto: ({ base_url }) => base_url +}); +export { + produto_suporte +}; diff --git a/dist-front/produtos/doc.js b/dist-front/produtos/doc.js new file mode 100644 index 0000000..e69de29 diff --git a/dist-front/produtos/index.js b/dist-front/produtos/index.js new file mode 100644 index 0000000..5f80481 --- /dev/null +++ b/dist-front/produtos/index.js @@ -0,0 +1,31 @@ +import { produto_betha_meio_ambiente } from "./_betha-meio-ambiente"; +import { produto_e_licencie } from "./_e-licencie"; +import { produto_e_licencie_gov } from "./_e-licencie-gov"; +import { produto_suporte } from "./_suporte"; +import { + chaves_produto, + opcoesVinculos, + opcoesVinculosGov, + Produto, + provedoresGov, + versao_usuarios +} from "./tipagem"; +const listaProdutos = { + "betha-meio-ambiente": produto_betha_meio_ambiente, + "e-licencie": produto_e_licencie, + "e-licencie-gov": produto_e_licencie_gov, + suporte: produto_suporte +}; +export { + Produto, + chaves_produto, + listaProdutos, + opcoesVinculos, + opcoesVinculosGov, + produto_betha_meio_ambiente, + produto_e_licencie, + produto_e_licencie_gov, + produto_suporte, + provedoresGov, + versao_usuarios +}; diff --git a/dist-front/produtos/tipagem.js b/dist-front/produtos/tipagem.js new file mode 100644 index 0000000..54bff39 --- /dev/null +++ b/dist-front/produtos/tipagem.js @@ -0,0 +1,60 @@ +var chaves_produto = /* @__PURE__ */ ((chaves_produto2) => { + chaves_produto2["suporte"] = "suporte"; + chaves_produto2["betha-meio-ambiente"] = "betha-meio-ambiente"; + chaves_produto2["e-licencie-gov"] = "e-licencie-gov"; + chaves_produto2["e-licencie"] = "e-licencie"; + return chaves_produto2; +})(chaves_produto || {}); +const opcoesVinculosGov = { + governo: "Governo", + sociedade: "Sociedade", + anonimo: "An\xF4nimo" +}; +const opcoesVinculosSuporte = { + "suporte-1": "Suporte Prim\xE1rio" +}; +const opcoesVinculos = { + ["suporte" /* suporte */]: opcoesVinculosSuporte, + ["betha-meio-ambiente" /* betha-meio-ambiente */]: opcoesVinculosGov, + ["e-licencie-gov" /* e-licencie-gov */]: opcoesVinculosGov, + ["e-licencie" /* e-licencie */]: {} +}; +const tiposAcesso = opcoesVinculosGov; +const provedoresGov = { + /** Sistema de login da Beta */ + "betha-sistemas": "Betha Sistemas", + /** sistema de login do altenticado */ + "e-licencie": "e-licencie" +}; +class Produto { + constructor(_) { + this.chave_produto = _.chave_produto; + this.titulo = _.titulo; + this.descricao = _.descricao; + this.url_produto = _.url_produto; + } + extruturaToken(_) { + return { ..._, chave_produto: this.chave_produto }; + } +} +class ProdutoQuipo extends Produto { + extruturaToken(_) { + return { ..._, chave_produto: this.chave_produto }; + } +} +var versao_usuarios = /* @__PURE__ */ ((versao_usuarios2) => { + versao_usuarios2["versao_usuarios_autenticacao"] = "versao_usuarios_autenticacao"; + versao_usuarios2["versao_usuarios_quipo"] = "versao_usuarios_quipo"; + return versao_usuarios2; +})(versao_usuarios || {}); +export { + Produto, + ProdutoQuipo, + chaves_produto, + opcoesVinculos, + opcoesVinculosGov, + opcoesVinculosSuporte, + provedoresGov, + tiposAcesso, + versao_usuarios +}; diff --git a/dist-front/tokens/index.js b/dist-front/tokens/index.js new file mode 100644 index 0000000..e69de29 diff --git a/dist-import/autenticacao/_codigoContaSite.d.ts b/dist-import/autenticacao/_codigoContaSite.d.ts deleted file mode 100644 index 41e1592..0000000 --- a/dist-import/autenticacao/_codigoContaSite.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { type tipoResposta } from "p-respostas"; -type tipoPostCodigoContaSite = { - site: string; -}; -export declare const codigoContaSite: ({ url_api_autenticacao, post, }: { - url_api_autenticacao: string; - post: tipoPostCodigoContaSite; -}) => Promise>; -export {}; diff --git a/dist-import/autenticacao/_codigoContaSite.js b/dist-import/autenticacao/_codigoContaSite.js deleted file mode 100644 index fe83e06..0000000 --- a/dist-import/autenticacao/_codigoContaSite.js +++ /dev/null @@ -1,19 +0,0 @@ -import { respostaComuns } from "p-respostas"; -import node_fetch from "cross-fetch"; -export const codigoContaSite = async ({ url_api_autenticacao, post, }) => { - const url = `${url_api_autenticacao}/api/codigo_prefeitura_site`; - try { - const resp = await node_fetch(url, { - method: "POST", - body: JSON.stringify(post), - headers: { "Content-Type": "application/json" }, - }) - .then((r) => r.json()) - .catch((e) => respostaComuns.erro("Erro ao enviar registros", [e.message])) - .then((r) => r); - return resp; - } - catch (e) { - return respostaComuns.erro(`erro ao buscar código do site: ${e}`); - } -}; diff --git a/dist-import/autenticacao/_usuarios_quipo.d.ts b/dist-import/autenticacao/_usuarios_quipo.d.ts deleted file mode 100644 index 757ec14..0000000 --- a/dist-import/autenticacao/_usuarios_quipo.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { type tipoResposta } from "p-respostas"; -import type { tipo_usuarios__listar_retorno } from "../lista-usuarios"; -export type tipoUsuarioExterno = { - _nome: string; - _email: string; - _telefone: string; - vinculo: string; - inquilino: string; - chave_produto: string; - codigo: string; - _cpf: string; -}; -export declare const usuarios_quipo: ({ token_produto, url_api_autenticacao, inquilino, }: { - url_api_autenticacao: string; - token_produto: string; - inquilino: string; -}) => Promise>; diff --git a/dist-import/autenticacao/_usuarios_quipo.js b/dist-import/autenticacao/_usuarios_quipo.js deleted file mode 100644 index f4eea06..0000000 --- a/dist-import/autenticacao/_usuarios_quipo.js +++ /dev/null @@ -1,19 +0,0 @@ -import node_fetch from "cross-fetch"; -import { respostaComuns } from "p-respostas"; -export const usuarios_quipo = async ({ token_produto, url_api_autenticacao, inquilino, }) => { - const url = `${url_api_autenticacao}/api/usuarios__listar`; - if (!token_produto) - return respostaComuns.erro("token_produto não informado"); - const headers = { - token: token_produto, - "Content-Type": "application/json", - }; - return node_fetch(url, { - method: "POST", - body: JSON.stringify({ inquilino }), - headers, - }) - .then((r) => r.json()) - .catch((e) => respostaComuns.erro(`Erro ao buscar usuários quipo governo ${e.message}`)) - .then((r) => r); -}; diff --git a/dist-import/autenticacao/_usuarios_quipo_vincular.d.ts b/dist-import/autenticacao/_usuarios_quipo_vincular.d.ts deleted file mode 100644 index f5a03e8..0000000 --- a/dist-import/autenticacao/_usuarios_quipo_vincular.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { type tipoResposta } from "p-respostas"; -export declare const usuarios_quipo_vincular: ({ token_produto, url_api_autenticacao, inquilino_codigo, vinculo, usuario_codigo, email, }: { - url_api_autenticacao: string; - token_produto: string; - inquilino_codigo: string; - vinculo: string; - usuario_codigo?: string; - email: string; -}) => Promise>; diff --git a/dist-import/autenticacao/_usuarios_quipo_vincular.js b/dist-import/autenticacao/_usuarios_quipo_vincular.js deleted file mode 100644 index aa745b8..0000000 --- a/dist-import/autenticacao/_usuarios_quipo_vincular.js +++ /dev/null @@ -1,22 +0,0 @@ -import node_fetch from "cross-fetch"; -import { respostaComuns } from "p-respostas"; -export const usuarios_quipo_vincular = async ({ token_produto, url_api_autenticacao, inquilino_codigo, vinculo, usuario_codigo, email, }) => { - const url = `${url_api_autenticacao}/api/vinculos__criar`; - if (!token_produto) - return respostaComuns.erro("token_produto não informado"); - const headers = { - token: token_produto, - "Content-Type": "application/json", - }; - const parametros = { - vinculos: { inquilino_codigo, usuario_codigo, vinculo }, - email: email, - }; - return await node_fetch(url, { - headers, - body: JSON.stringify(parametros), - method: "POST", - }) - .then(async (r) => await r.json()) - .catch((e) => respostaComuns.erro(`Erro ao criar vinculo de usuario ${e.message}`)); -}; diff --git a/dist-import/autenticacao/_validarToken.d.ts b/dist-import/autenticacao/_validarToken.d.ts deleted file mode 100644 index 872d220..0000000 --- a/dist-import/autenticacao/_validarToken.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -type tipoPostValidarTokem = { - token: string; -}; -/** faz a validação do token */ -export declare const validarToken: ({ url_api_autenticacao, post, }: { - url_api_autenticacao: string; - post: tipoPostValidarTokem; -}) => Promise<"valido" | "erro">; -export {}; diff --git a/dist-import/autenticacao/_validarToken.js b/dist-import/autenticacao/_validarToken.js deleted file mode 100644 index ce52a1f..0000000 --- a/dist-import/autenticacao/_validarToken.js +++ /dev/null @@ -1,20 +0,0 @@ -import node_fetch from "cross-fetch"; -/** faz a validação do token */ -export const validarToken = async ({ url_api_autenticacao, post, }) => { - const url = `${url_api_autenticacao}/api/validar_token`; - try { - const resposta = await node_fetch(url, { - method: "POST", - body: JSON.stringify(post), - headers: { "Content-Type": "application/json" }, - }) - .then((r) => r.json()) - .then((r) => r) - .then((resposta) => resposta.eCerto ? "valido" : "erro") - .catch(() => "erro"); - return resposta; - } - catch (_e) { - return "erro"; - } -}; diff --git a/dist-import/autenticacao/index.d.ts b/dist-import/autenticacao/index.d.ts deleted file mode 100644 index 2a45dc9..0000000 --- a/dist-import/autenticacao/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { type tipoUsuarioExterno } from "./_usuarios_quipo"; -export type { tipoUsuarioExterno }; -/** todas as rotas de comunicação com autenticador partem dessa variável */ -export declare const pAutenticacao: { - validarToken: ({ url_api_autenticacao, post, }: { - url_api_autenticacao: string; - post: { - token: string; - }; - }) => Promise<"valido" | "erro">; - codigoContaSite: ({ url_api_autenticacao, post, }: { - url_api_autenticacao: string; - post: { - site: string; - }; - }) => Promise>; - usuarios_quipo: ({ token_produto, url_api_autenticacao, inquilino, }: { - url_api_autenticacao: string; - token_produto: string; - inquilino: string; - }) => Promise>; - usuarios_quipo_vincular: ({ token_produto, url_api_autenticacao, inquilino_codigo, vinculo, usuario_codigo, email, }: { - url_api_autenticacao: string; - token_produto: string; - inquilino_codigo: string; - vinculo: string; - usuario_codigo?: string; - email: string; - }) => Promise>; -}; diff --git a/dist-import/index.d.ts b/dist-import/index.d.ts deleted file mode 100644 index b8e4f3c..0000000 --- a/dist-import/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from "./autenticacao"; -export * from "./lista-prefeituras"; -export * from "./lista-usuarios"; -export * from "./lista-vinculos"; -export * from "./produtos"; -export * from "./tokens"; diff --git a/dist-import/lista-prefeituras.d.ts b/dist-import/lista-prefeituras.d.ts deleted file mode 100644 index 5d5e0aa..0000000 --- a/dist-import/lista-prefeituras.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { type tipoResposta } from "p-respostas"; -import type { chaves_produto } from "./produtos/tipagem"; -export type tipoRetornoListarPrefeitrua = { - nome: string; - inquilino: string; - base_url: string; - produto: keyof typeof chaves_produto; -}; -export declare const tx_listar_prefeituras: "listar_prefeituras"; -export declare const listarPrefeituras: ({ url_api_autenticacao, }: { - url_api_autenticacao: string; -}) => Promise>; diff --git a/dist-import/lista-prefeituras.js b/dist-import/lista-prefeituras.js deleted file mode 100644 index 91ed9d4..0000000 --- a/dist-import/lista-prefeituras.js +++ /dev/null @@ -1,21 +0,0 @@ -import cFetch from "cross-fetch"; -import { respostaComuns } from "p-respostas"; -export const tx_listar_prefeituras = "listar_prefeituras"; -export const listarPrefeituras = async ({ url_api_autenticacao, }) => { - const url = `${url_api_autenticacao}/api/${tx_listar_prefeituras}`; - return cFetch(url) - .then(async (a) => { - const texto = await a.text(); - try { - const res = JSON.parse(texto); - return res; - } - catch (error) { - return respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [ - texto, - error, - ]); - } - }) - .catch((error) => respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [error])); -}; diff --git a/dist-import/lista-usuarios.d.ts b/dist-import/lista-usuarios.d.ts deleted file mode 100644 index 9d540cb..0000000 --- a/dist-import/lista-usuarios.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { type tipoResposta } from "p-respostas"; -export declare const tx_usuarios__listar: "usuarios__listar"; -export type tipo_usuarios__listar_retorno = { - inquilino: string; - vinculo: string; - codigo: string; - cpf: string; - data_hora_atualizacao: string; - email: string; - id_betha_sistema: string; - nome: string; - telefone: string; -}; -export type tipo_usuarios__listar_parametros = { - inquilino?: string; -}; -export declare const listarUsuarios: ({ token, url_api_autenticacao, }: { - url_api_autenticacao: string; - token: string; -}, parametros: tipo_usuarios__listar_parametros) => Promise>; diff --git a/dist-import/lista-usuarios.js b/dist-import/lista-usuarios.js deleted file mode 100644 index 1f8a280..0000000 --- a/dist-import/lista-usuarios.js +++ /dev/null @@ -1,22 +0,0 @@ -import cFetch from "cross-fetch"; -import { respostaComuns } from "p-respostas"; -export const tx_usuarios__listar = "usuarios__listar"; -export const listarUsuarios = async ({ token, url_api_autenticacao, }, parametros) => { - const url = `${url_api_autenticacao}/api/${tx_usuarios__listar}`; - return cFetch(url, { - headers: { token, "Content-Type": "application/json" }, - body: JSON.stringify(parametros), - method: "post", - }) - .then(async (a) => { - const texto = await a.text(); - try { - const res = JSON.parse(texto); - return res; - } - catch (error) { - return respostaComuns.erro(`Erro ao listar usuários: ${error.message}`, [texto, error]); - } - }) - .catch((error) => respostaComuns.erro(`Erro ao listar usuários: ${error.message}`, [error])); -}; diff --git a/dist-import/lista-vinculos.d.ts b/dist-import/lista-vinculos.d.ts deleted file mode 100644 index 213bcf5..0000000 --- a/dist-import/lista-vinculos.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { type tipoResposta } from "p-respostas"; -export declare const tx_vinculos__listar: "vinculos__listar"; -export type tipo_retorno_vinculo_listas = { - codigo: string; - usuario_codigo: string; - inquilino: string; - vinculo: string; - chave_produto: string; - _usuario_nome: string; - _inquilino_nome: string; - _inquilino_base_url: string; -}; -export declare const listarVinculos: ({ token, url_api_autenticacao, desativarCache, }: { - url_api_autenticacao: string; - token: string; - /** por padrão será 10 segundos */ - desativarCache?: boolean; -}) => Promise>; diff --git a/dist-import/lista-vinculos.js b/dist-import/lista-vinculos.js deleted file mode 100644 index 3d2fda1..0000000 --- a/dist-import/lista-vinculos.js +++ /dev/null @@ -1,45 +0,0 @@ -import cFetch from "cross-fetch"; -import { respostaComuns } from "p-respostas"; -import { cacheAuDrive } from "./plugins/node-cache"; -import { uuidV3 } from "./plugins/uuid"; -export const tx_vinculos__listar = "vinculos__listar"; -export const listarVinculos = async ({ token, url_api_autenticacao, desativarCache, }) => { - const chaveCache = uuidV3({ token, url_api_autenticacao }); - // Buscar promeiro no cache - if (!desativarCache) { - const valorCache = cacheAuDrive.get(chaveCache); - if (valorCache) - return valorCache; - } - const res = (async () => { - const url = `${url_api_autenticacao}/api/${tx_vinculos__listar}`; - return cFetch(url, { - headers: { token, "Content-Type": "application/json" }, - body: "{}", - method: "post", - }) - .then(async (a) => { - const texto = await a.text(); - try { - const res = JSON.parse(texto); - return res; - } - catch (error) { - return respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [texto, error]); - } - }) - .catch((error) => respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [ - error, - ])); - })(); - cacheAuDrive.set(chaveCache, res.then((a) => { - try { - if (a.eErro) { - cacheAuDrive.del(chaveCache); - } - } - catch { } - return a; - }), 10); - return res; -}; diff --git a/dist-import/plugins/node-cache.d.ts b/dist-import/plugins/node-cache.d.ts deleted file mode 100644 index 9eb85eb..0000000 --- a/dist-import/plugins/node-cache.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import NodeCache from "node-cache"; -export declare const cacheAuDrive: NodeCache; diff --git a/dist-import/plugins/node-cache.js b/dist-import/plugins/node-cache.js deleted file mode 100644 index cb6de26..0000000 --- a/dist-import/plugins/node-cache.js +++ /dev/null @@ -1,2 +0,0 @@ -import NodeCache from "node-cache"; -export const cacheAuDrive = new NodeCache(); diff --git a/dist-import/plugins/uuid.d.ts b/dist-import/plugins/uuid.d.ts deleted file mode 100644 index 4cb7206..0000000 --- a/dist-import/plugins/uuid.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { v4 } from "uuid"; -export declare const uuidV3: (qualquerCoisa: any) => string; -export declare const uuidV4: typeof v4; diff --git a/dist-import/plugins/uuid.js b/dist-import/plugins/uuid.js deleted file mode 100644 index c016266..0000000 --- a/dist-import/plugins/uuid.js +++ /dev/null @@ -1,7 +0,0 @@ -import { NIL, v3, v4 } from "uuid"; -export const uuidV3 = (qualquerCoisa) => v3(typeof qualquerCoisa == "string" - ? qualquerCoisa - : typeof qualquerCoisa == "number" - ? String(qualquerCoisa) - : JSON.stringify(qualquerCoisa), NIL); -export const uuidV4 = v4; diff --git a/dist-import/produtos/_betha-meio-ambiente.d.ts b/dist-import/produtos/_betha-meio-ambiente.d.ts deleted file mode 100644 index 701ee61..0000000 --- a/dist-import/produtos/_betha-meio-ambiente.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { ProdutoQuipo } from "./tipagem"; -export declare const produto_betha_meio_ambiente: ProdutoQuipo<"betha-meio-ambiente">; diff --git a/dist-import/produtos/_betha-meio-ambiente.js b/dist-import/produtos/_betha-meio-ambiente.js deleted file mode 100644 index e69f86b..0000000 --- a/dist-import/produtos/_betha-meio-ambiente.js +++ /dev/null @@ -1,9 +0,0 @@ -import { ProdutoQuipo } from "./tipagem"; -export const produto_betha_meio_ambiente = new ProdutoQuipo({ - chave_produto: "betha-meio-ambiente", - titulo: "Betha Meio Ambiente", - descricao: "Betha Meio Ambiente: Software de gestão de processos ambientais para órgãos públicos da Betha Sistemas.", - url_produto: ({ inquilino, base_url, vinculo }) => `${base_url}/${inquilino}${vinculo == "anonimo" - ? "" - : `/${vinculo}#/admin`}`, -}); diff --git a/dist-import/produtos/_e-licencie-gov.d.ts b/dist-import/produtos/_e-licencie-gov.d.ts deleted file mode 100644 index c61248c..0000000 --- a/dist-import/produtos/_e-licencie-gov.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { ProdutoQuipo } from "./tipagem"; -export declare const produto_e_licencie_gov: ProdutoQuipo<"e-licencie-gov">; diff --git a/dist-import/produtos/_e-licencie-gov.js b/dist-import/produtos/_e-licencie-gov.js deleted file mode 100644 index c479dca..0000000 --- a/dist-import/produtos/_e-licencie-gov.js +++ /dev/null @@ -1,10 +0,0 @@ -import { produto_betha_meio_ambiente } from "./_betha-meio-ambiente"; -import { ProdutoQuipo } from "./tipagem"; -export const produto_e_licencie_gov = new ProdutoQuipo({ - ...produto_betha_meio_ambiente, - titulo: "e-Licencie Gov", - chave_produto: "e-licencie-gov", - url_produto: ({ inquilino, base_url, vinculo }) => `${base_url}/${inquilino}${vinculo == "anonimo" - ? "" - : `/${vinculo}#/admin`}`, -}); diff --git a/dist-import/produtos/_e-licencie.d.ts b/dist-import/produtos/_e-licencie.d.ts deleted file mode 100644 index d5043b2..0000000 --- a/dist-import/produtos/_e-licencie.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Produto } from "./tipagem"; -export declare const produto_e_licencie: Produto<"e-licencie">; diff --git a/dist-import/produtos/_e-licencie.js b/dist-import/produtos/_e-licencie.js deleted file mode 100644 index 2ea965d..0000000 --- a/dist-import/produtos/_e-licencie.js +++ /dev/null @@ -1,7 +0,0 @@ -import { Produto } from "./tipagem"; -export const produto_e_licencie = new Produto({ - chave_produto: "e-licencie", - titulo: "e-Licencie", - descricao: "e-Licencie: Software de gestão de processos e dados ambientais.", - url_produto: ({ base_url }) => base_url, -}); diff --git a/dist-import/produtos/_suporte.d.ts b/dist-import/produtos/_suporte.d.ts deleted file mode 100644 index f13f8e1..0000000 --- a/dist-import/produtos/_suporte.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Produto } from "./tipagem"; -export declare const produto_suporte: Produto<"suporte">; diff --git a/dist-import/produtos/_suporte.js b/dist-import/produtos/_suporte.js deleted file mode 100644 index 7e2c222..0000000 --- a/dist-import/produtos/_suporte.js +++ /dev/null @@ -1,7 +0,0 @@ -import { Produto } from "./tipagem"; -export const produto_suporte = new Produto({ - chave_produto: "suporte", - titulo: "Suporte", - descricao: "Gestão de contas e usuários dos produtos da e-licencie", - url_produto: ({ base_url }) => base_url, -}); diff --git a/dist-import/produtos/doc.d.ts b/dist-import/produtos/doc.d.ts deleted file mode 100644 index 2e00a65..0000000 --- a/dist-import/produtos/doc.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - -Produtos existentes: - -Atenticacao: - Acesso a gestão de produtos - Apenas uma conta com o código autenticao - /autenticacao - -Betha Meio Ambiente: - Acesso a gestão da aplicação Quipo - Acesso pode ser sociedade ou governo - /quipo - Possue limite de acesso a módulos: - Licenciamento - Fiscalização - - - -e-licencie GOV: - Acesso a gestão da aplicação Quipo - Acesso pode ser sociedade ou governo - /quipo - - -e-licencie: - Acesso a Aplicação e-licencie - Adminstrador e Não adminstrasdor - - - */ diff --git a/dist-import/produtos/doc.js b/dist-import/produtos/doc.js deleted file mode 100644 index 4dd180b..0000000 --- a/dist-import/produtos/doc.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -/** - -Produtos existentes: - -Atenticacao: - Acesso a gestão de produtos - Apenas uma conta com o código autenticao - /autenticacao - -Betha Meio Ambiente: - Acesso a gestão da aplicação Quipo - Acesso pode ser sociedade ou governo - /quipo - Possue limite de acesso a módulos: - Licenciamento - Fiscalização - - - -e-licencie GOV: - Acesso a gestão da aplicação Quipo - Acesso pode ser sociedade ou governo - /quipo - - -e-licencie: - Acesso a Aplicação e-licencie - Adminstrador e Não adminstrasdor - - - */ diff --git a/dist-import/produtos/index.d.ts b/dist-import/produtos/index.d.ts deleted file mode 100644 index 438e4d8..0000000 --- a/dist-import/produtos/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { produto_betha_meio_ambiente } from "./_betha-meio-ambiente"; -import { produto_e_licencie } from "./_e-licencie"; -import { produto_e_licencie_gov } from "./_e-licencie-gov"; -import { produto_suporte } from "./_suporte"; -import { chaves_produto, opcoesVinculos, opcoesVinculosGov, Produto, provedoresGov, versao_usuarios } from "./tipagem"; -export declare const listaProdutos: { - [k in keyof typeof chaves_produto]: Produto; -}; -export { Produto, chaves_produto, opcoesVinculosGov, opcoesVinculos, provedoresGov, produto_betha_meio_ambiente, produto_e_licencie, produto_e_licencie_gov, produto_suporte, versao_usuarios, }; diff --git a/dist-import/produtos/index.js b/dist-import/produtos/index.js deleted file mode 100644 index 98607fc..0000000 --- a/dist-import/produtos/index.js +++ /dev/null @@ -1,12 +0,0 @@ -import { produto_betha_meio_ambiente } from "./_betha-meio-ambiente"; -import { produto_e_licencie } from "./_e-licencie"; -import { produto_e_licencie_gov } from "./_e-licencie-gov"; -import { produto_suporte } from "./_suporte"; -import { chaves_produto, opcoesVinculos, opcoesVinculosGov, Produto, provedoresGov, versao_usuarios, } from "./tipagem"; -export const listaProdutos = { - "betha-meio-ambiente": produto_betha_meio_ambiente, - "e-licencie": produto_e_licencie, - "e-licencie-gov": produto_e_licencie_gov, - suporte: produto_suporte, -}; -export { Produto, chaves_produto, opcoesVinculosGov, opcoesVinculos, provedoresGov, produto_betha_meio_ambiente, produto_e_licencie, produto_e_licencie_gov, produto_suporte, versao_usuarios, }; diff --git a/dist-import/produtos/tipagem.d.ts b/dist-import/produtos/tipagem.d.ts deleted file mode 100644 index d42fa16..0000000 --- a/dist-import/produtos/tipagem.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -/** Lista dos produtos da e-licencie */ -export declare enum chaves_produto { - suporte = "suporte", - "betha-meio-ambiente" = "betha-meio-ambiente", - "e-licencie-gov" = "e-licencie-gov", - "e-licencie" = "e-licencie" -} -export declare const opcoesVinculosGov: { - readonly governo: "Governo"; - readonly sociedade: "Sociedade"; - readonly anonimo: "Anônimo"; -}; -export declare const opcoesVinculosSuporte: { - readonly "suporte-1": "Suporte Primário"; -}; -export declare const opcoesVinculos: { - readonly suporte: { - readonly "suporte-1": "Suporte Primário"; - }; - readonly "betha-meio-ambiente": { - readonly governo: "Governo"; - readonly sociedade: "Sociedade"; - readonly anonimo: "Anônimo"; - }; - readonly "e-licencie-gov": { - readonly governo: "Governo"; - readonly sociedade: "Sociedade"; - readonly anonimo: "Anônimo"; - }; - readonly "e-licencie": {}; -}; -export declare const tiposAcesso: { - readonly governo: "Governo"; - readonly sociedade: "Sociedade"; - readonly anonimo: "Anônimo"; -}; -export declare const provedoresGov: { - /** Sistema de login da Beta */ - readonly "betha-sistemas": "Betha Sistemas"; - /** sistema de login do altenticado */ - readonly "e-licencie": "e-licencie"; -}; -type extruturaTokenBase = { - inquilino_codigo: string; - usuario_codigo: string; - usuario_nome: string; - codigo_acesso_produto: string; - codigo_autenticacao: string; -}; -type extrutruaraTokenQuipo = extruturaTokenBase & { - inquilino_nome: string; - tipo_de_acesso: keyof typeof opcoesVinculosGov; - provedor: keyof typeof provedoresGov; -}; -export declare class Produto { - /** Chave do produto*/ - chave_produto: C; - /** Titulo do produto */ - titulo: string; - /** Descrição do módulo */ - descricao: string; - /** URL base do módulo */ - url_produto: (_: { - inquilino: string; - base_url: string; - vinculo: string; - }) => string; - constructor(_: { - /** Chave do produto*/ chave_produto: C; - /** Titulo do produto */ - titulo: string; - /** Descrição do módulo */ - descricao: string; - /** URL base do módulo */ - url_produto: (_: { - inquilino: string; - base_url: string; - vinculo: string; - }) => string; - }); - extruturaToken(_: extruturaTokenBase): extruturaTokenBase & { - chave_produto: C; - }; -} -export declare class ProdutoQuipo extends Produto { - extruturaToken(_: extrutruaraTokenQuipo): extrutruaraTokenQuipo & { - chave_produto: C; - }; -} -export declare enum versao_usuarios { - versao_usuarios_autenticacao = "versao_usuarios_autenticacao", - versao_usuarios_quipo = "versao_usuarios_quipo" -} -export {}; diff --git a/dist-import/produtos/tipagem.js b/dist-import/produtos/tipagem.js deleted file mode 100644 index ec192d2..0000000 --- a/dist-import/produtos/tipagem.js +++ /dev/null @@ -1,50 +0,0 @@ -/** Lista dos produtos da e-licencie */ -export var chaves_produto; -(function (chaves_produto) { - chaves_produto["suporte"] = "suporte"; - chaves_produto["betha-meio-ambiente"] = "betha-meio-ambiente"; - chaves_produto["e-licencie-gov"] = "e-licencie-gov"; - chaves_produto["e-licencie"] = "e-licencie"; -})(chaves_produto || (chaves_produto = {})); -export const opcoesVinculosGov = { - governo: "Governo", - sociedade: "Sociedade", - anonimo: "Anônimo", -}; -export const opcoesVinculosSuporte = { - "suporte-1": "Suporte Primário", -}; -export const opcoesVinculos = { - [chaves_produto.suporte]: opcoesVinculosSuporte, - [chaves_produto["betha-meio-ambiente"]]: opcoesVinculosGov, - [chaves_produto["e-licencie-gov"]]: opcoesVinculosGov, - [chaves_produto["e-licencie"]]: {}, -}; -export const tiposAcesso = opcoesVinculosGov; -export const provedoresGov = { - /** Sistema de login da Beta */ - "betha-sistemas": "Betha Sistemas", - /** sistema de login do altenticado */ - "e-licencie": "e-licencie", -}; -export class Produto { - constructor(_) { - this.chave_produto = _.chave_produto; - this.titulo = _.titulo; - this.descricao = _.descricao; - this.url_produto = _.url_produto; - } - extruturaToken(_) { - return { ..._, chave_produto: this.chave_produto }; - } -} -export class ProdutoQuipo extends Produto { - extruturaToken(_) { - return { ..._, chave_produto: this.chave_produto }; - } -} -export var versao_usuarios; -(function (versao_usuarios) { - versao_usuarios["versao_usuarios_autenticacao"] = "versao_usuarios_autenticacao"; - versao_usuarios["versao_usuarios_quipo"] = "versao_usuarios_quipo"; -})(versao_usuarios || (versao_usuarios = {})); diff --git a/dist-import/tokens/index.d.ts b/dist-import/tokens/index.d.ts deleted file mode 100644 index a95421b..0000000 --- a/dist-import/tokens/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { provedoresGov } from "../produtos"; -export type tipoUsuarioTokenAutneticacao = { - usuario_codigo: string; - usuario_nome: string; - usuario_email: string; - usuario_cpf: string; - autenticacao_codigo: string; - eSuporte: boolean; - autenticacao_provedor: keyof typeof provedoresGov; -}; diff --git a/dist-import/tokens/index.js b/dist-import/tokens/index.js deleted file mode 100644 index cb0ff5c..0000000 --- a/dist-import/tokens/index.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dist-require/autenticacao/_codigoContaSite.d.ts b/dist-require/autenticacao/_codigoContaSite.d.ts deleted file mode 100644 index 41e1592..0000000 --- a/dist-require/autenticacao/_codigoContaSite.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { type tipoResposta } from "p-respostas"; -type tipoPostCodigoContaSite = { - site: string; -}; -export declare const codigoContaSite: ({ url_api_autenticacao, post, }: { - url_api_autenticacao: string; - post: tipoPostCodigoContaSite; -}) => Promise>; -export {}; diff --git a/dist-require/autenticacao/_codigoContaSite.js b/dist-require/autenticacao/_codigoContaSite.js deleted file mode 100644 index f9b9f04..0000000 --- a/dist-require/autenticacao/_codigoContaSite.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.codigoContaSite = void 0; -const p_respostas_1 = require("p-respostas"); -const cross_fetch_1 = __importDefault(require("cross-fetch")); -const codigoContaSite = async ({ url_api_autenticacao, post, }) => { - const url = `${url_api_autenticacao}/api/codigo_prefeitura_site`; - try { - const resp = await (0, cross_fetch_1.default)(url, { - method: "POST", - body: JSON.stringify(post), - headers: { "Content-Type": "application/json" }, - }) - .then((r) => r.json()) - .catch((e) => p_respostas_1.respostaComuns.erro("Erro ao enviar registros", [e.message])) - .then((r) => r); - return resp; - } - catch (e) { - return p_respostas_1.respostaComuns.erro(`erro ao buscar código do site: ${e}`); - } -}; -exports.codigoContaSite = codigoContaSite; diff --git a/dist-require/autenticacao/_usuarios_quipo.d.ts b/dist-require/autenticacao/_usuarios_quipo.d.ts deleted file mode 100644 index 757ec14..0000000 --- a/dist-require/autenticacao/_usuarios_quipo.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { type tipoResposta } from "p-respostas"; -import type { tipo_usuarios__listar_retorno } from "../lista-usuarios"; -export type tipoUsuarioExterno = { - _nome: string; - _email: string; - _telefone: string; - vinculo: string; - inquilino: string; - chave_produto: string; - codigo: string; - _cpf: string; -}; -export declare const usuarios_quipo: ({ token_produto, url_api_autenticacao, inquilino, }: { - url_api_autenticacao: string; - token_produto: string; - inquilino: string; -}) => Promise>; diff --git a/dist-require/autenticacao/_usuarios_quipo.js b/dist-require/autenticacao/_usuarios_quipo.js deleted file mode 100644 index 62f9d6d..0000000 --- a/dist-require/autenticacao/_usuarios_quipo.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.usuarios_quipo = void 0; -const cross_fetch_1 = __importDefault(require("cross-fetch")); -const p_respostas_1 = require("p-respostas"); -const usuarios_quipo = async ({ token_produto, url_api_autenticacao, inquilino, }) => { - const url = `${url_api_autenticacao}/api/usuarios__listar`; - if (!token_produto) - return p_respostas_1.respostaComuns.erro("token_produto não informado"); - const headers = { - token: token_produto, - "Content-Type": "application/json", - }; - return (0, cross_fetch_1.default)(url, { - method: "POST", - body: JSON.stringify({ inquilino }), - headers, - }) - .then((r) => r.json()) - .catch((e) => p_respostas_1.respostaComuns.erro(`Erro ao buscar usuários quipo governo ${e.message}`)) - .then((r) => r); -}; -exports.usuarios_quipo = usuarios_quipo; diff --git a/dist-require/autenticacao/_usuarios_quipo_vincular.d.ts b/dist-require/autenticacao/_usuarios_quipo_vincular.d.ts deleted file mode 100644 index f5a03e8..0000000 --- a/dist-require/autenticacao/_usuarios_quipo_vincular.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { type tipoResposta } from "p-respostas"; -export declare const usuarios_quipo_vincular: ({ token_produto, url_api_autenticacao, inquilino_codigo, vinculo, usuario_codigo, email, }: { - url_api_autenticacao: string; - token_produto: string; - inquilino_codigo: string; - vinculo: string; - usuario_codigo?: string; - email: string; -}) => Promise>; diff --git a/dist-require/autenticacao/_usuarios_quipo_vincular.js b/dist-require/autenticacao/_usuarios_quipo_vincular.js deleted file mode 100644 index 9791c4c..0000000 --- a/dist-require/autenticacao/_usuarios_quipo_vincular.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.usuarios_quipo_vincular = void 0; -const cross_fetch_1 = __importDefault(require("cross-fetch")); -const p_respostas_1 = require("p-respostas"); -const usuarios_quipo_vincular = async ({ token_produto, url_api_autenticacao, inquilino_codigo, vinculo, usuario_codigo, email, }) => { - const url = `${url_api_autenticacao}/api/vinculos__criar`; - if (!token_produto) - return p_respostas_1.respostaComuns.erro("token_produto não informado"); - const headers = { - token: token_produto, - "Content-Type": "application/json", - }; - const parametros = { - vinculos: { inquilino_codigo, usuario_codigo, vinculo }, - email: email, - }; - return await (0, cross_fetch_1.default)(url, { - headers, - body: JSON.stringify(parametros), - method: "POST", - }) - .then(async (r) => await r.json()) - .catch((e) => p_respostas_1.respostaComuns.erro(`Erro ao criar vinculo de usuario ${e.message}`)); -}; -exports.usuarios_quipo_vincular = usuarios_quipo_vincular; diff --git a/dist-require/autenticacao/_validarToken.d.ts b/dist-require/autenticacao/_validarToken.d.ts deleted file mode 100644 index 872d220..0000000 --- a/dist-require/autenticacao/_validarToken.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -type tipoPostValidarTokem = { - token: string; -}; -/** faz a validação do token */ -export declare const validarToken: ({ url_api_autenticacao, post, }: { - url_api_autenticacao: string; - post: tipoPostValidarTokem; -}) => Promise<"valido" | "erro">; -export {}; diff --git a/dist-require/autenticacao/_validarToken.js b/dist-require/autenticacao/_validarToken.js deleted file mode 100644 index f980d33..0000000 --- a/dist-require/autenticacao/_validarToken.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validarToken = void 0; -const cross_fetch_1 = __importDefault(require("cross-fetch")); -/** faz a validação do token */ -const validarToken = async ({ url_api_autenticacao, post, }) => { - const url = `${url_api_autenticacao}/api/validar_token`; - try { - const resposta = await (0, cross_fetch_1.default)(url, { - method: "POST", - body: JSON.stringify(post), - headers: { "Content-Type": "application/json" }, - }) - .then((r) => r.json()) - .then((r) => r) - .then((resposta) => resposta.eCerto ? "valido" : "erro") - .catch(() => "erro"); - return resposta; - } - catch (_e) { - return "erro"; - } -}; -exports.validarToken = validarToken; diff --git a/dist-require/autenticacao/index.d.ts b/dist-require/autenticacao/index.d.ts deleted file mode 100644 index 2a45dc9..0000000 --- a/dist-require/autenticacao/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { type tipoUsuarioExterno } from "./_usuarios_quipo"; -export type { tipoUsuarioExterno }; -/** todas as rotas de comunicação com autenticador partem dessa variável */ -export declare const pAutenticacao: { - validarToken: ({ url_api_autenticacao, post, }: { - url_api_autenticacao: string; - post: { - token: string; - }; - }) => Promise<"valido" | "erro">; - codigoContaSite: ({ url_api_autenticacao, post, }: { - url_api_autenticacao: string; - post: { - site: string; - }; - }) => Promise>; - usuarios_quipo: ({ token_produto, url_api_autenticacao, inquilino, }: { - url_api_autenticacao: string; - token_produto: string; - inquilino: string; - }) => Promise>; - usuarios_quipo_vincular: ({ token_produto, url_api_autenticacao, inquilino_codigo, vinculo, usuario_codigo, email, }: { - url_api_autenticacao: string; - token_produto: string; - inquilino_codigo: string; - vinculo: string; - usuario_codigo?: string; - email: string; - }) => Promise>; -}; diff --git a/dist-require/autenticacao/index.js b/dist-require/autenticacao/index.js deleted file mode 100644 index 09a942d..0000000 --- a/dist-require/autenticacao/index.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.pAutenticacao = void 0; -const _codigoContaSite_1 = require("./_codigoContaSite"); -const _usuarios_quipo_1 = require("./_usuarios_quipo"); -const _usuarios_quipo_vincular_1 = require("./_usuarios_quipo_vincular"); -const _validarToken_1 = require("./_validarToken"); -/** todas as rotas de comunicação com autenticador partem dessa variável */ -exports.pAutenticacao = { - validarToken: _validarToken_1.validarToken, - codigoContaSite: _codigoContaSite_1.codigoContaSite, - usuarios_quipo: _usuarios_quipo_1.usuarios_quipo, - usuarios_quipo_vincular: _usuarios_quipo_vincular_1.usuarios_quipo_vincular, -}; diff --git a/dist-require/index.d.ts b/dist-require/index.d.ts deleted file mode 100644 index b8e4f3c..0000000 --- a/dist-require/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from "./autenticacao"; -export * from "./lista-prefeituras"; -export * from "./lista-usuarios"; -export * from "./lista-vinculos"; -export * from "./produtos"; -export * from "./tokens"; diff --git a/dist-require/index.js b/dist-require/index.js deleted file mode 100644 index 399341d..0000000 --- a/dist-require/index.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./autenticacao"), exports); -__exportStar(require("./lista-prefeituras"), exports); -__exportStar(require("./lista-usuarios"), exports); -__exportStar(require("./lista-vinculos"), exports); -__exportStar(require("./produtos"), exports); -__exportStar(require("./tokens"), exports); diff --git a/dist-require/lista-prefeituras.d.ts b/dist-require/lista-prefeituras.d.ts deleted file mode 100644 index 5d5e0aa..0000000 --- a/dist-require/lista-prefeituras.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { type tipoResposta } from "p-respostas"; -import type { chaves_produto } from "./produtos/tipagem"; -export type tipoRetornoListarPrefeitrua = { - nome: string; - inquilino: string; - base_url: string; - produto: keyof typeof chaves_produto; -}; -export declare const tx_listar_prefeituras: "listar_prefeituras"; -export declare const listarPrefeituras: ({ url_api_autenticacao, }: { - url_api_autenticacao: string; -}) => Promise>; diff --git a/dist-require/lista-prefeituras.js b/dist-require/lista-prefeituras.js deleted file mode 100644 index 4c25430..0000000 --- a/dist-require/lista-prefeituras.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.listarPrefeituras = exports.tx_listar_prefeituras = void 0; -const cross_fetch_1 = __importDefault(require("cross-fetch")); -const p_respostas_1 = require("p-respostas"); -exports.tx_listar_prefeituras = "listar_prefeituras"; -const listarPrefeituras = async ({ url_api_autenticacao, }) => { - const url = `${url_api_autenticacao}/api/${exports.tx_listar_prefeituras}`; - return (0, cross_fetch_1.default)(url) - .then(async (a) => { - const texto = await a.text(); - try { - const res = JSON.parse(texto); - return res; - } - catch (error) { - return p_respostas_1.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [ - texto, - error, - ]); - } - }) - .catch((error) => p_respostas_1.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [error])); -}; -exports.listarPrefeituras = listarPrefeituras; diff --git a/dist-require/lista-usuarios.d.ts b/dist-require/lista-usuarios.d.ts deleted file mode 100644 index 9d540cb..0000000 --- a/dist-require/lista-usuarios.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { type tipoResposta } from "p-respostas"; -export declare const tx_usuarios__listar: "usuarios__listar"; -export type tipo_usuarios__listar_retorno = { - inquilino: string; - vinculo: string; - codigo: string; - cpf: string; - data_hora_atualizacao: string; - email: string; - id_betha_sistema: string; - nome: string; - telefone: string; -}; -export type tipo_usuarios__listar_parametros = { - inquilino?: string; -}; -export declare const listarUsuarios: ({ token, url_api_autenticacao, }: { - url_api_autenticacao: string; - token: string; -}, parametros: tipo_usuarios__listar_parametros) => Promise>; diff --git a/dist-require/lista-usuarios.js b/dist-require/lista-usuarios.js deleted file mode 100644 index b9c546c..0000000 --- a/dist-require/lista-usuarios.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.listarUsuarios = exports.tx_usuarios__listar = void 0; -const cross_fetch_1 = __importDefault(require("cross-fetch")); -const p_respostas_1 = require("p-respostas"); -exports.tx_usuarios__listar = "usuarios__listar"; -const listarUsuarios = async ({ token, url_api_autenticacao, }, parametros) => { - const url = `${url_api_autenticacao}/api/${exports.tx_usuarios__listar}`; - return (0, cross_fetch_1.default)(url, { - headers: { token, "Content-Type": "application/json" }, - body: JSON.stringify(parametros), - method: "post", - }) - .then(async (a) => { - const texto = await a.text(); - try { - const res = JSON.parse(texto); - return res; - } - catch (error) { - return p_respostas_1.respostaComuns.erro(`Erro ao listar usuários: ${error.message}`, [texto, error]); - } - }) - .catch((error) => p_respostas_1.respostaComuns.erro(`Erro ao listar usuários: ${error.message}`, [error])); -}; -exports.listarUsuarios = listarUsuarios; diff --git a/dist-require/lista-vinculos.d.ts b/dist-require/lista-vinculos.d.ts deleted file mode 100644 index 213bcf5..0000000 --- a/dist-require/lista-vinculos.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { type tipoResposta } from "p-respostas"; -export declare const tx_vinculos__listar: "vinculos__listar"; -export type tipo_retorno_vinculo_listas = { - codigo: string; - usuario_codigo: string; - inquilino: string; - vinculo: string; - chave_produto: string; - _usuario_nome: string; - _inquilino_nome: string; - _inquilino_base_url: string; -}; -export declare const listarVinculos: ({ token, url_api_autenticacao, desativarCache, }: { - url_api_autenticacao: string; - token: string; - /** por padrão será 10 segundos */ - desativarCache?: boolean; -}) => Promise>; diff --git a/dist-require/lista-vinculos.js b/dist-require/lista-vinculos.js deleted file mode 100644 index 64b0fe1..0000000 --- a/dist-require/lista-vinculos.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.listarVinculos = exports.tx_vinculos__listar = void 0; -const cross_fetch_1 = __importDefault(require("cross-fetch")); -const p_respostas_1 = require("p-respostas"); -const node_cache_1 = require("./plugins/node-cache"); -const uuid_1 = require("./plugins/uuid"); -exports.tx_vinculos__listar = "vinculos__listar"; -const listarVinculos = async ({ token, url_api_autenticacao, desativarCache, }) => { - const chaveCache = (0, uuid_1.uuidV3)({ token, url_api_autenticacao }); - // Buscar promeiro no cache - if (!desativarCache) { - const valorCache = node_cache_1.cacheAuDrive.get(chaveCache); - if (valorCache) - return valorCache; - } - const res = (async () => { - const url = `${url_api_autenticacao}/api/${exports.tx_vinculos__listar}`; - return (0, cross_fetch_1.default)(url, { - headers: { token, "Content-Type": "application/json" }, - body: "{}", - method: "post", - }) - .then(async (a) => { - const texto = await a.text(); - try { - const res = JSON.parse(texto); - return res; - } - catch (error) { - return p_respostas_1.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [texto, error]); - } - }) - .catch((error) => p_respostas_1.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [ - error, - ])); - })(); - node_cache_1.cacheAuDrive.set(chaveCache, res.then((a) => { - try { - if (a.eErro) { - node_cache_1.cacheAuDrive.del(chaveCache); - } - } - catch { } - return a; - }), 10); - return res; -}; -exports.listarVinculos = listarVinculos; diff --git a/dist-require/plugins/node-cache.d.ts b/dist-require/plugins/node-cache.d.ts deleted file mode 100644 index 9eb85eb..0000000 --- a/dist-require/plugins/node-cache.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import NodeCache from "node-cache"; -export declare const cacheAuDrive: NodeCache; diff --git a/dist-require/plugins/node-cache.js b/dist-require/plugins/node-cache.js deleted file mode 100644 index d6c004d..0000000 --- a/dist-require/plugins/node-cache.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.cacheAuDrive = void 0; -const node_cache_1 = __importDefault(require("node-cache")); -exports.cacheAuDrive = new node_cache_1.default(); diff --git a/dist-require/plugins/uuid.d.ts b/dist-require/plugins/uuid.d.ts deleted file mode 100644 index 4cb7206..0000000 --- a/dist-require/plugins/uuid.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { v4 } from "uuid"; -export declare const uuidV3: (qualquerCoisa: any) => string; -export declare const uuidV4: typeof v4; diff --git a/dist-require/plugins/uuid.js b/dist-require/plugins/uuid.js deleted file mode 100644 index ba16c8c..0000000 --- a/dist-require/plugins/uuid.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.uuidV4 = exports.uuidV3 = void 0; -const uuid_1 = require("uuid"); -const uuidV3 = (qualquerCoisa) => (0, uuid_1.v3)(typeof qualquerCoisa == "string" - ? qualquerCoisa - : typeof qualquerCoisa == "number" - ? String(qualquerCoisa) - : JSON.stringify(qualquerCoisa), uuid_1.NIL); -exports.uuidV3 = uuidV3; -exports.uuidV4 = uuid_1.v4; diff --git a/dist-require/produtos/_betha-meio-ambiente.d.ts b/dist-require/produtos/_betha-meio-ambiente.d.ts deleted file mode 100644 index 701ee61..0000000 --- a/dist-require/produtos/_betha-meio-ambiente.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { ProdutoQuipo } from "./tipagem"; -export declare const produto_betha_meio_ambiente: ProdutoQuipo<"betha-meio-ambiente">; diff --git a/dist-require/produtos/_betha-meio-ambiente.js b/dist-require/produtos/_betha-meio-ambiente.js deleted file mode 100644 index ad659db..0000000 --- a/dist-require/produtos/_betha-meio-ambiente.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.produto_betha_meio_ambiente = void 0; -const tipagem_1 = require("./tipagem"); -exports.produto_betha_meio_ambiente = new tipagem_1.ProdutoQuipo({ - chave_produto: "betha-meio-ambiente", - titulo: "Betha Meio Ambiente", - descricao: "Betha Meio Ambiente: Software de gestão de processos ambientais para órgãos públicos da Betha Sistemas.", - url_produto: ({ inquilino, base_url, vinculo }) => `${base_url}/${inquilino}${vinculo == "anonimo" - ? "" - : `/${vinculo}#/admin`}`, -}); diff --git a/dist-require/produtos/_e-licencie-gov.d.ts b/dist-require/produtos/_e-licencie-gov.d.ts deleted file mode 100644 index c61248c..0000000 --- a/dist-require/produtos/_e-licencie-gov.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { ProdutoQuipo } from "./tipagem"; -export declare const produto_e_licencie_gov: ProdutoQuipo<"e-licencie-gov">; diff --git a/dist-require/produtos/_e-licencie-gov.js b/dist-require/produtos/_e-licencie-gov.js deleted file mode 100644 index eb5bc4d..0000000 --- a/dist-require/produtos/_e-licencie-gov.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.produto_e_licencie_gov = void 0; -const _betha_meio_ambiente_1 = require("./_betha-meio-ambiente"); -const tipagem_1 = require("./tipagem"); -exports.produto_e_licencie_gov = new tipagem_1.ProdutoQuipo({ - ..._betha_meio_ambiente_1.produto_betha_meio_ambiente, - titulo: "e-Licencie Gov", - chave_produto: "e-licencie-gov", - url_produto: ({ inquilino, base_url, vinculo }) => `${base_url}/${inquilino}${vinculo == "anonimo" - ? "" - : `/${vinculo}#/admin`}`, -}); diff --git a/dist-require/produtos/_e-licencie.d.ts b/dist-require/produtos/_e-licencie.d.ts deleted file mode 100644 index d5043b2..0000000 --- a/dist-require/produtos/_e-licencie.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Produto } from "./tipagem"; -export declare const produto_e_licencie: Produto<"e-licencie">; diff --git a/dist-require/produtos/_e-licencie.js b/dist-require/produtos/_e-licencie.js deleted file mode 100644 index 855d52e..0000000 --- a/dist-require/produtos/_e-licencie.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.produto_e_licencie = void 0; -const tipagem_1 = require("./tipagem"); -exports.produto_e_licencie = new tipagem_1.Produto({ - chave_produto: "e-licencie", - titulo: "e-Licencie", - descricao: "e-Licencie: Software de gestão de processos e dados ambientais.", - url_produto: ({ base_url }) => base_url, -}); diff --git a/dist-require/produtos/_suporte.d.ts b/dist-require/produtos/_suporte.d.ts deleted file mode 100644 index f13f8e1..0000000 --- a/dist-require/produtos/_suporte.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Produto } from "./tipagem"; -export declare const produto_suporte: Produto<"suporte">; diff --git a/dist-require/produtos/_suporte.js b/dist-require/produtos/_suporte.js deleted file mode 100644 index 0c20849..0000000 --- a/dist-require/produtos/_suporte.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.produto_suporte = void 0; -const tipagem_1 = require("./tipagem"); -exports.produto_suporte = new tipagem_1.Produto({ - chave_produto: "suporte", - titulo: "Suporte", - descricao: "Gestão de contas e usuários dos produtos da e-licencie", - url_produto: ({ base_url }) => base_url, -}); diff --git a/dist-require/produtos/doc.d.ts b/dist-require/produtos/doc.d.ts deleted file mode 100644 index 2e00a65..0000000 --- a/dist-require/produtos/doc.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - -Produtos existentes: - -Atenticacao: - Acesso a gestão de produtos - Apenas uma conta com o código autenticao - /autenticacao - -Betha Meio Ambiente: - Acesso a gestão da aplicação Quipo - Acesso pode ser sociedade ou governo - /quipo - Possue limite de acesso a módulos: - Licenciamento - Fiscalização - - - -e-licencie GOV: - Acesso a gestão da aplicação Quipo - Acesso pode ser sociedade ou governo - /quipo - - -e-licencie: - Acesso a Aplicação e-licencie - Adminstrador e Não adminstrasdor - - - */ diff --git a/dist-require/produtos/doc.js b/dist-require/produtos/doc.js deleted file mode 100644 index 4dd180b..0000000 --- a/dist-require/produtos/doc.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -/** - -Produtos existentes: - -Atenticacao: - Acesso a gestão de produtos - Apenas uma conta com o código autenticao - /autenticacao - -Betha Meio Ambiente: - Acesso a gestão da aplicação Quipo - Acesso pode ser sociedade ou governo - /quipo - Possue limite de acesso a módulos: - Licenciamento - Fiscalização - - - -e-licencie GOV: - Acesso a gestão da aplicação Quipo - Acesso pode ser sociedade ou governo - /quipo - - -e-licencie: - Acesso a Aplicação e-licencie - Adminstrador e Não adminstrasdor - - - */ diff --git a/dist-require/produtos/index.d.ts b/dist-require/produtos/index.d.ts deleted file mode 100644 index 438e4d8..0000000 --- a/dist-require/produtos/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { produto_betha_meio_ambiente } from "./_betha-meio-ambiente"; -import { produto_e_licencie } from "./_e-licencie"; -import { produto_e_licencie_gov } from "./_e-licencie-gov"; -import { produto_suporte } from "./_suporte"; -import { chaves_produto, opcoesVinculos, opcoesVinculosGov, Produto, provedoresGov, versao_usuarios } from "./tipagem"; -export declare const listaProdutos: { - [k in keyof typeof chaves_produto]: Produto; -}; -export { Produto, chaves_produto, opcoesVinculosGov, opcoesVinculos, provedoresGov, produto_betha_meio_ambiente, produto_e_licencie, produto_e_licencie_gov, produto_suporte, versao_usuarios, }; diff --git a/dist-require/produtos/index.js b/dist-require/produtos/index.js deleted file mode 100644 index 97de87e..0000000 --- a/dist-require/produtos/index.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.versao_usuarios = exports.produto_suporte = exports.produto_e_licencie_gov = exports.produto_e_licencie = exports.produto_betha_meio_ambiente = exports.provedoresGov = exports.opcoesVinculos = exports.opcoesVinculosGov = exports.chaves_produto = exports.Produto = exports.listaProdutos = void 0; -const _betha_meio_ambiente_1 = require("./_betha-meio-ambiente"); -Object.defineProperty(exports, "produto_betha_meio_ambiente", { enumerable: true, get: function () { return _betha_meio_ambiente_1.produto_betha_meio_ambiente; } }); -const _e_licencie_1 = require("./_e-licencie"); -Object.defineProperty(exports, "produto_e_licencie", { enumerable: true, get: function () { return _e_licencie_1.produto_e_licencie; } }); -const _e_licencie_gov_1 = require("./_e-licencie-gov"); -Object.defineProperty(exports, "produto_e_licencie_gov", { enumerable: true, get: function () { return _e_licencie_gov_1.produto_e_licencie_gov; } }); -const _suporte_1 = require("./_suporte"); -Object.defineProperty(exports, "produto_suporte", { enumerable: true, get: function () { return _suporte_1.produto_suporte; } }); -const tipagem_1 = require("./tipagem"); -Object.defineProperty(exports, "chaves_produto", { enumerable: true, get: function () { return tipagem_1.chaves_produto; } }); -Object.defineProperty(exports, "opcoesVinculos", { enumerable: true, get: function () { return tipagem_1.opcoesVinculos; } }); -Object.defineProperty(exports, "opcoesVinculosGov", { enumerable: true, get: function () { return tipagem_1.opcoesVinculosGov; } }); -Object.defineProperty(exports, "Produto", { enumerable: true, get: function () { return tipagem_1.Produto; } }); -Object.defineProperty(exports, "provedoresGov", { enumerable: true, get: function () { return tipagem_1.provedoresGov; } }); -Object.defineProperty(exports, "versao_usuarios", { enumerable: true, get: function () { return tipagem_1.versao_usuarios; } }); -exports.listaProdutos = { - "betha-meio-ambiente": _betha_meio_ambiente_1.produto_betha_meio_ambiente, - "e-licencie": _e_licencie_1.produto_e_licencie, - "e-licencie-gov": _e_licencie_gov_1.produto_e_licencie_gov, - suporte: _suporte_1.produto_suporte, -}; diff --git a/dist-require/produtos/tipagem.d.ts b/dist-require/produtos/tipagem.d.ts deleted file mode 100644 index d42fa16..0000000 --- a/dist-require/produtos/tipagem.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -/** Lista dos produtos da e-licencie */ -export declare enum chaves_produto { - suporte = "suporte", - "betha-meio-ambiente" = "betha-meio-ambiente", - "e-licencie-gov" = "e-licencie-gov", - "e-licencie" = "e-licencie" -} -export declare const opcoesVinculosGov: { - readonly governo: "Governo"; - readonly sociedade: "Sociedade"; - readonly anonimo: "Anônimo"; -}; -export declare const opcoesVinculosSuporte: { - readonly "suporte-1": "Suporte Primário"; -}; -export declare const opcoesVinculos: { - readonly suporte: { - readonly "suporte-1": "Suporte Primário"; - }; - readonly "betha-meio-ambiente": { - readonly governo: "Governo"; - readonly sociedade: "Sociedade"; - readonly anonimo: "Anônimo"; - }; - readonly "e-licencie-gov": { - readonly governo: "Governo"; - readonly sociedade: "Sociedade"; - readonly anonimo: "Anônimo"; - }; - readonly "e-licencie": {}; -}; -export declare const tiposAcesso: { - readonly governo: "Governo"; - readonly sociedade: "Sociedade"; - readonly anonimo: "Anônimo"; -}; -export declare const provedoresGov: { - /** Sistema de login da Beta */ - readonly "betha-sistemas": "Betha Sistemas"; - /** sistema de login do altenticado */ - readonly "e-licencie": "e-licencie"; -}; -type extruturaTokenBase = { - inquilino_codigo: string; - usuario_codigo: string; - usuario_nome: string; - codigo_acesso_produto: string; - codigo_autenticacao: string; -}; -type extrutruaraTokenQuipo = extruturaTokenBase & { - inquilino_nome: string; - tipo_de_acesso: keyof typeof opcoesVinculosGov; - provedor: keyof typeof provedoresGov; -}; -export declare class Produto { - /** Chave do produto*/ - chave_produto: C; - /** Titulo do produto */ - titulo: string; - /** Descrição do módulo */ - descricao: string; - /** URL base do módulo */ - url_produto: (_: { - inquilino: string; - base_url: string; - vinculo: string; - }) => string; - constructor(_: { - /** Chave do produto*/ chave_produto: C; - /** Titulo do produto */ - titulo: string; - /** Descrição do módulo */ - descricao: string; - /** URL base do módulo */ - url_produto: (_: { - inquilino: string; - base_url: string; - vinculo: string; - }) => string; - }); - extruturaToken(_: extruturaTokenBase): extruturaTokenBase & { - chave_produto: C; - }; -} -export declare class ProdutoQuipo extends Produto { - extruturaToken(_: extrutruaraTokenQuipo): extrutruaraTokenQuipo & { - chave_produto: C; - }; -} -export declare enum versao_usuarios { - versao_usuarios_autenticacao = "versao_usuarios_autenticacao", - versao_usuarios_quipo = "versao_usuarios_quipo" -} -export {}; diff --git a/dist-require/produtos/tipagem.js b/dist-require/produtos/tipagem.js deleted file mode 100644 index 3936c33..0000000 --- a/dist-require/produtos/tipagem.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.versao_usuarios = exports.ProdutoQuipo = exports.Produto = exports.provedoresGov = exports.tiposAcesso = exports.opcoesVinculos = exports.opcoesVinculosSuporte = exports.opcoesVinculosGov = exports.chaves_produto = void 0; -/** Lista dos produtos da e-licencie */ -var chaves_produto; -(function (chaves_produto) { - chaves_produto["suporte"] = "suporte"; - chaves_produto["betha-meio-ambiente"] = "betha-meio-ambiente"; - chaves_produto["e-licencie-gov"] = "e-licencie-gov"; - chaves_produto["e-licencie"] = "e-licencie"; -})(chaves_produto || (exports.chaves_produto = chaves_produto = {})); -exports.opcoesVinculosGov = { - governo: "Governo", - sociedade: "Sociedade", - anonimo: "Anônimo", -}; -exports.opcoesVinculosSuporte = { - "suporte-1": "Suporte Primário", -}; -exports.opcoesVinculos = { - [chaves_produto.suporte]: exports.opcoesVinculosSuporte, - [chaves_produto["betha-meio-ambiente"]]: exports.opcoesVinculosGov, - [chaves_produto["e-licencie-gov"]]: exports.opcoesVinculosGov, - [chaves_produto["e-licencie"]]: {}, -}; -exports.tiposAcesso = exports.opcoesVinculosGov; -exports.provedoresGov = { - /** Sistema de login da Beta */ - "betha-sistemas": "Betha Sistemas", - /** sistema de login do altenticado */ - "e-licencie": "e-licencie", -}; -class Produto { - constructor(_) { - this.chave_produto = _.chave_produto; - this.titulo = _.titulo; - this.descricao = _.descricao; - this.url_produto = _.url_produto; - } - extruturaToken(_) { - return { ..._, chave_produto: this.chave_produto }; - } -} -exports.Produto = Produto; -class ProdutoQuipo extends Produto { - extruturaToken(_) { - return { ..._, chave_produto: this.chave_produto }; - } -} -exports.ProdutoQuipo = ProdutoQuipo; -var versao_usuarios; -(function (versao_usuarios) { - versao_usuarios["versao_usuarios_autenticacao"] = "versao_usuarios_autenticacao"; - versao_usuarios["versao_usuarios_quipo"] = "versao_usuarios_quipo"; -})(versao_usuarios || (exports.versao_usuarios = versao_usuarios = {})); diff --git a/dist-require/tokens/index.d.ts b/dist-require/tokens/index.d.ts deleted file mode 100644 index a95421b..0000000 --- a/dist-require/tokens/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { provedoresGov } from "../produtos"; -export type tipoUsuarioTokenAutneticacao = { - usuario_codigo: string; - usuario_nome: string; - usuario_email: string; - usuario_cpf: string; - autenticacao_codigo: string; - eSuporte: boolean; - autenticacao_provedor: keyof typeof provedoresGov; -}; diff --git a/dist-require/tokens/index.js b/dist-require/tokens/index.js deleted file mode 100644 index c8ad2e5..0000000 --- a/dist-require/tokens/index.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/package.json b/package.json index c52f039..6000505 100644 --- a/package.json +++ b/package.json @@ -1,29 +1,25 @@ { "name": "p-autenticacao-drive", - "version": "1.26.0", + "version": "1.28.0", "description": "", - "main": "src/index.ts", - "packageManager": "pnpm@9.15.4", + "main": "./src/index.ts", "exports": { ".": { - "import": "./dist-import/index.js", - "require": "./dist-require/index.js" + "types": "./src/index.ts", + "import": "./dist-front/index.js", + "require": "./dist-back/index.js" } }, + "types": "./src/index.ts", "scripts": { - "preinstall": "bun pm cache rm", "at": "pnpm up @biomejs/biome typescript", - "build-back": "rm -fr dist-require && tsc --project ./tsconfig-back.json", - "build-front": "rm -fr dist-import && tsc --project ./tsconfig-front.json", - "build": "pnpm run biome && pnpm run build-back && pnpm run build-front", - "pacote": "npm --no-git-tag-version version minor && sh ./pacote.sh", - "biome": "npx @biomejs/biome check --write ./src && npx @biomejs/biome check --write ./package.json", + "build": "pnpm run biome && tsup --config ./node_modules/p-comuns/src/tsup/tsup.config.ts && npm --no-git-tag-version version minor", + "biome": "biome check --write ./src && biome check --write ./package.json", "nodev": "check-node-version --node '>= 20'", - "check": "bun run biome && bunx tsc --noEmit" + "check": "pnpm run biome && tsc --noEmit" }, "dependencies": { "cross-fetch": "4.1.0", - "node-cache": "^5.1.2", "p-comuns": "git+https://git2.idz.one/publico/_comuns.git", "p-respostas": "git+https://git2.idz.one/publico/_respostas.git", "uuid": "11.1.0" @@ -32,6 +28,7 @@ "@biomejs/biome": "2.0.6", "@types/node": "^20.19.8", "check-node-version": "^4.2.1", + "tsup": "8.5.0", "typescript": "5.5.4" }, "keywords": [], @@ -41,4 +38,4 @@ "url": "https://e-licencie.com.br" }, "license": "ISC" -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a528029..d1b964f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,24 +9,30 @@ importers: .: dependencies: cross-fetch: - specifier: ^4.1.0 + specifier: 4.1.0 version: 4.1.0 p-comuns: specifier: git+https://git2.idz.one/publico/_comuns.git - version: git+https://git2.idz.one/publico/_comuns.git#4845733519d5c0a09927026137ed6a8028adb761 + version: git+https://git2.idz.one/publico/_comuns.git#17aee620b3e66f14605d0ab851e7b80ec6553d76 p-respostas: specifier: git+https://git2.idz.one/publico/_respostas.git - version: git+https://git2.idz.one/publico/_respostas.git#9bda7126b0a712002236c4912da7cc1e86fc43f1 + version: git+https://git2.idz.one/publico/_respostas.git#431364ade4bc85aa163b970e0a94807dcc73585c + uuid: + specifier: 11.1.0 + version: 11.1.0 devDependencies: '@biomejs/biome': - specifier: ^2.0.6 + specifier: 2.0.6 version: 2.0.6 '@types/node': - specifier: ^20.16.1 - version: 20.19.4 + specifier: ^20.19.8 + version: 20.19.8 check-node-version: specifier: ^4.2.1 version: 4.2.1 + tsup: + specifier: 8.5.0 + version: 8.5.0(typescript@5.5.4) typescript: specifier: 5.5.4 version: 5.5.4 @@ -86,13 +92,329 @@ packages: cpu: [x64] os: [win32] - '@types/node@20.19.4': - resolution: {integrity: sha512-OP+We5WV8Xnbuvw0zC2m4qfB/BJvjyCwtNjhHdJxV1639SGSKrLmJkc3fMnp2Qy8nJyHp8RO6umxELN/dS1/EA==} + '@esbuild/aix-ppc64@0.25.6': + resolution: {integrity: sha512-ShbM/3XxwuxjFiuVBHA+d3j5dyac0aEVVq1oluIDf71hUw0aRF59dV/efUsIwFnR6m8JNM2FjZOzmaZ8yG61kw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.25.6': + resolution: {integrity: sha512-hd5zdUarsK6strW+3Wxi5qWws+rJhCCbMiC9QZyzoxfk5uHRIE8T287giQxzVpEvCwuJ9Qjg6bEjcRJcgfLqoA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.25.6': + resolution: {integrity: sha512-S8ToEOVfg++AU/bHwdksHNnyLyVM+eMVAOf6yRKFitnwnbwwPNqKr3srzFRe7nzV69RQKb5DgchIX5pt3L53xg==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.25.6': + resolution: {integrity: sha512-0Z7KpHSr3VBIO9A/1wcT3NTy7EB4oNC4upJ5ye3R7taCc2GUdeynSLArnon5G8scPwaU866d3H4BCrE5xLW25A==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.25.6': + resolution: {integrity: sha512-FFCssz3XBavjxcFxKsGy2DYK5VSvJqa6y5HXljKzhRZ87LvEi13brPrf/wdyl/BbpbMKJNOr1Sd0jtW4Ge1pAA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.25.6': + resolution: {integrity: sha512-GfXs5kry/TkGM2vKqK2oyiLFygJRqKVhawu3+DOCk7OxLy/6jYkWXhlHwOoTb0WqGnWGAS7sooxbZowy+pK9Yg==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.25.6': + resolution: {integrity: sha512-aoLF2c3OvDn2XDTRvn8hN6DRzVVpDlj2B/F66clWd/FHLiHaG3aVZjxQX2DYphA5y/evbdGvC6Us13tvyt4pWg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.25.6': + resolution: {integrity: sha512-2SkqTjTSo2dYi/jzFbU9Plt1vk0+nNg8YC8rOXXea+iA3hfNJWebKYPs3xnOUf9+ZWhKAaxnQNUf2X9LOpeiMQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.25.6': + resolution: {integrity: sha512-b967hU0gqKd9Drsh/UuAm21Khpoh6mPBSgz8mKRq4P5mVK8bpA+hQzmm/ZwGVULSNBzKdZPQBRT3+WuVavcWsQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.25.6': + resolution: {integrity: sha512-SZHQlzvqv4Du5PrKE2faN0qlbsaW/3QQfUUc6yO2EjFcA83xnwm91UbEEVx4ApZ9Z5oG8Bxz4qPE+HFwtVcfyw==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.25.6': + resolution: {integrity: sha512-aHWdQ2AAltRkLPOsKdi3xv0mZ8fUGPdlKEjIEhxCPm5yKEThcUjHpWB1idN74lfXGnZ5SULQSgtr5Qos5B0bPw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.25.6': + resolution: {integrity: sha512-VgKCsHdXRSQ7E1+QXGdRPlQ/e08bN6WMQb27/TMfV+vPjjTImuT9PmLXupRlC90S1JeNNW5lzkAEO/McKeJ2yg==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.25.6': + resolution: {integrity: sha512-WViNlpivRKT9/py3kCmkHnn44GkGXVdXfdc4drNmRl15zVQ2+D2uFwdlGh6IuK5AAnGTo2qPB1Djppj+t78rzw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.25.6': + resolution: {integrity: sha512-wyYKZ9NTdmAMb5730I38lBqVu6cKl4ZfYXIs31Baf8aoOtB4xSGi3THmDYt4BTFHk7/EcVixkOV2uZfwU3Q2Jw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.25.6': + resolution: {integrity: sha512-KZh7bAGGcrinEj4qzilJ4hqTY3Dg2U82c8bv+e1xqNqZCrCyc+TL9AUEn5WGKDzm3CfC5RODE/qc96OcbIe33w==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.25.6': + resolution: {integrity: sha512-9N1LsTwAuE9oj6lHMyyAM+ucxGiVnEqUdp4v7IaMmrwb06ZTEVCIs3oPPplVsnjPfyjmxwHxHMF8b6vzUVAUGw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.25.6': + resolution: {integrity: sha512-A6bJB41b4lKFWRKNrWoP2LHsjVzNiaurf7wyj/XtFNTsnPuxwEBWHLty+ZE0dWBKuSK1fvKgrKaNjBS7qbFKig==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.25.6': + resolution: {integrity: sha512-IjA+DcwoVpjEvyxZddDqBY+uJ2Snc6duLpjmkXm/v4xuS3H+3FkLZlDm9ZsAbF9rsfP3zeA0/ArNDORZgrxR/Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.25.6': + resolution: {integrity: sha512-dUXuZr5WenIDlMHdMkvDc1FAu4xdWixTCRgP7RQLBOkkGgwuuzaGSYcOpW4jFxzpzL1ejb8yF620UxAqnBrR9g==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.25.6': + resolution: {integrity: sha512-l8ZCvXP0tbTJ3iaqdNf3pjaOSd5ex/e6/omLIQCVBLmHTlfXW3zAxQ4fnDmPLOB1x9xrcSi/xtCWFwCZRIaEwg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.25.6': + resolution: {integrity: sha512-hKrmDa0aOFOr71KQ/19JC7az1P0GWtCN1t2ahYAf4O007DHZt/dW8ym5+CUdJhQ/qkZmI1HAF8KkJbEFtCL7gw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.25.6': + resolution: {integrity: sha512-+SqBcAWoB1fYKmpWoQP4pGtx+pUUC//RNYhFdbcSA16617cchuryuhOCRpPsjCblKukAckWsV+aQ3UKT/RMPcA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/sunos-x64@0.25.6': + resolution: {integrity: sha512-dyCGxv1/Br7MiSC42qinGL8KkG4kX0pEsdb0+TKhmJZgCUDBGmyo1/ArCjNGiOLiIAgdbWgmWgib4HoCi5t7kA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.25.6': + resolution: {integrity: sha512-42QOgcZeZOvXfsCBJF5Afw73t4veOId//XD3i+/9gSkhSV6Gk3VPlWncctI+JcOyERv85FUo7RxuxGy+z8A43Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.25.6': + resolution: {integrity: sha512-4AWhgXmDuYN7rJI6ORB+uU9DHLq/erBbuMoAuB4VWJTu5KtCgcKYPynF0YI1VkBNuEfjNlLrFr9KZPJzrtLkrQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.25.6': + resolution: {integrity: sha512-NgJPHHbEpLQgDH2MjQu90pzW/5vvXIZ7KOnPyNBm92A6WgZ/7b6fJyUBjoumLqeOQQGqY2QjQxRo97ah4Sj0cA==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@jridgewell/gen-mapping@0.3.12': + resolution: {integrity: sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.5.4': + resolution: {integrity: sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==} + + '@jridgewell/trace-mapping@0.3.29': + resolution: {integrity: sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==} + + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@rollup/rollup-android-arm-eabi@4.45.1': + resolution: {integrity: sha512-NEySIFvMY0ZQO+utJkgoMiCAjMrGvnbDLHvcmlA33UXJpYBCvlBEbMMtV837uCkS+plG2umfhn0T5mMAxGrlRA==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.45.1': + resolution: {integrity: sha512-ujQ+sMXJkg4LRJaYreaVx7Z/VMgBBd89wGS4qMrdtfUFZ+TSY5Rs9asgjitLwzeIbhwdEhyj29zhst3L1lKsRQ==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.45.1': + resolution: {integrity: sha512-FSncqHvqTm3lC6Y13xncsdOYfxGSLnP+73k815EfNmpewPs+EyM49haPS105Rh4aF5mJKywk9X0ogzLXZzN9lA==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.45.1': + resolution: {integrity: sha512-2/vVn/husP5XI7Fsf/RlhDaQJ7x9zjvC81anIVbr4b/f0xtSmXQTFcGIQ/B1cXIYM6h2nAhJkdMHTnD7OtQ9Og==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.45.1': + resolution: {integrity: sha512-4g1kaDxQItZsrkVTdYQ0bxu4ZIQ32cotoQbmsAnW1jAE4XCMbcBPDirX5fyUzdhVCKgPcrwWuucI8yrVRBw2+g==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.45.1': + resolution: {integrity: sha512-L/6JsfiL74i3uK1Ti2ZFSNsp5NMiM4/kbbGEcOCps99aZx3g8SJMO1/9Y0n/qKlWZfn6sScf98lEOUe2mBvW9A==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.45.1': + resolution: {integrity: sha512-RkdOTu2jK7brlu+ZwjMIZfdV2sSYHK2qR08FUWcIoqJC2eywHbXr0L8T/pONFwkGukQqERDheaGTeedG+rra6Q==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.45.1': + resolution: {integrity: sha512-3kJ8pgfBt6CIIr1o+HQA7OZ9mp/zDk3ctekGl9qn/pRBgrRgfwiffaUmqioUGN9hv0OHv2gxmvdKOkARCtRb8Q==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.45.1': + resolution: {integrity: sha512-k3dOKCfIVixWjG7OXTCOmDfJj3vbdhN0QYEqB+OuGArOChek22hn7Uy5A/gTDNAcCy5v2YcXRJ/Qcnm4/ma1xw==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.45.1': + resolution: {integrity: sha512-PmI1vxQetnM58ZmDFl9/Uk2lpBBby6B6rF4muJc65uZbxCs0EA7hhKCk2PKlmZKuyVSHAyIw3+/SiuMLxKxWog==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-loongarch64-gnu@4.45.1': + resolution: {integrity: sha512-9UmI0VzGmNJ28ibHW2GpE2nF0PBQqsyiS4kcJ5vK+wuwGnV5RlqdczVocDSUfGX/Na7/XINRVoUgJyFIgipoRg==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.45.1': + resolution: {integrity: sha512-7nR2KY8oEOUTD3pBAxIBBbZr0U7U+R9HDTPNy+5nVVHDXI4ikYniH1oxQz9VoB5PbBU1CZuDGHkLJkd3zLMWsg==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.45.1': + resolution: {integrity: sha512-nlcl3jgUultKROfZijKjRQLUu9Ma0PeNv/VFHkZiKbXTBQXhpytS8CIj5/NfBeECZtY2FJQubm6ltIxm/ftxpw==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-riscv64-musl@4.45.1': + resolution: {integrity: sha512-HJV65KLS51rW0VY6rvZkiieiBnurSzpzore1bMKAhunQiECPuxsROvyeaot/tcK3A3aGnI+qTHqisrpSgQrpgA==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.45.1': + resolution: {integrity: sha512-NITBOCv3Qqc6hhwFt7jLV78VEO/il4YcBzoMGGNxznLgRQf43VQDae0aAzKiBeEPIxnDrACiMgbqjuihx08OOw==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.45.1': + resolution: {integrity: sha512-+E/lYl6qu1zqgPEnTrs4WysQtvc/Sh4fC2nByfFExqgYrqkKWp1tWIbe+ELhixnenSpBbLXNi6vbEEJ8M7fiHw==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.45.1': + resolution: {integrity: sha512-a6WIAp89p3kpNoYStITT9RbTbTnqarU7D8N8F2CV+4Cl9fwCOZraLVuVFvlpsW0SbIiYtEnhCZBPLoNdRkjQFw==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.45.1': + resolution: {integrity: sha512-T5Bi/NS3fQiJeYdGvRpTAP5P02kqSOpqiopwhj0uaXB6nzs5JVi2XMJb18JUSKhCOX8+UE1UKQufyD6Or48dJg==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.45.1': + resolution: {integrity: sha512-lxV2Pako3ujjuUe9jiU3/s7KSrDfH6IgTSQOnDWr9aJ92YsFd7EurmClK0ly/t8dzMkDtd04g60WX6yl0sGfdw==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.45.1': + resolution: {integrity: sha512-M/fKi4sasCdM8i0aWJjCSFm2qEnYRR8AMLG2kxp6wD13+tMGA4Z1tVAuHkNRjud5SW2EM3naLuK35w9twvf6aA==} + cpu: [x64] + os: [win32] + + '@types/estree@1.0.8': + resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} + + '@types/node@20.19.8': + resolution: {integrity: sha512-HzbgCY53T6bfu4tT7Aq3TvViJyHjLjPNaAS3HOuMc9pw97KHsUtXNX4L+wu59g1WnjsZSko35MbEqnO58rihhw==} + + acorn@8.15.0: + resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==} + engines: {node: '>=0.4.0'} + hasBin: true + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} + engines: {node: '>=12'} ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + + any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + brace-expansion@2.0.2: + resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==} + + bundle-require@5.1.0: + resolution: {integrity: sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + peerDependencies: + esbuild: '>=0.18' + + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + chalk@3.0.0: resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==} engines: {node: '>=8'} @@ -102,6 +424,10 @@ packages: engines: {node: '>=8.3.0'} hasBin: true + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} @@ -109,19 +435,132 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + + confbox@0.1.8: + resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} + + consola@3.4.2: + resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} + engines: {node: ^14.18.0 || >=16.10.0} + cross-fetch@4.1.0: resolution: {integrity: sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw==} + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + debug@4.4.1: + resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + esbuild@0.25.6: + resolution: {integrity: sha512-GVuzuUwtdsghE3ocJ9Bs8PNoF13HNQ5TXbEi2AhvVb8xU1Iwt9Fos9FEamfoee+u/TOsn7GUWc04lz46n2bbTg==} + engines: {node: '>=18'} + hasBin: true + + fdir@6.4.6: + resolution: {integrity: sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + fix-dts-default-cjs-exports@1.0.1: + resolution: {integrity: sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==} + + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + glob@10.4.5: + resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} + hasBin: true + has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + joycon@3.1.1: + resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} + engines: {node: '>=10'} + + lilconfig@3.1.3: + resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} + engines: {node: '>=14'} + + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + + load-tsconfig@0.2.5: + resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + lodash.sortby@4.7.0: + resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + + magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + map-values@1.0.1: resolution: {integrity: sha512-BbShUnr5OartXJe1GeccAWtfro11hhgNJg6G9/UtWKjVGvV5U4C09cg5nk8JUevhXODaXY+hQ3xxMUKSs62ONQ==} + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + mlly@1.7.4: + resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -131,20 +570,87 @@ packages: encoding: optional: true + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + object-filter@1.0.2: resolution: {integrity: sha512-NahvP2vZcy1ZiiYah30CEPw0FpDcSkSePJBMpzl5EQgCmISijiGuJm3SPYp7U+Lf2TljyaIw3E5EgkEx/TNEVA==} - p-comuns@git+https://git2.idz.one/publico/_comuns.git#4845733519d5c0a09927026137ed6a8028adb761: - resolution: {commit: 4845733519d5c0a09927026137ed6a8028adb761, repo: https://git2.idz.one/publico/_comuns.git, type: git} - version: 0.119.0 + p-comuns@git+https://git2.idz.one/publico/_comuns.git#17aee620b3e66f14605d0ab851e7b80ec6553d76: + resolution: {commit: 17aee620b3e66f14605d0ab851e7b80ec6553d76, repo: https://git2.idz.one/publico/_comuns.git, type: git} + version: 0.158.0 - p-respostas@git+https://git2.idz.one/publico/_respostas.git#9bda7126b0a712002236c4912da7cc1e86fc43f1: - resolution: {commit: 9bda7126b0a712002236c4912da7cc1e86fc43f1, repo: https://git2.idz.one/publico/_respostas.git, type: git} - version: 0.37.0 + p-respostas@git+https://git2.idz.one/publico/_respostas.git#431364ade4bc85aa163b970e0a94807dcc73585c: + resolution: {commit: 431364ade4bc85aa163b970e0a94807dcc73585c, repo: https://git2.idz.one/publico/_respostas.git, type: git} + version: 0.43.0 + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@4.0.3: + resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} + engines: {node: '>=12'} + + pirates@4.0.7: + resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} + engines: {node: '>= 6'} + + pkg-types@1.3.1: + resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} + + postcss-load-config@6.0.1: + resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==} + engines: {node: '>= 18'} + peerDependencies: + jiti: '>=1.21.0' + postcss: '>=8.0.9' + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + jiti: + optional: true + postcss: + optional: true + tsx: + optional: true + yaml: + optional: true + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} + + resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + + rollup@4.45.1: + resolution: {integrity: sha512-4iya7Jb76fVpQyLoiVpzUrsjQ12r3dM7fIVz+4NwoYvZOShknRmiv+iu9CClZml5ZLGb0XMcYLutK6w9tgxHDw==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -152,27 +658,133 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + source-map@0.8.0-beta.0: + resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} + engines: {node: '>= 8'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + + sucrase@3.35.0: + resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} + thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + + thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + + tinyglobby@0.2.14: + resolution: {integrity: sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==} + engines: {node: '>=12.0.0'} + tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + tr46@1.0.1: + resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} + + tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + + ts-interface-checker@0.1.13: + resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + + tsup@8.5.0: + resolution: {integrity: sha512-VmBp77lWNQq6PfuMqCHD3xWl22vEoWsKajkF8t+yMBawlUS8JzEI+vOVMeuNZIuMML8qXRizFKi9oD5glKQVcQ==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + '@microsoft/api-extractor': ^7.36.0 + '@swc/core': ^1 + postcss: ^8.4.12 + typescript: '>=4.5.0' + peerDependenciesMeta: + '@microsoft/api-extractor': + optional: true + '@swc/core': + optional: true + postcss: + optional: true + typescript: + optional: true + typescript@5.5.4: resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} engines: {node: '>=14.17'} hasBin: true + ufo@1.6.1: + resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} + undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + uuid@11.1.0: + resolution: {integrity: sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==} + hasBin: true + webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + webidl-conversions@4.0.2: + resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} + whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + whatwg-url@7.1.0: + resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + zod@3.24.1: resolution: {integrity: sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==} @@ -213,14 +825,203 @@ snapshots: '@biomejs/cli-win32-x64@2.0.6': optional: true - '@types/node@20.19.4': + '@esbuild/aix-ppc64@0.25.6': + optional: true + + '@esbuild/android-arm64@0.25.6': + optional: true + + '@esbuild/android-arm@0.25.6': + optional: true + + '@esbuild/android-x64@0.25.6': + optional: true + + '@esbuild/darwin-arm64@0.25.6': + optional: true + + '@esbuild/darwin-x64@0.25.6': + optional: true + + '@esbuild/freebsd-arm64@0.25.6': + optional: true + + '@esbuild/freebsd-x64@0.25.6': + optional: true + + '@esbuild/linux-arm64@0.25.6': + optional: true + + '@esbuild/linux-arm@0.25.6': + optional: true + + '@esbuild/linux-ia32@0.25.6': + optional: true + + '@esbuild/linux-loong64@0.25.6': + optional: true + + '@esbuild/linux-mips64el@0.25.6': + optional: true + + '@esbuild/linux-ppc64@0.25.6': + optional: true + + '@esbuild/linux-riscv64@0.25.6': + optional: true + + '@esbuild/linux-s390x@0.25.6': + optional: true + + '@esbuild/linux-x64@0.25.6': + optional: true + + '@esbuild/netbsd-arm64@0.25.6': + optional: true + + '@esbuild/netbsd-x64@0.25.6': + optional: true + + '@esbuild/openbsd-arm64@0.25.6': + optional: true + + '@esbuild/openbsd-x64@0.25.6': + optional: true + + '@esbuild/openharmony-arm64@0.25.6': + optional: true + + '@esbuild/sunos-x64@0.25.6': + optional: true + + '@esbuild/win32-arm64@0.25.6': + optional: true + + '@esbuild/win32-ia32@0.25.6': + optional: true + + '@esbuild/win32-x64@0.25.6': + optional: true + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@jridgewell/gen-mapping@0.3.12': + dependencies: + '@jridgewell/sourcemap-codec': 1.5.4 + '@jridgewell/trace-mapping': 0.3.29 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/sourcemap-codec@1.5.4': {} + + '@jridgewell/trace-mapping@0.3.29': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.4 + + '@pkgjs/parseargs@0.11.0': + optional: true + + '@rollup/rollup-android-arm-eabi@4.45.1': + optional: true + + '@rollup/rollup-android-arm64@4.45.1': + optional: true + + '@rollup/rollup-darwin-arm64@4.45.1': + optional: true + + '@rollup/rollup-darwin-x64@4.45.1': + optional: true + + '@rollup/rollup-freebsd-arm64@4.45.1': + optional: true + + '@rollup/rollup-freebsd-x64@4.45.1': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.45.1': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.45.1': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.45.1': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.45.1': + optional: true + + '@rollup/rollup-linux-loongarch64-gnu@4.45.1': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.45.1': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.45.1': + optional: true + + '@rollup/rollup-linux-riscv64-musl@4.45.1': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.45.1': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.45.1': + optional: true + + '@rollup/rollup-linux-x64-musl@4.45.1': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.45.1': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.45.1': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.45.1': + optional: true + + '@types/estree@1.0.8': {} + + '@types/node@20.19.8': dependencies: undici-types: 6.21.0 + acorn@8.15.0: {} + + ansi-regex@5.0.1: {} + + ansi-regex@6.1.0: {} + ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 + ansi-styles@6.2.1: {} + + any-promise@1.3.0: {} + + balanced-match@1.0.2: {} + + brace-expansion@2.0.2: + dependencies: + balanced-match: 1.0.2 + + bundle-require@5.1.0(esbuild@0.25.6): + dependencies: + esbuild: 0.25.6 + load-tsconfig: 0.2.5 + + cac@6.7.14: {} + chalk@3.0.0: dependencies: ansi-styles: 4.3.0 @@ -235,64 +1036,377 @@ snapshots: run-parallel: 1.2.0 semver: 6.3.1 + chokidar@4.0.3: + dependencies: + readdirp: 4.1.2 + color-convert@2.0.1: dependencies: color-name: 1.1.4 color-name@1.1.4: {} + commander@4.1.1: {} + + confbox@0.1.8: {} + + consola@3.4.2: {} + cross-fetch@4.1.0: dependencies: node-fetch: 2.7.0 transitivePeerDependencies: - encoding + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + debug@4.4.1: + dependencies: + ms: 2.1.3 + + eastasianwidth@0.2.0: {} + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + esbuild@0.25.6: + optionalDependencies: + '@esbuild/aix-ppc64': 0.25.6 + '@esbuild/android-arm': 0.25.6 + '@esbuild/android-arm64': 0.25.6 + '@esbuild/android-x64': 0.25.6 + '@esbuild/darwin-arm64': 0.25.6 + '@esbuild/darwin-x64': 0.25.6 + '@esbuild/freebsd-arm64': 0.25.6 + '@esbuild/freebsd-x64': 0.25.6 + '@esbuild/linux-arm': 0.25.6 + '@esbuild/linux-arm64': 0.25.6 + '@esbuild/linux-ia32': 0.25.6 + '@esbuild/linux-loong64': 0.25.6 + '@esbuild/linux-mips64el': 0.25.6 + '@esbuild/linux-ppc64': 0.25.6 + '@esbuild/linux-riscv64': 0.25.6 + '@esbuild/linux-s390x': 0.25.6 + '@esbuild/linux-x64': 0.25.6 + '@esbuild/netbsd-arm64': 0.25.6 + '@esbuild/netbsd-x64': 0.25.6 + '@esbuild/openbsd-arm64': 0.25.6 + '@esbuild/openbsd-x64': 0.25.6 + '@esbuild/openharmony-arm64': 0.25.6 + '@esbuild/sunos-x64': 0.25.6 + '@esbuild/win32-arm64': 0.25.6 + '@esbuild/win32-ia32': 0.25.6 + '@esbuild/win32-x64': 0.25.6 + + fdir@6.4.6(picomatch@4.0.3): + optionalDependencies: + picomatch: 4.0.3 + + fix-dts-default-cjs-exports@1.0.1: + dependencies: + magic-string: 0.30.17 + mlly: 1.7.4 + rollup: 4.45.1 + + foreground-child@3.3.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + fsevents@2.3.3: + optional: true + + glob@10.4.5: + dependencies: + foreground-child: 3.3.1 + jackspeak: 3.4.3 + minimatch: 9.0.5 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + has-flag@4.0.0: {} + is-fullwidth-code-point@3.0.0: {} + + isexe@2.0.0: {} + + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + joycon@3.1.1: {} + + lilconfig@3.1.3: {} + + lines-and-columns@1.2.4: {} + + load-tsconfig@0.2.5: {} + + lodash.sortby@4.7.0: {} + + lru-cache@10.4.3: {} + + magic-string@0.30.17: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.4 + map-values@1.0.1: {} + minimatch@9.0.5: + dependencies: + brace-expansion: 2.0.2 + minimist@1.2.8: {} + minipass@7.1.2: {} + + mlly@1.7.4: + dependencies: + acorn: 8.15.0 + pathe: 2.0.3 + pkg-types: 1.3.1 + ufo: 1.6.1 + + ms@2.1.3: {} + + mz@2.7.0: + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + node-fetch@2.7.0: dependencies: whatwg-url: 5.0.0 + object-assign@4.1.1: {} + object-filter@1.0.2: {} - p-comuns@git+https://git2.idz.one/publico/_comuns.git#4845733519d5c0a09927026137ed6a8028adb761: + p-comuns@git+https://git2.idz.one/publico/_comuns.git#17aee620b3e66f14605d0ab851e7b80ec6553d76: dependencies: cross-fetch: 4.1.0 zod: 3.24.1 transitivePeerDependencies: - encoding - p-respostas@git+https://git2.idz.one/publico/_respostas.git#9bda7126b0a712002236c4912da7cc1e86fc43f1: + p-respostas@git+https://git2.idz.one/publico/_respostas.git#431364ade4bc85aa163b970e0a94807dcc73585c: dependencies: + p-comuns: git+https://git2.idz.one/publico/_comuns.git#17aee620b3e66f14605d0ab851e7b80ec6553d76 zod: 3.24.1 + transitivePeerDependencies: + - encoding + + package-json-from-dist@1.0.1: {} + + path-key@3.1.1: {} + + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.2 + + pathe@2.0.3: {} + + picocolors@1.1.1: {} + + picomatch@4.0.3: {} + + pirates@4.0.7: {} + + pkg-types@1.3.1: + dependencies: + confbox: 0.1.8 + mlly: 1.7.4 + pathe: 2.0.3 + + postcss-load-config@6.0.1: + dependencies: + lilconfig: 3.1.3 + + punycode@2.3.1: {} queue-microtask@1.2.3: {} + readdirp@4.1.2: {} + + resolve-from@5.0.0: {} + + rollup@4.45.1: + dependencies: + '@types/estree': 1.0.8 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.45.1 + '@rollup/rollup-android-arm64': 4.45.1 + '@rollup/rollup-darwin-arm64': 4.45.1 + '@rollup/rollup-darwin-x64': 4.45.1 + '@rollup/rollup-freebsd-arm64': 4.45.1 + '@rollup/rollup-freebsd-x64': 4.45.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.45.1 + '@rollup/rollup-linux-arm-musleabihf': 4.45.1 + '@rollup/rollup-linux-arm64-gnu': 4.45.1 + '@rollup/rollup-linux-arm64-musl': 4.45.1 + '@rollup/rollup-linux-loongarch64-gnu': 4.45.1 + '@rollup/rollup-linux-powerpc64le-gnu': 4.45.1 + '@rollup/rollup-linux-riscv64-gnu': 4.45.1 + '@rollup/rollup-linux-riscv64-musl': 4.45.1 + '@rollup/rollup-linux-s390x-gnu': 4.45.1 + '@rollup/rollup-linux-x64-gnu': 4.45.1 + '@rollup/rollup-linux-x64-musl': 4.45.1 + '@rollup/rollup-win32-arm64-msvc': 4.45.1 + '@rollup/rollup-win32-ia32-msvc': 4.45.1 + '@rollup/rollup-win32-x64-msvc': 4.45.1 + fsevents: 2.3.3 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 semver@6.3.1: {} + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + signal-exit@4.1.0: {} + + source-map@0.8.0-beta.0: + dependencies: + whatwg-url: 7.1.0 + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.1.0: + dependencies: + ansi-regex: 6.1.0 + + sucrase@3.35.0: + dependencies: + '@jridgewell/gen-mapping': 0.3.12 + commander: 4.1.1 + glob: 10.4.5 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.7 + ts-interface-checker: 0.1.13 + supports-color@7.2.0: dependencies: has-flag: 4.0.0 + thenify-all@1.6.0: + dependencies: + thenify: 3.3.1 + + thenify@3.3.1: + dependencies: + any-promise: 1.3.0 + + tinyexec@0.3.2: {} + + tinyglobby@0.2.14: + dependencies: + fdir: 6.4.6(picomatch@4.0.3) + picomatch: 4.0.3 + tr46@0.0.3: {} + tr46@1.0.1: + dependencies: + punycode: 2.3.1 + + tree-kill@1.2.2: {} + + ts-interface-checker@0.1.13: {} + + tsup@8.5.0(typescript@5.5.4): + dependencies: + bundle-require: 5.1.0(esbuild@0.25.6) + cac: 6.7.14 + chokidar: 4.0.3 + consola: 3.4.2 + debug: 4.4.1 + esbuild: 0.25.6 + fix-dts-default-cjs-exports: 1.0.1 + joycon: 3.1.1 + picocolors: 1.1.1 + postcss-load-config: 6.0.1 + resolve-from: 5.0.0 + rollup: 4.45.1 + source-map: 0.8.0-beta.0 + sucrase: 3.35.0 + tinyexec: 0.3.2 + tinyglobby: 0.2.14 + tree-kill: 1.2.2 + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - jiti + - supports-color + - tsx + - yaml + typescript@5.5.4: {} + ufo@1.6.1: {} + undici-types@6.21.0: {} + uuid@11.1.0: {} + webidl-conversions@3.0.1: {} + webidl-conversions@4.0.2: {} + whatwg-url@5.0.0: dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 + whatwg-url@7.1.0: + dependencies: + lodash.sortby: 4.7.0 + tr46: 1.0.1 + webidl-conversions: 4.0.2 + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + zod@3.24.1: {} diff --git a/src/lista-vinculos.ts b/src/lista-vinculos.ts index 02e9833..c1ddee0 100644 --- a/src/lista-vinculos.ts +++ b/src/lista-vinculos.ts @@ -1,6 +1,6 @@ import cFetch from "cross-fetch" +import { cacheM } from "p-comuns" import { respostaComuns, type tipoResposta } from "p-respostas" -import { cacheAuDrive } from "./plugins/node-cache" import { uuidV3 } from "./plugins/uuid" export const tx_vinculos__listar = "vinculos__listar" as const @@ -30,9 +30,7 @@ export const listarVinculos = async ({ // Buscar promeiro no cache if (!desativarCache) { const valorCache = - cacheAuDrive.get>>( - chaveCache, - ) + cacheM>>(chaveCache) if (valorCache) return valorCache } @@ -66,13 +64,10 @@ export const listarVinculos = async ({ ) })() - cacheAuDrive.set( + cacheM( chaveCache, res.then((a) => { try { - if (a.eErro) { - cacheAuDrive.del(chaveCache) - } } catch {} return a diff --git a/src/plugins/node-cache.ts b/src/plugins/node-cache.ts deleted file mode 100644 index 7a19f16..0000000 --- a/src/plugins/node-cache.ts +++ /dev/null @@ -1,3 +0,0 @@ -import NodeCache from "node-cache" - -export const cacheAuDrive = new NodeCache()