The tRPC createContext was () => ({}) — the mounted dsr/consent routers
401'd every call and the dsr singleton stub threw (audit finding A11).
createTrpcContext now accepts an app resolveUser hook; web-next resolves
the session cookie through the auth feature's validateSession (denylist
included) plus a role snapshot, and threads bindProductionDsr/Consent
(or dev-seed) bindings into every request. The dsr router resolves its
binding from ctx.dsrBinding per request instead of a throwing proxy.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
59 lines
1.8 KiB
JSON
59 lines
1.8 KiB
JSON
{
|
|
"name": "@repo/web-next",
|
|
"private": true,
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "echo 'Next.js build requires full environment — use pnpm dev or docker'",
|
|
"dev": "TSX_TSCONFIG_PATH=../../tsconfig.json tsx server.ts",
|
|
"start": "node --import tsx server.ts",
|
|
"lint": "eslint .",
|
|
"test": "vitest run --passWithNoTests",
|
|
"test:e2e": "playwright test",
|
|
"test:e2e:install": "playwright install --with-deps chromium",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@repo/auth": "workspace:*",
|
|
"@repo/blog": "workspace:*",
|
|
"@repo/core-api": "workspace:*",
|
|
"@repo/core-audit": "workspace:*",
|
|
"@repo/core-cms": "workspace:*",
|
|
"@repo/core-consent": "workspace:*",
|
|
"@repo/core-dsr": "workspace:*",
|
|
"@repo/core-shared": "workspace:*",
|
|
"@repo/core-trpc": "workspace:^",
|
|
"@repo/marketing-pages": "workspace:*",
|
|
"@repo/media": "workspace:*",
|
|
"@repo/navigation": "workspace:*",
|
|
"@sentry/nextjs": "^10.51.0",
|
|
"@tailwindcss/postcss": "^4.3.0",
|
|
"@tanstack/react-query": "^5.96.2",
|
|
"@trpc/server": "^11.18.0",
|
|
"inversify": "^6.2.0",
|
|
"next": "^15.3.0",
|
|
"payload": "^3.14.0",
|
|
"react": "^19.0.0",
|
|
"react-dom": "^19.0.0",
|
|
"reflect-metadata": "^0.2.2",
|
|
"superjson": "^2.2.1",
|
|
"tailwindcss": "^4.1.0"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.50.0",
|
|
"@repo/core-eslint": "workspace:*",
|
|
"@repo/core-testing": "workspace:*",
|
|
"@repo/core-typescript": "workspace:*",
|
|
"@testing-library/jest-dom": "^6.5.0",
|
|
"@testing-library/react": "^16.0.0",
|
|
"@testing-library/user-event": "^14.5.0",
|
|
"@types/node": "^22.0.0",
|
|
"@types/react": "^19.0.0",
|
|
"@types/react-dom": "^19.0.0",
|
|
"@vitest/coverage-v8": "^3.2.7",
|
|
"jsdom": "^25.0.0",
|
|
"tsx": "^4.0.0",
|
|
"vitest": "^3.2.7"
|
|
}
|
|
}
|