batchCooking/apps/api/package.json
Nicolas 9b2b2c2e28 API: GET /planning?date= remplace GET /planning/current (step 2/4)
- getPlanningForDate(houseId, date: DateTime) — paramétré au lieu de
  toujours "aujourd'hui", même logique de recherche sinon
- GET /planning?date=YYYY-MM-DD, validation de forme (zod) puis de
  validité calendaire (parseDateOnly, 400 VALIDATION_ERROR sinon) —
  un seul endpoint générique au lieu de deux qui se recouvrent
- Tests Mocha + Cucumber adaptés, + cas date manquante/malformée/
  impossible et "semaine différente d'aujourd'hui"
2026-08-17 14:17:46 +02:00

47 lines
1.3 KiB
JSON

{
"name": "api",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "tsx watch src/server.ts",
"build": "tsc -p tsconfig.json",
"start": "node dist/server.js",
"test": "cross-env NODE_ENV=test mocha",
"test:bdd": "cross-env NODE_ENV=test NODE_OPTIONS=--import=tsx cucumber-js",
"prisma:generate": "prisma generate",
"prisma:migrate": "prisma migrate dev",
"prisma:seed": "prisma db seed",
"postinstall": "prisma generate"
},
"prisma": {
"seed": "tsx prisma/seed.ts"
},
"dependencies": {
"@batch-cooking/date-tools": "workspace:*",
"@batch-cooking/error-tools": "workspace:*",
"@batch-cooking/express-tools": "workspace:*",
"@batch-cooking/shared": "workspace:*",
"@prisma/client": "^5.22.0",
"argon2": "0.31.2",
"dotenv": "^16.4.5",
"express": "^4.21.1",
"jsonwebtoken": "^9.0.3",
"zod": "^3.23.8"
},
"devDependencies": {
"@cucumber/cucumber": "^13.2.1",
"@faker-js/faker": "^10.6.0",
"@types/express": "^4.17.21",
"@types/jsonwebtoken": "^9.0.10",
"@types/node": "^22.9.0",
"@types/supertest": "^6.0.2",
"chai": "^5.1.2",
"cross-env": "^10.1.0",
"mocha": "^10.8.2",
"prisma": "^5.22.0",
"supertest": "^7.0.0",
"tsx": "^4.19.2",
"typescript": "^5.7.2"
}
}