feat(core-trpc): scaffold tRPC client with React Query providers
- createTRPCContext + useTRPC hook for typed client access - NextTrpcProvider with SSR-safe absolute URL resolution - TanstackTrpcProvider for TanStack Start apps - /api/trpc catch-all route handler in web-next - Wire NextTrpcProvider into app providers - Add @repo/core-trpc to transpilePackages
This commit is contained in:
37
packages/core-trpc/package.json
Normal file
37
packages/core-trpc/package.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "@repo/core-trpc",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./next": "./src/providers/next-provider.tsx",
|
||||
"./tanstack": "./src/providers/tanstack-provider.tsx"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc --noEmit",
|
||||
"lint": "eslint .",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run --passWithNoTests"
|
||||
},
|
||||
"dependencies": {
|
||||
"@repo/core-api": "workspace:*",
|
||||
"@tanstack/react-query": "^5.66.0",
|
||||
"@trpc/client": "^11.17.0",
|
||||
"@trpc/react-query": "^11.17.0",
|
||||
"@trpc/server": "^11.17.0",
|
||||
"@trpc/tanstack-react-query": "^11.17.0",
|
||||
"react": "^19.0.0",
|
||||
"superjson": "^2.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@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",
|
||||
"@types/react": "^19.0.0",
|
||||
"jsdom": "^25.0.0",
|
||||
"vitest": "^3.0.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user