Skip to content

Commit 2d658a2

Browse files
committed
fix: missing prisma client
Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr>
1 parent 4804c02 commit 2d658a2

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

apps/server-nestjs/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,18 @@
1212
"scripts": {
1313
"build": "nest build",
1414
"format": "eslint ./ --fix",
15+
"prestart": "prisma generate",
1516
"start": "nest start",
1617
"start:dev": "nest start --watch",
1718
"start:debug": "nest start --debug --watch",
1819
"start:prod": "node dist/main",
19-
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix"
20+
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
21+
"pretest": "prisma generate",
22+
"test": "vitest run",
23+
"test:watch": "vitest",
24+
"pretest:cov": "prisma generate",
25+
"test:cov": "vitest run --coverage",
26+
"test:debug": "vitest --inspect"
2027
},
2128
"dependencies": {
2229
"@cpn-console/argocd-plugin": "workspace:^",
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import path from 'node:path'
2+
import { defineConfig } from 'prisma/config'
3+
import * as dotenv from 'dotenv'
4+
5+
if (process.env.DOCKER !== 'true') {
6+
dotenv.config({ path: '.env' })
7+
}
8+
9+
if (process.env.INTEGRATION === 'true') {
10+
const envInteg = dotenv.config({ path: '.env.integ' })
11+
process.env = {
12+
...process.env,
13+
...(envInteg?.parsed ?? {}),
14+
}
15+
}
16+
17+
export default defineConfig({
18+
schema: path.join(__dirname, 'src', 'prisma', 'schema'),
19+
migrations: {
20+
path: path.join(__dirname, 'src', 'prisma', 'migrations'),
21+
},
22+
})

0 commit comments

Comments
 (0)