@trpc/server 11.0.0-alpha-tmp-issues-5851-take-two.485 → 11.0.0-alpha-tmp-issues-5851-take-two.488
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 27.
|
|
2
|
+
"bundleSize": 131082,
|
|
3
|
+
"bundleOrigSize": 180516,
|
|
4
|
+
"bundleReduction": 27.38,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
@@ -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.23,
|
|
21
21
|
"reduction": 4.22
|
|
22
22
|
},
|
|
23
23
|
{
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependents": [
|
|
32
32
|
"/src/unstable-core-do-not-import.ts"
|
|
33
33
|
],
|
|
34
|
-
"percent": 13,
|
|
34
|
+
"percent": 13.03,
|
|
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.89,
|
|
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.79,
|
|
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.87,
|
|
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.83,
|
|
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.3,
|
|
117
117
|
"reduction": 24.48
|
|
118
118
|
},
|
|
119
119
|
{
|
|
@@ -132,8 +132,8 @@
|
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
"id": "/src/observable/observable.ts",
|
|
135
|
-
"size":
|
|
136
|
-
"origSize":
|
|
135
|
+
"size": 4116,
|
|
136
|
+
"origSize": 4093,
|
|
137
137
|
"renderedExports": [
|
|
138
138
|
"isObservable",
|
|
139
139
|
"observable",
|
|
@@ -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.14,
|
|
151
151
|
"reduction": 0
|
|
152
152
|
},
|
|
153
153
|
{
|
|
@@ -261,7 +261,7 @@
|
|
|
261
261
|
"/src/unstable-core-do-not-import.ts",
|
|
262
262
|
"/src/unstable-core-do-not-import/router.ts"
|
|
263
263
|
],
|
|
264
|
-
"percent": 1.
|
|
264
|
+
"percent": 1.78,
|
|
265
265
|
"reduction": 0
|
|
266
266
|
},
|
|
267
267
|
{
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
],
|
|
341
341
|
"removedExports": [],
|
|
342
342
|
"dependents": [],
|
|
343
|
-
"percent": 1.
|
|
343
|
+
"percent": 1.21,
|
|
344
344
|
"reduction": 21.04
|
|
345
345
|
},
|
|
346
346
|
{
|
|
@@ -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"
|
|
@@ -721,6 +721,16 @@
|
|
|
721
721
|
"percent": 0,
|
|
722
722
|
"reduction": 100
|
|
723
723
|
},
|
|
724
|
+
{
|
|
725
|
+
"id": "/src/rpc.ts",
|
|
726
|
+
"size": 0,
|
|
727
|
+
"origSize": 36,
|
|
728
|
+
"renderedExports": [],
|
|
729
|
+
"removedExports": [],
|
|
730
|
+
"dependents": [],
|
|
731
|
+
"percent": 0,
|
|
732
|
+
"reduction": 100
|
|
733
|
+
},
|
|
724
734
|
{
|
|
725
735
|
"id": "/src/index.ts",
|
|
726
736
|
"size": 0,
|
|
@@ -732,9 +742,9 @@
|
|
|
732
742
|
"reduction": 100
|
|
733
743
|
},
|
|
734
744
|
{
|
|
735
|
-
"id": "/src/
|
|
745
|
+
"id": "/src/shared.ts",
|
|
736
746
|
"size": 0,
|
|
737
|
-
"origSize":
|
|
747
|
+
"origSize": 653,
|
|
738
748
|
"renderedExports": [],
|
|
739
749
|
"removedExports": [],
|
|
740
750
|
"dependents": [],
|
|
@@ -754,16 +764,6 @@
|
|
|
754
764
|
"percent": 0,
|
|
755
765
|
"reduction": 100
|
|
756
766
|
},
|
|
757
|
-
{
|
|
758
|
-
"id": "/src/shared.ts",
|
|
759
|
-
"size": 0,
|
|
760
|
-
"origSize": 653,
|
|
761
|
-
"renderedExports": [],
|
|
762
|
-
"removedExports": [],
|
|
763
|
-
"dependents": [],
|
|
764
|
-
"percent": 0,
|
|
765
|
-
"reduction": 100
|
|
766
|
-
},
|
|
767
767
|
{
|
|
768
768
|
"id": "/src/adapters/next-app-dir.ts",
|
|
769
769
|
"size": 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observable.d.ts","sourceRoot":"","sources":["../../src/observable/observable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EAER,aAAa,EAGd,MAAM,SAAS,CAAC;AAEjB,cAAc;AACd,MAAM,MAAM,oBAAoB,CAAC,WAAW,IAAI,WAAW,SAAS,UAAU,CAC5E,MAAM,MAAM,EACZ,OAAO,CACR,GACG,MAAM,GACN,KAAK,CAAC;AAEV,cAAc;AACd,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAE1E;AAED,cAAc;AACd,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,EACjD,SAAS,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,aAAa,GAC/D,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,CA6D5B;
|
|
1
|
+
{"version":3,"file":"observable.d.ts","sourceRoot":"","sources":["../../src/observable/observable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EAER,aAAa,EAGd,MAAM,SAAS,CAAC;AAEjB,cAAc;AACd,MAAM,MAAM,oBAAoB,CAAC,WAAW,IAAI,WAAW,SAAS,UAAU,CAC5E,MAAM,MAAM,EACZ,OAAO,CACR,GACG,MAAM,GACN,KAAK,CAAC;AAEV,cAAc;AACd,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAE1E;AAED,cAAc;AACd,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,EACjD,SAAS,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,aAAa,GAC/D,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,CA6D5B;AAMD,gBAAgB;AAChB,wBAAgB,mBAAmB,CAAC,MAAM,EACxC,UAAU,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,mBA+BxC;AA6BD,wBAAgB,yBAAyB,CAAC,MAAM,EAC9C,UAAU,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,GACtC,aAAa,CAAC,MAAM,CAAC,CA+BvB"}
|
|
@@ -65,14 +65,8 @@
|
|
|
65
65
|
function pipeReducer(prev, fn) {
|
|
66
66
|
return fn(prev);
|
|
67
67
|
}
|
|
68
|
-
class ObservableAbortError extends Error {
|
|
69
|
-
constructor(message){
|
|
70
|
-
super(message);
|
|
71
|
-
this.name = 'ObservableAbortError';
|
|
72
|
-
Object.setPrototypeOf(this, ObservableAbortError.prototype);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
68
|
/** @internal */ function observableToPromise(observable) {
|
|
69
|
+
const ac = new AbortController();
|
|
76
70
|
const promise = new Promise((resolve, reject)=>{
|
|
77
71
|
let isDone = false;
|
|
78
72
|
function onDone() {
|
|
@@ -80,9 +74,11 @@ class ObservableAbortError extends Error {
|
|
|
80
74
|
return;
|
|
81
75
|
}
|
|
82
76
|
isDone = true;
|
|
83
|
-
reject(new ObservableAbortError('This operation was aborted.'));
|
|
84
77
|
obs$.unsubscribe();
|
|
85
78
|
}
|
|
79
|
+
ac.signal.addEventListener('abort', ()=>{
|
|
80
|
+
reject(ac.signal.reason);
|
|
81
|
+
});
|
|
86
82
|
const obs$ = observable.subscribe({
|
|
87
83
|
next (data) {
|
|
88
84
|
isDone = true;
|
|
@@ -90,12 +86,10 @@ class ObservableAbortError extends Error {
|
|
|
90
86
|
onDone();
|
|
91
87
|
},
|
|
92
88
|
error (data) {
|
|
93
|
-
isDone = true;
|
|
94
89
|
reject(data);
|
|
95
|
-
onDone();
|
|
96
90
|
},
|
|
97
91
|
complete () {
|
|
98
|
-
|
|
92
|
+
ac.abort();
|
|
99
93
|
onDone();
|
|
100
94
|
}
|
|
101
95
|
});
|
|
@@ -63,14 +63,8 @@
|
|
|
63
63
|
function pipeReducer(prev, fn) {
|
|
64
64
|
return fn(prev);
|
|
65
65
|
}
|
|
66
|
-
class ObservableAbortError extends Error {
|
|
67
|
-
constructor(message){
|
|
68
|
-
super(message);
|
|
69
|
-
this.name = 'ObservableAbortError';
|
|
70
|
-
Object.setPrototypeOf(this, ObservableAbortError.prototype);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
66
|
/** @internal */ function observableToPromise(observable) {
|
|
67
|
+
const ac = new AbortController();
|
|
74
68
|
const promise = new Promise((resolve, reject)=>{
|
|
75
69
|
let isDone = false;
|
|
76
70
|
function onDone() {
|
|
@@ -78,9 +72,11 @@ class ObservableAbortError extends Error {
|
|
|
78
72
|
return;
|
|
79
73
|
}
|
|
80
74
|
isDone = true;
|
|
81
|
-
reject(new ObservableAbortError('This operation was aborted.'));
|
|
82
75
|
obs$.unsubscribe();
|
|
83
76
|
}
|
|
77
|
+
ac.signal.addEventListener('abort', ()=>{
|
|
78
|
+
reject(ac.signal.reason);
|
|
79
|
+
});
|
|
84
80
|
const obs$ = observable.subscribe({
|
|
85
81
|
next (data) {
|
|
86
82
|
isDone = true;
|
|
@@ -88,12 +84,10 @@ class ObservableAbortError extends Error {
|
|
|
88
84
|
onDone();
|
|
89
85
|
},
|
|
90
86
|
error (data) {
|
|
91
|
-
isDone = true;
|
|
92
87
|
reject(data);
|
|
93
|
-
onDone();
|
|
94
88
|
},
|
|
95
89
|
complete () {
|
|
96
|
-
|
|
90
|
+
ac.abort();
|
|
97
91
|
onDone();
|
|
98
92
|
}
|
|
99
93
|
});
|
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.488+33ec2950b",
|
|
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": "33ec2950bd3d9da1f49796cbe512c6e27fc3b1fb"
|
|
153
153
|
}
|
|
@@ -90,18 +90,11 @@ function pipeReducer(prev: any, fn: UnaryFunction<any, any>) {
|
|
|
90
90
|
return fn(prev);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
class ObservableAbortError extends Error {
|
|
94
|
-
constructor(message: string) {
|
|
95
|
-
super(message);
|
|
96
|
-
this.name = 'ObservableAbortError';
|
|
97
|
-
Object.setPrototypeOf(this, ObservableAbortError.prototype);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
93
|
/** @internal */
|
|
102
94
|
export function observableToPromise<TValue>(
|
|
103
95
|
observable: Observable<TValue, unknown>,
|
|
104
96
|
) {
|
|
97
|
+
const ac = new AbortController();
|
|
105
98
|
const promise = new Promise<TValue>((resolve, reject) => {
|
|
106
99
|
let isDone = false;
|
|
107
100
|
function onDone() {
|
|
@@ -109,9 +102,11 @@ export function observableToPromise<TValue>(
|
|
|
109
102
|
return;
|
|
110
103
|
}
|
|
111
104
|
isDone = true;
|
|
112
|
-
reject(new ObservableAbortError('This operation was aborted.'));
|
|
113
105
|
obs$.unsubscribe();
|
|
114
106
|
}
|
|
107
|
+
ac.signal.addEventListener('abort', () => {
|
|
108
|
+
reject(ac.signal.reason);
|
|
109
|
+
});
|
|
115
110
|
const obs$ = observable.subscribe({
|
|
116
111
|
next(data) {
|
|
117
112
|
isDone = true;
|
|
@@ -119,12 +114,10 @@ export function observableToPromise<TValue>(
|
|
|
119
114
|
onDone();
|
|
120
115
|
},
|
|
121
116
|
error(data) {
|
|
122
|
-
isDone = true;
|
|
123
117
|
reject(data);
|
|
124
|
-
onDone();
|
|
125
118
|
},
|
|
126
119
|
complete() {
|
|
127
|
-
|
|
120
|
+
ac.abort();
|
|
128
121
|
onDone();
|
|
129
122
|
},
|
|
130
123
|
});
|