Validation: shared NaN-guarded Zod coercion helpers in schemas/common.ts replace the raw number|string transform idiom across every schema (the root-cause NaN bug class); emailOrEmpty + lenient isoDateString/timeString. Security: roles privilege-escalation closed; refresh-token family revocation on reuse; TOTP uses config params; read endpoints permission-guarded; received-invoices gross VAT on all paths; orders-pdf custom-items authz. Concurrency: $queryRaw SELECT...FOR UPDATE locks in ascending-id order (warehouse confirm/cancel, attendance lockUserRow); uniqueness checks moved into create transactions (TOCTOU -> 409); deterministic id tiebreak on second-precision timestamp ordering (plan resolveCell/resolveGrid, warehouse FIFO). Frontend: Rules-of-Hooks fixed across ~14 pages + PlanCellModal; UTC-date persisted fields; dashboard invalidation gaps; stale-closure confirm bugs. Tooling/tests: ESLint flat config (react-hooks/rules-of-hooks = error) + Prettier; tsconfig.test.json so tsc -b type-checks the tests; removed 3 dead deps; npm audit fix (8 -> 3). Suite 195 -> 247 (happy-path auth, FIFO oldest-first, flakiness fixes), isolated on app_test via .env.test with a hard-throw setup guard. Gates: tsc 0 | build 0 | vitest 247/247 | eslint 0 errors. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
104 lines
2.9 KiB
JSON
104 lines
2.9 KiB
JSON
{
|
|
"name": "app-ts",
|
|
"version": "2.1.5",
|
|
"description": "",
|
|
"main": "dist/server.js",
|
|
"scripts": {
|
|
"dev:server": "tsx watch src/server.ts",
|
|
"dev:client": "vite",
|
|
"dev": "tsx watch src/server.ts",
|
|
"build:server": "tsc -p tsconfig.server.json",
|
|
"build:client": "vite build",
|
|
"build": "npm run build:server && npm run build:client",
|
|
"start": "node dist/server.js",
|
|
"preview": "vite preview",
|
|
"db:generate": "prisma generate",
|
|
"db:pull": "prisma db pull",
|
|
"db:push": "prisma db push",
|
|
"db:studio": "prisma studio",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"seed": "tsx prisma/seed.ts",
|
|
"typecheck": "tsc -b --noEmit",
|
|
"lint": "eslint .",
|
|
"lint:fix": "eslint . --fix",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check ."
|
|
},
|
|
"prisma": {
|
|
"seed": "tsx prisma/seed.ts"
|
|
},
|
|
"keywords": [],
|
|
"author": "",
|
|
"license": "ISC",
|
|
"type": "commonjs",
|
|
"dependencies": {
|
|
"@anthropic-ai/sdk": "^0.102.0",
|
|
"@dnd-kit/core": "^6.3.1",
|
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
"@dnd-kit/sortable": "^10.0.0",
|
|
"@dnd-kit/utilities": "^3.2.2",
|
|
"@emotion/react": "^11.14.0",
|
|
"@emotion/styled": "^11.14.1",
|
|
"@fastify/cookie": "^11.0.2",
|
|
"@fastify/cors": "^11.2.0",
|
|
"@fastify/multipart": "^9.4.0",
|
|
"@fastify/rate-limit": "^10.3.0",
|
|
"@fastify/static": "^9.0.0",
|
|
"@mui/material": "^7.3.11",
|
|
"@mui/x-date-pickers": "^8.29.0",
|
|
"@prisma/client": "^6.19.2",
|
|
"@tanstack/react-query": "^5.100.5",
|
|
"@types/jsdom": "^28.0.1",
|
|
"bcryptjs": "^3.0.3",
|
|
"date-fns": "^4.1.0",
|
|
"dompurify": "^3.3.3",
|
|
"dotenv": "^17.3.1",
|
|
"fastify": "^5.8.2",
|
|
"file-type": "^16.5.4",
|
|
"framer-motion": "^12.38.0",
|
|
"jsdom": "^29.0.2",
|
|
"jsonwebtoken": "^9.0.3",
|
|
"leaflet": "^1.9.4",
|
|
"node-cron": "^4.2.1",
|
|
"nodemailer": "^8.0.2",
|
|
"otpauth": "^9.5.0",
|
|
"prisma": "^6.19.2",
|
|
"puppeteer": "^24.40.0",
|
|
"qrcode": "^1.5.4",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"react-quill-new": "^3.8.3",
|
|
"react-router-dom": "^6.30.3",
|
|
"zod": "^4.3.6"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@types/bcryptjs": "^2.4.6",
|
|
"@types/dompurify": "^3.0.5",
|
|
"@types/jsonwebtoken": "^9.0.10",
|
|
"@types/leaflet": "^1.9.21",
|
|
"@types/node": "^25.5.0",
|
|
"@types/node-cron": "^3.0.11",
|
|
"@types/nodemailer": "^7.0.11",
|
|
"@types/qrcode": "^1.5.6",
|
|
"@types/react": "^18.3.31",
|
|
"@types/react-dom": "^18.3.7",
|
|
"@types/supertest": "^7.2.0",
|
|
"@vitejs/plugin-react": "^6.0.1",
|
|
"concurrently": "^9.2.1",
|
|
"eslint": "^10.4.1",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
"globals": "^17.6.0",
|
|
"prettier": "^3.8.3",
|
|
"supertest": "^7.2.2",
|
|
"tsx": "^4.21.0",
|
|
"typescript": "^5.9.3",
|
|
"typescript-eslint": "^8.61.0",
|
|
"vite": "^8.0.0",
|
|
"vitest": "^4.1.0"
|
|
}
|
|
}
|