@trpc/server 11.0.0-alpha-tmp-app-router-example.384 → 11.0.0-alpha-tmp-app-router-example.388
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.
|
@@ -12,12 +12,9 @@ import type * as http from 'http';
|
|
|
12
12
|
import type { AnyRouter, CreateContextCallback, inferRouterContext } from '../../@trpc/server';
|
|
13
13
|
import type { HTTPBaseHandlerOptions, TRPCRequestInfo } from '../../@trpc/server/http';
|
|
14
14
|
import type { MaybePromise } from '../../unstable-core-do-not-import';
|
|
15
|
-
interface ParsedQs {
|
|
16
|
-
[key: string]: ParsedQs | ParsedQs[] | string[] | string | undefined;
|
|
17
|
-
}
|
|
18
15
|
export type NodeHTTPRequest = http.IncomingMessage & {
|
|
19
|
-
query?: ParsedQs;
|
|
20
16
|
body?: unknown;
|
|
17
|
+
query?: unknown;
|
|
21
18
|
};
|
|
22
19
|
export type NodeHTTPResponse = http.ServerResponse & {
|
|
23
20
|
/**
|
|
@@ -52,7 +49,7 @@ export type NodeHTTPHandlerOptions<TRouter extends AnyRouter, TRequest extends N
|
|
|
52
49
|
* You can also use it for other needs which a connect/node.js compatible middleware can solve,
|
|
53
50
|
* though you might wish to consider an alternative solution like the Express adapter if your needs are complex.
|
|
54
51
|
*/
|
|
55
|
-
middleware?: ConnectMiddleware
|
|
52
|
+
middleware?: ConnectMiddleware<TRequest, TResponse>;
|
|
56
53
|
maxBodySize?: number;
|
|
57
54
|
};
|
|
58
55
|
export type NodeHTTPRequestHandlerOptions<TRouter extends AnyRouter, TRequest extends NodeHTTPRequest, TResponse extends NodeHTTPResponse> = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/adapters/node-http/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,KAAK,IAAI,MAAM,MAAM,CAAC;AAElC,OAAO,KAAK,EACV,SAAS,EACT,qBAAqB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IAAI,CAAC;AAEtE,MAAM,MAAM,sBAAsB,CAChC,OAAO,SAAS,SAAS,EACzB,QAAQ,SAAS,eAAe,EAChC,SAAS,SAAS,gBAAgB,IAChC,sBAAsB,CAAC,OAAO,EAAE,QAAQ,CAAC,GAC3C,2BAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,GAAG;IAC1D;;;;;;;;;;;;;;;OAeG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEJ,MAAM,MAAM,6BAA6B,CACvC,OAAO,SAAS,SAAS,EACzB,QAAQ,SAAS,eAAe,EAChC,SAAS,SAAS,gBAAgB,IAChC;IACF,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,SAAS,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,sBAAsB,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAEzD,MAAM,MAAM,8BAA8B,CAAC,QAAQ,EAAE,SAAS,IAAI;IAChE,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,SAAS,CAAC;IACf,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC;AACF,MAAM,MAAM,uBAAuB,CACjC,OAAO,SAAS,SAAS,EACzB,QAAQ,EACR,SAAS,IACP,CACF,IAAI,EAAE,8BAA8B,CAAC,QAAQ,EAAE,SAAS,CAAC,KACtD,YAAY,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC"}
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"removedExports": [],
|
|
78
78
|
"dependents": [
|
|
79
79
|
"/src/unstable-core-do-not-import.ts",
|
|
80
|
-
"/src/unstable-core-do-not-import/
|
|
81
|
-
"/src/unstable-core-do-not-import/
|
|
80
|
+
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
81
|
+
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
82
82
|
],
|
|
83
83
|
"percent": 5.78,
|
|
84
84
|
"reduction": 40.45
|
|
@@ -172,9 +172,9 @@
|
|
|
172
172
|
"removedExports": [],
|
|
173
173
|
"dependents": [
|
|
174
174
|
"/src/unstable-core-do-not-import.ts",
|
|
175
|
+
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
175
176
|
"/src/unstable-core-do-not-import/router.ts",
|
|
176
|
-
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
177
|
-
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
177
|
+
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
178
178
|
],
|
|
179
179
|
"percent": 2.6,
|
|
180
180
|
"reduction": 45.94
|
|
@@ -284,9 +284,9 @@
|
|
|
284
284
|
"removedExports": [],
|
|
285
285
|
"dependents": [
|
|
286
286
|
"/src/unstable-core-do-not-import.ts",
|
|
287
|
+
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
287
288
|
"/src/unstable-core-do-not-import/router.ts",
|
|
288
289
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
289
|
-
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
290
290
|
"/src/unstable-core-do-not-import/http/contentType.ts",
|
|
291
291
|
"/src/unstable-core-do-not-import/procedureBuilder.ts"
|
|
292
292
|
],
|
|
@@ -369,8 +369,8 @@
|
|
|
369
369
|
"removedExports": [],
|
|
370
370
|
"dependents": [
|
|
371
371
|
"/src/unstable-core-do-not-import.ts",
|
|
372
|
-
"/src/unstable-core-do-not-import/
|
|
373
|
-
"/src/unstable-core-do-not-import/
|
|
372
|
+
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
373
|
+
"/src/unstable-core-do-not-import/error/getErrorShape.ts"
|
|
374
374
|
],
|
|
375
375
|
"percent": 1.2,
|
|
376
376
|
"reduction": 23.5
|
|
@@ -390,11 +390,11 @@
|
|
|
390
390
|
"removedExports": [],
|
|
391
391
|
"dependents": [
|
|
392
392
|
"/src/unstable-core-do-not-import.ts",
|
|
393
|
+
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
393
394
|
"/src/unstable-core-do-not-import/error/TRPCError.ts",
|
|
394
395
|
"/src/unstable-core-do-not-import/router.ts",
|
|
395
396
|
"/src/unstable-core-do-not-import/transformer.ts",
|
|
396
397
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
397
|
-
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
398
398
|
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
399
399
|
"/src/unstable-core-do-not-import/http/contentType.ts",
|
|
400
400
|
"/src/unstable-core-do-not-import/procedureBuilder.ts",
|
|
@@ -633,9 +633,9 @@
|
|
|
633
633
|
"reduction": 93.8
|
|
634
634
|
},
|
|
635
635
|
{
|
|
636
|
-
"id": "/src/
|
|
636
|
+
"id": "/src/http.ts",
|
|
637
637
|
"size": 0,
|
|
638
|
-
"origSize":
|
|
638
|
+
"origSize": 37,
|
|
639
639
|
"renderedExports": [],
|
|
640
640
|
"removedExports": [],
|
|
641
641
|
"dependents": [],
|
|
@@ -643,9 +643,9 @@
|
|
|
643
643
|
"reduction": 100
|
|
644
644
|
},
|
|
645
645
|
{
|
|
646
|
-
"id": "/src/
|
|
646
|
+
"id": "/src/index.ts",
|
|
647
647
|
"size": 0,
|
|
648
|
-
"origSize":
|
|
648
|
+
"origSize": 32,
|
|
649
649
|
"renderedExports": [],
|
|
650
650
|
"removedExports": [],
|
|
651
651
|
"dependents": [],
|
|
@@ -732,8 +732,8 @@
|
|
|
732
732
|
"removedExports": [],
|
|
733
733
|
"dependents": [
|
|
734
734
|
"/src/adapters/express.ts",
|
|
735
|
-
"/src/adapters/standalone.ts",
|
|
736
735
|
"/src/adapters/next.ts",
|
|
736
|
+
"/src/adapters/standalone.ts",
|
|
737
737
|
"/src/adapters/fastify/fastifyRequestHandler.ts"
|
|
738
738
|
],
|
|
739
739
|
"percent": 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/server",
|
|
3
|
-
"version": "11.0.0-alpha-tmp-app-router-example.
|
|
3
|
+
"version": "11.0.0-alpha-tmp-app-router-example.388+2b04d6593",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
},
|
|
118
118
|
"devDependencies": {
|
|
119
119
|
"@fastify/websocket": "^10.0.1",
|
|
120
|
-
"@tanstack/react-query": "^5.
|
|
120
|
+
"@tanstack/react-query": "^5.45.0",
|
|
121
121
|
"@types/aws-lambda": "^8.10.137",
|
|
122
122
|
"@types/express": "^4.17.17",
|
|
123
123
|
"@types/hash-sum": "^1.0.0",
|
|
@@ -149,5 +149,5 @@
|
|
|
149
149
|
"funding": [
|
|
150
150
|
"https://trpc.io/sponsor"
|
|
151
151
|
],
|
|
152
|
-
"gitHead": "
|
|
152
|
+
"gitHead": "2b04d659340f9d18d0a8138a09da7f9c54985787"
|
|
153
153
|
}
|
|
@@ -22,13 +22,9 @@ import type {
|
|
|
22
22
|
// eslint-disable-next-line no-restricted-imports
|
|
23
23
|
import type { MaybePromise } from '../../unstable-core-do-not-import';
|
|
24
24
|
|
|
25
|
-
interface ParsedQs {
|
|
26
|
-
[key: string]: ParsedQs | ParsedQs[] | string[] | string | undefined;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
25
|
export type NodeHTTPRequest = http.IncomingMessage & {
|
|
30
|
-
query?: ParsedQs;
|
|
31
26
|
body?: unknown;
|
|
27
|
+
query?: unknown;
|
|
32
28
|
};
|
|
33
29
|
export type NodeHTTPResponse = http.ServerResponse & {
|
|
34
30
|
/**
|
|
@@ -81,7 +77,7 @@ export type NodeHTTPHandlerOptions<
|
|
|
81
77
|
* You can also use it for other needs which a connect/node.js compatible middleware can solve,
|
|
82
78
|
* though you might wish to consider an alternative solution like the Express adapter if your needs are complex.
|
|
83
79
|
*/
|
|
84
|
-
middleware?: ConnectMiddleware
|
|
80
|
+
middleware?: ConnectMiddleware<TRequest, TResponse>;
|
|
85
81
|
maxBodySize?: number;
|
|
86
82
|
};
|
|
87
83
|
|