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
This commit is contained in:
@@ -16,6 +16,9 @@ RUN pnpm install --frozen-lockfile
|
||||
COPY packages/shared ./packages/shared
|
||||
COPY apps/api ./apps/api
|
||||
|
||||
# Compila primero el paquete shared (api lo consume vía dist/)
|
||||
RUN pnpm --filter @naturcalabacera/shared build
|
||||
|
||||
# Compila TypeScript del api
|
||||
RUN pnpm --filter @naturcalabacera/api build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user