build
This commit is contained in:
parent
9a839c693d
commit
ad6dcda6a5
4 changed files with 225 additions and 206 deletions
|
|
@ -5,6 +5,7 @@ import fs from "node:fs";
|
|||
import { gerar } from "./listar_arquivos";
|
||||
import { ambiente } from "./ambiente";
|
||||
import { renderToStaticMarkup } from "react-dom/server";
|
||||
import bodyParser from 'body-parser'
|
||||
|
||||
// biome-ignore lint/style/useImportType: <explanation>
|
||||
import React, {} from "react";
|
||||
|
|
@ -58,6 +59,7 @@ gerar.then(() => {
|
|||
app.use(express.json());
|
||||
app.use(express.urlencoded());
|
||||
app.use(cors());
|
||||
app.use(bodyParser.urlencoded({ extended: false }))
|
||||
|
||||
app.get([PREFIXO, `${PREFIXO}/`], (req, res) => {
|
||||
const html = (
|
||||
|
|
|
|||
13
package.json
13
package.json
|
|
@ -18,10 +18,17 @@
|
|||
"biome": "npx @biomejs/biome check --write ./src",
|
||||
"postinstall": "pnpm up p-*"
|
||||
},
|
||||
"author": "",
|
||||
"author": {
|
||||
"name": "AZTECA SOFTWARE LTDA",
|
||||
"email": "ti@e-licencie.com.br",
|
||||
"url": "https://e-licencie.com.br"
|
||||
},
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
||||
"body-parser": "latest",
|
||||
"cors": "^2.8.5",
|
||||
"express": "latest",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"zod": "3.23.8"
|
||||
|
|
@ -29,13 +36,13 @@
|
|||
"devDependencies": {
|
||||
"@biomejs/biome": "latest",
|
||||
"@types/cors": "^2.8.17",
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/express": "latest",
|
||||
"@types/body-parser": "latest",
|
||||
"@types/node": "^20.11.30",
|
||||
"@types/react": "^18.3.1",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"dotenv-cli": "^7.4.1",
|
||||
"express": "^4.19.1",
|
||||
"glob": "^10.3.10",
|
||||
"kill-port-process": "^3.2.1",
|
||||
"p-comuns": "git+http://leitura:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MTQ3NTA1NzYsImlzcyI6IkdpdG5lc3MiLCJwaWQiOjgsInRrbiI6eyJ0eXAiOiJwYXQiLCJpZCI6MzJ9fQ.OYdExOVQm5UI3wfeTaWjmD0o65Y1hrjFz5EvMB1a__U@git.idz.one:3000/git/multi-modulos-ambientais/_comuns.git#producao"
|
||||
|
|
|
|||
14
pnpm-lock.yaml
generated
14
pnpm-lock.yaml
generated
|
|
@ -8,9 +8,18 @@ importers:
|
|||
|
||||
.:
|
||||
dependencies:
|
||||
'@types/body-parser':
|
||||
specifier: ^1.19.5
|
||||
version: 1.19.5
|
||||
body-parser:
|
||||
specifier: latest
|
||||
version: 1.20.2
|
||||
cors:
|
||||
specifier: ^2.8.5
|
||||
version: 2.8.5
|
||||
express:
|
||||
specifier: latest
|
||||
version: 4.19.2
|
||||
react:
|
||||
specifier: ^18.3.1
|
||||
version: 18.3.1
|
||||
|
|
@ -31,7 +40,7 @@ importers:
|
|||
specifier: ^2.8.17
|
||||
version: 2.8.17
|
||||
'@types/express':
|
||||
specifier: ^4.17.21
|
||||
specifier: latest
|
||||
version: 4.17.21
|
||||
'@types/node':
|
||||
specifier: ^20.11.30
|
||||
|
|
@ -48,9 +57,6 @@ importers:
|
|||
dotenv-cli:
|
||||
specifier: ^7.4.1
|
||||
version: 7.4.1
|
||||
express:
|
||||
specifier: ^4.19.1
|
||||
version: 4.19.2
|
||||
glob:
|
||||
specifier: ^10.3.10
|
||||
version: 10.3.12
|
||||
|
|
|
|||
72
src/index.ts
72
src/index.ts
|
|
@ -1,27 +1,30 @@
|
|||
const Prefixos = {
|
||||
relativo: "/estaticos",
|
||||
"link-local": "http://localhost:5020/estaticos",
|
||||
"link-servidor": "https://carro-de-boi-idz-one.b-cdn.net/estaticos",
|
||||
node_modules: "node_modules/p-estaticos/estaticos",
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
|
||||
const Prefixos = {
|
||||
"relativo": "/estaticos",
|
||||
"link-local": "http://localhost:5020/estaticos",
|
||||
"link-servidor": "https://carro-de-boi-idz-one.b-cdn.net/estaticos",
|
||||
"node_modules": "node_modules/p-estaticos/estaticos"
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param caminho
|
||||
* @returns String
|
||||
*/
|
||||
export const estaticos = (caminho: keyof typeof Prefixos) => {
|
||||
export const estaticos = (caminho: keyof typeof Prefixos) => {
|
||||
const prefixo = Prefixos[caminho];
|
||||
|
||||
return {
|
||||
logos: {
|
||||
"logos": {
|
||||
"e-licencie-gov": {
|
||||
"Logo-e-licencie-gov-vertical.svg": `${prefixo}/logos/e-licencie-gov/Logo-e-licencie-gov-vertical.svg`,
|
||||
"Logo-e-licencie-gov-vertical.": `${prefixo}/logos/e-licencie-gov/Logo-e-licencie-gov-vertical.`,
|
||||
"Logo-e-licencie-gov-horizontal.svg": `${prefixo}/logos/e-licencie-gov/Logo-e-licencie-gov-horizontal.svg`,
|
||||
"Logo-e-licencie-gov-horizontal.png": `${prefixo}/logos/e-licencie-gov/Logo-e-licencie-gov-horizontal.png`,
|
||||
"Logo-e-licencie-gov-horizontal-branco.svg": `${prefixo}/logos/e-licencie-gov/Logo-e-licencie-gov-horizontal-branco.svg`,
|
||||
"Logo-e-licencie-gov-horizontal-branco.png": `${prefixo}/logos/e-licencie-gov/Logo-e-licencie-gov-horizontal-branco.png`,
|
||||
"Logo-e-licencie-gov-horizontal-branco.png": `${prefixo}/logos/e-licencie-gov/Logo-e-licencie-gov-horizontal-branco.png`
|
||||
},
|
||||
"e-licencie": {
|
||||
"verde-verde_.png": `${prefixo}/logos/e-licencie/verde-verde_.png`,
|
||||
|
|
@ -29,10 +32,10 @@ export const estaticos = (caminho: keyof typeof Prefixos) => {
|
|||
"logo_verde_plantula_branca.png": `${prefixo}/logos/e-licencie/logo_verde_plantula_branca.png`,
|
||||
"escala-branco_.png": `${prefixo}/logos/e-licencie/escala-branco_.png`,
|
||||
"escala-branco.png": `${prefixo}/logos/e-licencie/escala-branco.png`,
|
||||
"branco-branco.png": `${prefixo}/logos/e-licencie/branco-branco.png`,
|
||||
"branco-branco.png": `${prefixo}/logos/e-licencie/branco-branco.png`
|
||||
},
|
||||
"betha-sistemas": {
|
||||
"logo.png": `${prefixo}/logos/betha-sistemas/logo.png`,
|
||||
"logo.png": `${prefixo}/logos/betha-sistemas/logo.png`
|
||||
},
|
||||
"betha-meio-ambiente": {
|
||||
"Logo-betha-meio-ambiente-vertical.svg": `${prefixo}/logos/betha-meio-ambiente/Logo-betha-meio-ambiente-vertical.svg`,
|
||||
|
|
@ -42,18 +45,18 @@ export const estaticos = (caminho: keyof typeof Prefixos) => {
|
|||
"Logo-betha-meio-ambiente-horizontal-branco.svg": `${prefixo}/logos/betha-meio-ambiente/Logo-betha-meio-ambiente-horizontal-branco.svg`,
|
||||
"Logo-betha-meio-ambiente-horizontal-branco.png": `${prefixo}/logos/betha-meio-ambiente/Logo-betha-meio-ambiente-horizontal-branco.png`,
|
||||
"Logo-betha-meio-ambiente-brasao.svg": `${prefixo}/logos/betha-meio-ambiente/Logo-betha-meio-ambiente-brasao.svg`,
|
||||
"Logo-betha-meio-ambiente-brasao.png": `${prefixo}/logos/betha-meio-ambiente/Logo-betha-meio-ambiente-brasao.png`,
|
||||
"Logo-betha-meio-ambiente-brasao.png": `${prefixo}/logos/betha-meio-ambiente/Logo-betha-meio-ambiente-brasao.png`
|
||||
}
|
||||
},
|
||||
},
|
||||
imagens: {
|
||||
"imagens": {
|
||||
"quero-quero.gif": `${prefixo}/imagens/quero-quero.gif`,
|
||||
"favicon.ico": `${prefixo}/imagens/favicon.ico`,
|
||||
"exemplo_brasao.jpeg": `${prefixo}/imagens/exemplo_brasao.jpeg`,
|
||||
"exemplo_brasao.jpeg": `${prefixo}/imagens/exemplo_brasao.jpeg`
|
||||
},
|
||||
html: {
|
||||
"404.html": `${prefixo}/html/404.html`,
|
||||
"html": {
|
||||
"404.html": `${prefixo}/html/404.html`
|
||||
},
|
||||
fundos: {
|
||||
"fundos": {
|
||||
"fundo-16.jpg": `${prefixo}/fundos/fundo-16.jpg`,
|
||||
"fundo-15.jpg": `${prefixo}/fundos/fundo-15.jpg`,
|
||||
"fundo-14.jpg": `${prefixo}/fundos/fundo-14.jpg`,
|
||||
|
|
@ -69,11 +72,11 @@ export const estaticos = (caminho: keyof typeof Prefixos) => {
|
|||
"fundo-04.jpg": `${prefixo}/fundos/fundo-04.jpg`,
|
||||
"fundo-03.jpg": `${prefixo}/fundos/fundo-03.jpg`,
|
||||
"fundo-02.jpg": `${prefixo}/fundos/fundo-02.jpg`,
|
||||
"fundo-01.jpg": `${prefixo}/fundos/fundo-01.jpg`,
|
||||
"fundo-01.jpg": `${prefixo}/fundos/fundo-01.jpg`
|
||||
},
|
||||
"fonts-master": {
|
||||
"sobre.txt": `${prefixo}/fonts-master/sobre.txt`,
|
||||
roboto: {
|
||||
"roboto": {
|
||||
"Roboto-ThinItalic.ttf": `${prefixo}/fonts-master/roboto/Roboto-ThinItalic.ttf`,
|
||||
"Roboto-Thin.ttf": `${prefixo}/fonts-master/roboto/Roboto-Thin.ttf`,
|
||||
"Roboto-Regular.ttf": `${prefixo}/fonts-master/roboto/Roboto-Regular.ttf`,
|
||||
|
|
@ -93,7 +96,7 @@ export const estaticos = (caminho: keyof typeof Prefixos) => {
|
|||
"Roboto-BlackItalic.ttf": `${prefixo}/fonts-master/roboto/Roboto-BlackItalic.ttf`,
|
||||
"Roboto-Black.ttf": `${prefixo}/fonts-master/roboto/Roboto-Black.ttf`,
|
||||
"LICENSE.txt": `${prefixo}/fonts-master/roboto/LICENSE.txt`,
|
||||
"COPYRIGHT.txt": `${prefixo}/fonts-master/roboto/COPYRIGHT.txt`,
|
||||
"COPYRIGHT.txt": `${prefixo}/fonts-master/roboto/COPYRIGHT.txt`
|
||||
},
|
||||
"pt-sans": {
|
||||
"PTSans-Regular.ttf": `${prefixo}/fonts-master/pt-sans/PTSans-Regular.ttf`,
|
||||
|
|
@ -104,7 +107,7 @@ export const estaticos = (caminho: keyof typeof Prefixos) => {
|
|||
"PTSans-CaptionRegular.ttf": `${prefixo}/fonts-master/pt-sans/PTSans-CaptionRegular.ttf`,
|
||||
"PTSans-BoldItalic.ttf": `${prefixo}/fonts-master/pt-sans/PTSans-BoldItalic.ttf`,
|
||||
"PTSans-Bold.ttf": `${prefixo}/fonts-master/pt-sans/PTSans-Bold.ttf`,
|
||||
"OFL.txt": `${prefixo}/fonts-master/pt-sans/OFL.txt`,
|
||||
"OFL.txt": `${prefixo}/fonts-master/pt-sans/OFL.txt`
|
||||
},
|
||||
"open-sans": {
|
||||
"OpenSans-SemiboldItalic.ttf": `${prefixo}/fonts-master/open-sans/OpenSans-SemiboldItalic.ttf`,
|
||||
|
|
@ -118,7 +121,7 @@ export const estaticos = (caminho: keyof typeof Prefixos) => {
|
|||
"OpenSans-BoldItalic.ttf": `${prefixo}/fonts-master/open-sans/OpenSans-BoldItalic.ttf`,
|
||||
"OpenSans-Bold.ttf": `${prefixo}/fonts-master/open-sans/OpenSans-Bold.ttf`,
|
||||
"LICENSE.txt": `${prefixo}/fonts-master/open-sans/LICENSE.txt`,
|
||||
"Apache License.txt": `${prefixo}/fonts-master/open-sans/Apache%20License.txt`,
|
||||
"Apache License.txt": `${prefixo}/fonts-master/open-sans/Apache%20License.txt`
|
||||
},
|
||||
"noto-sans": {
|
||||
"fonts.json": `${prefixo}/fonts-master/noto-sans/fonts.json`,
|
||||
|
|
@ -167,9 +170,9 @@ export const estaticos = (caminho: keyof typeof Prefixos) => {
|
|||
"NotoSans-Bold.ttf": `${prefixo}/fonts-master/noto-sans/NotoSans-Bold.ttf`,
|
||||
"NotoNaskhArabic-Regular.ttf": `${prefixo}/fonts-master/noto-sans/NotoNaskhArabic-Regular.ttf`,
|
||||
"NotoNaskhArabic-Bold.ttf": `${prefixo}/fonts-master/noto-sans/NotoNaskhArabic-Bold.ttf`,
|
||||
LICENSE: `${prefixo}/fonts-master/noto-sans/LICENSE`,
|
||||
"LICENSE": `${prefixo}/fonts-master/noto-sans/LICENSE`
|
||||
},
|
||||
metropolis: {
|
||||
"metropolis": {
|
||||
"SIL Open Font License.txt": `${prefixo}/fonts-master/metropolis/SIL%20Open%20Font%20License.txt`,
|
||||
"Metropolis-ThinItalic.otf": `${prefixo}/fonts-master/metropolis/Metropolis-ThinItalic.otf`,
|
||||
"Metropolis-Thin.otf": `${prefixo}/fonts-master/metropolis/Metropolis-Thin.otf`,
|
||||
|
|
@ -188,15 +191,16 @@ export const estaticos = (caminho: keyof typeof Prefixos) => {
|
|||
"Metropolis-BoldItalic.otf": `${prefixo}/fonts-master/metropolis/Metropolis-BoldItalic.otf`,
|
||||
"Metropolis-Bold.otf": `${prefixo}/fonts-master/metropolis/Metropolis-Bold.otf`,
|
||||
"Metropolis-BlackItalic.otf": `${prefixo}/fonts-master/metropolis/Metropolis-BlackItalic.otf`,
|
||||
"Metropolis-Black.otf": `${prefixo}/fonts-master/metropolis/Metropolis-Black.otf`,
|
||||
"Metropolis-Black.otf": `${prefixo}/fonts-master/metropolis/Metropolis-Black.otf`
|
||||
}
|
||||
},
|
||||
},
|
||||
dados: {
|
||||
"dados": {
|
||||
"tabela_ibama.json": `${prefixo}/dados/tabela_ibama.json`,
|
||||
"municipios.json": `${prefixo}/dados/municipios.json`,
|
||||
"municipios.json": `${prefixo}/dados/municipios.json`
|
||||
},
|
||||
background: {
|
||||
"Paisagem.jpg": `${prefixo}/background/Paisagem.jpg`,
|
||||
},
|
||||
};
|
||||
"background": {
|
||||
"Paisagem.jpg": `${prefixo}/background/Paisagem.jpg`
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue