@stryke/trpc-next 0.5.9 → 0.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/action-handler.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ import type { BaseContext } from "./types";
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function createTRPCServerActionHandler<TInstance extends {
|
|
12
12
|
_config: RootConfig<AnyRootTypes>;
|
|
13
|
-
}, TContext extends BaseContext = BaseContext>(cookies: () => Promise<ReadonlyRequestCookies>, t: TInstance, createContext?: () => MaybePromise<TContext>): <TProc extends import("@trpc/server/unstable-core-do-not-import").AnyProcedure>(proc: TProc) => import("@trpc/next/
|
|
14
|
-
input: import("@trpc/server/unstable-core-do-not-import").inferProcedureInput<TProc>;
|
|
15
|
-
output: import("@trpc/server/unstable-core-do-not-import").inferProcedureOutput<TProc>;
|
|
16
|
-
errorShape: import("@trpc/server/unstable-core-do-not-import").inferClientTypes<TInstance>["errorShape"];
|
|
13
|
+
}, TContext extends BaseContext = BaseContext>(cookies: () => Promise<ReadonlyRequestCookies>, t: TInstance, createContext?: () => MaybePromise<TContext>): <TProc extends import("@trpc/server/dist/unstable-core-do-not-import.d-BJCeJk5P.d.cts").AnyProcedure>(proc: TProc) => import("@trpc/next/dist/server.d-DLnegS7F.d.cts").TRPCActionHandler<{
|
|
14
|
+
input: import("@trpc/server/dist/unstable-core-do-not-import.d-BJCeJk5P.d.cts").inferProcedureInput<TProc>;
|
|
15
|
+
output: import("@trpc/server/dist/unstable-core-do-not-import.d-BJCeJk5P.d.cts").inferProcedureOutput<TProc>;
|
|
16
|
+
errorShape: import("@trpc/server/dist/unstable-core-do-not-import.d-BJCeJk5P.d.cts").inferClientTypes<TInstance>["errorShape"];
|
|
17
17
|
}>;
|
package/dist/server.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { MaybePromise } from "@stryke/types";
|
|
|
2
2
|
import type { Resolver } from "@trpc/client";
|
|
3
3
|
import type { AnyTRPCRouter, inferRouterContext } from "@trpc/server";
|
|
4
4
|
import type { AnyProcedure, AnyRootTypes, inferProcedureInput, inferTransformedProcedureOutput, ProcedureType, RouterRecord } from "@trpc/server/unstable-core-do-not-import";
|
|
5
|
-
import type { ResolverDef } from "@trpc/tanstack-react-query";
|
|
5
|
+
import type { FeatureFlags, ResolverDef } from "@trpc/tanstack-react-query";
|
|
6
6
|
import type { ReadonlyRequestCookies } from "next/dist/server/web/spec-extension/adapters/request-cookies";
|
|
7
7
|
export type DecorateProcedureServer<TType extends ProcedureType, TDef extends ResolverDef> = TType extends "query" ? {
|
|
8
8
|
query: Resolver<TDef>;
|
|
@@ -23,6 +23,7 @@ export type NextAppDirDecorateRouterRecord<TRoot extends AnyRootTypes, TRecord e
|
|
|
23
23
|
output: inferTransformedProcedureOutput<TRoot, $Value>;
|
|
24
24
|
errorShape: TRoot["errorShape"];
|
|
25
25
|
transformer: TRoot["transformer"];
|
|
26
|
+
featureFlags: FeatureFlags;
|
|
26
27
|
}> : $Value extends RouterRecord ? NextAppDirDecorateRouterRecord<TRoot, $Value> : never : never;
|
|
27
28
|
};
|
|
28
29
|
/**
|
package/dist/server.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loggerLink as n}from"@trpc/client";import{experimental_nextCacheLink as s}from"@trpc/next/app-dir/links/nextCache";import{experimental_createTRPCNextAppDirServer as u}from"@trpc/next/app-dir/server";import{transformer as
|
|
1
|
+
import{loggerLink as n}from"@trpc/client";import{experimental_nextCacheLink as s}from"@trpc/next/app-dir/links/nextCache";import{experimental_createTRPCNextAppDirServer as u}from"@trpc/next/app-dir/server";import{transformer as a}from"./shared";export function createTRPCServer(r,t,o=()=>({})){return u({config(){return{links:[n({enabled:e=>!0}),s({revalidate:5,router:t,transformer:a,createContext:async()=>{const e=await Promise.resolve(o());return e.headers??={},e.headers["x-trpc-source"]="rsc-invoke",e.headers.cookie=(await r()).toString(),e}})]}}})}export{experimental_notFound as notFound,experimental_redirect as redirect}from"@trpc/server/adapters/next-app-dir";
|
|
@@ -7,7 +7,9 @@ import type { AnyTRPCRouter } from "@trpc/server";
|
|
|
7
7
|
* @returns The TRPC Tanstack Query client
|
|
8
8
|
*/
|
|
9
9
|
export declare function createTRPCTanstackQueryClient<TRouter extends AnyTRPCRouter>(baseUrl: string | StormURLInterface, queryClient: QueryClient): {
|
|
10
|
-
useTRPCTanstackQuery: () => import("@trpc/tanstack-react-query").TRPCOptionsProxy<TRouter
|
|
10
|
+
useTRPCTanstackQuery: () => import("@trpc/tanstack-react-query").TRPCOptionsProxy<TRouter, {
|
|
11
|
+
keyPrefix: false;
|
|
12
|
+
}>;
|
|
11
13
|
TRPCTanstackQueryProvider: (props: {
|
|
12
14
|
children: React.ReactNode;
|
|
13
15
|
}) => import("react").JSX.Element;
|
|
@@ -13,7 +13,9 @@ import "server-only";
|
|
|
13
13
|
* @returns The TRPC Tanstack Query server
|
|
14
14
|
*/
|
|
15
15
|
export declare function createTRPCTanstackQueryServer<TRouter extends AnyTRPCRouter, TContext extends inferRouterContext<TRouter> = inferRouterContext<TRouter>>(headers: () => Promise<Headers>, router: TRouter, createContext?: () => MaybePromise<TContext>, queryClientConfig?: Partial<QueryClientConfig>): {
|
|
16
|
-
trpc: import("@trpc/tanstack-react-query").TRPCOptionsProxy<TRouter
|
|
16
|
+
trpc: import("@trpc/tanstack-react-query").TRPCOptionsProxy<TRouter, {
|
|
17
|
+
keyPrefix: false;
|
|
18
|
+
}>;
|
|
17
19
|
HydrateClient: (props: {
|
|
18
20
|
children: React.ReactNode;
|
|
19
21
|
}) => any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stryke/trpc-next",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package to help in using tRPC in modern NextJs applications.",
|
|
6
6
|
"repository": {
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
},
|
|
11
11
|
"private": false,
|
|
12
12
|
"peerDependencies": {
|
|
13
|
-
"react": "^19.
|
|
14
|
-
"react-dom": "^19.
|
|
15
|
-
"react-native": "^0.77.
|
|
13
|
+
"react": "^19.2.0",
|
|
14
|
+
"react-dom": "^19.2.0",
|
|
15
|
+
"react-native": "^0.77.3"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"react": { "optional": false },
|
|
@@ -20,23 +20,23 @@
|
|
|
20
20
|
"react-native": { "optional": true }
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@js-temporal/polyfill": "^0.5.
|
|
24
|
-
"@tanstack/react-query": "^5.
|
|
25
|
-
"@trpc/client": "
|
|
26
|
-
"@trpc/next": "
|
|
27
|
-
"@trpc/server": "
|
|
28
|
-
"@trpc/tanstack-react-query": "
|
|
23
|
+
"@js-temporal/polyfill": "^0.5.1",
|
|
24
|
+
"@tanstack/react-query": "^5.90.7",
|
|
25
|
+
"@trpc/client": "^11.7.1",
|
|
26
|
+
"@trpc/next": "^11.7.1",
|
|
27
|
+
"@trpc/server": "^11.7.1",
|
|
28
|
+
"@trpc/tanstack-react-query": "^11.7.1",
|
|
29
29
|
"defu": "^6.1.4",
|
|
30
30
|
"server-only": "^0.0.1",
|
|
31
31
|
"superjson": "2.2.2",
|
|
32
|
-
"@stryke/env": "^0.
|
|
33
|
-
"@stryke/path": "^0.
|
|
34
|
-
"@stryke/types": "^0.
|
|
35
|
-
"@stryke/url": "^0.2.
|
|
32
|
+
"@stryke/env": "^0.20.11",
|
|
33
|
+
"@stryke/path": "^0.18.5",
|
|
34
|
+
"@stryke/types": "^0.10.0",
|
|
35
|
+
"@stryke/url": "^0.2.4"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@types/react": "^19.
|
|
39
|
-
"@types/react-dom": "^19.
|
|
38
|
+
"@types/react": "^19.2.2",
|
|
39
|
+
"@types/react-dom": "^19.2.2",
|
|
40
40
|
"@types/react-native": "0.72.8"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": { "access": "public" },
|
|
@@ -322,5 +322,5 @@
|
|
|
322
322
|
"main": "./dist/index.cjs",
|
|
323
323
|
"module": "./dist/index.mjs",
|
|
324
324
|
"types": "./dist/index.d.ts",
|
|
325
|
-
"gitHead": "
|
|
325
|
+
"gitHead": "906d6304c09a8964297fa784f96377535fca6769"
|
|
326
326
|
}
|