@trpc/server 11.0.0-alpha-tmp-issues-5851-take-two.461 → 11.0.0-alpha-tmp-issues-5851-take-two.463
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 27.
|
|
2
|
+
"bundleSize": 131395,
|
|
3
|
+
"bundleOrigSize": 180831,
|
|
4
|
+
"bundleReduction": 27.34,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
8
|
-
"size":
|
|
9
|
-
"origSize":
|
|
8
|
+
"size": 17283,
|
|
9
|
+
"origSize": 18068,
|
|
10
10
|
"renderedExports": [
|
|
11
11
|
"isPromise",
|
|
12
12
|
"jsonlStreamProducer",
|
|
@@ -17,7 +17,7 @@
|
|
|
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.
|
|
20
|
+
"percent": 13.15,
|
|
21
21
|
"reduction": 4.34
|
|
22
22
|
},
|
|
23
23
|
{
|
|
@@ -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"
|
|
@@ -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": [],
|
|
@@ -332,7 +332,7 @@ function createConsumerStream(from) {
|
|
|
332
332
|
let headDeferred = createDeferred.createDeferred();
|
|
333
333
|
const chunkDeferred = new Map();
|
|
334
334
|
const controllers = new Map();
|
|
335
|
-
const
|
|
335
|
+
const maybeAbort = ()=>{
|
|
336
336
|
if (chunkDeferred.size === 0 && Array.from(controllers.values()).every((it)=>it.returned)) {
|
|
337
337
|
// nothing is listening to the stream anymore
|
|
338
338
|
opts.abortController?.abort();
|
|
@@ -382,7 +382,7 @@ function createConsumerStream(from) {
|
|
|
382
382
|
}).catch(reject).finally(()=>{
|
|
383
383
|
// reader.releaseLock();
|
|
384
384
|
controllers.delete(chunkId);
|
|
385
|
-
|
|
385
|
+
maybeAbort();
|
|
386
386
|
});
|
|
387
387
|
});
|
|
388
388
|
}
|
|
@@ -413,14 +413,14 @@ function createConsumerStream(from) {
|
|
|
413
413
|
};
|
|
414
414
|
case ASYNC_ITERABLE_STATUS_DONE:
|
|
415
415
|
controllers.delete(chunkId);
|
|
416
|
-
|
|
416
|
+
maybeAbort();
|
|
417
417
|
return {
|
|
418
418
|
done: true,
|
|
419
419
|
value: undefined
|
|
420
420
|
};
|
|
421
421
|
case ASYNC_ITERABLE_STATUS_ERROR:
|
|
422
422
|
controllers.delete(chunkId);
|
|
423
|
-
|
|
423
|
+
maybeAbort();
|
|
424
424
|
throw opts.formatError?.({
|
|
425
425
|
error: data
|
|
426
426
|
}) ?? new AsyncError(data);
|
|
@@ -428,7 +428,7 @@ function createConsumerStream(from) {
|
|
|
428
428
|
},
|
|
429
429
|
return: async ()=>{
|
|
430
430
|
wrapper.returned = true;
|
|
431
|
-
|
|
431
|
+
maybeAbort();
|
|
432
432
|
return {
|
|
433
433
|
done: true,
|
|
434
434
|
value: undefined
|
|
@@ -330,7 +330,7 @@ function createConsumerStream(from) {
|
|
|
330
330
|
let headDeferred = createDeferred();
|
|
331
331
|
const chunkDeferred = new Map();
|
|
332
332
|
const controllers = new Map();
|
|
333
|
-
const
|
|
333
|
+
const maybeAbort = ()=>{
|
|
334
334
|
if (chunkDeferred.size === 0 && Array.from(controllers.values()).every((it)=>it.returned)) {
|
|
335
335
|
// nothing is listening to the stream anymore
|
|
336
336
|
opts.abortController?.abort();
|
|
@@ -380,7 +380,7 @@ function createConsumerStream(from) {
|
|
|
380
380
|
}).catch(reject).finally(()=>{
|
|
381
381
|
// reader.releaseLock();
|
|
382
382
|
controllers.delete(chunkId);
|
|
383
|
-
|
|
383
|
+
maybeAbort();
|
|
384
384
|
});
|
|
385
385
|
});
|
|
386
386
|
}
|
|
@@ -411,14 +411,14 @@ function createConsumerStream(from) {
|
|
|
411
411
|
};
|
|
412
412
|
case ASYNC_ITERABLE_STATUS_DONE:
|
|
413
413
|
controllers.delete(chunkId);
|
|
414
|
-
|
|
414
|
+
maybeAbort();
|
|
415
415
|
return {
|
|
416
416
|
done: true,
|
|
417
417
|
value: undefined
|
|
418
418
|
};
|
|
419
419
|
case ASYNC_ITERABLE_STATUS_ERROR:
|
|
420
420
|
controllers.delete(chunkId);
|
|
421
|
-
|
|
421
|
+
maybeAbort();
|
|
422
422
|
throw opts.formatError?.({
|
|
423
423
|
error: data
|
|
424
424
|
}) ?? new AsyncError(data);
|
|
@@ -426,7 +426,7 @@ function createConsumerStream(from) {
|
|
|
426
426
|
},
|
|
427
427
|
return: async ()=>{
|
|
428
428
|
wrapper.returned = true;
|
|
429
|
-
|
|
429
|
+
maybeAbort();
|
|
430
430
|
return {
|
|
431
431
|
done: true,
|
|
432
432
|
value: undefined
|
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.463+cc69ca8f6",
|
|
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": "cc69ca8f621afbc7c7b26d202a4b2e25866b84de"
|
|
153
153
|
}
|
|
@@ -447,7 +447,7 @@ export async function jsonlStreamConsumer<THead>(opts: {
|
|
|
447
447
|
const chunkDeferred = new Map<ChunkIndex, Deferred<ControllerWrapper>>();
|
|
448
448
|
const controllers = new Map<ChunkIndex, ControllerWrapper>();
|
|
449
449
|
|
|
450
|
-
const
|
|
450
|
+
const maybeAbort = () => {
|
|
451
451
|
if (
|
|
452
452
|
chunkDeferred.size === 0 &&
|
|
453
453
|
Array.from(controllers.values()).every((it) => it.returned)
|
|
@@ -510,7 +510,7 @@ export async function jsonlStreamConsumer<THead>(opts: {
|
|
|
510
510
|
// reader.releaseLock();
|
|
511
511
|
controllers.delete(chunkId);
|
|
512
512
|
|
|
513
|
-
|
|
513
|
+
maybeAbort();
|
|
514
514
|
});
|
|
515
515
|
});
|
|
516
516
|
}
|
|
@@ -542,14 +542,14 @@ export async function jsonlStreamConsumer<THead>(opts: {
|
|
|
542
542
|
};
|
|
543
543
|
case ASYNC_ITERABLE_STATUS_DONE:
|
|
544
544
|
controllers.delete(chunkId);
|
|
545
|
-
|
|
545
|
+
maybeAbort();
|
|
546
546
|
return {
|
|
547
547
|
done: true,
|
|
548
548
|
value: undefined,
|
|
549
549
|
};
|
|
550
550
|
case ASYNC_ITERABLE_STATUS_ERROR:
|
|
551
551
|
controllers.delete(chunkId);
|
|
552
|
-
|
|
552
|
+
maybeAbort();
|
|
553
553
|
throw (
|
|
554
554
|
opts.formatError?.({ error: data }) ??
|
|
555
555
|
new AsyncError(data)
|
|
@@ -558,7 +558,7 @@ export async function jsonlStreamConsumer<THead>(opts: {
|
|
|
558
558
|
},
|
|
559
559
|
return: async () => {
|
|
560
560
|
wrapper.returned = true;
|
|
561
|
-
|
|
561
|
+
maybeAbort();
|
|
562
562
|
return {
|
|
563
563
|
done: true,
|
|
564
564
|
value: undefined,
|