@trpc/server 11.0.0-rc.740 → 11.0.0-rc.743
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/adapters/node-http/types.d.ts +6 -2
- package/dist/adapters/node-http/types.d.ts.map +1 -1
- package/dist/adapters/standalone.d.ts +15 -3
- package/dist/adapters/standalone.d.ts.map +1 -1
- package/dist/adapters/standalone.js +4 -3
- package/dist/adapters/standalone.mjs +4 -3
- package/dist/bundle-analysis.json +72 -71
- package/dist/unstable-core-do-not-import/http/resolveResponse.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/http/resolveResponse.js +1 -0
- package/dist/unstable-core-do-not-import/http/resolveResponse.mjs +1 -0
- package/dist/unstable-core-do-not-import/rootConfig.d.ts +6 -0
- package/dist/unstable-core-do-not-import/rootConfig.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/stream/jsonl.d.ts +8 -2
- package/dist/unstable-core-do-not-import/stream/jsonl.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/stream/jsonl.js +16 -3
- package/dist/unstable-core-do-not-import/stream/jsonl.mjs +16 -3
- package/package.json +2 -2
- package/src/adapters/node-http/types.ts +6 -2
- package/src/adapters/standalone.ts +25 -6
- package/src/unstable-core-do-not-import/http/resolveResponse.ts +1 -0
- package/src/unstable-core-do-not-import/rootConfig.ts +7 -0
- package/src/unstable-core-do-not-import/stream/jsonl.ts +28 -7
|
@@ -62,11 +62,15 @@ export type NodeHTTPHandlerOptions<TRouter extends AnyRouter, TRequest extends N
|
|
|
62
62
|
middleware?: ConnectMiddleware<TRequest, TResponse>;
|
|
63
63
|
maxBodySize?: number;
|
|
64
64
|
};
|
|
65
|
-
export type NodeHTTPRequestHandlerOptions<TRouter extends AnyRouter, TRequest extends NodeHTTPRequest, TResponse extends NodeHTTPResponse> = {
|
|
65
|
+
export type NodeHTTPRequestHandlerOptions<TRouter extends AnyRouter, TRequest extends NodeHTTPRequest, TResponse extends NodeHTTPResponse> = NodeHTTPHandlerOptions<TRouter, TRequest, TResponse> & {
|
|
66
66
|
req: TRequest;
|
|
67
67
|
res: TResponse;
|
|
68
|
+
/**
|
|
69
|
+
* The tRPC path to handle requests for
|
|
70
|
+
* @example 'post.all'
|
|
71
|
+
*/
|
|
68
72
|
path: string;
|
|
69
|
-
}
|
|
73
|
+
};
|
|
70
74
|
export type NodeHTTPCreateContextFnOptions<TRequest, TResponse> = {
|
|
71
75
|
req: TRequest;
|
|
72
76
|
res: TResponse;
|
|
@@ -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;AAClC,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,KAAK,EACV,SAAS,EACT,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACb,MAAM,mCAAmC,CAAC;AAE3C,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAC5C,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,kBAAkB,EAC/C,QAAQ,CACT,GAAG;IACF;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;OAKG;IACH,MAAM,CAAC,EACH,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,GACvC,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAC7C,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,mBAAmB,EAC/C,OAAO,CACR,GAAG;IACF;;;;;;;OA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KAAK,GAAG,KAAK,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,sBAAsB,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,GAAG;IACzD,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,SAAS,CAAC;IACf;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,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"}
|
|
@@ -10,15 +10,27 @@
|
|
|
10
10
|
import http from 'http';
|
|
11
11
|
import type * as http2 from 'http2';
|
|
12
12
|
import { type AnyRouter } from '../@trpc/server';
|
|
13
|
-
import type { NodeHTTPCreateContextFnOptions, NodeHTTPHandlerOptions } from './node-http';
|
|
14
|
-
|
|
13
|
+
import type { NodeHTTPCreateContextFnOptions, NodeHTTPHandlerOptions, NodeHTTPRequest, NodeHTTPResponse } from './node-http';
|
|
14
|
+
type StandaloneHandlerOptions<TRouter extends AnyRouter, TRequest extends NodeHTTPRequest, TResponse extends NodeHTTPResponse> = NodeHTTPHandlerOptions<TRouter, TRequest, TResponse> & {
|
|
15
|
+
/**
|
|
16
|
+
* The base path to handle requests for.
|
|
17
|
+
* This will be sliced from the beginning of the request path
|
|
18
|
+
* (Do not miss including the trailing slash)
|
|
19
|
+
* @default '/'
|
|
20
|
+
* @example '/trpc/'
|
|
21
|
+
* @example '/trpc/api/'
|
|
22
|
+
*/
|
|
23
|
+
basePath?: string;
|
|
24
|
+
};
|
|
25
|
+
export type CreateHTTPHandlerOptions<TRouter extends AnyRouter> = StandaloneHandlerOptions<TRouter, http.IncomingMessage, http.ServerResponse>;
|
|
15
26
|
export type CreateHTTPContextOptions = NodeHTTPCreateContextFnOptions<http.IncomingMessage, http.ServerResponse>;
|
|
16
27
|
/**
|
|
17
28
|
* @internal
|
|
18
29
|
*/
|
|
19
30
|
export declare function createHTTPHandler<TRouter extends AnyRouter>(opts: CreateHTTPHandlerOptions<TRouter>): http.RequestListener;
|
|
20
31
|
export declare function createHTTPServer<TRouter extends AnyRouter>(opts: CreateHTTPHandlerOptions<TRouter>): http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
|
|
21
|
-
export type CreateHTTP2HandlerOptions<TRouter extends AnyRouter> =
|
|
32
|
+
export type CreateHTTP2HandlerOptions<TRouter extends AnyRouter> = StandaloneHandlerOptions<TRouter, http2.Http2ServerRequest, http2.Http2ServerResponse>;
|
|
22
33
|
export type CreateHTTP2ContextOptions = NodeHTTPCreateContextFnOptions<http2.Http2ServerRequest, http2.Http2ServerResponse>;
|
|
23
34
|
export declare function createHTTP2Handler(opts: CreateHTTP2HandlerOptions<AnyRouter>): (req: http2.Http2ServerRequest, res: http2.Http2ServerResponse<http2.Http2ServerRequest>) => void;
|
|
35
|
+
export {};
|
|
24
36
|
//# sourceMappingURL=standalone.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standalone.d.ts","sourceRoot":"","sources":["../../src/adapters/standalone.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,KAAK,EACV,8BAA8B,EAC9B,sBAAsB,
|
|
1
|
+
{"version":3,"file":"standalone.d.ts","sourceRoot":"","sources":["../../src/adapters/standalone.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,KAAK,EACV,8BAA8B,EAC9B,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAOrB,KAAK,wBAAwB,CAC3B,OAAO,SAAS,SAAS,EACzB,QAAQ,SAAS,eAAe,EAChC,SAAS,SAAS,gBAAgB,IAChC,sBAAsB,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,GAAG;IACzD;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAGF,MAAM,MAAM,wBAAwB,CAAC,OAAO,SAAS,SAAS,IAC5D,wBAAwB,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;AAE/E,MAAM,MAAM,wBAAwB,GAAG,8BAA8B,CACnE,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,cAAc,CACpB,CAAC;AAsCF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,SAAS,SAAS,EACzD,IAAI,EAAE,wBAAwB,CAAC,OAAO,CAAC,GACtC,IAAI,CAAC,eAAe,CAEtB;AAED,wBAAgB,gBAAgB,CAAC,OAAO,SAAS,SAAS,EACxD,IAAI,EAAE,wBAAwB,CAAC,OAAO,CAAC,wEAGxC;AAGD,MAAM,MAAM,yBAAyB,CAAC,OAAO,SAAS,SAAS,IAC7D,wBAAwB,CACtB,OAAO,EACP,KAAK,CAAC,kBAAkB,EACxB,KAAK,CAAC,mBAAmB,CAC1B,CAAC;AAEJ,MAAM,MAAM,yBAAyB,GAAG,8BAA8B,CACpE,KAAK,CAAC,kBAAkB,EACxB,KAAK,CAAC,mBAAmB,CAC1B,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,yBAAyB,CAAC,SAAS,CAAC,gGA1DvC,IAAI,CA4DzC"}
|
|
@@ -9,13 +9,14 @@ var nodeHTTPRequestHandler = require('./node-http/nodeHTTPRequestHandler.js');
|
|
|
9
9
|
var incomingMessageToRequest = require('./node-http/incomingMessageToRequest.js');
|
|
10
10
|
|
|
11
11
|
function createHandler(opts) {
|
|
12
|
+
const basePath = opts.basePath ?? '/';
|
|
13
|
+
const sliceLength = basePath.length;
|
|
12
14
|
return (req, res)=>{
|
|
13
15
|
let path = '';
|
|
14
16
|
utils.run(async ()=>{
|
|
15
17
|
const url = incomingMessageToRequest.createURL(req);
|
|
16
|
-
// get procedure path and remove the leading slash
|
|
17
|
-
|
|
18
|
-
path = url.pathname.slice(1);
|
|
18
|
+
// get procedure(s) path and remove the leading slash
|
|
19
|
+
path = url.pathname.slice(sliceLength);
|
|
19
20
|
await nodeHTTPRequestHandler.nodeHTTPRequestHandler({
|
|
20
21
|
...opts,
|
|
21
22
|
req,
|
|
@@ -7,13 +7,14 @@ import { nodeHTTPRequestHandler, internal_exceptionHandler } from './node-http/n
|
|
|
7
7
|
import { createURL } from './node-http/incomingMessageToRequest.mjs';
|
|
8
8
|
|
|
9
9
|
function createHandler(opts) {
|
|
10
|
+
const basePath = opts.basePath ?? '/';
|
|
11
|
+
const sliceLength = basePath.length;
|
|
10
12
|
return (req, res)=>{
|
|
11
13
|
let path = '';
|
|
12
14
|
run(async ()=>{
|
|
13
15
|
const url = createURL(req);
|
|
14
|
-
// get procedure path and remove the leading slash
|
|
15
|
-
|
|
16
|
-
path = url.pathname.slice(1);
|
|
16
|
+
// get procedure(s) path and remove the leading slash
|
|
17
|
+
path = url.pathname.slice(sliceLength);
|
|
17
18
|
await nodeHTTPRequestHandler({
|
|
18
19
|
...opts,
|
|
19
20
|
req,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 13.
|
|
2
|
+
"bundleSize": 195330,
|
|
3
|
+
"bundleOrigSize": 226680,
|
|
4
|
+
"bundleReduction": 13.83,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
8
|
-
"size":
|
|
9
|
-
"origSize":
|
|
8
|
+
"size": 21071,
|
|
9
|
+
"origSize": 19429,
|
|
10
10
|
"renderedExports": [
|
|
11
11
|
"resolveResponse"
|
|
12
12
|
],
|
|
@@ -14,40 +14,40 @@
|
|
|
14
14
|
"dependents": [
|
|
15
15
|
"/src/unstable-core-do-not-import.ts"
|
|
16
16
|
],
|
|
17
|
-
"percent": 10.
|
|
17
|
+
"percent": 10.79,
|
|
18
18
|
"reduction": 0
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
|
-
"id": "/src/
|
|
22
|
-
"size":
|
|
23
|
-
"origSize":
|
|
21
|
+
"id": "/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
22
|
+
"size": 20426,
|
|
23
|
+
"origSize": 17485,
|
|
24
24
|
"renderedExports": [
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
25
|
+
"isPromise",
|
|
26
|
+
"jsonlStreamProducer",
|
|
27
|
+
"jsonlStreamConsumer"
|
|
28
28
|
],
|
|
29
29
|
"removedExports": [],
|
|
30
30
|
"dependents": [
|
|
31
|
-
"/src/
|
|
31
|
+
"/src/unstable-core-do-not-import.ts",
|
|
32
|
+
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
32
33
|
],
|
|
33
|
-
"percent": 10.
|
|
34
|
+
"percent": 10.46,
|
|
34
35
|
"reduction": 0
|
|
35
36
|
},
|
|
36
37
|
{
|
|
37
|
-
"id": "/src/
|
|
38
|
-
"size":
|
|
39
|
-
"origSize":
|
|
38
|
+
"id": "/src/adapters/ws.ts",
|
|
39
|
+
"size": 20168,
|
|
40
|
+
"origSize": 15955,
|
|
40
41
|
"renderedExports": [
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
42
|
+
"getWSConnectionHandler",
|
|
43
|
+
"handleKeepAlive",
|
|
44
|
+
"applyWSSHandler"
|
|
44
45
|
],
|
|
45
46
|
"removedExports": [],
|
|
46
47
|
"dependents": [
|
|
47
|
-
"/src/
|
|
48
|
-
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
48
|
+
"/src/adapters/fastify/fastifyTRPCPlugin.ts"
|
|
49
49
|
],
|
|
50
|
-
"percent": 10.
|
|
50
|
+
"percent": 10.33,
|
|
51
51
|
"reduction": 0
|
|
52
52
|
},
|
|
53
53
|
{
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"/src/unstable-core-do-not-import.ts",
|
|
65
65
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
66
66
|
],
|
|
67
|
-
"percent": 6.
|
|
67
|
+
"percent": 6.46,
|
|
68
68
|
"reduction": 0
|
|
69
69
|
},
|
|
70
70
|
{
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
],
|
|
78
78
|
"removedExports": [],
|
|
79
79
|
"dependents": [],
|
|
80
|
-
"percent": 6.
|
|
80
|
+
"percent": 6.22,
|
|
81
81
|
"reduction": 11.62
|
|
82
82
|
},
|
|
83
83
|
{
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"dependents": [
|
|
92
92
|
"/src/unstable-core-do-not-import/stream/jsonl.ts"
|
|
93
93
|
],
|
|
94
|
-
"percent": 4.
|
|
94
|
+
"percent": 4.16,
|
|
95
95
|
"reduction": 0
|
|
96
96
|
},
|
|
97
97
|
{
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"/src/unstable-core-do-not-import.ts",
|
|
107
107
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
108
108
|
],
|
|
109
|
-
"percent": 3.
|
|
109
|
+
"percent": 3.98,
|
|
110
110
|
"reduction": 0
|
|
111
111
|
},
|
|
112
112
|
{
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"/src/unstable-core-do-not-import.ts",
|
|
125
125
|
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
126
126
|
],
|
|
127
|
-
"percent": 3.
|
|
127
|
+
"percent": 3.3,
|
|
128
128
|
"reduction": 39.41
|
|
129
129
|
},
|
|
130
130
|
{
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
"/src/unstable-core-do-not-import/stream/sse.ts",
|
|
144
144
|
"/src/unstable-core-do-not-import/stream/utils/withPing.ts"
|
|
145
145
|
],
|
|
146
|
-
"percent": 2.
|
|
146
|
+
"percent": 2.98,
|
|
147
147
|
"reduction": 0
|
|
148
148
|
},
|
|
149
149
|
{
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
"dependents": [
|
|
173
173
|
"/src/adapters/aws-lambda/index.ts"
|
|
174
174
|
],
|
|
175
|
-
"percent": 2.
|
|
175
|
+
"percent": 2.77,
|
|
176
176
|
"reduction": 11.51
|
|
177
177
|
},
|
|
178
178
|
{
|
|
@@ -205,9 +205,10 @@
|
|
|
205
205
|
],
|
|
206
206
|
"removedExports": [],
|
|
207
207
|
"dependents": [
|
|
208
|
+
"/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
208
209
|
"/src/unstable-core-do-not-import/stream/sse.ts"
|
|
209
210
|
],
|
|
210
|
-
"percent": 2.
|
|
211
|
+
"percent": 2.27,
|
|
211
212
|
"reduction": 0
|
|
212
213
|
},
|
|
213
214
|
{
|
|
@@ -223,7 +224,7 @@
|
|
|
223
224
|
"/src/adapters/node-http/index.ts",
|
|
224
225
|
"/src/adapters/node-http/nodeHTTPRequestHandler.ts"
|
|
225
226
|
],
|
|
226
|
-
"percent": 2.
|
|
227
|
+
"percent": 2.07,
|
|
227
228
|
"reduction": 6.82
|
|
228
229
|
},
|
|
229
230
|
{
|
|
@@ -241,7 +242,7 @@
|
|
|
241
242
|
"dependents": [
|
|
242
243
|
"/src/observable/index.ts"
|
|
243
244
|
],
|
|
244
|
-
"percent": 2
|
|
245
|
+
"percent": 2,
|
|
245
246
|
"reduction": 1.66
|
|
246
247
|
},
|
|
247
248
|
{
|
|
@@ -255,7 +256,7 @@
|
|
|
255
256
|
"dependents": [
|
|
256
257
|
"/src/adapters/next-app-dir.ts"
|
|
257
258
|
],
|
|
258
|
-
"percent": 1.
|
|
259
|
+
"percent": 1.66,
|
|
259
260
|
"reduction": 22.52
|
|
260
261
|
},
|
|
261
262
|
{
|
|
@@ -270,7 +271,7 @@
|
|
|
270
271
|
"dependents": [
|
|
271
272
|
"/src/adapters/node-http/index.ts"
|
|
272
273
|
],
|
|
273
|
-
"percent": 1.
|
|
274
|
+
"percent": 1.4,
|
|
274
275
|
"reduction": 16.3
|
|
275
276
|
},
|
|
276
277
|
{
|
|
@@ -290,7 +291,7 @@
|
|
|
290
291
|
"/src/unstable-core-do-not-import/initTRPC.ts",
|
|
291
292
|
"/src/unstable-core-do-not-import/router.ts"
|
|
292
293
|
],
|
|
293
|
-
"percent": 1.
|
|
294
|
+
"percent": 1.4,
|
|
294
295
|
"reduction": 45.98
|
|
295
296
|
},
|
|
296
297
|
{
|
|
@@ -304,7 +305,7 @@
|
|
|
304
305
|
"dependents": [
|
|
305
306
|
"/src/unstable-core-do-not-import.ts"
|
|
306
307
|
],
|
|
307
|
-
"percent": 1.
|
|
308
|
+
"percent": 1.36,
|
|
308
309
|
"reduction": 40.81
|
|
309
310
|
},
|
|
310
311
|
{
|
|
@@ -324,7 +325,7 @@
|
|
|
324
325
|
"/src/unstable-core-do-not-import/initTRPC.ts",
|
|
325
326
|
"/src/unstable-core-do-not-import/procedureBuilder.ts"
|
|
326
327
|
],
|
|
327
|
-
"percent": 1.
|
|
328
|
+
"percent": 1.34,
|
|
328
329
|
"reduction": 55.79
|
|
329
330
|
},
|
|
330
331
|
{
|
|
@@ -351,7 +352,6 @@
|
|
|
351
352
|
"/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
|
|
352
353
|
"/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
|
|
353
354
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
354
|
-
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
355
355
|
"/src/unstable-core-do-not-import/error/TRPCError.ts",
|
|
356
356
|
"/src/unstable-core-do-not-import/transformer.ts",
|
|
357
357
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
@@ -359,6 +359,7 @@
|
|
|
359
359
|
"/src/unstable-core-do-not-import/http/contentType.ts",
|
|
360
360
|
"/src/unstable-core-do-not-import/http/isAbortError.ts",
|
|
361
361
|
"/src/unstable-core-do-not-import/procedureBuilder.ts",
|
|
362
|
+
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
362
363
|
"/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
363
364
|
"/src/unstable-core-do-not-import/stream/sse.ts"
|
|
364
365
|
],
|
|
@@ -401,7 +402,7 @@
|
|
|
401
402
|
"/src/unstable-core-do-not-import.ts",
|
|
402
403
|
"/src/unstable-core-do-not-import/router.ts"
|
|
403
404
|
],
|
|
404
|
-
"percent": 1.
|
|
405
|
+
"percent": 1.19,
|
|
405
406
|
"reduction": 0
|
|
406
407
|
},
|
|
407
408
|
{
|
|
@@ -524,7 +525,7 @@
|
|
|
524
525
|
],
|
|
525
526
|
"removedExports": [],
|
|
526
527
|
"dependents": [],
|
|
527
|
-
"percent": 0.
|
|
528
|
+
"percent": 0.82,
|
|
528
529
|
"reduction": 17.81
|
|
529
530
|
},
|
|
530
531
|
{
|
|
@@ -539,7 +540,7 @@
|
|
|
539
540
|
"/src/unstable-core-do-not-import.ts",
|
|
540
541
|
"/src/unstable-core-do-not-import/procedureBuilder.ts"
|
|
541
542
|
],
|
|
542
|
-
"percent": 0.
|
|
543
|
+
"percent": 0.82,
|
|
543
544
|
"reduction": 54.01
|
|
544
545
|
},
|
|
545
546
|
{
|
|
@@ -632,8 +633,8 @@
|
|
|
632
633
|
},
|
|
633
634
|
{
|
|
634
635
|
"id": "/src/adapters/standalone.ts",
|
|
635
|
-
"size":
|
|
636
|
-
"origSize":
|
|
636
|
+
"size": 958,
|
|
637
|
+
"origSize": 3103,
|
|
637
638
|
"renderedExports": [
|
|
638
639
|
"createHTTPHandler",
|
|
639
640
|
"createHTTPServer",
|
|
@@ -641,8 +642,8 @@
|
|
|
641
642
|
],
|
|
642
643
|
"removedExports": [],
|
|
643
644
|
"dependents": [],
|
|
644
|
-
"percent": 0.
|
|
645
|
-
"reduction":
|
|
645
|
+
"percent": 0.49,
|
|
646
|
+
"reduction": 69.13
|
|
646
647
|
},
|
|
647
648
|
{
|
|
648
649
|
"id": "/src/adapters/express.ts",
|
|
@@ -653,7 +654,7 @@
|
|
|
653
654
|
],
|
|
654
655
|
"removedExports": [],
|
|
655
656
|
"dependents": [],
|
|
656
|
-
"percent": 0.
|
|
657
|
+
"percent": 0.45,
|
|
657
658
|
"reduction": 34
|
|
658
659
|
},
|
|
659
660
|
{
|
|
@@ -750,7 +751,7 @@
|
|
|
750
751
|
{
|
|
751
752
|
"id": "/src/unstable-core-do-not-import/rootConfig.ts",
|
|
752
753
|
"size": 343,
|
|
753
|
-
"origSize":
|
|
754
|
+
"origSize": 3318,
|
|
754
755
|
"renderedExports": [
|
|
755
756
|
"isServerDefault"
|
|
756
757
|
],
|
|
@@ -760,7 +761,7 @@
|
|
|
760
761
|
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
761
762
|
],
|
|
762
763
|
"percent": 0.18,
|
|
763
|
-
"reduction":
|
|
764
|
+
"reduction": 89.66
|
|
764
765
|
},
|
|
765
766
|
{
|
|
766
767
|
"id": "/src/unstable-core-do-not-import/stream/utils/createDeferred.ts",
|
|
@@ -864,16 +865,6 @@
|
|
|
864
865
|
"percent": 0,
|
|
865
866
|
"reduction": 100
|
|
866
867
|
},
|
|
867
|
-
{
|
|
868
|
-
"id": "/src/rpc.ts",
|
|
869
|
-
"size": 0,
|
|
870
|
-
"origSize": 36,
|
|
871
|
-
"renderedExports": [],
|
|
872
|
-
"removedExports": [],
|
|
873
|
-
"dependents": [],
|
|
874
|
-
"percent": 0,
|
|
875
|
-
"reduction": 100
|
|
876
|
-
},
|
|
877
868
|
{
|
|
878
869
|
"id": "/src/index.ts",
|
|
879
870
|
"size": 0,
|
|
@@ -902,8 +893,8 @@
|
|
|
902
893
|
"removedExports": [],
|
|
903
894
|
"dependents": [
|
|
904
895
|
"/src/adapters/express.ts",
|
|
905
|
-
"/src/adapters/standalone.ts",
|
|
906
896
|
"/src/adapters/next.ts",
|
|
897
|
+
"/src/adapters/standalone.ts",
|
|
907
898
|
"/src/adapters/ws.ts",
|
|
908
899
|
"/src/adapters/node-http/nodeHTTPRequestHandler.ts",
|
|
909
900
|
"/src/adapters/next-app-dir/nextAppDirCaller.ts",
|
|
@@ -912,6 +903,16 @@
|
|
|
912
903
|
"percent": 0,
|
|
913
904
|
"reduction": 100
|
|
914
905
|
},
|
|
906
|
+
{
|
|
907
|
+
"id": "/src/rpc.ts",
|
|
908
|
+
"size": 0,
|
|
909
|
+
"origSize": 36,
|
|
910
|
+
"renderedExports": [],
|
|
911
|
+
"removedExports": [],
|
|
912
|
+
"dependents": [],
|
|
913
|
+
"percent": 0,
|
|
914
|
+
"reduction": 100
|
|
915
|
+
},
|
|
915
916
|
{
|
|
916
917
|
"id": "/src/adapters/next-app-dir.ts",
|
|
917
918
|
"size": 0,
|
|
@@ -944,16 +945,6 @@
|
|
|
944
945
|
"percent": 0,
|
|
945
946
|
"reduction": 100
|
|
946
947
|
},
|
|
947
|
-
{
|
|
948
|
-
"id": "/src/adapters/fetch/index.ts",
|
|
949
|
-
"size": 0,
|
|
950
|
-
"origSize": 64,
|
|
951
|
-
"renderedExports": [],
|
|
952
|
-
"removedExports": [],
|
|
953
|
-
"dependents": [],
|
|
954
|
-
"percent": 0,
|
|
955
|
-
"reduction": 100
|
|
956
|
-
},
|
|
957
948
|
{
|
|
958
949
|
"id": "/src/adapters/node-http/index.ts",
|
|
959
950
|
"size": 0,
|
|
@@ -962,13 +953,23 @@
|
|
|
962
953
|
"removedExports": [],
|
|
963
954
|
"dependents": [
|
|
964
955
|
"/src/adapters/express.ts",
|
|
965
|
-
"/src/adapters/standalone.ts",
|
|
966
956
|
"/src/adapters/next.ts",
|
|
957
|
+
"/src/adapters/standalone.ts",
|
|
967
958
|
"/src/adapters/ws.ts",
|
|
968
959
|
"/src/adapters/fastify/fastifyRequestHandler.ts"
|
|
969
960
|
],
|
|
970
961
|
"percent": 0,
|
|
971
962
|
"reduction": 100
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
"id": "/src/adapters/fetch/index.ts",
|
|
966
|
+
"size": 0,
|
|
967
|
+
"origSize": 64,
|
|
968
|
+
"renderedExports": [],
|
|
969
|
+
"removedExports": [],
|
|
970
|
+
"dependents": [],
|
|
971
|
+
"percent": 0,
|
|
972
|
+
"reduction": 100
|
|
972
973
|
}
|
|
973
974
|
],
|
|
974
975
|
"moduleCount": 63
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveResponse.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/http/resolveResponse.ts"],"names":[],"mappings":"AAMA,OAAO,EAA2B,SAAS,E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@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CombinedDataTransformer } from '../unstable-core-do-not-import';
|
|
2
2
|
import type { DefaultErrorShape, ErrorFormatter } from './error/formatter';
|
|
3
|
+
import type { JSONLProducerOptions } from './stream/jsonl';
|
|
3
4
|
import type { SSEStreamProducerOptions } from './stream/sse';
|
|
4
5
|
/**
|
|
5
6
|
* The initial generics that are used in the init function
|
|
@@ -65,6 +66,11 @@ export interface RootConfig<TTypes extends RootTypes> {
|
|
|
65
66
|
*/
|
|
66
67
|
enabled?: boolean;
|
|
67
68
|
} & Pick<SSEStreamProducerOptions, 'ping' | 'emitAndEndImmediately' | 'maxDurationMs' | 'client'>;
|
|
69
|
+
/**
|
|
70
|
+
* Options for batch stream
|
|
71
|
+
* @see https://trpc.io/docs/client/links/httpBatchStreamLink
|
|
72
|
+
*/
|
|
73
|
+
jsonl?: Pick<JSONLProducerOptions, 'pingMs'>;
|
|
68
74
|
experimental?: {};
|
|
69
75
|
}
|
|
70
76
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rootConfig.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/rootConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAE7D;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,iBAAiB,CAAC;IAC9B,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,OAMmB,CAAC;AAElD;;;GAGG;AACH,MAAM,WAAW,UAAU,CAAC,MAAM,SAAS,SAAS;IAClD;;;OAGG;IAC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AAE,GAAG,EAAE,KAAK,GAAG,IACvC,SAAS,CACX,MAAM,SAAS,QAAQ,GAAG,IAAI,GAAG,KAAK,EACtC;IACE;;QAEI;IACJ,aAAa,EAAE,SAAS,CAAC;CAC1B,CACF,CAAC"}
|
|
@@ -65,7 +65,7 @@ export type ProducerOnError = (opts: {
|
|
|
65
65
|
error: unknown;
|
|
66
66
|
path: PathArray;
|
|
67
67
|
}) => void;
|
|
68
|
-
export interface
|
|
68
|
+
export interface JSONLProducerOptions {
|
|
69
69
|
serialize?: Serialize;
|
|
70
70
|
data: Record<string, unknown> | unknown[];
|
|
71
71
|
onError?: ProducerOnError;
|
|
@@ -74,12 +74,18 @@ export interface ProducerOptions {
|
|
|
74
74
|
path: PathArray;
|
|
75
75
|
}) => unknown;
|
|
76
76
|
maxDepth?: number;
|
|
77
|
+
/**
|
|
78
|
+
* Interval in milliseconds to send a ping to the client to keep the connection alive
|
|
79
|
+
* This will be sent as a whitespace character
|
|
80
|
+
* @default undefined
|
|
81
|
+
*/
|
|
82
|
+
pingMs?: number;
|
|
77
83
|
}
|
|
78
84
|
/**
|
|
79
85
|
* JSON Lines stream producer
|
|
80
86
|
* @see https://jsonlines.org/
|
|
81
87
|
*/
|
|
82
|
-
export declare function jsonlStreamProducer(opts:
|
|
88
|
+
export declare function jsonlStreamProducer(opts: JSONLProducerOptions): ReadableStream<Uint8Array<ArrayBufferLike>>;
|
|
83
89
|
declare class StreamInterruptedError extends Error {
|
|
84
90
|
constructor(cause?: unknown);
|
|
85
91
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonl.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/stream/jsonl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jsonl.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/stream/jsonl.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,M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;KAAE,KAAK,OAAO,CAAC;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAoJD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,oBAAoB,+CA+B7D;AAED,cAAM,sBAAuB,SAAQ,KAAK;gBAC5B,KAAK,CAAC,EAAE,OAAO;CAK5B;AAMD,MAAM,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,KAAK,IAAI,CAAC;AAkFjE;;GAEG;AACH,KAAK,eAAe,GAAG,SAAS,GAAG,sBAAsB,CAAC;AA8F1D;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE;IACrD,IAAI,EAAE,yBAAyB,GAAG,sBAAsB,CAAC;IACzD,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,KAAK,KAAK,CAAC;IAClD;;OAEG;IACH,eAAe,EAAE,eAAe,CAAC;CAClC;2BAxC+B,UAAU;qBArCvB,eAAe;;;;;;wBAiDL,OAAO;IA0JnC"}
|
|
@@ -6,6 +6,7 @@ var createDeferred = require('./utils/createDeferred.js');
|
|
|
6
6
|
var disposable = require('./utils/disposable.js');
|
|
7
7
|
var mergeAsyncIterables = require('./utils/mergeAsyncIterables.js');
|
|
8
8
|
var readableStreamFrom = require('./utils/readableStreamFrom.js');
|
|
9
|
+
var withPing = require('./utils/withPing.js');
|
|
9
10
|
|
|
10
11
|
function _define_property(obj, key, value) {
|
|
11
12
|
if (key in obj) {
|
|
@@ -284,7 +285,11 @@ async function* createBatchStreamProducer(opts) {
|
|
|
284
285
|
]);
|
|
285
286
|
}
|
|
286
287
|
yield newHead;
|
|
287
|
-
|
|
288
|
+
let iterable = mergedIterables;
|
|
289
|
+
if (opts.pingMs) {
|
|
290
|
+
iterable = withPing.withPing(mergedIterables, opts.pingMs);
|
|
291
|
+
}
|
|
292
|
+
for await (const value of iterable){
|
|
288
293
|
yield value;
|
|
289
294
|
}
|
|
290
295
|
}
|
|
@@ -297,13 +302,21 @@ async function* createBatchStreamProducer(opts) {
|
|
|
297
302
|
if (serialize) {
|
|
298
303
|
stream = stream.pipeThrough(new TransformStream({
|
|
299
304
|
transform (chunk, controller) {
|
|
300
|
-
|
|
305
|
+
if (chunk === withPing.PING_SYM) {
|
|
306
|
+
controller.enqueue(withPing.PING_SYM);
|
|
307
|
+
} else {
|
|
308
|
+
controller.enqueue(serialize(chunk));
|
|
309
|
+
}
|
|
301
310
|
}
|
|
302
311
|
}));
|
|
303
312
|
}
|
|
304
313
|
return stream.pipeThrough(new TransformStream({
|
|
305
314
|
transform (chunk, controller) {
|
|
306
|
-
|
|
315
|
+
if (chunk === withPing.PING_SYM) {
|
|
316
|
+
controller.enqueue(' ');
|
|
317
|
+
} else {
|
|
318
|
+
controller.enqueue(JSON.stringify(chunk) + '\n');
|
|
319
|
+
}
|
|
307
320
|
}
|
|
308
321
|
})).pipeThrough(new TextEncoderStream());
|
|
309
322
|
}
|
|
@@ -4,6 +4,7 @@ import { createDeferred } from './utils/createDeferred.mjs';
|
|
|
4
4
|
import { makeResource } from './utils/disposable.mjs';
|
|
5
5
|
import { mergeAsyncIterables } from './utils/mergeAsyncIterables.mjs';
|
|
6
6
|
import { readableStreamFrom } from './utils/readableStreamFrom.mjs';
|
|
7
|
+
import { PING_SYM, withPing } from './utils/withPing.mjs';
|
|
7
8
|
|
|
8
9
|
function _define_property(obj, key, value) {
|
|
9
10
|
if (key in obj) {
|
|
@@ -282,7 +283,11 @@ async function* createBatchStreamProducer(opts) {
|
|
|
282
283
|
]);
|
|
283
284
|
}
|
|
284
285
|
yield newHead;
|
|
285
|
-
|
|
286
|
+
let iterable = mergedIterables;
|
|
287
|
+
if (opts.pingMs) {
|
|
288
|
+
iterable = withPing(mergedIterables, opts.pingMs);
|
|
289
|
+
}
|
|
290
|
+
for await (const value of iterable){
|
|
286
291
|
yield value;
|
|
287
292
|
}
|
|
288
293
|
}
|
|
@@ -295,13 +300,21 @@ async function* createBatchStreamProducer(opts) {
|
|
|
295
300
|
if (serialize) {
|
|
296
301
|
stream = stream.pipeThrough(new TransformStream({
|
|
297
302
|
transform (chunk, controller) {
|
|
298
|
-
|
|
303
|
+
if (chunk === PING_SYM) {
|
|
304
|
+
controller.enqueue(PING_SYM);
|
|
305
|
+
} else {
|
|
306
|
+
controller.enqueue(serialize(chunk));
|
|
307
|
+
}
|
|
299
308
|
}
|
|
300
309
|
}));
|
|
301
310
|
}
|
|
302
311
|
return stream.pipeThrough(new TransformStream({
|
|
303
312
|
transform (chunk, controller) {
|
|
304
|
-
|
|
313
|
+
if (chunk === PING_SYM) {
|
|
314
|
+
controller.enqueue(' ');
|
|
315
|
+
} else {
|
|
316
|
+
controller.enqueue(JSON.stringify(chunk) + '\n');
|
|
317
|
+
}
|
|
305
318
|
}
|
|
306
319
|
})).pipeThrough(new TextEncoderStream());
|
|
307
320
|
}
|
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.743+96fa581c4",
|
|
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": "96fa581c4a53778dbb4272d728a010c64c8fecbe"
|
|
156
156
|
}
|
|
@@ -108,11 +108,15 @@ export type NodeHTTPRequestHandlerOptions<
|
|
|
108
108
|
TRouter extends AnyRouter,
|
|
109
109
|
TRequest extends NodeHTTPRequest,
|
|
110
110
|
TResponse extends NodeHTTPResponse,
|
|
111
|
-
> = {
|
|
111
|
+
> = NodeHTTPHandlerOptions<TRouter, TRequest, TResponse> & {
|
|
112
112
|
req: TRequest;
|
|
113
113
|
res: TResponse;
|
|
114
|
+
/**
|
|
115
|
+
* The tRPC path to handle requests for
|
|
116
|
+
* @example 'post.all'
|
|
117
|
+
*/
|
|
114
118
|
path: string;
|
|
115
|
-
}
|
|
119
|
+
};
|
|
116
120
|
|
|
117
121
|
export type NodeHTTPCreateContextFnOptions<TRequest, TResponse> = {
|
|
118
122
|
req: TRequest;
|
|
@@ -27,9 +27,25 @@ import {
|
|
|
27
27
|
nodeHTTPRequestHandler,
|
|
28
28
|
} from './node-http';
|
|
29
29
|
|
|
30
|
+
type StandaloneHandlerOptions<
|
|
31
|
+
TRouter extends AnyRouter,
|
|
32
|
+
TRequest extends NodeHTTPRequest,
|
|
33
|
+
TResponse extends NodeHTTPResponse,
|
|
34
|
+
> = NodeHTTPHandlerOptions<TRouter, TRequest, TResponse> & {
|
|
35
|
+
/**
|
|
36
|
+
* The base path to handle requests for.
|
|
37
|
+
* This will be sliced from the beginning of the request path
|
|
38
|
+
* (Do not miss including the trailing slash)
|
|
39
|
+
* @default '/'
|
|
40
|
+
* @example '/trpc/'
|
|
41
|
+
* @example '/trpc/api/'
|
|
42
|
+
*/
|
|
43
|
+
basePath?: string;
|
|
44
|
+
};
|
|
45
|
+
|
|
30
46
|
// --- http1 ---
|
|
31
47
|
export type CreateHTTPHandlerOptions<TRouter extends AnyRouter> =
|
|
32
|
-
|
|
48
|
+
StandaloneHandlerOptions<TRouter, http.IncomingMessage, http.ServerResponse>;
|
|
33
49
|
|
|
34
50
|
export type CreateHTTPContextOptions = NodeHTTPCreateContextFnOptions<
|
|
35
51
|
http.IncomingMessage,
|
|
@@ -41,16 +57,19 @@ function createHandler<
|
|
|
41
57
|
TRequest extends NodeHTTPRequest,
|
|
42
58
|
TResponse extends NodeHTTPResponse,
|
|
43
59
|
>(
|
|
44
|
-
opts:
|
|
60
|
+
opts: StandaloneHandlerOptions<TRouter, TRequest, TResponse>,
|
|
45
61
|
): (req: TRequest, res: TResponse) => void {
|
|
62
|
+
const basePath = opts.basePath ?? '/';
|
|
63
|
+
const sliceLength = basePath.length;
|
|
64
|
+
|
|
46
65
|
return (req, res) => {
|
|
47
66
|
let path = '';
|
|
67
|
+
|
|
48
68
|
run(async () => {
|
|
49
69
|
const url = createURL(req);
|
|
50
70
|
|
|
51
|
-
// get procedure path and remove the leading slash
|
|
52
|
-
|
|
53
|
-
path = url.pathname.slice(1);
|
|
71
|
+
// get procedure(s) path and remove the leading slash
|
|
72
|
+
path = url.pathname.slice(sliceLength);
|
|
54
73
|
|
|
55
74
|
await nodeHTTPRequestHandler({
|
|
56
75
|
...(opts as any),
|
|
@@ -86,7 +105,7 @@ export function createHTTPServer<TRouter extends AnyRouter>(
|
|
|
86
105
|
|
|
87
106
|
// --- http2 ---
|
|
88
107
|
export type CreateHTTP2HandlerOptions<TRouter extends AnyRouter> =
|
|
89
|
-
|
|
108
|
+
StandaloneHandlerOptions<
|
|
90
109
|
TRouter,
|
|
91
110
|
http2.Http2ServerRequest,
|
|
92
111
|
http2.Http2ServerResponse
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CombinedDataTransformer } from '../unstable-core-do-not-import';
|
|
2
2
|
import type { DefaultErrorShape, ErrorFormatter } from './error/formatter';
|
|
3
|
+
import type { JSONLProducerOptions } from './stream/jsonl';
|
|
3
4
|
import type { SSEStreamProducerOptions } from './stream/sse';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -79,6 +80,12 @@ export interface RootConfig<TTypes extends RootTypes> {
|
|
|
79
80
|
SSEStreamProducerOptions,
|
|
80
81
|
'ping' | 'emitAndEndImmediately' | 'maxDurationMs' | 'client'
|
|
81
82
|
>;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Options for batch stream
|
|
86
|
+
* @see https://trpc.io/docs/client/links/httpBatchStreamLink
|
|
87
|
+
*/
|
|
88
|
+
jsonl?: Pick<JSONLProducerOptions, 'pingMs'>;
|
|
82
89
|
experimental?: {};
|
|
83
90
|
}
|
|
84
91
|
|
|
@@ -5,6 +5,7 @@ import { createDeferred } from './utils/createDeferred';
|
|
|
5
5
|
import { makeResource } from './utils/disposable';
|
|
6
6
|
import { mergeAsyncIterables } from './utils/mergeAsyncIterables';
|
|
7
7
|
import { readableStreamFrom } from './utils/readableStreamFrom';
|
|
8
|
+
import { PING_SYM, withPing } from './utils/withPing';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* A subset of the standard ReadableStream properties needed by tRPC internally.
|
|
@@ -107,12 +108,18 @@ export type ProducerOnError = (opts: {
|
|
|
107
108
|
error: unknown;
|
|
108
109
|
path: PathArray;
|
|
109
110
|
}) => void;
|
|
110
|
-
export interface
|
|
111
|
+
export interface JSONLProducerOptions {
|
|
111
112
|
serialize?: Serialize;
|
|
112
113
|
data: Record<string, unknown> | unknown[];
|
|
113
114
|
onError?: ProducerOnError;
|
|
114
115
|
formatError?: (opts: { error: unknown; path: PathArray }) => unknown;
|
|
115
116
|
maxDepth?: number;
|
|
117
|
+
/**
|
|
118
|
+
* Interval in milliseconds to send a ping to the client to keep the connection alive
|
|
119
|
+
* This will be sent as a whitespace character
|
|
120
|
+
* @default undefined
|
|
121
|
+
*/
|
|
122
|
+
pingMs?: number;
|
|
116
123
|
}
|
|
117
124
|
|
|
118
125
|
class MaxDepthError extends Error {
|
|
@@ -122,8 +129,8 @@ class MaxDepthError extends Error {
|
|
|
122
129
|
}
|
|
123
130
|
|
|
124
131
|
async function* createBatchStreamProducer(
|
|
125
|
-
opts:
|
|
126
|
-
): AsyncIterable<Head | ChunkData, void> {
|
|
132
|
+
opts: JSONLProducerOptions,
|
|
133
|
+
): AsyncIterable<Head | ChunkData | typeof PING_SYM, void> {
|
|
127
134
|
const { data } = opts;
|
|
128
135
|
let counter = 0 as ChunkIndex;
|
|
129
136
|
const placeholder = 0 as PlaceholderValue;
|
|
@@ -251,7 +258,13 @@ async function* createBatchStreamProducer(
|
|
|
251
258
|
|
|
252
259
|
yield newHead;
|
|
253
260
|
|
|
254
|
-
|
|
261
|
+
let iterable: AsyncIterable<Head | ChunkData | typeof PING_SYM, void> =
|
|
262
|
+
mergedIterables;
|
|
263
|
+
if (opts.pingMs) {
|
|
264
|
+
iterable = withPing(mergedIterables, opts.pingMs);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
for await (const value of iterable) {
|
|
255
268
|
yield value;
|
|
256
269
|
}
|
|
257
270
|
}
|
|
@@ -259,7 +272,7 @@ async function* createBatchStreamProducer(
|
|
|
259
272
|
* JSON Lines stream producer
|
|
260
273
|
* @see https://jsonlines.org/
|
|
261
274
|
*/
|
|
262
|
-
export function jsonlStreamProducer(opts:
|
|
275
|
+
export function jsonlStreamProducer(opts: JSONLProducerOptions) {
|
|
263
276
|
let stream = readableStreamFrom(createBatchStreamProducer(opts));
|
|
264
277
|
|
|
265
278
|
const { serialize } = opts;
|
|
@@ -267,7 +280,11 @@ export function jsonlStreamProducer(opts: ProducerOptions) {
|
|
|
267
280
|
stream = stream.pipeThrough(
|
|
268
281
|
new TransformStream({
|
|
269
282
|
transform(chunk, controller) {
|
|
270
|
-
|
|
283
|
+
if (chunk === PING_SYM) {
|
|
284
|
+
controller.enqueue(PING_SYM);
|
|
285
|
+
} else {
|
|
286
|
+
controller.enqueue(serialize(chunk));
|
|
287
|
+
}
|
|
271
288
|
},
|
|
272
289
|
}),
|
|
273
290
|
);
|
|
@@ -277,7 +294,11 @@ export function jsonlStreamProducer(opts: ProducerOptions) {
|
|
|
277
294
|
.pipeThrough(
|
|
278
295
|
new TransformStream({
|
|
279
296
|
transform(chunk, controller) {
|
|
280
|
-
|
|
297
|
+
if (chunk === PING_SYM) {
|
|
298
|
+
controller.enqueue(' ');
|
|
299
|
+
} else {
|
|
300
|
+
controller.enqueue(JSON.stringify(chunk) + '\n');
|
|
301
|
+
}
|
|
281
302
|
},
|
|
282
303
|
}),
|
|
283
304
|
)
|