a6ffba6b37
The API Docker image was copying raw .ts source files for @groombook/db and @groombook/types into the runtime stage, but tsx (the TS loader) is a devDependency stripped by --prod install. Node.js cannot load .ts files natively, causing ERR_UNKNOWN_FILE_EXTENSION at startup. - Add build scripts to db and types packages - Add outDir to types tsconfig - Update package.json main fields to point to compiled dist/ - Build packages in dependency order in Dockerfile - Copy only dist output to runtime stage Co-Authored-By: Paperclip <noreply@paperclip.ing>
26 lines
564 B
JSON
26 lines
564 B
JSON
{
|
|
"name": "@groombook/db",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"main": "./dist/index.js",
|
|
"types": "./src/index.ts",
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"generate": "drizzle-kit generate",
|
|
"migrate": "drizzle-kit migrate",
|
|
"seed": "tsx src/seed.ts",
|
|
"studio": "drizzle-kit studio",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"drizzle-orm": "^0.38.4",
|
|
"postgres": "^3.4.5"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.10.7",
|
|
"drizzle-kit": "^0.30.4",
|
|
"tsx": "^4.19.0",
|
|
"typescript": "^5.7.3"
|
|
}
|
|
}
|