@trpc/next 11.0.0-rc.348 → 11.0.0-rc.351
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,4 +1,3 @@
|
|
|
1
|
-
import type { CreateContextCallback } from '@trpc/server';
|
|
2
1
|
import type { AnyProcedure, AnyRootTypes, AnyRouter, ErrorHandlerOptions, inferClientTypes, MaybePromise, RootConfig, Simplify, TRPCResponse } from '@trpc/server/unstable-core-do-not-import';
|
|
3
2
|
import type { ActionHandlerDef, CreateTRPCNextAppRouterOptions, inferActionDef } from './shared';
|
|
4
3
|
import type { NextAppDirDecorateRouterRecord } from './types';
|
|
@@ -9,7 +8,11 @@ export declare function experimental_createTRPCNextAppDirServer<TRouter extends
|
|
|
9
8
|
export type TRPCActionHandler<TDef extends ActionHandlerDef> = (input: FormData | TDef['input']) => Promise<TRPCResponse<TDef['output'], TDef['errorShape']>>;
|
|
10
9
|
export declare function experimental_createServerActionHandler<TInstance extends {
|
|
11
10
|
_config: RootConfig<AnyRootTypes>;
|
|
12
|
-
}>(t: TInstance, opts:
|
|
11
|
+
}>(t: TInstance, opts: (object extends TInstance['_config']['$types']['ctx'] ? {
|
|
12
|
+
createContext?: () => MaybePromise<TInstance['_config']['$types']['ctx']>;
|
|
13
|
+
} : {
|
|
14
|
+
createContext: () => MaybePromise<TInstance['_config']['$types']['ctx']>;
|
|
15
|
+
}) & {
|
|
13
16
|
/**
|
|
14
17
|
* Transform form data to a `Record` before passing it to the procedure
|
|
15
18
|
* @default true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/app-dir/server.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/app-dir/server.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,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,CAAC,KAC7D,IAAI,CAAC;IAEV;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,sCAaO,KAAK,KACV,kBACD,SAAS,eAAe,iBAAiB,SAAS,CAAC,EAAE,KAAK,CAAC,CAAC,CAC7D,CAmEF;AAGD,wBAAsB,+BAA+B,CAAC,GAAG,EAAE,OAAO,qBAiBjE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bundleSize": 23547,
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 38.
|
|
3
|
+
"bundleOrigSize": 38462,
|
|
4
|
+
"bundleReduction": 38.78,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/ssrPrepass.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
{
|
|
19
19
|
"id": "/src/app-dir/server.ts",
|
|
20
20
|
"size": 4333,
|
|
21
|
-
"origSize":
|
|
21
|
+
"origSize": 6110,
|
|
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": 29.08
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"id": "/src/withTRPC.tsx",
|
|
@@ -136,8 +136,8 @@
|
|
|
136
136
|
],
|
|
137
137
|
"dependents": [
|
|
138
138
|
"/src/app-dir/server.ts",
|
|
139
|
-
"/src/app-dir/links/nextHttp.ts",
|
|
140
139
|
"/src/app-dir/links/nextCache.ts",
|
|
140
|
+
"/src/app-dir/links/nextHttp.ts",
|
|
141
141
|
"/src/app-dir/create-action-hook.tsx"
|
|
142
142
|
],
|
|
143
143
|
"percent": 1.42,
|
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.351+a9b03d7f3",
|
|
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.351+a9b03d7f3",
|
|
77
|
+
"@trpc/react-query": "11.0.0-rc.351+a9b03d7f3",
|
|
78
|
+
"@trpc/server": "11.0.0-rc.351+a9b03d7f3",
|
|
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.351+a9b03d7f3",
|
|
94
|
+
"@trpc/react-query": "11.0.0-rc.351+a9b03d7f3",
|
|
95
|
+
"@trpc/server": "11.0.0-rc.351+a9b03d7f3",
|
|
96
96
|
"@types/express": "^4.17.17",
|
|
97
97
|
"@types/node": "^20.10.0",
|
|
98
98
|
"@types/react": "^18.2.33",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"funding": [
|
|
113
113
|
"https://trpc.io/sponsor"
|
|
114
114
|
],
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "a9b03d7f3b6d6b4cf17ba4bff8e19767d26c31a4"
|
|
116
116
|
}
|
package/src/app-dir/server.ts
CHANGED
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
clientCallTypeToProcedureType,
|
|
4
4
|
createTRPCUntypedClient,
|
|
5
5
|
} from '@trpc/client';
|
|
6
|
-
import type { CreateContextCallback } from '@trpc/server';
|
|
7
6
|
import type {
|
|
8
7
|
AnyProcedure,
|
|
9
8
|
AnyRootTypes,
|
|
@@ -90,10 +89,17 @@ export function experimental_createServerActionHandler<
|
|
|
90
89
|
},
|
|
91
90
|
>(
|
|
92
91
|
t: TInstance,
|
|
93
|
-
opts:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
opts: (object extends TInstance['_config']['$types']['ctx']
|
|
93
|
+
? {
|
|
94
|
+
createContext?: () => MaybePromise<
|
|
95
|
+
TInstance['_config']['$types']['ctx']
|
|
96
|
+
>;
|
|
97
|
+
}
|
|
98
|
+
: {
|
|
99
|
+
createContext: () => MaybePromise<
|
|
100
|
+
TInstance['_config']['$types']['ctx']
|
|
101
|
+
>;
|
|
102
|
+
}) & {
|
|
97
103
|
/**
|
|
98
104
|
* Transform form data to a `Record` before passing it to the procedure
|
|
99
105
|
* @default true
|