Skip to content

Instantly share code, notes, and snippets.

@lassiter
Created August 5, 2025 15:09
Show Gist options
  • Select an option

  • Save lassiter/5897d62324e29d846cd6a7f8ab670de1 to your computer and use it in GitHub Desktop.

Select an option

Save lassiter/5897d62324e29d846cd6a7f8ab670de1 to your computer and use it in GitHub Desktop.
All files from repo root (excluding .gitignore), recursively
# Dependencies
node_modules/
.pnpm-debug.log*
# Build outputs
dist/
.next/
out/
.turbo
# Environment variables
.env*
!.env.example
# IDE
.vscode/
.idea/
.cursor
.claude
# OS generated files
.DS_Store
Thumbs.db
# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Coverage directory used by tools like istanbul
coverage/
# Turbo
.turbo/
# Temporary folders
tmp/
temp/
# Generated files
*.generated.*
.generated/

tRPC Tanstack React Query Integration Issue - Provider Approach

Problem

When trying to use the tRPC Tanstack React Query integration with createTRPCContext (provider approach), the queryOptions and mutationOptions methods are not available on tRPC procedures, causing TypeScript errors.

Environment

  • @trpc/tanstack-react-query: ^11.4.3
  • @tanstack/react-query: ^5.79.0
  • @trpc/client: ^11.4.3
  • @trpc/server: ^11.4.3
  • TypeScript: ^5.7.3

Expected Behavior (Provider Approach)

import { createTRPCContext } from "@trpc/tanstack-react-query";
const { TRPCProvider, useTRPC, useTRPCClient } = createTRPCContext<AppRouter>();

// In component:
const utils = useTRPC();
const query = useQuery(utils.foo.list.queryOptions());
const mutation = useMutation(utils.foo.create.mutationOptions());

Actual Behavior

// TypeScript errors:
// hooks/use-requests.ts:11:22 - error TS2339: Property 'queryOptions' does not exist on type 
// 'DecoratedRouterRecord<{ ctx: TRPCContext; meta: object; errorShape: {...}; }>'
// Property 'queryOptions' does not exist on type 
// 'DecorateMutationProcedure<{ input: any; output: any; transformer: true; errorShape: {...}; }>'

// hooks/use-requests.ts:20:24 - error TS2339: Property 'mutationOptions' does not exist on type
// 'DecoratedRouterRecord<{ ctx: TRPCContext; meta: object; errorShape: {...}; }>'
// Property 'mutationOptions' does not exist on type 
// 'DecorateQueryProcedure<{ input: any; output: any; transformer: true; errorShape: {...}; }>'

Root Cause

The issue occurs in BOTH approaches (createTRPCOptionsProxy AND createTRPCContext) because tRPC procedures are cast to any due to TypeScript portability issues with Supabase auth types:

// packages/trpc/src/server/procedures.ts
export const workspaceProcedure = procedures.workspaceProcedure as any;
//                                                                ^^^^^^^^
// This breaks type inference for ANY Tanstack React Query integration

TypeScript errors when removing as any:

  • TS2742: The inferred type cannot be named without a reference to '@supabase/supabase-js'
  • TS4023: Exported variable has or is using name from external module but cannot be named

Files Structure

Client Setup (Provider Approach)

// apps/web/lib/trpc/client.ts
import { createTRPCContext } from "@trpc/tanstack-react-query";
export const { TRPCProvider, useTRPC, useTRPCClient } = createTRPCContext<AppRouter>();

Provider Setup

// apps/web/lib/trpc/provider.tsx
<QueryClientProvider client={queryClient}>
  <TRPCProvider client={trpcClient} queryClient={queryClient}>
    {children}
  </TRPCProvider>
</QueryClientProvider>

Usage (Fails)

// apps/web/hooks/use-requests.ts
const utils = useTRPC();
// ❌ Property 'queryOptions' does not exist
const query = useQuery(utils.foo.list.queryOptions({}));
const mutation = useMutation(utils.bar.update.mutationOptions({}));

Setup Instructions

  1. pnpm install
  2. pnpm check - Shows TypeScript errors
  3. Try to use utils.foo.list.queryOptions() and utils.bar.update.mutationOptions() in hooks
  4. Observe missing queryOptions/mutationOptions methods

Key Insight

The issue is NOT with the client setup approach (proxy vs provider) - it's with the server-side type exports. Both approaches fail because the underlying router types are broken due to the as any cast needed for Supabase type portability.

Success Criteria

  1. Remove as any cast from procedures without TypeScript errors
  2. utils.procedure.queryOptions() and utils.procedure.mutationOptions() methods exist
  3. Full TypeScript support in Tanstack React Query integration
  4. pnpm check passes with no errors
