@trpc/server 11.0.0-alpha-tmp-issues-5851-take-two.457 → 11.0.0-alpha-tmp-issues-5851-take-two.458
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/bundle-analysis.json +38 -38
- package/dist/unstable-core-do-not-import/stream/jsonl.d.ts +1 -1
- package/dist/unstable-core-do-not-import/stream/jsonl.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/stream/jsonl.js +2 -9
- package/dist/unstable-core-do-not-import/stream/jsonl.mjs +2 -9
- package/package.json +2 -2
- package/src/unstable-core-do-not-import/stream/jsonl.ts +2 -8
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 27.
|
|
2
|
+
"bundleSize": 131586,
|
|
3
|
+
"bundleOrigSize": 180977,
|
|
4
|
+
"bundleReduction": 27.29,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
8
|
-
"size":
|
|
9
|
-
"origSize":
|
|
8
|
+
"size": 17474,
|
|
9
|
+
"origSize": 18214,
|
|
10
10
|
"renderedExports": [
|
|
11
11
|
"isPromise",
|
|
12
12
|
"jsonlStreamProducer",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"/src/unstable-core-do-not-import.ts",
|
|
18
18
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
19
19
|
],
|
|
20
|
-
"percent": 13.
|
|
21
|
-
"reduction":
|
|
20
|
+
"percent": 13.28,
|
|
21
|
+
"reduction": 4.06
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependents": [
|
|
32
32
|
"/src/unstable-core-do-not-import.ts"
|
|
33
33
|
],
|
|
34
|
-
"percent": 12.
|
|
34
|
+
"percent": 12.98,
|
|
35
35
|
"reduction": 0
|
|
36
36
|
},
|
|
37
37
|
{
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dependents": [
|
|
47
47
|
"/src/adapters/fastify/fastifyTRPCPlugin.ts"
|
|
48
48
|
],
|
|
49
|
-
"percent": 10.
|
|
49
|
+
"percent": 10.85,
|
|
50
50
|
"reduction": 0
|
|
51
51
|
},
|
|
52
52
|
{
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"/src/unstable-core-do-not-import.ts",
|
|
62
62
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
63
63
|
],
|
|
64
|
-
"percent": 5.
|
|
64
|
+
"percent": 5.77,
|
|
65
65
|
"reduction": 0
|
|
66
66
|
},
|
|
67
67
|
{
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"/src/unstable-core-do-not-import.ts",
|
|
80
80
|
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
81
81
|
],
|
|
82
|
-
"percent": 4.
|
|
82
|
+
"percent": 4.85,
|
|
83
83
|
"reduction": 39.77
|
|
84
84
|
},
|
|
85
85
|
{
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"/src/unstable-core-do-not-import.ts",
|
|
95
95
|
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
96
96
|
],
|
|
97
|
-
"percent": 4.
|
|
97
|
+
"percent": 4.81,
|
|
98
98
|
"reduction": 60.06
|
|
99
99
|
},
|
|
100
100
|
{
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"/src/unstable-core-do-not-import.ts",
|
|
114
114
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
115
115
|
],
|
|
116
|
-
"percent": 4.
|
|
116
|
+
"percent": 4.28,
|
|
117
117
|
"reduction": 24.48
|
|
118
118
|
},
|
|
119
119
|
{
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"dependents": [
|
|
128
128
|
"/src/adapters/aws-lambda/index.ts"
|
|
129
129
|
],
|
|
130
|
-
"percent": 4.
|
|
130
|
+
"percent": 4.12,
|
|
131
131
|
"reduction": 11.38
|
|
132
132
|
},
|
|
133
133
|
{
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
148
148
|
"/src/observable/operators.ts"
|
|
149
149
|
],
|
|
150
|
-
"percent": 3.
|
|
150
|
+
"percent": 3.41,
|
|
151
151
|
"reduction": 0
|
|
152
152
|
},
|
|
153
153
|
{
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
"/src/unstable-core-do-not-import/initTRPC.ts",
|
|
198
198
|
"/src/unstable-core-do-not-import/router.ts"
|
|
199
199
|
],
|
|
200
|
-
"percent": 2.
|
|
200
|
+
"percent": 2.09,
|
|
201
201
|
"reduction": 45.94
|
|
202
202
|
},
|
|
203
203
|
{
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
"/src/unstable-core-do-not-import/initTRPC.ts",
|
|
246
246
|
"/src/unstable-core-do-not-import/procedureBuilder.ts"
|
|
247
247
|
],
|
|
248
|
-
"percent":
|
|
248
|
+
"percent": 2,
|
|
249
249
|
"reduction": 55.5
|
|
250
250
|
},
|
|
251
251
|
{
|
|
@@ -290,7 +290,7 @@
|
|
|
290
290
|
"/src/adapters/node-http/index.ts",
|
|
291
291
|
"/src/adapters/node-http/nodeHTTPRequestHandler.ts"
|
|
292
292
|
],
|
|
293
|
-
"percent": 1.
|
|
293
|
+
"percent": 1.67,
|
|
294
294
|
"reduction": 13.79
|
|
295
295
|
},
|
|
296
296
|
{
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
"dependents": [
|
|
305
305
|
"/src/adapters/next-app-dir/nextAppDirCaller.ts"
|
|
306
306
|
],
|
|
307
|
-
"percent": 1.
|
|
307
|
+
"percent": 1.56,
|
|
308
308
|
"reduction": 5.79
|
|
309
309
|
},
|
|
310
310
|
{
|
|
@@ -328,7 +328,7 @@
|
|
|
328
328
|
"/src/unstable-core-do-not-import/procedureBuilder.ts",
|
|
329
329
|
"/src/unstable-core-do-not-import/stream/jsonl.ts"
|
|
330
330
|
],
|
|
331
|
-
"percent": 1.
|
|
331
|
+
"percent": 1.32,
|
|
332
332
|
"reduction": 19.47
|
|
333
333
|
},
|
|
334
334
|
{
|
|
@@ -418,12 +418,12 @@
|
|
|
418
418
|
"/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
|
|
419
419
|
"/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
|
|
420
420
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
421
|
+
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
421
422
|
"/src/unstable-core-do-not-import/error/TRPCError.ts",
|
|
422
423
|
"/src/unstable-core-do-not-import/stream/sse.ts",
|
|
423
424
|
"/src/unstable-core-do-not-import/transformer.ts",
|
|
424
425
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
425
426
|
"/src/unstable-core-do-not-import/router.ts",
|
|
426
|
-
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
427
427
|
"/src/unstable-core-do-not-import/http/contentType.ts",
|
|
428
428
|
"/src/unstable-core-do-not-import/procedureBuilder.ts",
|
|
429
429
|
"/src/unstable-core-do-not-import/stream/jsonl.ts"
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
"dependents": [
|
|
474
474
|
"/src/unstable-core-do-not-import.ts"
|
|
475
475
|
],
|
|
476
|
-
"percent": 0.
|
|
476
|
+
"percent": 0.81,
|
|
477
477
|
"reduction": 0
|
|
478
478
|
},
|
|
479
479
|
{
|
|
@@ -488,7 +488,7 @@
|
|
|
488
488
|
"/src/unstable-core-do-not-import.ts",
|
|
489
489
|
"/src/unstable-core-do-not-import/procedureBuilder.ts"
|
|
490
490
|
],
|
|
491
|
-
"percent": 0.
|
|
491
|
+
"percent": 0.79,
|
|
492
492
|
"reduction": 58.57
|
|
493
493
|
},
|
|
494
494
|
{
|
|
@@ -592,7 +592,7 @@
|
|
|
592
592
|
],
|
|
593
593
|
"removedExports": [],
|
|
594
594
|
"dependents": [],
|
|
595
|
-
"percent": 0.
|
|
595
|
+
"percent": 0.4,
|
|
596
596
|
"reduction": 67.09
|
|
597
597
|
},
|
|
598
598
|
{
|
|
@@ -722,9 +722,9 @@
|
|
|
722
722
|
"reduction": 100
|
|
723
723
|
},
|
|
724
724
|
{
|
|
725
|
-
"id": "/src/
|
|
725
|
+
"id": "/src/rpc.ts",
|
|
726
726
|
"size": 0,
|
|
727
|
-
"origSize":
|
|
727
|
+
"origSize": 36,
|
|
728
728
|
"renderedExports": [],
|
|
729
729
|
"removedExports": [],
|
|
730
730
|
"dependents": [],
|
|
@@ -732,9 +732,9 @@
|
|
|
732
732
|
"reduction": 100
|
|
733
733
|
},
|
|
734
734
|
{
|
|
735
|
-
"id": "/src/
|
|
735
|
+
"id": "/src/index.ts",
|
|
736
736
|
"size": 0,
|
|
737
|
-
"origSize":
|
|
737
|
+
"origSize": 32,
|
|
738
738
|
"renderedExports": [],
|
|
739
739
|
"removedExports": [],
|
|
740
740
|
"dependents": [],
|
|
@@ -796,6 +796,16 @@
|
|
|
796
796
|
"percent": 0,
|
|
797
797
|
"reduction": 100
|
|
798
798
|
},
|
|
799
|
+
{
|
|
800
|
+
"id": "/src/adapters/fetch/index.ts",
|
|
801
|
+
"size": 0,
|
|
802
|
+
"origSize": 64,
|
|
803
|
+
"renderedExports": [],
|
|
804
|
+
"removedExports": [],
|
|
805
|
+
"dependents": [],
|
|
806
|
+
"percent": 0,
|
|
807
|
+
"reduction": 100
|
|
808
|
+
},
|
|
799
809
|
{
|
|
800
810
|
"id": "/src/adapters/node-http/index.ts",
|
|
801
811
|
"size": 0,
|
|
@@ -810,16 +820,6 @@
|
|
|
810
820
|
],
|
|
811
821
|
"percent": 0,
|
|
812
822
|
"reduction": 100
|
|
813
|
-
},
|
|
814
|
-
{
|
|
815
|
-
"id": "/src/adapters/fetch/index.ts",
|
|
816
|
-
"size": 0,
|
|
817
|
-
"origSize": 64,
|
|
818
|
-
"renderedExports": [],
|
|
819
|
-
"removedExports": [],
|
|
820
|
-
"dependents": [],
|
|
821
|
-
"percent": 0,
|
|
822
|
-
"reduction": 100
|
|
823
823
|
}
|
|
824
824
|
],
|
|
825
825
|
"moduleCount": 55
|
|
@@ -93,12 +93,12 @@ export declare function jsonlStreamConsumer<THead>(opts: {
|
|
|
93
93
|
formatError?: (opts: {
|
|
94
94
|
error: unknown;
|
|
95
95
|
}) => Error;
|
|
96
|
+
abortController: AbortController | null;
|
|
96
97
|
}): Promise<readonly [Awaited<THead>, {
|
|
97
98
|
readonly controllers: Map<ChunkIndex, {
|
|
98
99
|
controller: ReadableStreamDefaultController<ChunkData | StreamInterruptedError>;
|
|
99
100
|
returned: boolean;
|
|
100
101
|
}>;
|
|
101
|
-
readonly streamAbortController: AbortController;
|
|
102
102
|
}]>;
|
|
103
103
|
export {};
|
|
104
104
|
//# sourceMappingURL=jsonl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonl.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/stream/jsonl.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,2BAA2B,CAAC,UAAU,CAAC,CAAC;CAC1D,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,CACA,SAAS,EAAE,MAAM,GAAG,MAAM,EAC1B,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,GACjC,yBAAyB,CAAC;CAC9B,CAAC;AAGF,QAAA,MAAM,wBAAwB,IAAI,CAAC;AACnC,KAAK,wBAAwB,GAAG,OAAO,wBAAwB,CAAC;AAChE,QAAA,MAAM,+BAA+B,IAAI,CAAC;AAC1C,KAAK,+BAA+B,GAAG,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AAS,CAAC;CACjB,KAAK,IAAI,CAAC;AACX,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,EAAE,CAAC;IAC1C,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE,KAAK,OAAO,CAAC;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAuLD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,eAAe,8BA2BxD;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;AAgFjE;;;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,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;CACzC;;;kBAmBa,OAAO;;IA+MpB"}
|
|
@@ -321,7 +321,6 @@ function createConsumerStream(from) {
|
|
|
321
321
|
* @see https://jsonlines.org/
|
|
322
322
|
*/ async function jsonlStreamConsumer(opts) {
|
|
323
323
|
const { deserialize =(v)=>v } = opts;
|
|
324
|
-
const streamAbortController = new AbortController();
|
|
325
324
|
let source = createConsumerStream(opts.from);
|
|
326
325
|
if (deserialize) {
|
|
327
326
|
source = source.pipeThrough(new TransformStream({
|
|
@@ -336,7 +335,7 @@ function createConsumerStream(from) {
|
|
|
336
335
|
const maybeAbortStream = ()=>{
|
|
337
336
|
if (chunkDeferred.size === 0 && Array.from(controllers.values()).every((it)=>it.returned)) {
|
|
338
337
|
// nothing is listening to the stream anymore
|
|
339
|
-
|
|
338
|
+
opts.abortController?.abort();
|
|
340
339
|
}
|
|
341
340
|
};
|
|
342
341
|
function hydrateChunkDefinition(value, path) {
|
|
@@ -471,11 +470,6 @@ function createConsumerStream(from) {
|
|
|
471
470
|
controllers.clear();
|
|
472
471
|
};
|
|
473
472
|
source.pipeTo(new WritableStream({
|
|
474
|
-
start (controller) {
|
|
475
|
-
streamAbortController.signal.addEventListener('abort', ()=>{
|
|
476
|
-
controller.error(streamAbortController.signal.reason);
|
|
477
|
-
});
|
|
478
|
-
},
|
|
479
473
|
async write (chunkOrHead) {
|
|
480
474
|
if (headDeferred) {
|
|
481
475
|
const head = chunkOrHead;
|
|
@@ -513,8 +507,7 @@ function createConsumerStream(from) {
|
|
|
513
507
|
return [
|
|
514
508
|
await headDeferred.promise,
|
|
515
509
|
{
|
|
516
|
-
controllers
|
|
517
|
-
streamAbortController
|
|
510
|
+
controllers
|
|
518
511
|
}
|
|
519
512
|
];
|
|
520
513
|
}
|
|
@@ -319,7 +319,6 @@ function createConsumerStream(from) {
|
|
|
319
319
|
* @see https://jsonlines.org/
|
|
320
320
|
*/ async function jsonlStreamConsumer(opts) {
|
|
321
321
|
const { deserialize =(v)=>v } = opts;
|
|
322
|
-
const streamAbortController = new AbortController();
|
|
323
322
|
let source = createConsumerStream(opts.from);
|
|
324
323
|
if (deserialize) {
|
|
325
324
|
source = source.pipeThrough(new TransformStream({
|
|
@@ -334,7 +333,7 @@ function createConsumerStream(from) {
|
|
|
334
333
|
const maybeAbortStream = ()=>{
|
|
335
334
|
if (chunkDeferred.size === 0 && Array.from(controllers.values()).every((it)=>it.returned)) {
|
|
336
335
|
// nothing is listening to the stream anymore
|
|
337
|
-
|
|
336
|
+
opts.abortController?.abort();
|
|
338
337
|
}
|
|
339
338
|
};
|
|
340
339
|
function hydrateChunkDefinition(value, path) {
|
|
@@ -469,11 +468,6 @@ function createConsumerStream(from) {
|
|
|
469
468
|
controllers.clear();
|
|
470
469
|
};
|
|
471
470
|
source.pipeTo(new WritableStream({
|
|
472
|
-
start (controller) {
|
|
473
|
-
streamAbortController.signal.addEventListener('abort', ()=>{
|
|
474
|
-
controller.error(streamAbortController.signal.reason);
|
|
475
|
-
});
|
|
476
|
-
},
|
|
477
471
|
async write (chunkOrHead) {
|
|
478
472
|
if (headDeferred) {
|
|
479
473
|
const head = chunkOrHead;
|
|
@@ -511,8 +505,7 @@ function createConsumerStream(from) {
|
|
|
511
505
|
return [
|
|
512
506
|
await headDeferred.promise,
|
|
513
507
|
{
|
|
514
|
-
controllers
|
|
515
|
-
streamAbortController
|
|
508
|
+
controllers
|
|
516
509
|
}
|
|
517
510
|
];
|
|
518
511
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/server",
|
|
3
|
-
"version": "11.0.0-alpha-tmp-issues-5851-take-two.
|
|
3
|
+
"version": "11.0.0-alpha-tmp-issues-5851-take-two.458+a4c9a078a",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -149,5 +149,5 @@
|
|
|
149
149
|
"funding": [
|
|
150
150
|
"https://trpc.io/sponsor"
|
|
151
151
|
],
|
|
152
|
-
"gitHead": "
|
|
152
|
+
"gitHead": "a4c9a078a9c1ef9bfe1f6c9d94bbe28b61fc9a54"
|
|
153
153
|
}
|
|
@@ -422,9 +422,9 @@ export async function jsonlStreamConsumer<THead>(opts: {
|
|
|
422
422
|
deserialize?: Deserialize;
|
|
423
423
|
onError?: ConsumerOnError;
|
|
424
424
|
formatError?: (opts: { error: unknown }) => Error;
|
|
425
|
+
abortController: AbortController | null;
|
|
425
426
|
}) {
|
|
426
427
|
const { deserialize = (v) => v } = opts;
|
|
427
|
-
const streamAbortController = new AbortController();
|
|
428
428
|
|
|
429
429
|
let source = createConsumerStream<Head>(opts.from);
|
|
430
430
|
if (deserialize) {
|
|
@@ -453,7 +453,7 @@ export async function jsonlStreamConsumer<THead>(opts: {
|
|
|
453
453
|
Array.from(controllers.values()).every((it) => it.returned)
|
|
454
454
|
) {
|
|
455
455
|
// nothing is listening to the stream anymore
|
|
456
|
-
|
|
456
|
+
opts.abortController?.abort();
|
|
457
457
|
}
|
|
458
458
|
};
|
|
459
459
|
|
|
@@ -608,11 +608,6 @@ export async function jsonlStreamConsumer<THead>(opts: {
|
|
|
608
608
|
source
|
|
609
609
|
.pipeTo(
|
|
610
610
|
new WritableStream({
|
|
611
|
-
start(controller) {
|
|
612
|
-
streamAbortController.signal.addEventListener('abort', () => {
|
|
613
|
-
controller.error(streamAbortController.signal.reason);
|
|
614
|
-
});
|
|
615
|
-
},
|
|
616
611
|
async write(chunkOrHead) {
|
|
617
612
|
if (headDeferred) {
|
|
618
613
|
const head = chunkOrHead as Record<number | string, unknown>;
|
|
@@ -652,7 +647,6 @@ export async function jsonlStreamConsumer<THead>(opts: {
|
|
|
652
647
|
await headDeferred.promise,
|
|
653
648
|
{
|
|
654
649
|
controllers,
|
|
655
|
-
streamAbortController,
|
|
656
650
|
},
|
|
657
651
|
] as const;
|
|
658
652
|
}
|