Commit Graph

3 Commits

Author SHA1 Message Date
91091b2648 fix: shared exporta dist compilado, no src TS (arregla crash de la API en prod)
El package apuntaba main/types a src/index.ts. En runtime Node intentaba
cargar TypeScript desde node_modules y abortaba con
ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING, dejando la API en 502.
Surgió al importar CONFIGURABLE_SCENARIOS (valor real, no solo tipos).

main/types → dist, exports con condición development→src para hot-reload,
files:["dist"] para que pnpm deploy nunca copie el .ts. El frontend no se
ve afectado: Vite resuelve shared vía alias a src/ en su config.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 11:30:10 +01:00
00a914279b Fix API build: shared package emits dist, fix type errors
- packages/shared: tsconfig adds outDir/declaration, package.json adds build script
- apps/api/tsconfig.json: paths now point to shared/dist (.d.ts) instead of source,
  resolves TS6059 rootDir conflict
- apps/api/src/routes/{health,notifications,users}.ts: explicit Router type annotation
  to fix TS2742 portable type inference
- apps/api/src/events/handler.ts: cast via 'as unknown as' to satisfy TS2352
- apps/api/Dockerfile: build shared package before api
2026-04-30 11:07:21 +01:00
a0ccb8ca64 Initial commit: monorepo Naturcalabacera reservas (apps/api + apps/web + packages/shared) 2026-04-30 10:09:44 +01:00