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>
- 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