import { z } from "zod";
import { createTRPCRouter, publicProcedure } from "../server/procedures.js";
export const barRouter = createTRPCRouter({
get: publicProcedure
.input(z.object({ id: z.string() }))
.query(async ({ input }) => {
return { id: input.id, value: `bar-${input.id}` };
}),
update: publicProcedure
.input(z.object({ id: z.string(), value: z.string() }))
.mutation(async ({ input }) => {
return { id: input.id, value: input.value, updated: true };
}),
});
import { createTRPCContext } from "@trpc/tanstack-react-query";
import type { AppRouter } from "@repro/trpc/server";
// ✅ Create tRPC context with provider approach (recommended for SSR)
// This should provide useTRPC hook that returns utils with queryOptions/mutationOptions
export const { TRPCProvider, useTRPC, useTRPCClient } = createTRPCContext<AppRouter>();
import type { User } from "@supabase/supabase-js";
// ⚠️ Using Supabase User type here causes the TypeScript portability issue
export interface TRPCContext {
user: User | null;
workspaceId: string | null;
}
export async function createTRPCContext(): Promise<TRPCContext> {
return {
user: null,
workspaceId: null,
};
}
import { z } from "zod";
import { createTRPCRouter, workspaceProcedure } from "../server/procedures.js";
export const fooRouter = createTRPCRouter({
list: workspaceProcedure.query(async () => {
return ["foo1", "foo2", "foo3"];
}),
create: workspaceProcedure
.input(z.object({ name: z.string() }))
.mutation(async ({ input }) => {
return { id: "new-foo", name: input.name };
}),
});
export { fetchRequestHandler } from "@trpc/server/adapters/fetch";
export * from "./context.js";
export * from "./procedures.js";
export * from "./router.js";
'use client';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { httpBatchLink } from '@trpc/client';
import { useState } from 'react';
import superjson from 'superjson';
import { api } from '@/lib/trpc';
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
const [queryClient] = useState(() => new QueryClient());
const [trpcClient] = useState(() =>
api.createClient({
links: [
httpBatchLink({
url: '/api/trpc',
// Add this if your tRPC endpoint is different
// url: 'http://localhost:3000/api/trpc',
transformer: superjson,
}),
],
}),
);
return (
<html lang="en">
<body>
<QueryClientProvider client={queryClient}>
<api.Provider client={trpcClient} queryClient={queryClient}>
{children}
</api.Provider>
</QueryClientProvider>
</body>
</html>
);
}
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ['@repro/trpc']
}
module.exports = nextConfig
{
"name": "@repro/trpc",
"version": "0.0.1",
"type": "module",
"exports": {
"./server": "./src/server/index.js"
},
"scripts": {
"build": "tsc",
"check": "tsc --noEmit"
},
"dependencies": {
"@trpc/server": "^11.4.3",
"@supabase/supabase-js": "^2.50.5",
"superjson": "^2.2.2",
"zod": "^3.25.48"
},
"devDependencies": {
"typescript": "^5.7.3"
}
}
'use client';
import { useQuery, useMutation } from '@tanstack/react-query';
import { api } from '@/lib/trpc';
export default function HomePage() {
const utils = api.useUtils();
// ❌ TypeScript Error: Property 'queryOptions' does not exist on type 'DecoratedRouterRecord<...>'
const { data: fooList, isLoading } = useQuery(
utils.foo.list.queryOptions({}),
);
// ❌ TypeScript Error: Property 'mutationOptions' does not exist on type 'DecorateMutationProcedure<...>'
const { mutateAsync: createFoo } = useMutation(
utils.foo.create.mutationOptions({}),
);
// Alternative: This would work with the traditional tRPC React Query integration
// const { data: fooList, isLoading } = api.foo.list.useQuery({});
// const { mutateAsync: createFoo } = api.foo.create.useMutation({});
const handleCreateFoo = async () => {
try {
await createFoo({ name: 'New Foo Item' });
} catch (error) {
console.error('Failed to create foo:', error);
}
};
return (
<div style={{ padding: '2rem', fontFamily: 'system-ui' }}>
<h1>tRPC Tanstack React Query Issue Reproduction</h1>
<div style={{ marginBottom: '2rem' }}>
<h2>Current Status</h2>
<p>
This page attempts to use <code>utils.foo.list.queryOptions()</code> and{' '}
<code>utils.foo.create.mutationOptions()</code> but they don't exist due to
TypeScript issues with the tRPC server procedures.
</p>
</div>
<div style={{ marginBottom: '2rem' }}>
<h2>Expected Behavior</h2>
<p>According to the tRPC docs, this should work:</p>
<pre style={{ background: '#f5f5f5', padding: '1rem', borderRadius: '4px' }}>
{`const utils = api.useUtils();
const query = useQuery(utils.foo.list.queryOptions());
const mutation = useMutation(utils.foo.create.mutationOptions());`}
</pre>
</div>
<div style={{ marginBottom: '2rem' }}>
<h2>Actual Behavior</h2>
<p>TypeScript errors:</p>
<ul>
<li>Property 'queryOptions' does not exist on type 'DecoratedRouterRecord'</li>
<li>Property 'mutationOptions' does not exist on type 'DecorateMutationProcedure'</li>
</ul>
</div>
<div>
<h2>Data</h2>
{isLoading ? (
<p>Loading...</p>
) : (
<>
<p>Foo items: {JSON.stringify(fooList)}</p>
<button onClick={handleCreateFoo} style={{
padding: '0.5rem 1rem',
fontSize: '1rem',
cursor: 'pointer'
}}>
Create New Foo
</button>
</>
)}
</div>
</div>
);
}
lockfileVersion: '9.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
importers:
.:
devDependencies:
turbo:
specifier: latest
version: 2.5.5
typescript:
specifier: ^5.7.3
version: 5.9.2
apps/web:
dependencies:
'@repro/trpc':
specifier: workspace:*
version: link:../../packages/trpc
'@tanstack/react-query':
specifier: ^5.79.0
version: 5.84.1([email protected])
next:
specifier: 15.4.3
version: 15.4.3([email protected]([email protected]))([email protected])
react:
specifier: ^18.3.0
version: 18.3.1
react-dom:
specifier: ^18.3.0
version: 18.3.1([email protected])
devDependencies:
'@types/node':
specifier: ^20.0.0
version: 20.19.9
'@types/react':
specifier: ^18.3.0
version: 18.3.23
'@types/react-dom':
specifier: ^18.3.0
version: 18.3.7(@types/[email protected])
typescript:
specifier: ^5.7.3
version: 5.9.2
packages/common:
dependencies:
'@tanstack/react-query':
specifier: ^5.79.0
version: 5.84.1([email protected])
devDependencies:
typescript:
specifier: ^5.7.3
version: 5.9.2
packages/trpc:
dependencies:
'@supabase/supabase-js':
specifier: ^2.50.5
version: 2.53.0
'@trpc/server':
specifier: ^11.4.3
version: 11.4.4([email protected])
'@trpc/tanstack-react-query':
specifier: ^11.4.4
version: 11.4.4(@tanstack/[email protected]([email protected]))(@trpc/[email protected](@trpc/[email protected]([email protected]))([email protected]))(@trpc/[email protected]([email protected]))([email protected]([email protected]))([email protected])([email protected])
superjson:
specifier: ^2.2.2
version: 2.2.2
zod:
specifier: ^3.25.48
version: 3.25.76
devDependencies:
typescript:
specifier: ^5.7.3
version: 5.9.2
packages:
'@emnapi/[email protected]':
resolution: {integrity: sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg==}
'@img/[email protected]':
resolution: {integrity: sha512-ryFMfvxxpQRsgZJqBd4wsttYQbCxsJksrv9Lw/v798JcQ8+w84mBWuXwl+TT0WJ/WrYOLaYpwQXi3sA9nTIaIg==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [arm64]
os: [darwin]
'@img/[email protected]':
resolution: {integrity: sha512-yHpJYynROAj12TA6qil58hmPmAwxKKC7reUqtGLzsOHfP7/rniNGTL8tjWX6L3CTV4+5P4ypcS7Pp+7OB+8ihA==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [x64]
os: [darwin]
'@img/[email protected]':
resolution: {integrity: sha512-sBZmpwmxqwlqG9ueWFXtockhsxefaV6O84BMOrhtg/YqbTaRdqDE7hxraVE3y6gVM4eExmfzW4a8el9ArLeEiQ==}
cpu: [arm64]
os: [darwin]
'@img/[email protected]':
resolution: {integrity: sha512-M64XVuL94OgiNHa5/m2YvEQI5q2cl9d/wk0qFTDVXcYzi43lxuiFTftMR1tOnFQovVXNZJ5TURSDK2pNe9Yzqg==}
cpu: [x64]
os: [darwin]
'@img/[email protected]':
resolution: {integrity: sha512-RXwd0CgG+uPRX5YYrkzKyalt2OJYRiJQ8ED/fi1tq9WQW2jsQIn0tqrlR5l5dr/rjqq6AHAxURhj2DVjyQWSOA==}
cpu: [arm64]
os: [linux]
'@img/[email protected]':
resolution: {integrity: sha512-mWd2uWvDtL/nvIzThLq3fr2nnGfyr/XMXlq8ZJ9WMR6PXijHlC3ksp0IpuhK6bougvQrchUAfzRLnbsen0Cqvw==}
cpu: [arm]
os: [linux]
'@img/[email protected]':
resolution: {integrity: sha512-Xod/7KaDDHkYu2phxxfeEPXfVXFKx70EAFZ0qyUdOjCcxbjqyJOEUpDe6RIyaunGxT34Anf9ue/wuWOqBW2WcQ==}
cpu: [ppc64]
os: [linux]
'@img/[email protected]':
resolution: {integrity: sha512-eMKfzDxLGT8mnmPJTNMcjfO33fLiTDsrMlUVcp6b96ETbnJmd4uvZxVJSKPQfS+odwfVaGifhsB07J1LynFehw==}
cpu: [s390x]
os: [linux]
'@img/[email protected]':
resolution: {integrity: sha512-ZW3FPWIc7K1sH9E3nxIGB3y3dZkpJlMnkk7z5tu1nSkBoCgw2nSRTFHI5pB/3CQaJM0pdzMF3paf9ckKMSE9Tg==}
cpu: [x64]
os: [linux]
'@img/[email protected]':
resolution: {integrity: sha512-UG+LqQJbf5VJ8NWJ5Z3tdIe/HXjuIdo4JeVNADXBFuG7z9zjoegpzzGIyV5zQKi4zaJjnAd2+g2nna8TZvuW9Q==}
cpu: [arm64]
os: [linux]
'@img/[email protected]':
resolution: {integrity: sha512-SRYOLR7CXPgNze8akZwjoGBoN1ThNZoqpOgfnOxmWsklTGVfJiGJoC/Lod7aNMGA1jSsKWM1+HRX43OP6p9+6Q==}
cpu: [x64]
os: [linux]
'@img/[email protected]':
resolution: {integrity: sha512-QdrKe3EvQrqwkDrtuTIjI0bu6YEJHTgEeqdzI3uWJOH6G1O8Nl1iEeVYRGdj1h5I21CqxSvQp1Yv7xeU3ZewbA==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [arm64]
os: [linux]
'@img/[email protected]':
resolution: {integrity: sha512-oBK9l+h6KBN0i3dC8rYntLiVfW8D8wH+NPNT3O/WBHeW0OQWCjfWksLUaPidsrDKpJgXp3G3/hkmhptAW0I3+A==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [arm]
os: [linux]
'@img/[email protected]':
resolution: {integrity: sha512-GLtbLQMCNC5nxuImPR2+RgrviwKwVql28FWZIW1zWruy6zLgA5/x2ZXk3mxj58X/tszVF69KK0Is83V8YgWhLA==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [ppc64]
os: [linux]
'@img/[email protected]':
resolution: {integrity: sha512-3gahT+A6c4cdc2edhsLHmIOXMb17ltffJlxR0aC2VPZfwKoTGZec6u5GrFgdR7ciJSsHT27BD3TIuGcuRT0KmQ==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [s390x]
os: [linux]
'@img/[email protected]':
resolution: {integrity: sha512-8kYso8d806ypnSq3/Ly0QEw90V5ZoHh10yH0HnrzOCr6DKAPI6QVHvwleqMkVQ0m+fc7EH8ah0BB0QPuWY6zJQ==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [x64]
os: [linux]
'@img/[email protected]':
resolution: {integrity: sha512-vAjbHDlr4izEiXM1OTggpCcPg9tn4YriK5vAjowJsHwdBIdx0fYRsURkxLG2RLm9gyBq66gwtWI8Gx0/ov+JKQ==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [arm64]
os: [linux]
'@img/[email protected]':
resolution: {integrity: sha512-gCWUn9547K5bwvOn9l5XGAEjVTTRji4aPTqLzGXHvIr6bIDZKNTA34seMPgM0WmSf+RYBH411VavCejp3PkOeQ==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [x64]
os: [linux]
'@img/[email protected]':
resolution: {integrity: sha512-+CyRcpagHMGteySaWos8IbnXcHgfDn7pO2fiC2slJxvNq9gDipYBN42/RagzctVRKgxATmfqOSulgZv5e1RdMg==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [wasm32]
'@img/[email protected]':
resolution: {integrity: sha512-MjnHPnbqMXNC2UgeLJtX4XqoVHHlZNd+nPt1kRPmj63wURegwBhZlApELdtxM2OIZDRv/DFtLcNhVbd1z8GYXQ==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [arm64]
os: [win32]
'@img/[email protected]':
resolution: {integrity: sha512-xuCdhH44WxuXgOM714hn4amodJMZl3OEvf0GVTm0BEyMeA2to+8HEdRPShH0SLYptJY1uBw+SCFP9WVQi1Q/cw==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [ia32]
os: [win32]
'@img/[email protected]':
resolution: {integrity: sha512-OWwz05d++TxzLEv4VnsTz5CmZ6mI6S05sfQGEMrNrQcOEERbX46332IvE7pO/EUiw7jUrrS40z/M7kPyjfl04g==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [x64]
os: [win32]
'@next/[email protected]':
resolution: {integrity: sha512-lKJ9KJAvaWzqurIsz6NWdQOLj96mdhuDMusLSYHw9HBe2On7BjUwU1WeRvq19x7NrEK3iOgMeSBV5qEhVH1cMw==}
'@next/[email protected]':
resolution: {integrity: sha512-YAhZWKeEYY7LHQJiQ8fe3Y6ymfcDcTn7rDC8PDu/pdeIl1Z2LHD4uyPNuQUGCEQT//MSNv6oZCeQzZfTCKZv+A==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [darwin]
'@next/[email protected]':
resolution: {integrity: sha512-ZPHRdd51xaxCMpT4viQ6h8TgYM1zPW1JIeksPY9wKlyvBVUQqrWqw8kEh1sa7/x0Ied+U7pYHkAkutrUwxbMcg==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
'@next/[email protected]':
resolution: {integrity: sha512-QUdqftCXC5vw5cowucqi9FeOPQ0vdMxoOHLY0J5jPdercwSJFjdi9CkEO4Xkq1eG4t1TB/BG81n6rmTsWoILnw==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
'@next/[email protected]':
resolution: {integrity: sha512-HTL31NsmoafX+r5g91Yj3+q34nrn1xKmCWVuNA+fUWO4X0pr+n83uGzLyEOn0kUqbMZ40KmWx+4wsbMoUChkiQ==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
'@next/[email protected]':
resolution: {integrity: sha512-HRQLWoeFkKXd2YCEEy9GhfwOijRm37x4w5r0MMVHxBKSA6ms3JoPUXvGhfHT6srnGRcEUWNrQ2vzkHir5ZWTSw==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
'@next/[email protected]':
resolution: {integrity: sha512-NyXUx6G7AayaRGUsVPenuwhyAoyxjQuQPaK50AXoaAHPwRuif4WmSrXUs8/Y0HJIZh8E/YXRm9H7uuGfiacpuQ==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
'@next/[email protected]':
resolution: {integrity: sha512-2CUTmpzN/7cL1a7GjdLkDFlfH3nwMwW8a6JiaAUsL9MtKmNNO3fnXqnY0Zk30fii3hVEl4dr7ztrpYt0t2CcGQ==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [win32]
'@next/[email protected]':
resolution: {integrity: sha512-i54YgUhvrUQxQD84SjAbkfWhYkOdm/DNRAVekCHLWxVg3aUbyC6NFQn9TwgCkX5QAS2pXCJo3kFboSFvrsd7dA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [win32]
'@supabase/[email protected]':
resolution: {integrity: sha512-mMIQHBRc+SKpZFRB2qtupuzulaUhFYupNyxqDj5Jp/LyPvcWvjaJzZzObv6URtL/O6lPxkanASnotGtNpS3H2Q==}
'@supabase/[email protected]':
resolution: {integrity: sha512-v5GSqb9zbosquTo6gBwIiq7W9eQ7rE5QazsK/ezNiQXdCbY+bH8D9qEaBIkhVvX4ZRW5rP03gEfw5yw9tiq4EQ==}
'@supabase/[email protected]':
resolution: {integrity: sha512-1ibVeYUacxWYi9i0cf5efil6adJ9WRyZBLivgjs+AUpewx1F3xPi7gLgaASI2SmIQxPoCEjAsLAzKPgMJVgOUQ==}
engines: {node: 4.x || >=6.0.0}
'@supabase/[email protected]':
resolution: {integrity: sha512-O4soKqKtZIW3olqmbXXbKugUtByD2jPa8kL2m2c1oozAO11uCcGrRhkZL0kVxjBLrXHE0mdSkFsMj7jDSfyNpw==}
'@supabase/[email protected]':
resolution: {integrity: sha512-HQKRnwAqdVqJW/P9TjKVK+/ETpW4yQ8tyDPPtRMKOH4Uh3vQD74vmj353CYs8+YwVBKubeUOOEpI9CT8mT4obw==}
'@supabase/[email protected]':
resolution: {integrity: sha512-cvL02GarJVFcNoWe36VBybQqTVRq6wQSOCvTS64C+eyuxOruFIm1utZAY0xi2qKtHJO3EjKaj8iWJKySusDmAQ==}
'@supabase/[email protected]':
resolution: {integrity: sha512-Vg9sl0oFn55cCPaEOsDsRDbxOVccxRrK/cikjL1XbywHEOfyA5SOOEypidMvQLwgoAfnC2S4D9BQwJDcZs7/TQ==}
'@swc/[email protected]':
resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==}
'@tanstack/[email protected]':
resolution: {integrity: sha512-OG69LQgT7jSp+5pPuCfzltq/+7l2xoweggjme9vlbCPa/d7D7zaqv5vN/S82SzSYZ4EDLTxNO1PWrv49RAS64Q==}
'@tanstack/[email protected]':
resolution: {integrity: sha512-zo7EUygcWJMQfFNWDSG7CBhy8irje/XY0RDVKKV4IQJAysb+ZJkkJPcnQi+KboyGUgT+SQebRFoTqLuTtfoDLw==}
peerDependencies:
react: ^18 || ^19
'@trpc/[email protected]':
resolution: {integrity: sha512-86OZl+Y+Xlt9ITGlhCMImERcsWCOrVzpNuzg3XBlsDSmSs9NGsghKjeCpJQlE36XaG3aze+o9pRukiYYvBqxgQ==}
peerDependencies:
'@trpc/server': 11.4.4
typescript: '>=5.7.2'
'@trpc/[email protected]':
resolution: {integrity: sha512-VkJb2xnb4rCynuwlCvgPBh5aM+Dco6fBBIo6lWAdJJRYVwtyE5bxNZBgUvRRz/cFSEAy0vmzLxF7aABDJfK5Rg==}
peerDependencies:
typescript: '>=5.7.2'
'@trpc/[email protected]':
resolution: {integrity: sha512-Rf7jhPfwAHqmQdQlxTiMolNRon85bPEsBNa5JGpjSvhrTmiaFu5UEhEwHDF2myL7IRYxuYHLc4H0bQ+19qjdHQ==}
peerDependencies:
'@tanstack/react-query': ^5.80.3
'@trpc/client': 11.4.4
'@trpc/server': 11.4.4
react: '>=18.2.0'
react-dom: '>=18.2.0'
typescript: '>=5.7.2'
'@types/[email protected]':
resolution: {integrity: sha512-cuVNgarYWZqxRJDQHEB58GEONhOK79QVR/qYx4S7kcUObQvUwvFnYxJuuHUKm2aieN9X3yZB4LZsuYNU1Qphsw==}
'@types/[email protected]':
resolution: {integrity: sha512-PIzZZlEppgrpoT2QgbnDU+MMzuR6BbCjllj0bM70lWoejMeNJAxCchxnv7J3XFkI8MpygtRpzXrIlmWUBclP5A==}
'@types/[email protected]':
resolution: {integrity: sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==}
'@types/[email protected]':
resolution: {integrity: sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==}
peerDependencies:
'@types/react': ^18.0.0
'@types/[email protected]':
resolution: {integrity: sha512-/LDXMQh55EzZQ0uVAZmKKhfENivEvWz6E+EYzh+/MCjMhNsotd+ZHhBGIjFDTi6+fz0OhQQQLbTgdQIxxCsC0w==}
'@types/[email protected]':
resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==}
[email protected]:
resolution: {integrity: sha512-lDdp2/wrOmTRWuoB5DpfNkC0rJDU8DqRa6nYL6HK6sytw70QMopt/NIc/9SM7ylItlBWfACXk0tEn37UWM/+mg==}
[email protected]:
resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==}
[email protected]:
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
engines: {node: '>=7.0.0'}
[email protected]:
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
[email protected]:
resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==}
[email protected]:
resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==}
engines: {node: '>=12.5.0'}
[email protected]:
resolution: {integrity: sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==}
engines: {node: '>=12.13'}
[email protected]:
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
[email protected]:
resolution: {integrity: sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==}
engines: {node: '>=8'}
[email protected]:
resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==}
[email protected]:
resolution: {integrity: sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==}
engines: {node: '>=12.13'}
[email protected]:
resolution: {integrity: sha512-I1fSfDCZL5P0v33sVqeTDSpcstAg/N+wF5HS033mogOVIp4B+oHC7oOCsA3axAbBSGTJ8QubbNmnIRN/h8U7hg==}
peerDependencies:
ws: '*'
[email protected]:
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
[email protected]:
resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
hasBin: true
[email protected]:
resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
[email protected]:
resolution: {integrity: sha512-uW7Qe6poVasNIE1X382nI29oxSdFJzjQzTgJFLD43MxyPfGKKxCMySllhBpvqr48f58Om+tLMivzRwBpXEytvA==}
engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0}
hasBin: true
peerDependencies:
'@opentelemetry/api': ^1.1.0
'@playwright/test': ^1.51.1
babel-plugin-react-compiler: '*'
react: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0
react-dom: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0
sass: ^1.3.0
peerDependenciesMeta:
'@opentelemetry/api':
optional: true
'@playwright/test':
optional: true
babel-plugin-react-compiler:
optional: true
sass:
optional: true
[email protected]:
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
[email protected]:
resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==}
engines: {node: ^10 || ^12 || >=14}
[email protected]:
resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==}
peerDependencies:
react: ^18.3.1
[email protected]:
resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==}
engines: {node: '>=0.10.0'}
[email protected]:
resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==}
[email protected]:
resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==}
engines: {node: '>=10'}
hasBin: true
[email protected]:
resolution: {integrity: sha512-eX2IQ6nFohW4DbvHIOLRB3MHFpYqaqvXd3Tp5e/T/dSH83fxaNJQRvDMhASmkNTsNTVF2/OOopzRCt7xokgPfg==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
[email protected]:
resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==}
[email protected]:
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
engines: {node: '>=0.10.0'}
[email protected]:
resolution: {integrity: sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==}
engines: {node: '>= 12.0.0'}
peerDependencies:
'@babel/core': '*'
babel-plugin-macros: '*'
react: '>= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0'
peerDependenciesMeta:
'@babel/core':
optional: true
babel-plugin-macros:
optional: true
[email protected]:
resolution: {integrity: sha512-5JRxVqC8I8NuOUjzBbvVJAKNM8qoVuH0O77h4WInc/qC2q5IreqKxYwgkga3PfA22OayK2ikceb/B26dztPl+Q==}
engines: {node: '>=16'}
[email protected]:
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
[email protected]:
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
[email protected]:
resolution: {integrity: sha512-RYnTz49u4F5tDD2SUwwtlynABNBAfbyT2uU/brJcyh5k6lDLyNfYKdKmqd3K2ls4AaiALWrFKVSBsiVwhdFNzQ==}
cpu: [x64]
os: [darwin]
[email protected]:
resolution: {integrity: sha512-Tk+ZeSNdBobZiMw9aFypQt0DlLsWSFWu1ymqsAdJLuPoAH05qCfYtRxE1pJuYHcJB5pqI+/HOxtJoQ40726Btw==}
cpu: [arm64]
os: [darwin]
[email protected]:
resolution: {integrity: sha512-2/XvMGykD7VgsvWesZZYIIVXMlgBcQy+ZAryjugoTcvJv8TZzSU/B1nShcA7IAjZ0q7OsZ45uP2cOb8EgKT30w==}
cpu: [x64]
os: [linux]
[email protected]:
resolution: {integrity: sha512-DW+8CjCjybu0d7TFm9dovTTVg1VRnlkZ1rceO4zqsaLrit3DgHnN4to4uwyuf9s2V/BwS3IYcRy+HG9BL596Iw==}
cpu: [arm64]
os: [linux]
[email protected]:
resolution: {integrity: sha512-q5p1BOy8ChtSZfULuF1BhFMYIx6bevXu4fJ+TE/hyNfyHJIfjl90Z6jWdqAlyaFLmn99X/uw+7d6T/Y/dr5JwQ==}
cpu: [x64]
os: [win32]
[email protected]:
resolution: {integrity: sha512-AXbF1KmpHUq3PKQwddMGoKMYhHsy5t1YBQO8HZ04HLMR0rWv9adYlQ8kaeQJTko1Ay1anOBFTqaxfVOOsu7+1Q==}
cpu: [arm64]
os: [win32]
[email protected]:
resolution: {integrity: sha512-eZ7wI6KjtT1eBqCnh2JPXWNUAxtoxxfi6VdBdZFvil0ychCOTxbm7YLRBi1JSt7U3c+u3CLxpoPxLdvr/Npr3A==}
hasBin: true
[email protected]:
resolution: {integrity: sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==}
engines: {node: '>=14.17'}
hasBin: true
[email protected]:
resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
[email protected]:
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
[email protected]:
resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
[email protected]:
resolution: {integrity: sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==}
engines: {node: '>=10.0.0'}
peerDependencies:
bufferutil: ^4.0.1
utf-8-validate: '>=5.0.2'
peerDependenciesMeta:
bufferutil:
optional: true
utf-8-validate:
optional: true
[email protected]:
resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==}
snapshots:
'@emnapi/[email protected]':
dependencies:
tslib: 2.8.1
optional: true
'@img/[email protected]':
optionalDependencies:
'@img/sharp-libvips-darwin-arm64': 1.2.0
optional: true
'@img/[email protected]':
optionalDependencies:
'@img/sharp-libvips-darwin-x64': 1.2.0
optional: true
'@img/[email protected]':
optional: true
'@img/[email protected]':
optional: true
'@img/[email protected]':
optional: true
'@img/[email protected]':
optional: true
'@img/[email protected]':
optional: true
'@img/[email protected]':
optional: true
'@img/[email protected]':
optional: true
'@img/[email protected]':
optional: true
'@img/[email protected]':
optional: true
'@img/[email protected]':
optionalDependencies:
'@img/sharp-libvips-linux-arm64': 1.2.0
optional: true
'@img/[email protected]':
optionalDependencies:
'@img/sharp-libvips-linux-arm': 1.2.0
optional: true
'@img/[email protected]':
optionalDependencies:
'@img/sharp-libvips-linux-ppc64': 1.2.0
optional: true
'@img/[email protected]':
optionalDependencies:
'@img/sharp-libvips-linux-s390x': 1.2.0
optional: true
'@img/[email protected]':
optionalDependencies:
'@img/sharp-libvips-linux-x64': 1.2.0
optional: true
'@img/[email protected]':
optionalDependencies:
'@img/sharp-libvips-linuxmusl-arm64': 1.2.0
optional: true
'@img/[email protected]':
optionalDependencies:
'@img/sharp-libvips-linuxmusl-x64': 1.2.0
optional: true
'@img/[email protected]':
dependencies:
'@emnapi/runtime': 1.4.5
optional: true
'@img/[email protected]':
optional: true
'@img/[email protected]':
optional: true
'@img/[email protected]':
optional: true
'@next/[email protected]': {}
'@next/[email protected]':
optional: true
'@next/[email protected]':
optional: true
'@next/[email protected]':
optional: true
'@next/[email protected]':
optional: true
'@next/[email protected]':
optional: true
'@next/[email protected]':
optional: true
'@next/[email protected]':
optional: true
'@next/[email protected]':
optional: true
'@supabase/[email protected]':
dependencies:
'@supabase/node-fetch': 2.6.15
'@supabase/[email protected]':
dependencies:
'@supabase/node-fetch': 2.6.15
'@supabase/[email protected]':
dependencies:
whatwg-url: 5.0.0
'@supabase/[email protected]':
dependencies:
'@supabase/node-fetch': 2.6.15
'@supabase/[email protected]':
dependencies:
'@supabase/node-fetch': 2.6.15
'@types/phoenix': 1.6.6
'@types/ws': 8.18.1
isows: 1.0.7([email protected])
ws: 8.18.3
transitivePeerDependencies:
- bufferutil
- utf-8-validate
'@supabase/[email protected]':
dependencies:
'@supabase/node-fetch': 2.6.15
'@supabase/[email protected]':
dependencies:
'@supabase/auth-js': 2.71.1
'@supabase/functions-js': 2.4.5
'@supabase/node-fetch': 2.6.15
'@supabase/postgrest-js': 1.19.4
'@supabase/realtime-js': 2.11.15
'@supabase/storage-js': 2.10.4
transitivePeerDependencies:
- bufferutil
- utf-8-validate
'@swc/[email protected]':
dependencies:
tslib: 2.8.1
'@tanstack/[email protected]': {}
'@tanstack/[email protected]([email protected])':
dependencies:
'@tanstack/query-core': 5.83.1
react: 18.3.1
'@trpc/[email protected](@trpc/[email protected]([email protected]))([email protected])':
dependencies:
'@trpc/server': 11.4.4([email protected])
typescript: 5.9.2
'@trpc/[email protected]([email protected])':
dependencies:
typescript: 5.9.2
'@trpc/[email protected](@tanstack/[email protected]([email protected]))(@trpc/[email protected](@trpc/[email protected]([email protected]))([email protected]))(@trpc/[email protected]([email protected]))([email protected]([email protected]))([email protected])([email protected])':
dependencies:
'@tanstack/react-query': 5.84.1([email protected])
'@trpc/client': 11.4.4(@trpc/[email protected]([email protected]))([email protected])
'@trpc/server': 11.4.4([email protected])
react: 18.3.1
react-dom: 18.3.1([email protected])
typescript: 5.9.2
'@types/[email protected]':
dependencies:
undici-types: 6.21.0
'@types/[email protected]': {}
'@types/[email protected]': {}
'@types/[email protected](@types/[email protected])':
dependencies:
'@types/react': 18.3.23
'@types/[email protected]':
dependencies:
'@types/prop-types': 15.7.15
csstype: 3.1.3
'@types/[email protected]':
dependencies:
'@types/node': 20.19.9
[email protected]: {}
[email protected]: {}
[email protected]:
dependencies:
color-name: 1.1.4
optional: true
[email protected]:
optional: true
[email protected]:
dependencies:
color-name: 1.1.4
simple-swizzle: 0.2.2
optional: true
[email protected]:
dependencies:
color-convert: 2.0.1
color-string: 1.9.1
optional: true
[email protected]:
dependencies:
is-what: 4.1.16
[email protected]: {}
[email protected]:
optional: true
[email protected]:
optional: true
[email protected]: {}
[email protected]([email protected]):
dependencies:
ws: 8.18.3
[email protected]: {}
[email protected]:
dependencies:
js-tokens: 4.0.0
[email protected]: {}
[email protected]([email protected]([email protected]))([email protected]):
dependencies:
'@next/env': 15.4.3
'@swc/helpers': 0.5.15
caniuse-lite: 1.0.30001731
postcss: 8.4.31
react: 18.3.1
react-dom: 18.3.1([email protected])
styled-jsx: 5.1.6([email protected])
optionalDependencies:
'@next/swc-darwin-arm64': 15.4.3
'@next/swc-darwin-x64': 15.4.3
'@next/swc-linux-arm64-gnu': 15.4.3
'@next/swc-linux-arm64-musl': 15.4.3
'@next/swc-linux-x64-gnu': 15.4.3
'@next/swc-linux-x64-musl': 15.4.3
'@next/swc-win32-arm64-msvc': 15.4.3
'@next/swc-win32-x64-msvc': 15.4.3
sharp: 0.34.3
transitivePeerDependencies:
- '@babel/core'
- babel-plugin-macros
[email protected]: {}
[email protected]:
dependencies:
nanoid: 3.3.11
picocolors: 1.1.1
source-map-js: 1.2.1
[email protected]([email protected]):
dependencies:
loose-envify: 1.4.0
react: 18.3.1
scheduler: 0.23.2
[email protected]:
dependencies:
loose-envify: 1.4.0
[email protected]:
dependencies:
loose-envify: 1.4.0
[email protected]:
optional: true
[email protected]:
dependencies:
color: 4.2.3
detect-libc: 2.0.4
semver: 7.7.2
optionalDependencies:
'@img/sharp-darwin-arm64': 0.34.3
'@img/sharp-darwin-x64': 0.34.3
'@img/sharp-libvips-darwin-arm64': 1.2.0
'@img/sharp-libvips-darwin-x64': 1.2.0
'@img/sharp-libvips-linux-arm': 1.2.0
'@img/sharp-libvips-linux-arm64': 1.2.0
'@img/sharp-libvips-linux-ppc64': 1.2.0
'@img/sharp-libvips-linux-s390x': 1.2.0
'@img/sharp-libvips-linux-x64': 1.2.0
'@img/sharp-libvips-linuxmusl-arm64': 1.2.0
'@img/sharp-libvips-linuxmusl-x64': 1.2.0
'@img/sharp-linux-arm': 0.34.3
'@img/sharp-linux-arm64': 0.34.3
'@img/sharp-linux-ppc64': 0.34.3
'@img/sharp-linux-s390x': 0.34.3
'@img/sharp-linux-x64': 0.34.3
'@img/sharp-linuxmusl-arm64': 0.34.3
'@img/sharp-linuxmusl-x64': 0.34.3
'@img/sharp-wasm32': 0.34.3
'@img/sharp-win32-arm64': 0.34.3
'@img/sharp-win32-ia32': 0.34.3
'@img/sharp-win32-x64': 0.34.3
optional: true
[email protected]:
dependencies:
is-arrayish: 0.3.2
optional: true
[email protected]: {}
[email protected]([email protected]):
dependencies:
client-only: 0.0.1
react: 18.3.1
[email protected]:
dependencies:
copy-anything: 3.0.5
[email protected]: {}
[email protected]: {}
[email protected]:
optional: true
[email protected]:
optional: true
[email protected]:
optional: true
[email protected]:
optional: true
[email protected]:
optional: true
[email protected]:
optional: true
[email protected]:
optionalDependencies:
turbo-darwin-64: 2.5.5
turbo-darwin-arm64: 2.5.5
turbo-linux-64: 2.5.5
turbo-linux-arm64: 2.5.5
turbo-windows-64: 2.5.5
turbo-windows-arm64: 2.5.5
[email protected]: {}
[email protected]: {}
[email protected]: {}
[email protected]:
dependencies:
tr46: 0.0.3
webidl-conversions: 3.0.1
[email protected]: {}
[email protected]: {}
packages:
- 'packages/*'
- 'apps/*'
import { TRPCError, initTRPC } from "@trpc/server";
import superjson from "superjson";
import type { TRPCContext } from "./context.js";
// Create a more specific context type for authenticated users
interface AuthenticatedContext extends TRPCContext {
user: NonNullable<TRPCContext["user"]>;
}
// Create a more specific context type for workspace-scoped operations
interface WorkspaceContext extends AuthenticatedContext {
workspaceId: NonNullable<TRPCContext["workspaceId"]>;
}
const t = initTRPC.context<TRPCContext>().create({
transformer: superjson,
});
export const createTRPCRouter = t.router;
export const createCallerFactory = t.createCallerFactory;
// Base procedure (no auth required)
export const publicProcedure = t.procedure;
// Auth middleware
const enforceUserIsAuthed = t.middleware(({ ctx, next }) => {
if (!ctx.user) {
throw new TRPCError({ code: "UNAUTHORIZED" });
}
return next({
ctx: {
...ctx,
user: ctx.user,
} as AuthenticatedContext,
});
});
// Workspace middleware
const enforceWorkspaceAccess = t.middleware(({ ctx, next }) => {
if (!ctx.user) {
throw new TRPCError({ code: "UNAUTHORIZED" });
}
if (!ctx.workspaceId) {
throw new TRPCError({
code: "PRECONDITION_FAILED",
message: "Workspace context required",
});
}
return next({
ctx: {
...ctx,
user: ctx.user,
workspaceId: ctx.workspaceId,
} as WorkspaceContext,
});
});
// Helper function to create procedures with type inference
function createProcedures() {
const protectedProcedure = publicProcedure.use(enforceUserIsAuthed);
const workspaceProcedure = protectedProcedure.use(enforceWorkspaceAccess);
return {
protectedProcedure,
workspaceProcedure,
};
}
// Export procedures
// ❌ THE CORE ISSUE: These must be cast to 'any' due to TypeScript portability issues
// When removed, TypeScript errors:
// - TS2742: The inferred type cannot be named without a reference to '@supabase/supabase-js'
// - TS4023: Exported variable has or is using name from external module but cannot be named
//
// This breaks BOTH createTRPCOptionsProxy AND createTRPCContext approaches
// because the procedures lose their type information
const procedures = createProcedures();
export const protectedProcedure = procedures.protectedProcedure as any;
export const workspaceProcedure = procedures.workspaceProcedure as any;
import { useState } from "react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { httpBatchLink } from "@trpc/client";
import superjson from "superjson";
import { TRPCProvider, useTRPCClient } from "./client";
import type { AppRouter } from "@repro/trpc/server";
export function AppProviders({ children }: { children: React.ReactNode }) {
const [queryClient] = useState(() => new QueryClient({
defaultOptions: {
queries: {
staleTime: 5 * 60 * 1000, // 5 minutes
},
},
}));
const [trpcClient] = useState(() =>
// ❌ This may fail due to AppRouter procedures being typed as 'any'
// causing useTRPCClient to not have proper createClient method
useTRPCClient().createClient({
links: [
httpBatchLink({
url: "/api/trpc",
transformer: superjson,
}),
],
})
);
return (
<QueryClientProvider client={queryClient}>
<TRPCProvider client={trpcClient} queryClient={queryClient}>
{children}
</TRPCProvider>
</QueryClientProvider>
);
}
// Requires @tanstack/react-query to be installed in the consuming package or hoisted in the monorepo.
import type { QueryClient } from "@tanstack/react-query";
import { QueryClient as QueryClientImpl } from "@tanstack/react-query";
// Type declaration for browser environment
declare const window: any;
let client: QueryClient | null = null;
/**
* Returns a QueryClient instance. On the server, always returns a new instance. On the client, returns a singleton.
*/
export function getQueryClient(): QueryClient {
if (typeof window === "undefined") {
// SSR: always new instance
return new QueryClientImpl();
}
// CSR: singleton
if (!client) {
client = new QueryClientImpl();
}
return client;
}
export { QueryClientProvider } from "@tanstack/react-query";
import { z } from "zod";
import { createTRPCRouter, workspaceProcedure } from "../server/procedures.js";
export const fooRouter = createTRPCRouter({
list: workspaceProcedure.query(async ({ ctx }) => {
return ["foo1", "foo2", "foo3"];
}),
create: workspaceProcedure
.input(z.object({ name: z.string() }))
.mutation(async ({ ctx, input }) => {
return { id: "new-foo", name: input.name };
}),
});
import { appRouter, createTRPCContext, fetchRequestHandler } from '@repro/trpc/server';
const handler = (req: Request) =>
fetchRequestHandler({
endpoint: '/api/trpc',
req,
router: appRouter,
createContext: createTRPCContext,
});
export { handler as GET, handler as POST };
import { fooRouter } from "../routers/requests.js";
import { barRouter } from "../routers/bar.js";
import { createTRPCRouter } from "./procedures.js";
export const appRouter = createTRPCRouter({
foo: fooRouter,
bar: barRouter,
});
export type AppRouter = typeof appRouter;
'use client';
import { createTRPCContext } from '@trpc/tanstack-react-query';
import type { AppRouter } from '@repro/trpc/server';
export const {useTRPC} = createTRPCContext<AppRouter>();
{
"compilerOptions": {
"target": "ES2020",
"lib": ["ES2020"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": false,
"esModuleInterop": true,
"module": "ESNext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"declaration": true,
"outDir": "dist"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
{
"$schema": "https://turbo.build/schema.json",
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**"]
},
"check": {
"dependsOn": ["^build"]
}
}
}
import { useTRPC } from "@/lib/trpc";
import { useQuery, useMutation } from "@tanstack/react-query";
export function useFoo() {
const trpc = useTRPC()
// ❌ Property 'queryOptions' does not exist on type 'DecoratedQuery<...>'
const { data, isLoading, error } = useQuery(
trpc.foo.list.queryOptions({}, {
staleTime: 5 * 60 * 1000,
}),
);
// ❌ Property 'mutationOptions' does not exist on type 'DecoratedMutation<...>'
const { mutateAsync: createRequestMutation } = useMutation(
trpc.foo.create.mutationOptions({}),
);
return {
data,
isLoading,
error,
createRequest: createRequestMutation,
};
}
import { useQuery, useMutation } from "@tanstack/react-query";
import { useTRPC } from "../lib/trpc/client";
export function useFoo() {
const utils = useTRPC();
// ❌ TypeScript Error: Property 'queryOptions' does not exist on type
// 'DecoratedRouterRecord<{ ctx: TRPCContext; meta: object; errorShape: {...}; }>'
// OR 'DecorateMutationProcedure<{ input: any; output: any; transformer: true; errorShape: {...}; }>'
const { data, isLoading, error } = useQuery(
utils.foo.list.queryOptions({}),
);
// ❌ TypeScript Error: Property 'mutationOptions' does not exist on type
// 'DecoratedRouterRecord<{ ctx: TRPCContext; meta: object; errorShape: {...}; }>'
// OR 'DecorateQueryProcedure<{ input: any; output: any; transformer: true; errorShape: {...}; }>'
const { mutateAsync: createFoo } = useMutation(
utils.foo.create.mutationOptions({}),
);
return {
data,
isLoading,
error,
createFoo,
};
}
export function useBar() {
const utils = useTRPC();
// ❌ Same errors with bar router
const getBar = (id: string) => useQuery(
utils.bar.get.queryOptions({ id }),
);
const { mutateAsync: updateBar } = useMutation(
utils.bar.update.mutationOptions({}),
);
return {
getBar,
updateBar,
};
}
import { createTRPCContext } from '@trpc/tanstack-react-query';
export const {
useTRPC
} = createTRPCContext()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment