Problema de los path en build

This commit is contained in:
2026-01-30 14:24:42 +01:00
parent 237eda4174
commit b30c7e71e9
13 changed files with 64 additions and 18 deletions

2
.gitignore vendored
View File

@@ -17,3 +17,5 @@ node_modules
.pnp.* .pnp.*
*.pem *.pem
dist/*

View File

@@ -6,8 +6,8 @@
], ],
"scripts": { "scripts": {
"test": "vitest watch", "test": "vitest watch",
"build": "npx tsc", "build": "yarn workspaces foreach -A run build",
"start": "node dist/index.js", "start": "yarn workspaces foreach -A run start",
"typecheck": "npx tsc --noEmit", "typecheck": "npx tsc --noEmit",
"dev": "yarn workspaces foreach -Apiv run dev ", "dev": "yarn workspaces foreach -Apiv run dev ",
"lint": "eslint .", "lint": "eslint .",
@@ -18,14 +18,17 @@
"dependencies": { "dependencies": {
"@tsconfig/node22": "^22.0.5", "@tsconfig/node22": "^22.0.5",
"amqp-connection-manager": "^5.0.0", "amqp-connection-manager": "^5.0.0",
"amqplib": "^0.10.9",
"axios": "^1.13.3", "axios": "^1.13.3",
"cors": "^2.8.5", "cors": "^2.8.5",
"dotenv": "^17.2.3", "dotenv": "^17.2.3",
"express": "^5.2.1", "express": "^5.2.1",
"typescript": "^5.9.3", "typescript": "^5.9.3",
"vite": "^7.3.1",
"vite-tsconfig-paths": "^6.0.5" "vite-tsconfig-paths": "^6.0.5"
}, },
"devDependencies": { "devDependencies": {
"@types/amqplib": "^0.10.8",
"@types/cors": "^2.8.19", "@types/cors": "^2.8.19",
"@types/express": "^5.0.6", "@types/express": "^5.0.6",
"@types/node": "^25.0.3", "@types/node": "^25.0.3",

View File

@@ -1,7 +0,0 @@
import { makeValidator } from 'envalid';
import { isValidEnvString, isValidEnvStringArray } from '#shared/domain/utils/env-validators';
export const ensureEnvStringArray = makeValidator((value: unknown) => isValidEnvStringArray(value));
export const ensureEnvString = makeValidator((value: unknown) => isValidEnvString(value));

View File

@@ -4,7 +4,8 @@
"description": "", "description": "",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"dev": "echo \" Shared no es un modulo ejecutable \" " "dev": "echo \" Shared no es un modulo ejecutable \" ",
"build": "tsc"
}, },
"author": "", "author": "",
"license": "ISC", "license": "ISC",

View File

@@ -0,0 +1,34 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/packages/shared",
"baseUrl": ".",
"paths": {
"#config/*": [
"config/*"
],
"#adapters/*": [
"adapters/*"
],
"#domain/*": [
"domain/*"
],
"#ports/*": [
"ports/*"
],
"#tests/*": [
"__tests__/*"
],
"#shared/*": [
"../shared/*"
],
}
},
"exclude": [
"node_modules"
],
"include": [
"**/*.ts",
"src/**/*.d.ts"
],
}

View File

@@ -5,7 +5,8 @@
"main": "index.ts", "main": "index.ts",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"dev": "tsx watch index.ts " "dev": "tsx watch index.ts ",
"start": "echo \"Proyecto no completado\""
}, },
"author": "", "author": "",
"license": "ISC", "license": "ISC",

View File

@@ -1,7 +1,7 @@
{ {
"extends": "../../tsconfig.json", "extends": "../../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../dist/sim-consumidor-nos", "outDir": "../../dist/packages/sim-consumidor-nos",
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"#config/*": [ "#config/*": [

View File

@@ -5,7 +5,9 @@
"main": "index.ts", "main": "index.ts",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"dev": "tsx watch index.ts " "dev": "tsx watch index.ts",
"build": "yarn tsc --project tsconfig.json",
"start": "node index.js"
}, },
"author": "", "author": "",
"license": "ISC", "license": "ISC",

View File

@@ -1,7 +1,7 @@
{ {
"extends": "../../tsconfig.json", "extends": "../../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../dist/sim-consumidor-objenioius", "outDir": "../../dist/packages/sim-consumidor-objenioius",
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"#config/*": [ "#config/*": [

View File

@@ -5,7 +5,9 @@
"main": "index.ts", "main": "index.ts",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"dev": "tsx watch index.ts" "build": "yarn tsc --project tsconfig.json",
"dev": "tsx watch index.ts",
"start": "node index.js"
}, },
"author": "", "author": "",
"license": "ISC", "license": "ISC",

View File

@@ -1,7 +1,7 @@
{ {
"extends": "../../tsconfig.json", "extends": "../../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../dist/sim-entrada-eventos", "outDir": "../../dist/packages/sim-entrada-eventos",
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"#config/*": [ "#config/*": [

View File

@@ -3,7 +3,12 @@
"compilerOptions": { "compilerOptions": {
"outDir": "./dist", "outDir": "./dist",
"rootDir": "./", "rootDir": "./",
"paths": {} "paths": {},
"esModuleInterop": true,
"sourceMap": true,
"inlineSources": true,
"skipLibCheck": true,
"resolveJsonModule": true
}, },
"include": [ "include": [
"**/*.ts", "**/*.ts",

View File

@@ -2408,11 +2408,13 @@ __metadata:
resolution: "sim-eventos@workspace:." resolution: "sim-eventos@workspace:."
dependencies: dependencies:
"@tsconfig/node22": "npm:^22.0.5" "@tsconfig/node22": "npm:^22.0.5"
"@types/amqplib": "npm:^0.10.8"
"@types/cors": "npm:^2.8.19" "@types/cors": "npm:^2.8.19"
"@types/express": "npm:^5.0.6" "@types/express": "npm:^5.0.6"
"@types/node": "npm:^25.0.3" "@types/node": "npm:^25.0.3"
"@types/supertest": "npm:^6.0.3" "@types/supertest": "npm:^6.0.3"
amqp-connection-manager: "npm:^5.0.0" amqp-connection-manager: "npm:^5.0.0"
amqplib: "npm:^0.10.9"
axios: "npm:^1.13.3" axios: "npm:^1.13.3"
concurrently: "npm:^9.2.1" concurrently: "npm:^9.2.1"
cors: "npm:^2.8.5" cors: "npm:^2.8.5"
@@ -2422,6 +2424,7 @@ __metadata:
supertest: "npm:^7.1.4" supertest: "npm:^7.1.4"
tsx: "npm:^4.21.0" tsx: "npm:^4.21.0"
typescript: "npm:^5.9.3" typescript: "npm:^5.9.3"
vite: "npm:^7.3.1"
vite-tsconfig-paths: "npm:^6.0.5" vite-tsconfig-paths: "npm:^6.0.5"
vitest: "npm:^4.0.16" vitest: "npm:^4.0.16"
languageName: unknown languageName: unknown
@@ -2792,7 +2795,7 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"vite@npm:^6.0.0 || ^7.0.0": "vite@npm:^6.0.0 || ^7.0.0, vite@npm:^7.3.1":
version: 7.3.1 version: 7.3.1
resolution: "vite@npm:7.3.1" resolution: "vite@npm:7.3.1"
dependencies: dependencies: