@trpc/next 11.0.0-rc.359 → 11.0.0-rc.362
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/app-dir/server.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CreateContextCallback } from '@trpc/server';
|
|
1
2
|
import type { AnyProcedure, AnyRootTypes, AnyRouter, ErrorHandlerOptions, inferClientTypes, MaybePromise, RootConfig, Simplify, TRPCResponse } from '@trpc/server/unstable-core-do-not-import';
|
|
2
3
|
import type { ActionHandlerDef, CreateTRPCNextAppRouterOptions, inferActionDef } from './shared';
|
|
3
4
|
import type { NextAppDirDecorateRouterRecord } from './types';
|
|
@@ -8,11 +9,7 @@ export declare function experimental_createTRPCNextAppDirServer<TRouter extends
|
|
|
8
9
|
export type TRPCActionHandler<TDef extends ActionHandlerDef> = (input: FormData | TDef['input']) => Promise<TRPCResponse<TDef['output'], TDef['errorShape']>>;
|
|
9
10
|
export declare function experimental_createServerActionHandler<TInstance extends {
|
|
10
11
|
_config: RootConfig<AnyRootTypes>;
|
|
11
|
-
}>(t: TInstance, opts: (
|
|
12
|
-
createContext?: () => MaybePromise<TInstance['_config']['$types']['ctx']>;
|
|
13
|
-
} : {
|
|
14
|
-
createContext: () => MaybePromise<TInstance['_config']['$types']['ctx']>;
|
|
15
|
-
}) & {
|
|
12
|
+
}>(t: TInstance, opts: CreateContextCallback<TInstance['_config']['$types']['ctx'], () => MaybePromise<TInstance['_config']['$types']['ctx']>> & {
|
|
16
13
|
/**
|
|
17
14
|
* Transform form data to a `Record` before passing it to the procedure
|
|
18
15
|
* @default true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/app-dir/server.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EAEhB,YAAY,EACZ,UAAU,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/src/app-dir/server.ts",
|
|
20
20
|
"size": 4333,
|
|
21
|
-
"origSize":
|
|
21
|
+
"origSize": 6009,
|
|
22
22
|
"renderedExports": [
|
|
23
23
|
"experimental_createTRPCNextAppDirServer",
|
|
24
24
|
"experimental_createServerActionHandler",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"removedExports": [],
|
|
28
28
|
"dependents": [],
|
|
29
29
|
"percent": 18.4,
|
|
30
|
-
"reduction":
|
|
30
|
+
"reduction": 27.89
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"id": "/src/withTRPC.tsx",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/next",
|
|
3
|
-
"version": "11.0.0-rc.
|
|
3
|
+
"version": "11.0.0-rc.362+01bb2eade",
|
|
4
4
|
"description": "The tRPC Next.js library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
],
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"@tanstack/react-query": "^5.25.0",
|
|
76
|
-
"@trpc/client": "11.0.0-rc.
|
|
77
|
-
"@trpc/react-query": "11.0.0-rc.
|
|
78
|
-
"@trpc/server": "11.0.0-rc.
|
|
76
|
+
"@trpc/client": "11.0.0-rc.362+01bb2eade",
|
|
77
|
+
"@trpc/react-query": "11.0.0-rc.362+01bb2eade",
|
|
78
|
+
"@trpc/server": "11.0.0-rc.362+01bb2eade",
|
|
79
79
|
"next": "*",
|
|
80
80
|
"react": ">=16.8.0",
|
|
81
81
|
"react-dom": ">=16.8.0"
|
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@tanstack/react-query": "^5.25.0",
|
|
93
|
-
"@trpc/client": "11.0.0-rc.
|
|
94
|
-
"@trpc/react-query": "11.0.0-rc.
|
|
95
|
-
"@trpc/server": "11.0.0-rc.
|
|
93
|
+
"@trpc/client": "11.0.0-rc.362+01bb2eade",
|
|
94
|
+
"@trpc/react-query": "11.0.0-rc.362+01bb2eade",
|
|
95
|
+
"@trpc/server": "11.0.0-rc.362+01bb2eade",
|
|
96
96
|
"@types/express": "^4.17.17",
|
|
97
97
|
"@types/node": "^20.10.0",
|
|
98
98
|
"@types/react": "^18.3.0",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"funding": [
|
|
113
113
|
"https://trpc.io/sponsor"
|
|
114
114
|
],
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "01bb2eadebe880a91f31192b2d4e16bfd679d99a"
|
|
116
116
|
}
|
package/src/app-dir/server.ts
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
clientCallTypeToProcedureType,
|
|
4
4
|
createTRPCUntypedClient,
|
|
5
5
|
} from '@trpc/client';
|
|
6
|
+
import type { CreateContextCallback } from '@trpc/server';
|
|
6
7
|
import type {
|
|
7
8
|
AnyProcedure,
|
|
8
9
|
AnyRootTypes,
|
|
@@ -89,17 +90,10 @@ export function experimental_createServerActionHandler<
|
|
|
89
90
|
},
|
|
90
91
|
>(
|
|
91
92
|
t: TInstance,
|
|
92
|
-
opts:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
>;
|
|
97
|
-
}
|
|
98
|
-
: {
|
|
99
|
-
createContext: () => MaybePromise<
|
|
100
|
-
TInstance['_config']['$types']['ctx']
|
|
101
|
-
>;
|
|
102
|
-
}) & {
|
|
93
|
+
opts: CreateContextCallback<
|
|
94
|
+
TInstance['_config']['$types']['ctx'],
|
|
95
|
+
() => MaybePromise<TInstance['_config']['$types']['ctx']>
|
|
96
|
+
> & {
|
|
103
97
|
/**
|
|
104
98
|
* Transform form data to a `Record` before passing it to the procedure
|
|
105
99
|
* @default true
|