add zod for validator

This commit is contained in:
Guillaume Dorce 2022-08-19 16:04:20 +02:00
parent 46f1d97c23
commit 43393b3fd3
2 changed files with 32 additions and 3 deletions

View File

@ -7,7 +7,8 @@
"dev": "nodemon --watch src -e js,ts,json --exec 'ts-node src/index.ts'",
"build": "tsc src/index.ts",
"start": "node dist/index.js",
"db": "prisma studio"
"db": "prisma studio",
"db-build": "prisma generate; prisma db push"
},
"keywords": [],
"author": "",
@ -19,11 +20,13 @@
"nodemon": "^2.0.19",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.1.0",
"typescript": "^4.7.4"
"typescript": "^4.7.4",
"prisma": "^4.2.1"
},
"dependencies": {
"@prisma/client": "^4.2.1",
"cors": "^2.8.5",
"express": "^4.18.1",
"prisma": "^4.2.1"
"zod": "^3.18.0"
}
}

View File

@ -1,6 +1,7 @@
lockfileVersion: 5.4
specifiers:
'@prisma/client': ^4.2.1
'@types/cors': ^2.8.12
'@types/express': ^4.17.13
'@types/node': ^18.7.4
@ -11,11 +12,14 @@ specifiers:
ts-node: ^10.9.1
tsconfig-paths: ^4.1.0
typescript: ^4.7.4
zod: ^3.18.0
dependencies:
'@prisma/client': 4.2.1_prisma@4.2.1
cors: 2.8.5
express: 4.18.1
prisma: 4.2.1
zod: 3.18.0
devDependencies:
'@types/cors': 2.8.12
@ -51,6 +55,24 @@ packages:
'@jridgewell/sourcemap-codec': 1.4.14
dev: true
/@prisma/client/4.2.1_prisma@4.2.1:
resolution: {integrity: sha512-PZBkY60+k5oix+e6IUfl3ub8TbRLNsPLdfWrdy2eh80WcHTaT+/UfvXf/B7gXedH7FRtbPFHZXk1hZenJiJZFQ==}
engines: {node: '>=14.17'}
requiresBuild: true
peerDependencies:
prisma: '*'
peerDependenciesMeta:
prisma:
optional: true
dependencies:
'@prisma/engines-version': 4.2.0-33.2920a97877e12e055c1333079b8d19cee7f33826
prisma: 4.2.1
dev: false
/@prisma/engines-version/4.2.0-33.2920a97877e12e055c1333079b8d19cee7f33826:
resolution: {integrity: sha512-tktkqdiwqE4QhmE088boPt+FwPj1Jub/zk+5F6sEfcRHzO5yz9jyMD5HFVtiwxZPLx/8Xg9ElnuTi8E5lWVQFQ==}
dev: false
/@prisma/engines/4.2.1:
resolution: {integrity: sha512-0KqBwREUOjBiHwITsQzw2DWfLHjntvbqzGRawj4sBMnIiL5CXwyDUKeHOwXzKMtNr1rEjxEsypM14g0CzLRK3g==}
requiresBuild: true
@ -862,3 +884,7 @@ packages:
resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==}
engines: {node: '>=6'}
dev: true
/zod/3.18.0:
resolution: {integrity: sha512-gwTm8RfUCe8l9rDwN5r2A17DkAa8Ez4Yl4yXqc5VqeGaXaJahzYYXbTwvhroZi0SNBqTwh/bKm2N0mpCzuw4bA==}
dev: false