refactor(core-trpc): break the core-api package cycle

core-trpc imported AppRouter (type-only) from core-api, which depends
on the features, which depend on core-trpc — a cycle that killed every
turbo graph walk (lint/build/CI) and an illegal core -> core-composition
boundary edge. The tRPC context is now router-agnostic (AnyTRPCRouter);
useTRPC takes the router type as a generic and each feature exports a
type-only app-slice (e.g. BlogAppSlice) mirroring its mount key, so UI
hooks keep full procedure typing without touching the composition layer.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 17:38:12 +02:00
parent 5047953c9a
commit c551b33bfb
14 changed files with 70 additions and 24 deletions

3
pnpm-lock.yaml generated
View File

@@ -930,9 +930,6 @@ importers:
packages/core-trpc:
dependencies:
"@repo/core-api":
specifier: workspace:*
version: link:../core-api
"@tanstack/react-query":
specifier: ^5.66.0
version: 5.96.2(react@19.2.4)