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:
2026-04-30 11:07:21 +01:00
parent 22e8cc893f
commit 00a914279b
8 changed files with 20 additions and 13 deletions

View File

@@ -6,6 +6,7 @@
"main": "./src/index.ts",
"types": "./src/index.ts",
"scripts": {
"build": "tsc",
"test": "vitest run",
"test:watch": "vitest"
},

View File

@@ -1,12 +1,15 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"strict": true,
"skipLibCheck": true,
"declaration": true,
"declarationMap": true,
"rootDir": "./src",
"outDir": "./dist"
},
"include": ["src"]
"include": ["src"],
"exclude": ["node_modules", "dist", "**/*.test.ts"]
}