Problema de rutas + env

This commit is contained in:
2026-01-30 15:10:49 +01:00
parent 1be982e422
commit fedc71791e
4 changed files with 8 additions and 12 deletions

View File

@@ -7,7 +7,7 @@
"scripts": {
"test": "vitest watch",
"build": "yarn workspaces foreach -A --exclude sim-consumidor-nos run build && cp .env dist/",
"start": "yarn workspaces foreach -A --exclude sim-consumidor-nos run start",
"start": "yarn workspaces foreach -Apiv --exclude sim-consumidor-nos run start",
"typecheck": "npx tsc --noEmit",
"dev": "yarn workspaces foreach -Apiv --exclude sim-consumidor-nos run dev ",
"lint": "eslint .",
@@ -43,4 +43,4 @@
"imports": {
"#shared/*": "./dist/packages/shared/*.js"
}
}
}

View File

@@ -6,7 +6,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "tsx watch index.ts",
"build": "yarn tsc --project tsconfig.json && cp .env package.json ../../dist/packages/sim-consumidor-objenious/ && yarn tsc-alias",
"build": "yarn tsc --project tsconfig.json && yarn tsc-alias && cp .env ../../dist/packages/sim-consumidor-objenious/",
"start": "node ../../dist/packages/sim-consumidor-objenious/index.js"
},
"author": "",
@@ -31,8 +31,5 @@
"tsc-alias": "^1.8.16",
"tsx": "*",
"vitest": "*"
},
"imports": {
"#config/*": "./config/*.js"
}
}

View File

@@ -1,5 +1,7 @@
import { loadEnvFile } from "node:process";
loadEnvFile("../../.env")
import path from "node:path";
loadEnvFile(path.join(__dirname, "../../../../.env"))
export const env = {
ENVIRONMENT: process.env.ENVIORMENT,

View File

@@ -5,7 +5,7 @@
"main": "index.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "yarn tsc --project tsconfig.json && cp package.json ../../dist/packages/sim-entrada-eventos/",
"build": "yarn tsc --project tsconfig.json && yarn tsc-alias",
"dev": "tsx watch index.ts",
"start": "node ../../dist/packages/sim-entrada-eventos/index.js"
},
@@ -31,8 +31,5 @@
"tsc-alias": "^1.8.16",
"tsx": "*",
"vitest": "*"
},
"imports": {
"#config/*": "./config/*.js"
}
}
}