fix(core-consent): build consent router from the shared superjson t

The router previously created its own initTRPC without superjson while
the app router uses the shared transformer-enabled instance — a wire
transformer mismatch that corrupts inputs (audit finding A10). Procedures
now build on @repo/core-shared/trpc/init's t; a real client+fetch-adapter
round-trip test pins Date revival through appRouter-style mounting.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 17:46:46 +02:00
parent e2a4657471
commit 8b78563881
4 changed files with 112 additions and 11 deletions

6
pnpm-lock.yaml generated
View File

@@ -674,6 +674,9 @@ importers:
"@testing-library/react":
specifier: ^16.0.0
version: 16.3.2(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)
"@trpc/client":
specifier: ^11.18.0
version: 11.18.0(@trpc/server@11.18.0(typescript@5.9.3))(typescript@5.9.3)
"@types/react":
specifier: ^19.0.0
version: 19.2.14
@@ -689,6 +692,9 @@ importers:
react:
specifier: ^19.0.0
version: 19.2.4
superjson:
specifier: ^2.2.1
version: 2.2.6
typescript:
specifier: ^5.8.0
version: 5.9.3