diff --git a/.gitignore b/.gitignore index 24998cf..d24d576 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,5 @@ node_modules .pnp.* *.pem + +dist/* diff --git a/package.json b/package.json index 5d21bfb..010b59b 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ ], "scripts": { "test": "vitest watch", - "build": "npx tsc", - "start": "node dist/index.js", + "build": "yarn workspaces foreach -A run build", + "start": "yarn workspaces foreach -A run start", "typecheck": "npx tsc --noEmit", "dev": "yarn workspaces foreach -Apiv run dev ", "lint": "eslint .", @@ -18,14 +18,17 @@ "dependencies": { "@tsconfig/node22": "^22.0.5", "amqp-connection-manager": "^5.0.0", + "amqplib": "^0.10.9", "axios": "^1.13.3", "cors": "^2.8.5", "dotenv": "^17.2.3", "express": "^5.2.1", "typescript": "^5.9.3", + "vite": "^7.3.1", "vite-tsconfig-paths": "^6.0.5" }, "devDependencies": { + "@types/amqplib": "^0.10.8", "@types/cors": "^2.8.19", "@types/express": "^5.0.6", "@types/node": "^25.0.3", diff --git a/packages/_template/config/env/env-validators.ts b/packages/_template/config/env/env-validators.ts deleted file mode 100644 index 38e9454..0000000 --- a/packages/_template/config/env/env-validators.ts +++ /dev/null @@ -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)); diff --git a/packages/shared/package.json b/packages/shared/package.json index 5d4b363..50a1769 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -4,7 +4,8 @@ "description": "", "scripts": { "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": "", "license": "ISC", diff --git a/packages/shared/tsconfig.json b/packages/shared/tsconfig.json new file mode 100644 index 0000000..8e169ab --- /dev/null +++ b/packages/shared/tsconfig.json @@ -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" + ], +} \ No newline at end of file diff --git a/packages/sim-consumidor-nos/package.json b/packages/sim-consumidor-nos/package.json index 7d1aab3..2c15d19 100644 --- a/packages/sim-consumidor-nos/package.json +++ b/packages/sim-consumidor-nos/package.json @@ -5,7 +5,8 @@ "main": "index.ts", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "dev": "tsx watch index.ts " + "dev": "tsx watch index.ts ", + "start": "echo \"Proyecto no completado\"" }, "author": "", "license": "ISC", diff --git a/packages/sim-consumidor-nos/tsconfig.json b/packages/sim-consumidor-nos/tsconfig.json index 00ad21b..10af708 100644 --- a/packages/sim-consumidor-nos/tsconfig.json +++ b/packages/sim-consumidor-nos/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "outDir": "../../dist/sim-consumidor-nos", + "outDir": "../../dist/packages/sim-consumidor-nos", "baseUrl": ".", "paths": { "#config/*": [ diff --git a/packages/sim-consumidor-objenious/package.json b/packages/sim-consumidor-objenious/package.json index 6c99eb8..674a122 100644 --- a/packages/sim-consumidor-objenious/package.json +++ b/packages/sim-consumidor-objenious/package.json @@ -5,7 +5,9 @@ "main": "index.ts", "scripts": { "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": "", "license": "ISC", diff --git a/packages/sim-consumidor-objenious/tsconfig.json b/packages/sim-consumidor-objenious/tsconfig.json index 2a42c7d..7f04857 100644 --- a/packages/sim-consumidor-objenious/tsconfig.json +++ b/packages/sim-consumidor-objenious/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "outDir": "../../dist/sim-consumidor-objenioius", + "outDir": "../../dist/packages/sim-consumidor-objenioius", "baseUrl": ".", "paths": { "#config/*": [ diff --git a/packages/sim-entrada-eventos/package.json b/packages/sim-entrada-eventos/package.json index 84b2b55..b37fdef 100644 --- a/packages/sim-entrada-eventos/package.json +++ b/packages/sim-entrada-eventos/package.json @@ -5,7 +5,9 @@ "main": "index.ts", "scripts": { "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": "", "license": "ISC", diff --git a/packages/sim-entrada-eventos/tsconfig.json b/packages/sim-entrada-eventos/tsconfig.json index 091e3ce..93b1758 100644 --- a/packages/sim-entrada-eventos/tsconfig.json +++ b/packages/sim-entrada-eventos/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "outDir": "../../dist/sim-entrada-eventos", + "outDir": "../../dist/packages/sim-entrada-eventos", "baseUrl": ".", "paths": { "#config/*": [ diff --git a/tsconfig.json b/tsconfig.json index c3446ad..646f524 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,12 @@ "compilerOptions": { "outDir": "./dist", "rootDir": "./", - "paths": {} + "paths": {}, + "esModuleInterop": true, + "sourceMap": true, + "inlineSources": true, + "skipLibCheck": true, + "resolveJsonModule": true }, "include": [ "**/*.ts", diff --git a/yarn.lock b/yarn.lock index 27d2836..f0cb347 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2408,11 +2408,13 @@ __metadata: resolution: "sim-eventos@workspace:." dependencies: "@tsconfig/node22": "npm:^22.0.5" + "@types/amqplib": "npm:^0.10.8" "@types/cors": "npm:^2.8.19" "@types/express": "npm:^5.0.6" "@types/node": "npm:^25.0.3" "@types/supertest": "npm:^6.0.3" amqp-connection-manager: "npm:^5.0.0" + amqplib: "npm:^0.10.9" axios: "npm:^1.13.3" concurrently: "npm:^9.2.1" cors: "npm:^2.8.5" @@ -2422,6 +2424,7 @@ __metadata: supertest: "npm:^7.1.4" tsx: "npm:^4.21.0" typescript: "npm:^5.9.3" + vite: "npm:^7.3.1" vite-tsconfig-paths: "npm:^6.0.5" vitest: "npm:^4.0.16" languageName: unknown @@ -2792,7 +2795,7 @@ __metadata: languageName: node 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 resolution: "vite@npm:7.3.1" dependencies: