@trpc/server 11.0.0-rc.753 → 11.0.0-rc.754
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.
|
@@ -6,7 +6,7 @@ experimental_standaloneMiddleware, experimental_standaloneMiddleware as experime
|
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated use `tracked(id, data)` instead
|
|
8
8
|
*/
|
|
9
|
-
sse, tracked, type TrackedEnvelope, isTrackedEnvelope, lazy as experimental_lazy, } from '../../unstable-core-do-not-import';
|
|
9
|
+
sse, tracked, type TrackedEnvelope, isTrackedEnvelope, lazy as experimental_lazy, callProcedure as callTRPCProcedure, } from '../../unstable-core-do-not-import';
|
|
10
10
|
export type {
|
|
11
11
|
/**
|
|
12
12
|
* @deprecated use `AnyTRPCProcedure` instead
|
|
@@ -52,11 +52,7 @@ export {
|
|
|
52
52
|
/**
|
|
53
53
|
* @deprecated use `getTRPCErrorShape` instead
|
|
54
54
|
*/
|
|
55
|
-
getErrorShape,
|
|
56
|
-
/**
|
|
57
|
-
* @deprecated use `callTRPCProcedure` instead
|
|
58
|
-
*/
|
|
59
|
-
callProcedure, } from '../../unstable-core-do-not-import';
|
|
55
|
+
getErrorShape, } from '../../unstable-core-do-not-import';
|
|
60
56
|
/**
|
|
61
57
|
* @deprecated
|
|
62
58
|
* Use `Awaited<ReturnType<typeof myFunction>>` instead
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/@trpc/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS;AACT;;GAEG;AACH,iCAAiC,EACjC,iCAAiC,IAAI,2BAA2B,EAChE,QAAQ,EAER,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,IAAI,mBAAmB,EACtC,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,oCAAoC,EACzC,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB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[
|
|
6
6
|
{
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
{
|
|
21
21
|
"id": "/src/adapters/ws.ts",
|
|
22
22
|
"size": 20148,
|
|
23
|
-
"origSize":
|
|
23
|
+
"origSize": 15935,
|
|
24
24
|
"renderedExports": [
|
|
25
25
|
"getWSConnectionHandler",
|
|
26
26
|
"handleKeepAlive",
|
|
@@ -360,10 +360,10 @@
|
|
|
360
360
|
"/src/unstable-core-do-not-import/router.ts",
|
|
361
361
|
"/src/unstable-core-do-not-import/transformer.ts",
|
|
362
362
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
363
|
-
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
364
363
|
"/src/unstable-core-do-not-import/http/contentType.ts",
|
|
365
364
|
"/src/unstable-core-do-not-import/http/abortError.ts",
|
|
366
365
|
"/src/unstable-core-do-not-import/procedureBuilder.ts",
|
|
366
|
+
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
367
367
|
"/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
368
368
|
"/src/unstable-core-do-not-import/stream/sse.ts"
|
|
369
369
|
],
|
|
@@ -882,19 +882,27 @@
|
|
|
882
882
|
"reduction": 100
|
|
883
883
|
},
|
|
884
884
|
{
|
|
885
|
-
"id": "/src/
|
|
885
|
+
"id": "/src/unstable-core-do-not-import.ts",
|
|
886
886
|
"size": 0,
|
|
887
|
-
"origSize":
|
|
887
|
+
"origSize": 2584,
|
|
888
888
|
"renderedExports": [],
|
|
889
889
|
"removedExports": [],
|
|
890
|
-
"dependents": [
|
|
890
|
+
"dependents": [
|
|
891
|
+
"/src/adapters/express.ts",
|
|
892
|
+
"/src/adapters/next.ts",
|
|
893
|
+
"/src/adapters/standalone.ts",
|
|
894
|
+
"/src/adapters/ws.ts",
|
|
895
|
+
"/src/adapters/node-http/nodeHTTPRequestHandler.ts",
|
|
896
|
+
"/src/adapters/next-app-dir/nextAppDirCaller.ts",
|
|
897
|
+
"/src/adapters/node-http/writeResponse.ts"
|
|
898
|
+
],
|
|
891
899
|
"percent": 0,
|
|
892
900
|
"reduction": 100
|
|
893
901
|
},
|
|
894
902
|
{
|
|
895
|
-
"id": "/src/
|
|
903
|
+
"id": "/src/rpc.ts",
|
|
896
904
|
"size": 0,
|
|
897
|
-
"origSize":
|
|
905
|
+
"origSize": 36,
|
|
898
906
|
"renderedExports": [],
|
|
899
907
|
"removedExports": [],
|
|
900
908
|
"dependents": [],
|
|
@@ -902,20 +910,12 @@
|
|
|
902
910
|
"reduction": 100
|
|
903
911
|
},
|
|
904
912
|
{
|
|
905
|
-
"id": "/src/
|
|
913
|
+
"id": "/src/shared.ts",
|
|
906
914
|
"size": 0,
|
|
907
|
-
"origSize":
|
|
915
|
+
"origSize": 653,
|
|
908
916
|
"renderedExports": [],
|
|
909
917
|
"removedExports": [],
|
|
910
|
-
"dependents": [
|
|
911
|
-
"/src/adapters/express.ts",
|
|
912
|
-
"/src/adapters/next.ts",
|
|
913
|
-
"/src/adapters/standalone.ts",
|
|
914
|
-
"/src/adapters/ws.ts",
|
|
915
|
-
"/src/adapters/node-http/nodeHTTPRequestHandler.ts",
|
|
916
|
-
"/src/adapters/next-app-dir/nextAppDirCaller.ts",
|
|
917
|
-
"/src/adapters/node-http/writeResponse.ts"
|
|
918
|
-
],
|
|
918
|
+
"dependents": [],
|
|
919
919
|
"percent": 0,
|
|
920
920
|
"reduction": 100
|
|
921
921
|
},
|
|
@@ -941,16 +941,6 @@
|
|
|
941
941
|
"percent": 0,
|
|
942
942
|
"reduction": 100
|
|
943
943
|
},
|
|
944
|
-
{
|
|
945
|
-
"id": "/src/adapters/fetch/index.ts",
|
|
946
|
-
"size": 0,
|
|
947
|
-
"origSize": 64,
|
|
948
|
-
"renderedExports": [],
|
|
949
|
-
"removedExports": [],
|
|
950
|
-
"dependents": [],
|
|
951
|
-
"percent": 0,
|
|
952
|
-
"reduction": 100
|
|
953
|
-
},
|
|
954
944
|
{
|
|
955
945
|
"id": "/src/adapters/fastify/index.ts",
|
|
956
946
|
"size": 0,
|
|
@@ -976,6 +966,16 @@
|
|
|
976
966
|
],
|
|
977
967
|
"percent": 0,
|
|
978
968
|
"reduction": 100
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
"id": "/src/adapters/fetch/index.ts",
|
|
972
|
+
"size": 0,
|
|
973
|
+
"origSize": 64,
|
|
974
|
+
"renderedExports": [],
|
|
975
|
+
"removedExports": [],
|
|
976
|
+
"dependents": [],
|
|
977
|
+
"percent": 0,
|
|
978
|
+
"reduction": 100
|
|
979
979
|
}
|
|
980
980
|
],
|
|
981
981
|
"moduleCount": 63
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ exports.createTRPCFlatProxy = createProxy.createFlatProxy;
|
|
|
19
19
|
exports.getErrorShape = getErrorShape.getErrorShape;
|
|
20
20
|
exports.TRPCError = TRPCError.TRPCError;
|
|
21
21
|
exports.getTRPCErrorFromUnknown = TRPCError.getTRPCErrorFromUnknown;
|
|
22
|
-
exports.
|
|
22
|
+
exports.callTRPCProcedure = router.callProcedure;
|
|
23
23
|
exports.experimental_lazy = router.lazy;
|
|
24
24
|
exports.isTrackedEnvelope = tracked.isTrackedEnvelope;
|
|
25
25
|
exports.sse = tracked.sse;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { createFlatProxy as createTRPCFlatProxy } from './unstable-core-do-not-import/createProxy.mjs';
|
|
2
2
|
export { getErrorShape } from './unstable-core-do-not-import/error/getErrorShape.mjs';
|
|
3
3
|
export { TRPCError, getTRPCErrorFromUnknown } from './unstable-core-do-not-import/error/TRPCError.mjs';
|
|
4
|
-
export { callProcedure, lazy as experimental_lazy } from './unstable-core-do-not-import/router.mjs';
|
|
4
|
+
export { callProcedure as callTRPCProcedure, lazy as experimental_lazy } from './unstable-core-do-not-import/router.mjs';
|
|
5
5
|
import './vendor/unpromise/unpromise.mjs';
|
|
6
6
|
import './unstable-core-do-not-import/stream/utils/disposable.mjs';
|
|
7
7
|
export { isTrackedEnvelope, sse, tracked } from './unstable-core-do-not-import/stream/tracked.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/server",
|
|
3
|
-
"version": "11.0.0-rc.
|
|
3
|
+
"version": "11.0.0-rc.754+9e15916e9",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -152,5 +152,5 @@
|
|
|
152
152
|
"peerDependencies": {
|
|
153
153
|
"typescript": ">=5.7.2"
|
|
154
154
|
},
|
|
155
|
-
"gitHead": "
|
|
155
|
+
"gitHead": "9e15916e9fc26a08c9936c4c706e996321d42958"
|
|
156
156
|
}
|
|
@@ -44,6 +44,7 @@ export {
|
|
|
44
44
|
type TrackedEnvelope,
|
|
45
45
|
isTrackedEnvelope,
|
|
46
46
|
lazy as experimental_lazy,
|
|
47
|
+
callProcedure as callTRPCProcedure,
|
|
47
48
|
} from '../../unstable-core-do-not-import';
|
|
48
49
|
|
|
49
50
|
export type {
|
|
@@ -97,11 +98,6 @@ export {
|
|
|
97
98
|
* @deprecated use `getTRPCErrorShape` instead
|
|
98
99
|
*/
|
|
99
100
|
getErrorShape,
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @deprecated use `callTRPCProcedure` instead
|
|
103
|
-
*/
|
|
104
|
-
callProcedure,
|
|
105
101
|
} from '../../unstable-core-do-not-import';
|
|
106
102
|
|
|
107
103
|
/**
|
package/src/adapters/ws.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type {
|
|
|
6
6
|
inferRouterContext,
|
|
7
7
|
} from '../@trpc/server';
|
|
8
8
|
import {
|
|
9
|
-
|
|
9
|
+
callTRPCProcedure,
|
|
10
10
|
getErrorShape,
|
|
11
11
|
getTRPCErrorFromUnknown,
|
|
12
12
|
transformTRPCResponse,
|
|
@@ -218,7 +218,7 @@ export function getWSConnectionHandler<TRouter extends AnyRouter>(
|
|
|
218
218
|
await ctxPromise; // asserts context has been set
|
|
219
219
|
|
|
220
220
|
const abortController = new AbortController();
|
|
221
|
-
const result = await
|
|
221
|
+
const result = await callTRPCProcedure({
|
|
222
222
|
router,
|
|
223
223
|
path,
|
|
224
224
|
getRawInput: async () => input,
|