@trpc/server 11.0.0-alpha-tmp-export-from-main-nuke-core.236 → 11.0.0-alpha-tmp-export-from-main.217
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/@trpc-core-unstable-do-not-import-this-please.d.ts +10 -0
- package/dist/@trpc-core-unstable-do-not-import-this-please.d.ts.map +1 -0
- package/dist/@trpc-server/http.d.ts +2 -0
- package/dist/@trpc-server/http.d.ts.map +1 -0
- package/dist/adapters/aws-lambda/index.d.ts +2 -1
- package/dist/adapters/aws-lambda/index.d.ts.map +1 -1
- package/dist/adapters/aws-lambda/index.js +4 -6
- package/dist/adapters/aws-lambda/index.mjs +2 -4
- package/dist/adapters/aws-lambda/utils.d.ts +3 -2
- package/dist/adapters/aws-lambda/utils.d.ts.map +1 -1
- package/dist/adapters/aws-lambda/utils.js +4 -5
- package/dist/adapters/aws-lambda/utils.mjs +2 -3
- package/dist/adapters/express.d.ts +2 -1
- package/dist/adapters/express.d.ts.map +1 -1
- package/dist/adapters/fastify/fastifyRequestHandler.d.ts +2 -2
- package/dist/adapters/fastify/fastifyRequestHandler.d.ts.map +1 -1
- package/dist/adapters/fastify/fastifyRequestHandler.js +3 -6
- package/dist/adapters/fastify/fastifyRequestHandler.mjs +1 -4
- package/dist/adapters/fastify/fastifyTRPCPlugin.d.ts +2 -1
- package/dist/adapters/fastify/fastifyTRPCPlugin.d.ts.map +1 -1
- package/dist/adapters/fastify/fastifyTRPCPlugin.js +1 -0
- package/dist/adapters/fastify/fastifyTRPCPlugin.mjs +1 -0
- package/dist/adapters/fetch/fetchRequestHandler.d.ts +2 -1
- package/dist/adapters/fetch/fetchRequestHandler.d.ts.map +1 -1
- package/dist/adapters/fetch/fetchRequestHandler.js +4 -6
- package/dist/adapters/fetch/fetchRequestHandler.mjs +2 -4
- package/dist/adapters/fetch/types.d.ts +3 -2
- package/dist/adapters/fetch/types.d.ts.map +1 -1
- package/dist/adapters/next.d.ts +2 -1
- package/dist/adapters/next.d.ts.map +1 -1
- package/dist/adapters/next.js +4 -6
- package/dist/adapters/next.mjs +2 -4
- package/dist/adapters/node-http/content-type/json/getPostBody.d.ts +1 -1
- package/dist/adapters/node-http/content-type/json/getPostBody.d.ts.map +1 -1
- package/dist/adapters/node-http/content-type/json/getPostBody.js +2 -4
- package/dist/adapters/node-http/content-type/json/getPostBody.mjs +1 -3
- package/dist/adapters/node-http/content-type/json/index.js +2 -4
- package/dist/adapters/node-http/content-type/json/index.mjs +1 -3
- package/dist/adapters/node-http/internals/contentType.d.ts +2 -2
- package/dist/adapters/node-http/internals/contentType.d.ts.map +1 -1
- package/dist/adapters/node-http/nodeHTTPRequestHandler.d.ts +2 -1
- package/dist/adapters/node-http/nodeHTTPRequestHandler.d.ts.map +1 -1
- package/dist/adapters/node-http/nodeHTTPRequestHandler.js +4 -6
- package/dist/adapters/node-http/nodeHTTPRequestHandler.mjs +2 -4
- package/dist/adapters/node-http/types.d.ts +4 -3
- package/dist/adapters/node-http/types.d.ts.map +1 -1
- package/dist/adapters/standalone.d.ts +2 -1
- package/dist/adapters/standalone.d.ts.map +1 -1
- package/dist/adapters/standalone.js +0 -1
- package/dist/adapters/standalone.mjs +0 -1
- package/dist/adapters/ws.d.ts +2 -3
- package/dist/adapters/ws.d.ts.map +1 -1
- package/dist/adapters/ws.js +26 -33
- package/dist/adapters/ws.mjs +1 -8
- package/dist/http.d.ts +6 -1
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +21 -11
- package/dist/http.mjs +1 -6
- package/dist/index.d.ts +68 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -18
- package/dist/index.mjs +1 -8
- package/dist/observable.d.ts +3 -0
- package/dist/observable.d.ts.map +1 -0
- package/dist/observable.js +30 -0
- package/dist/observable.mjs +1 -0
- package/dist/rpc.d.ts +2 -1
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +13 -6
- package/dist/rpc.mjs +1 -3
- package/dist/shared.d.ts +1 -1
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +9 -6
- package/dist/shared.mjs +1 -4
- package/package.json +125 -53
- package/src/@trpc-core-unstable-do-not-import-this-please.ts +146 -0
- package/src/@trpc-server/http.ts +2 -0
- package/src/adapters/aws-lambda/index.ts +5 -4
- package/src/adapters/aws-lambda/utils.ts +4 -3
- package/src/adapters/express.ts +3 -1
- package/src/adapters/fastify/fastifyRequestHandler.ts +4 -6
- package/src/adapters/fastify/fastifyTRPCPlugin.ts +2 -1
- package/src/adapters/fetch/fetchRequestHandler.ts +4 -6
- package/src/adapters/fetch/types.ts +3 -2
- package/src/adapters/next.ts +3 -2
- package/src/adapters/node-http/content-type/form-data/index.ts +1 -1
- package/src/adapters/node-http/content-type/json/getPostBody.ts +2 -2
- package/src/adapters/node-http/content-type/json/index.ts +1 -1
- package/src/adapters/node-http/internals/contentType.ts +2 -2
- package/src/adapters/node-http/nodeHTTPRequestHandler.ts +4 -6
- package/src/adapters/node-http/types.ts +5 -4
- package/src/adapters/standalone.ts +2 -2
- package/src/adapters/ws.ts +13 -14
- package/src/http.ts +26 -1
- package/src/index.ts +105 -1
- package/src/observable.ts +16 -0
- package/src/rpc.ts +26 -1
- package/src/shared.ts +1 -1
- package/dist/@trpc/server/http.d.ts +0 -7
- package/dist/@trpc/server/http.d.ts.map +0 -1
- package/dist/@trpc/server/index.d.ts +0 -69
- package/dist/@trpc/server/index.d.ts.map +0 -1
- package/dist/@trpc/server/rpc.d.ts +0 -3
- package/dist/@trpc/server/rpc.d.ts.map +0 -1
- package/dist/bundle-analysis.json +0 -757
- package/dist/observable/index.d.ts +0 -5
- package/dist/observable/index.d.ts.map +0 -1
- package/dist/observable/index.js +0 -13
- package/dist/observable/index.mjs +0 -2
- package/dist/observable/observable.d.ts +0 -13
- package/dist/observable/observable.d.ts.map +0 -1
- package/dist/observable/observable.js +0 -126
- package/dist/observable/observable.mjs +0 -122
- package/dist/observable/operators.d.ts +0 -8
- package/dist/observable/operators.d.ts.map +0 -1
- package/dist/observable/operators.js +0 -103
- package/dist/observable/operators.mjs +0 -99
- package/dist/observable/types.d.ts +0 -26
- package/dist/observable/types.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/TRPCInferrable.d.ts +0 -6
- package/dist/unstable-core-do-not-import/TRPCInferrable.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/createProxy.d.ts +0 -19
- package/dist/unstable-core-do-not-import/createProxy.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/createProxy.js +0 -52
- package/dist/unstable-core-do-not-import/createProxy.mjs +0 -49
- package/dist/unstable-core-do-not-import/error/TRPCError.d.ts +0 -13
- package/dist/unstable-core-do-not-import/error/TRPCError.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/error/TRPCError.js +0 -67
- package/dist/unstable-core-do-not-import/error/TRPCError.mjs +0 -63
- package/dist/unstable-core-do-not-import/error/formatter.d.ts +0 -33
- package/dist/unstable-core-do-not-import/error/formatter.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/error/formatter.js +0 -7
- package/dist/unstable-core-do-not-import/error/formatter.mjs +0 -5
- package/dist/unstable-core-do-not-import/error/getErrorShape.d.ts +0 -15
- package/dist/unstable-core-do-not-import/error/getErrorShape.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/error/getErrorShape.js +0 -31
- package/dist/unstable-core-do-not-import/error/getErrorShape.mjs +0 -29
- package/dist/unstable-core-do-not-import/http/batchStreamFormatter.d.ts +0 -24
- package/dist/unstable-core-do-not-import/http/batchStreamFormatter.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/http/batchStreamFormatter.js +0 -32
- package/dist/unstable-core-do-not-import/http/batchStreamFormatter.mjs +0 -30
- package/dist/unstable-core-do-not-import/http/contentType.d.ts +0 -29
- package/dist/unstable-core-do-not-import/http/contentType.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/http/contentType.js +0 -54
- package/dist/unstable-core-do-not-import/http/contentType.mjs +0 -52
- package/dist/unstable-core-do-not-import/http/getHTTPStatusCode.d.ts +0 -5
- package/dist/unstable-core-do-not-import/http/getHTTPStatusCode.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/http/getHTTPStatusCode.js +0 -51
- package/dist/unstable-core-do-not-import/http/getHTTPStatusCode.mjs +0 -48
- package/dist/unstable-core-do-not-import/http/index.d.ts +0 -7
- package/dist/unstable-core-do-not-import/http/index.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.d.ts +0 -51
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.js +0 -295
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.mjs +0 -293
- package/dist/unstable-core-do-not-import/http/types.d.ts +0 -96
- package/dist/unstable-core-do-not-import/http/types.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/index.d.ts +0 -37
- package/dist/unstable-core-do-not-import/index.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/index.js +0 -48
- package/dist/unstable-core-do-not-import/index.mjs +0 -16
- package/dist/unstable-core-do-not-import/initTRPC.d.ts +0 -96
- package/dist/unstable-core-do-not-import/initTRPC.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/initTRPC.js +0 -95
- package/dist/unstable-core-do-not-import/initTRPC.mjs +0 -93
- package/dist/unstable-core-do-not-import/middleware.d.ts +0 -105
- package/dist/unstable-core-do-not-import/middleware.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/middleware.js +0 -95
- package/dist/unstable-core-do-not-import/middleware.mjs +0 -89
- package/dist/unstable-core-do-not-import/parser.d.ts +0 -30
- package/dist/unstable-core-do-not-import/parser.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/parser.js +0 -37
- package/dist/unstable-core-do-not-import/parser.mjs +0 -35
- package/dist/unstable-core-do-not-import/procedure.d.ts +0 -72
- package/dist/unstable-core-do-not-import/procedure.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/procedure.js +0 -9
- package/dist/unstable-core-do-not-import/procedure.mjs +0 -7
- package/dist/unstable-core-do-not-import/procedureBuilder.d.ts +0 -101
- package/dist/unstable-core-do-not-import/procedureBuilder.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/procedureBuilder.js +0 -176
- package/dist/unstable-core-do-not-import/procedureBuilder.mjs +0 -173
- package/dist/unstable-core-do-not-import/rootConfig.d.ts +0 -75
- package/dist/unstable-core-do-not-import/rootConfig.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/rootConfig.js +0 -8
- package/dist/unstable-core-do-not-import/rootConfig.mjs +0 -6
- package/dist/unstable-core-do-not-import/router.d.ts +0 -85
- package/dist/unstable-core-do-not-import/router.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/router.js +0 -156
- package/dist/unstable-core-do-not-import/router.mjs +0 -151
- package/dist/unstable-core-do-not-import/rpc/codes.d.ts +0 -51
- package/dist/unstable-core-do-not-import/rpc/codes.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/rpc/codes.js +0 -38
- package/dist/unstable-core-do-not-import/rpc/codes.mjs +0 -35
- package/dist/unstable-core-do-not-import/rpc/envelopes.d.ts +0 -97
- package/dist/unstable-core-do-not-import/rpc/envelopes.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/rpc/index.d.ts +0 -5
- package/dist/unstable-core-do-not-import/rpc/index.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/rpc/parseTRPCMessage.d.ts +0 -5
- package/dist/unstable-core-do-not-import/rpc/parseTRPCMessage.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/rpc/parseTRPCMessage.js +0 -59
- package/dist/unstable-core-do-not-import/rpc/parseTRPCMessage.mjs +0 -57
- package/dist/unstable-core-do-not-import/serialize.d.ts +0 -62
- package/dist/unstable-core-do-not-import/serialize.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/transformer.d.ts +0 -107
- package/dist/unstable-core-do-not-import/transformer.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/transformer.js +0 -107
- package/dist/unstable-core-do-not-import/transformer.mjs +0 -102
- package/dist/unstable-core-do-not-import/types.d.ts +0 -98
- package/dist/unstable-core-do-not-import/types.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/utils.d.ts +0 -27
- package/dist/unstable-core-do-not-import/utils.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/utils.js +0 -44
- package/dist/unstable-core-do-not-import/utils.mjs +0 -39
- package/src/@trpc/server/http.ts +0 -26
- package/src/@trpc/server/index.ts +0 -105
- package/src/@trpc/server/rpc.ts +0 -26
- package/src/observable/index.ts +0 -10
- package/src/observable/observable.ts +0 -158
- package/src/observable/operators.ts +0 -119
- package/src/observable/types.ts +0 -76
- package/src/unstable-core-do-not-import/TRPCInferrable.ts +0 -9
- package/src/unstable-core-do-not-import/createProxy.ts +0 -59
- package/src/unstable-core-do-not-import/error/TRPCError.ts +0 -82
- package/src/unstable-core-do-not-import/error/formatter.ts +0 -51
- package/src/unstable-core-do-not-import/error/getErrorShape.ts +0 -36
- package/src/unstable-core-do-not-import/http/batchStreamFormatter.ts +0 -29
- package/src/unstable-core-do-not-import/http/contentType.ts +0 -99
- package/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts +0 -57
- package/src/unstable-core-do-not-import/http/index.ts +0 -23
- package/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts +0 -458
- package/src/unstable-core-do-not-import/http/types.ts +0 -111
- package/src/unstable-core-do-not-import/index.ts +0 -110
- package/src/unstable-core-do-not-import/initTRPC.ts +0 -206
- package/src/unstable-core-do-not-import/middleware.ts +0 -233
- package/src/unstable-core-do-not-import/parser.ts +0 -94
- package/src/unstable-core-do-not-import/procedure.ts +0 -108
- package/src/unstable-core-do-not-import/procedureBuilder.ts +0 -458
- package/src/unstable-core-do-not-import/rootConfig.ts +0 -90
- package/src/unstable-core-do-not-import/router.ts +0 -370
- package/src/unstable-core-do-not-import/rpc/codes.ts +0 -44
- package/src/unstable-core-do-not-import/rpc/envelopes.ts +0 -136
- package/src/unstable-core-do-not-import/rpc/index.ts +0 -21
- package/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts +0 -85
- package/src/unstable-core-do-not-import/serialize.ts +0 -122
- package/src/unstable-core-do-not-import/transformer.ts +0 -202
- package/src/unstable-core-do-not-import/types.ts +0 -151
- package/src/unstable-core-do-not-import/utils.ts +0 -59
- package/unstable-core-do-not-import/index.d.ts +0 -1
- package/unstable-core-do-not-import/index.js +0 -1
package/dist/rpc.mjs
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
export { TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER } from '
|
|
2
|
-
export { parseTRPCMessage } from './unstable-core-do-not-import/rpc/parseTRPCMessage.mjs';
|
|
3
|
-
import './unstable-core-do-not-import/rootConfig.mjs';
|
|
1
|
+
export { TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER, parseTRPCMessage } from '@trpc/core';
|
package/dist/shared.d.ts
CHANGED
|
@@ -22,5 +22,5 @@ getErrorShape,
|
|
|
22
22
|
/**
|
|
23
23
|
* @deprecated `import { createTRPCFlatProxy } from '@trpc/server'` instead
|
|
24
24
|
*/
|
|
25
|
-
createTRPCFlatProxy as createFlatProxy, } from '
|
|
25
|
+
createTRPCFlatProxy as createFlatProxy, } from '.';
|
|
26
26
|
//# sourceMappingURL=shared.d.ts.map
|
package/dist/shared.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA,OAAO;AACL;;GAEG;AACH,KAAK,mBAAmB;AACxB;;GAEG;AACH,KAAK,oBAAoB;AACzB;;GAEG;AACH,KAAK,+BAA+B;AACpC;;GAEG;AACH,KAAK,kCAAkC;AACvC;;GAEG;AACH,aAAa;AACb;;GAEG;AACH,mBAAmB,IAAI,eAAe,GACvC,MAAM,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA,OAAO;AACL;;GAEG;AACH,KAAK,mBAAmB;AACxB;;GAEG;AACH,KAAK,oBAAoB;AACzB;;GAEG;AACH,KAAK,+BAA+B;AACpC;;GAEG;AACH,KAAK,kCAAkC;AACvC;;GAEG;AACH,aAAa;AACb;;GAEG;AACH,mBAAmB,IAAI,eAAe,GACvC,MAAM,GAAG,CAAC"}
|
package/dist/shared.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var createProxy = require('./unstable-core-do-not-import/createProxy.js');
|
|
5
|
-
require('./unstable-core-do-not-import/rootConfig.js');
|
|
6
|
-
require('./unstable-core-do-not-import/rpc/codes.js');
|
|
3
|
+
var core = require('@trpc/core');
|
|
7
4
|
|
|
8
5
|
|
|
9
6
|
|
|
10
|
-
exports
|
|
11
|
-
|
|
7
|
+
Object.defineProperty(exports, "createFlatProxy", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return core.createFlatProxy; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "getErrorShape", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return core.getErrorShape; }
|
|
14
|
+
});
|
package/dist/shared.mjs
CHANGED
|
@@ -1,4 +1 @@
|
|
|
1
|
-
export { getErrorShape } from '
|
|
2
|
-
export { createFlatProxy } from './unstable-core-do-not-import/createProxy.mjs';
|
|
3
|
-
import './unstable-core-do-not-import/rootConfig.mjs';
|
|
4
|
-
import './unstable-core-do-not-import/rpc/codes.mjs';
|
|
1
|
+
export { createFlatProxy, getErrorShape } from '@trpc/core';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/server",
|
|
3
|
-
"version": "11.0.0-alpha-tmp-export-from-main
|
|
3
|
+
"version": "11.0.0-alpha-tmp-export-from-main.217+ef6ef3e1c",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,84 +24,154 @@
|
|
|
24
24
|
"exports": {
|
|
25
25
|
"./package.json": "./package.json",
|
|
26
26
|
".": {
|
|
27
|
-
"import":
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
"import": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"default": "./dist/index.mjs"
|
|
30
|
+
},
|
|
31
|
+
"require": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"default": "./dist/index.js"
|
|
34
|
+
}
|
|
30
35
|
},
|
|
31
36
|
"./adapters/aws-lambda": {
|
|
32
|
-
"import":
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
"import": {
|
|
38
|
+
"types": "./dist/adapters/aws-lambda/index.d.ts",
|
|
39
|
+
"default": "./dist/adapters/aws-lambda/index.mjs"
|
|
40
|
+
},
|
|
41
|
+
"require": {
|
|
42
|
+
"types": "./dist/adapters/aws-lambda/index.d.ts",
|
|
43
|
+
"default": "./dist/adapters/aws-lambda/index.js"
|
|
44
|
+
}
|
|
35
45
|
},
|
|
36
46
|
"./adapters/express": {
|
|
37
|
-
"import":
|
|
38
|
-
|
|
39
|
-
|
|
47
|
+
"import": {
|
|
48
|
+
"types": "./dist/adapters/express.d.ts",
|
|
49
|
+
"default": "./dist/adapters/express.mjs"
|
|
50
|
+
},
|
|
51
|
+
"require": {
|
|
52
|
+
"types": "./dist/adapters/express.d.ts",
|
|
53
|
+
"default": "./dist/adapters/express.js"
|
|
54
|
+
}
|
|
40
55
|
},
|
|
41
56
|
"./adapters/fastify": {
|
|
42
|
-
"import":
|
|
43
|
-
|
|
44
|
-
|
|
57
|
+
"import": {
|
|
58
|
+
"types": "./dist/adapters/fastify/index.d.ts",
|
|
59
|
+
"default": "./dist/adapters/fastify/index.mjs"
|
|
60
|
+
},
|
|
61
|
+
"require": {
|
|
62
|
+
"types": "./dist/adapters/fastify/index.d.ts",
|
|
63
|
+
"default": "./dist/adapters/fastify/index.js"
|
|
64
|
+
}
|
|
45
65
|
},
|
|
46
66
|
"./adapters/fetch": {
|
|
47
|
-
"import":
|
|
48
|
-
|
|
49
|
-
|
|
67
|
+
"import": {
|
|
68
|
+
"types": "./dist/adapters/fetch/index.d.ts",
|
|
69
|
+
"default": "./dist/adapters/fetch/index.mjs"
|
|
70
|
+
},
|
|
71
|
+
"require": {
|
|
72
|
+
"types": "./dist/adapters/fetch/index.d.ts",
|
|
73
|
+
"default": "./dist/adapters/fetch/index.js"
|
|
74
|
+
}
|
|
50
75
|
},
|
|
51
76
|
"./adapters/next": {
|
|
52
|
-
"import":
|
|
53
|
-
|
|
54
|
-
|
|
77
|
+
"import": {
|
|
78
|
+
"types": "./dist/adapters/next.d.ts",
|
|
79
|
+
"default": "./dist/adapters/next.mjs"
|
|
80
|
+
},
|
|
81
|
+
"require": {
|
|
82
|
+
"types": "./dist/adapters/next.d.ts",
|
|
83
|
+
"default": "./dist/adapters/next.js"
|
|
84
|
+
}
|
|
55
85
|
},
|
|
56
86
|
"./adapters/node-http/content-type/form-data": {
|
|
57
|
-
"import":
|
|
58
|
-
|
|
59
|
-
|
|
87
|
+
"import": {
|
|
88
|
+
"types": "./dist/adapters/node-http/content-type/form-data/index.d.ts",
|
|
89
|
+
"default": "./dist/adapters/node-http/content-type/form-data/index.mjs"
|
|
90
|
+
},
|
|
91
|
+
"require": {
|
|
92
|
+
"types": "./dist/adapters/node-http/content-type/form-data/index.d.ts",
|
|
93
|
+
"default": "./dist/adapters/node-http/content-type/form-data/index.js"
|
|
94
|
+
}
|
|
60
95
|
},
|
|
61
96
|
"./adapters/node-http/content-type/json": {
|
|
62
|
-
"import":
|
|
63
|
-
|
|
64
|
-
|
|
97
|
+
"import": {
|
|
98
|
+
"types": "./dist/adapters/node-http/content-type/json/index.d.ts",
|
|
99
|
+
"default": "./dist/adapters/node-http/content-type/json/index.mjs"
|
|
100
|
+
},
|
|
101
|
+
"require": {
|
|
102
|
+
"types": "./dist/adapters/node-http/content-type/json/index.d.ts",
|
|
103
|
+
"default": "./dist/adapters/node-http/content-type/json/index.js"
|
|
104
|
+
}
|
|
65
105
|
},
|
|
66
106
|
"./adapters/node-http": {
|
|
67
|
-
"import":
|
|
68
|
-
|
|
69
|
-
|
|
107
|
+
"import": {
|
|
108
|
+
"types": "./dist/adapters/node-http/index.d.ts",
|
|
109
|
+
"default": "./dist/adapters/node-http/index.mjs"
|
|
110
|
+
},
|
|
111
|
+
"require": {
|
|
112
|
+
"types": "./dist/adapters/node-http/index.d.ts",
|
|
113
|
+
"default": "./dist/adapters/node-http/index.js"
|
|
114
|
+
}
|
|
70
115
|
},
|
|
71
116
|
"./adapters/standalone": {
|
|
72
|
-
"import":
|
|
73
|
-
|
|
74
|
-
|
|
117
|
+
"import": {
|
|
118
|
+
"types": "./dist/adapters/standalone.d.ts",
|
|
119
|
+
"default": "./dist/adapters/standalone.mjs"
|
|
120
|
+
},
|
|
121
|
+
"require": {
|
|
122
|
+
"types": "./dist/adapters/standalone.d.ts",
|
|
123
|
+
"default": "./dist/adapters/standalone.js"
|
|
124
|
+
}
|
|
75
125
|
},
|
|
76
126
|
"./adapters/ws": {
|
|
77
|
-
"import":
|
|
78
|
-
|
|
79
|
-
|
|
127
|
+
"import": {
|
|
128
|
+
"types": "./dist/adapters/ws.d.ts",
|
|
129
|
+
"default": "./dist/adapters/ws.mjs"
|
|
130
|
+
},
|
|
131
|
+
"require": {
|
|
132
|
+
"types": "./dist/adapters/ws.d.ts",
|
|
133
|
+
"default": "./dist/adapters/ws.js"
|
|
134
|
+
}
|
|
80
135
|
},
|
|
81
136
|
"./http": {
|
|
82
|
-
"import":
|
|
83
|
-
|
|
84
|
-
|
|
137
|
+
"import": {
|
|
138
|
+
"types": "./dist/http.d.ts",
|
|
139
|
+
"default": "./dist/http.mjs"
|
|
140
|
+
},
|
|
141
|
+
"require": {
|
|
142
|
+
"types": "./dist/http.d.ts",
|
|
143
|
+
"default": "./dist/http.js"
|
|
144
|
+
}
|
|
85
145
|
},
|
|
86
146
|
"./observable": {
|
|
87
|
-
"import":
|
|
88
|
-
|
|
89
|
-
|
|
147
|
+
"import": {
|
|
148
|
+
"types": "./dist/observable.d.ts",
|
|
149
|
+
"default": "./dist/observable.mjs"
|
|
150
|
+
},
|
|
151
|
+
"require": {
|
|
152
|
+
"types": "./dist/observable.d.ts",
|
|
153
|
+
"default": "./dist/observable.js"
|
|
154
|
+
}
|
|
90
155
|
},
|
|
91
156
|
"./rpc": {
|
|
92
|
-
"import":
|
|
93
|
-
|
|
94
|
-
|
|
157
|
+
"import": {
|
|
158
|
+
"types": "./dist/rpc.d.ts",
|
|
159
|
+
"default": "./dist/rpc.mjs"
|
|
160
|
+
},
|
|
161
|
+
"require": {
|
|
162
|
+
"types": "./dist/rpc.d.ts",
|
|
163
|
+
"default": "./dist/rpc.js"
|
|
164
|
+
}
|
|
95
165
|
},
|
|
96
166
|
"./shared": {
|
|
97
|
-
"import":
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
167
|
+
"import": {
|
|
168
|
+
"types": "./dist/shared.d.ts",
|
|
169
|
+
"default": "./dist/shared.mjs"
|
|
170
|
+
},
|
|
171
|
+
"require": {
|
|
172
|
+
"types": "./dist/shared.d.ts",
|
|
173
|
+
"default": "./dist/shared.js"
|
|
174
|
+
}
|
|
105
175
|
}
|
|
106
176
|
},
|
|
107
177
|
"files": [
|
|
@@ -114,12 +184,14 @@
|
|
|
114
184
|
"observable",
|
|
115
185
|
"rpc",
|
|
116
186
|
"shared",
|
|
117
|
-
"unstable-core-do-not-import",
|
|
118
187
|
"!**/*.test.*"
|
|
119
188
|
],
|
|
120
189
|
"publishConfig": {
|
|
121
190
|
"access": "public"
|
|
122
191
|
},
|
|
192
|
+
"dependencies": {
|
|
193
|
+
"@trpc/core": "11.0.0-alpha-tmp-export-from-main.217+ef6ef3e1c"
|
|
194
|
+
},
|
|
123
195
|
"devDependencies": {
|
|
124
196
|
"@fastify/websocket": "^7.1.2",
|
|
125
197
|
"@tanstack/react-query": "^5.0.0",
|
|
@@ -157,5 +229,5 @@
|
|
|
157
229
|
"funding": [
|
|
158
230
|
"https://trpc.io/sponsor"
|
|
159
231
|
],
|
|
160
|
-
"gitHead": "
|
|
232
|
+
"gitHead": "ef6ef3e1c3a4966d30335864d6edf9c94f096717"
|
|
161
233
|
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is here to make TypeScript happy and prevent _"The inferred type of 'createContext' cannot be named without a reference to [...]"_.
|
|
3
|
+
*
|
|
4
|
+
* We're basically just re-exporting everything from @trpc/core here.
|
|
5
|
+
*
|
|
6
|
+
* If you need to import anything from here, please open an issue at https://github.com/trpc/trpc/issues
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export type {
|
|
10
|
+
AnyMiddlewareFunction,
|
|
11
|
+
AnyRouter,
|
|
12
|
+
AnyMutationProcedure,
|
|
13
|
+
AnyProcedure,
|
|
14
|
+
AnyQueryProcedure,
|
|
15
|
+
AnyRootConfig,
|
|
16
|
+
AnyRouterDef,
|
|
17
|
+
AnySubscriptionProcedure,
|
|
18
|
+
BaseContentTypeHandler,
|
|
19
|
+
BaseHandlerOptions,
|
|
20
|
+
BodyResult,
|
|
21
|
+
CombinedDataTransformer,
|
|
22
|
+
CombinedDataTransformerClient,
|
|
23
|
+
CreateRouterInner,
|
|
24
|
+
DataTransformer,
|
|
25
|
+
DataTransformerOptions,
|
|
26
|
+
DeepPartial,
|
|
27
|
+
DefaultDataTransformer,
|
|
28
|
+
DefaultErrorData,
|
|
29
|
+
DefaultErrorShape,
|
|
30
|
+
Dict,
|
|
31
|
+
DistributiveOmit,
|
|
32
|
+
Filter,
|
|
33
|
+
FilterKeys,
|
|
34
|
+
HTTPBaseHandlerOptions,
|
|
35
|
+
HTTPHeaders,
|
|
36
|
+
HTTPRequest,
|
|
37
|
+
HTTPResponse,
|
|
38
|
+
IntersectionError,
|
|
39
|
+
JSONRPC2,
|
|
40
|
+
Maybe,
|
|
41
|
+
MaybePromise,
|
|
42
|
+
MiddlewareBuilder,
|
|
43
|
+
MiddlewareFunction,
|
|
44
|
+
MutationProcedure,
|
|
45
|
+
Observable,
|
|
46
|
+
Observer,
|
|
47
|
+
OnErrorFunction,
|
|
48
|
+
Overwrite,
|
|
49
|
+
PickFirstDefined,
|
|
50
|
+
Procedure,
|
|
51
|
+
ProcedureArgs,
|
|
52
|
+
ProcedureBuilder,
|
|
53
|
+
ProcedureCall,
|
|
54
|
+
ProcedureOptions,
|
|
55
|
+
ProcedureRecord,
|
|
56
|
+
ProcedureRouterRecord,
|
|
57
|
+
ProcedureType,
|
|
58
|
+
ProtectedIntersection,
|
|
59
|
+
QueryProcedure,
|
|
60
|
+
ResolveHTTPRequestOptionsContextFn,
|
|
61
|
+
ResponseChunk,
|
|
62
|
+
ResponseMeta,
|
|
63
|
+
ResponseMetaFn,
|
|
64
|
+
RootConfig,
|
|
65
|
+
Router,
|
|
66
|
+
RouterCaller,
|
|
67
|
+
Serialize,
|
|
68
|
+
SerializeObject,
|
|
69
|
+
Simplify,
|
|
70
|
+
SubscriptionProcedure,
|
|
71
|
+
TRPCClientIncomingMessage,
|
|
72
|
+
TRPCClientIncomingRequest,
|
|
73
|
+
TRPCClientOutgoingMessage,
|
|
74
|
+
TRPCClientOutgoingRequest,
|
|
75
|
+
TRPCErrorResponse,
|
|
76
|
+
TRPCErrorShape,
|
|
77
|
+
TRPCInferrable,
|
|
78
|
+
TRPCReconnectNotification,
|
|
79
|
+
TRPCRequest,
|
|
80
|
+
TRPCRequestInfo,
|
|
81
|
+
TRPCRequestMessage,
|
|
82
|
+
TRPCResponse,
|
|
83
|
+
TRPCResponseMessage,
|
|
84
|
+
TRPCResult,
|
|
85
|
+
TRPCResultMessage,
|
|
86
|
+
TRPCSubscriptionStopNotification,
|
|
87
|
+
TRPCSuccessResponse,
|
|
88
|
+
TRPC_ERROR_CODE_KEY,
|
|
89
|
+
TRPC_ERROR_CODE_NUMBER,
|
|
90
|
+
TeardownLogic,
|
|
91
|
+
Unsubscribable,
|
|
92
|
+
UnsubscribeFn,
|
|
93
|
+
Unwrap,
|
|
94
|
+
ValidateShape,
|
|
95
|
+
WithoutIndexSignature,
|
|
96
|
+
inferErrorShape,
|
|
97
|
+
inferHandlerInput,
|
|
98
|
+
inferObservableValue,
|
|
99
|
+
inferParser,
|
|
100
|
+
inferProcedureInput,
|
|
101
|
+
inferProcedureOutput,
|
|
102
|
+
inferProcedureParams,
|
|
103
|
+
inferRouterContext,
|
|
104
|
+
inferRouterError,
|
|
105
|
+
inferRouterInputs,
|
|
106
|
+
inferRouterMeta,
|
|
107
|
+
inferRouterOutputs,
|
|
108
|
+
inferTransformedProcedureOutput,
|
|
109
|
+
inferTransformedSubscriptionOutput,
|
|
110
|
+
} from '@trpc/core';
|
|
111
|
+
export {
|
|
112
|
+
TRPCError,
|
|
113
|
+
TRPC_ERROR_CODES_BY_KEY,
|
|
114
|
+
TRPC_ERROR_CODES_BY_NUMBER,
|
|
115
|
+
callProcedure,
|
|
116
|
+
createBuilder,
|
|
117
|
+
createFlatProxy,
|
|
118
|
+
createInputMiddleware,
|
|
119
|
+
createOutputMiddleware,
|
|
120
|
+
createRecursiveProxy,
|
|
121
|
+
createRouterFactory,
|
|
122
|
+
experimental_standaloneMiddleware,
|
|
123
|
+
getBatchStreamFormatter,
|
|
124
|
+
getCauseFromUnknown,
|
|
125
|
+
getErrorShape,
|
|
126
|
+
getHTTPStatusCode,
|
|
127
|
+
getHTTPStatusCodeFromError,
|
|
128
|
+
getJsonContentTypeInputs,
|
|
129
|
+
getTRPCErrorFromUnknown,
|
|
130
|
+
initTRPC,
|
|
131
|
+
isObject,
|
|
132
|
+
isObservable,
|
|
133
|
+
map,
|
|
134
|
+
mergeRouters,
|
|
135
|
+
middlewareMarker,
|
|
136
|
+
observable,
|
|
137
|
+
observableToPromise,
|
|
138
|
+
parseTRPCMessage,
|
|
139
|
+
procedureTypes,
|
|
140
|
+
resolveHTTPResponse,
|
|
141
|
+
share,
|
|
142
|
+
tap,
|
|
143
|
+
transformResult,
|
|
144
|
+
transformTRPCResponse,
|
|
145
|
+
unsetMarker,
|
|
146
|
+
} from '@trpc/core';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`
|
|
3
3
|
*
|
|
4
|
+
* Do **not** import from `@trpc/core`
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
@@ -15,15 +16,15 @@ import type {
|
|
|
15
16
|
Context as APIGWContext,
|
|
16
17
|
} from 'aws-lambda';
|
|
17
18
|
// @trpc/server
|
|
18
|
-
import type { AnyRouter } from '
|
|
19
|
+
import type { AnyRouter } from '../..';
|
|
19
20
|
// @trpc/server
|
|
20
|
-
import { TRPCError } from '
|
|
21
|
+
import { TRPCError } from '../..';
|
|
21
22
|
import type {
|
|
22
23
|
HTTPRequest,
|
|
23
24
|
HTTPResponse,
|
|
24
25
|
ResolveHTTPRequestOptionsContextFn,
|
|
25
|
-
} from '
|
|
26
|
-
import { resolveHTTPResponse } from '
|
|
26
|
+
} from '../../http';
|
|
27
|
+
import { resolveHTTPResponse } from '../../http';
|
|
27
28
|
import type {
|
|
28
29
|
APIGatewayEvent,
|
|
29
30
|
APIGatewayResult,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`
|
|
3
3
|
*
|
|
4
|
+
* Do **not** import from `@trpc/core`
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
@@ -14,16 +15,16 @@ import type {
|
|
|
14
15
|
APIGatewayProxyStructuredResultV2,
|
|
15
16
|
Context as APIGWContext,
|
|
16
17
|
} from 'aws-lambda';
|
|
17
|
-
import type { AnyRouter, inferRouterContext } from '
|
|
18
|
+
import type { AnyRouter, inferRouterContext } from '../..'; // import @trpc/server
|
|
18
19
|
|
|
19
20
|
// @trpc/server
|
|
20
|
-
import { TRPCError } from '
|
|
21
|
+
import { TRPCError } from '../..';
|
|
21
22
|
import type {
|
|
22
23
|
HTTPHeaders,
|
|
23
24
|
OnErrorFunction,
|
|
24
25
|
ResponseMetaFn,
|
|
25
26
|
TRPCRequestInfo,
|
|
26
|
-
} from '
|
|
27
|
+
} from '../../http';
|
|
27
28
|
|
|
28
29
|
export type APIGatewayEvent = APIGatewayProxyEvent | APIGatewayProxyEventV2;
|
|
29
30
|
export type APIGatewayResult =
|
package/src/adapters/express.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`
|
|
3
3
|
*
|
|
4
|
+
* Do **not** import from `@trpc/core`
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
@@ -8,7 +9,8 @@
|
|
|
8
9
|
* ```
|
|
9
10
|
*/
|
|
10
11
|
import type * as express from 'express';
|
|
11
|
-
|
|
12
|
+
// @trpc/server
|
|
13
|
+
import type { AnyRouter } from '..';
|
|
12
14
|
import type {
|
|
13
15
|
NodeHTTPCreateContextFnOptions,
|
|
14
16
|
NodeHTTPHandlerOptions,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`
|
|
3
3
|
*
|
|
4
|
+
* Do **not** import from `@trpc/core`
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
@@ -10,18 +11,15 @@
|
|
|
10
11
|
import { Readable } from 'node:stream';
|
|
11
12
|
import type { FastifyReply, FastifyRequest } from 'fastify';
|
|
12
13
|
// @trpc/server
|
|
13
|
-
import type { AnyRouter } from '
|
|
14
|
+
import type { AnyRouter } from '../..';
|
|
14
15
|
import type {
|
|
15
16
|
HTTPBaseHandlerOptions,
|
|
16
17
|
HTTPRequest,
|
|
17
18
|
HTTPResponse,
|
|
18
19
|
ResolveHTTPRequestOptionsContextFn,
|
|
19
20
|
ResponseChunk,
|
|
20
|
-
} from '
|
|
21
|
-
import {
|
|
22
|
-
getBatchStreamFormatter,
|
|
23
|
-
resolveHTTPResponse,
|
|
24
|
-
} from '../../@trpc/server/http';
|
|
21
|
+
} from '../../http';
|
|
22
|
+
import { getBatchStreamFormatter, resolveHTTPResponse } from '../../http';
|
|
25
23
|
import type { NodeHTTPCreateContextOption } from '../node-http';
|
|
26
24
|
|
|
27
25
|
export type FastifyHandlerOptions<
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`
|
|
3
3
|
*
|
|
4
|
+
* Do **not** import from `@trpc/core`
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
@@ -11,7 +12,7 @@
|
|
|
11
12
|
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
12
13
|
import type { FastifyHandlerOptions } from '.';
|
|
13
14
|
// @trpc/server
|
|
14
|
-
import type { AnyRouter } from '
|
|
15
|
+
import type { AnyRouter } from '../..';
|
|
15
16
|
import type { NodeHTTPCreateContextFnOptions } from '../node-http';
|
|
16
17
|
import type { WSSHandlerOptions } from '../ws';
|
|
17
18
|
import { applyWSSHandler } from '../ws';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`
|
|
3
3
|
*
|
|
4
|
+
* Do **not** import from `@trpc/core`
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
@@ -8,17 +9,14 @@
|
|
|
8
9
|
* ```
|
|
9
10
|
*/
|
|
10
11
|
// @trpc/server
|
|
11
|
-
import type { AnyRouter } from '
|
|
12
|
+
import type { AnyRouter } from '../..';
|
|
12
13
|
import type {
|
|
13
14
|
HTTPRequest,
|
|
14
15
|
HTTPResponse,
|
|
15
16
|
ResolveHTTPRequestOptionsContextFn,
|
|
16
17
|
ResponseChunk,
|
|
17
|
-
} from '
|
|
18
|
-
import {
|
|
19
|
-
getBatchStreamFormatter,
|
|
20
|
-
resolveHTTPResponse,
|
|
21
|
-
} from '../../@trpc/server/http';
|
|
18
|
+
} from '../../http';
|
|
19
|
+
import { getBatchStreamFormatter, resolveHTTPResponse } from '../../http';
|
|
22
20
|
import type { FetchHandlerOptions } from './types';
|
|
23
21
|
|
|
24
22
|
export type FetchHandlerRequestOptions<TRouter extends AnyRouter> =
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`
|
|
3
3
|
*
|
|
4
|
+
* Do **not** import from `@trpc/core`
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
@@ -8,12 +9,12 @@
|
|
|
8
9
|
* ```
|
|
9
10
|
*/
|
|
10
11
|
// @trpc/server
|
|
11
|
-
import type { AnyRouter, inferRouterContext } from '
|
|
12
|
+
import type { AnyRouter, inferRouterContext } from '../..';
|
|
12
13
|
// @trpc/server/http
|
|
13
14
|
import type {
|
|
14
15
|
HTTPBaseHandlerOptions,
|
|
15
16
|
TRPCRequestInfo,
|
|
16
|
-
} from '../../@trpc
|
|
17
|
+
} from '../../@trpc-server/http';
|
|
17
18
|
|
|
18
19
|
export type FetchCreateContextFnOptions = {
|
|
19
20
|
req: Request;
|
package/src/adapters/next.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`
|
|
3
3
|
*
|
|
4
|
+
* Do **not** import from `@trpc/core`
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
@@ -9,9 +10,9 @@
|
|
|
9
10
|
*/
|
|
10
11
|
import type { NextApiHandler, NextApiRequest, NextApiResponse } from 'next';
|
|
11
12
|
// @trpc/server
|
|
12
|
-
import type { AnyRouter } from '
|
|
13
|
+
import type { AnyRouter } from '..';
|
|
13
14
|
// @trpc/server
|
|
14
|
-
import { getErrorShape, TRPCError } from '
|
|
15
|
+
import { getErrorShape, TRPCError } from '..';
|
|
15
16
|
import type {
|
|
16
17
|
NodeHTTPCreateContextFnOptions,
|
|
17
18
|
NodeHTTPHandlerOptions,
|
|
@@ -14,7 +14,7 @@ import { Readable } from 'node:stream';
|
|
|
14
14
|
// @ts-ignore the type definitions for this package are borked
|
|
15
15
|
import { streamMultipart } from '@web3-storage/multipart-parser';
|
|
16
16
|
// @trpc/server
|
|
17
|
-
import type { CombinedDataTransformer } from '
|
|
17
|
+
import type { CombinedDataTransformer } from '../../../..';
|
|
18
18
|
import { createNodeHTTPContentTypeHandler } from '../../internals/contentType';
|
|
19
19
|
import type { NodeHTTPRequest } from '../../types';
|
|
20
20
|
import { NodeOnDiskFile } from './fileUploadHandler';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @trpc/server
|
|
2
|
-
import { TRPCError } from '
|
|
3
|
-
import type { BodyResult } from '
|
|
2
|
+
import { TRPCError } from '../../../..';
|
|
3
|
+
import type { BodyResult } from '../../../../http';
|
|
4
4
|
import type { NodeHTTPRequest } from '../../types';
|
|
5
5
|
|
|
6
6
|
export async function getPostBody(opts: {
|