@trpc/server 11.0.0-rc.745 → 11.0.0-rc.746
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 +37 -37
- package/dist/unstable-core-do-not-import/stream/jsonl.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/stream/jsonl.js +4 -9
- package/dist/unstable-core-do-not-import/stream/jsonl.mjs +4 -9
- package/package.json +2 -2
- package/src/unstable-core-do-not-import/stream/jsonl.ts +7 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 13.
|
|
2
|
+
"bundleSize": 195415,
|
|
3
|
+
"bundleOrigSize": 226915,
|
|
4
|
+
"bundleReduction": 13.88,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"id": "/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
22
|
-
"size":
|
|
23
|
-
"origSize":
|
|
22
|
+
"size": 20511,
|
|
23
|
+
"origSize": 17610,
|
|
24
24
|
"renderedExports": [
|
|
25
25
|
"isPromise",
|
|
26
26
|
"jsonlStreamProducer",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"/src/unstable-core-do-not-import.ts",
|
|
32
32
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
33
33
|
],
|
|
34
|
-
"percent": 10.
|
|
34
|
+
"percent": 10.5,
|
|
35
35
|
"reduction": 0
|
|
36
36
|
},
|
|
37
37
|
{
|
|
@@ -288,9 +288,9 @@
|
|
|
288
288
|
"removedExports": [],
|
|
289
289
|
"dependents": [
|
|
290
290
|
"/src/unstable-core-do-not-import.ts",
|
|
291
|
-
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
292
291
|
"/src/unstable-core-do-not-import/initTRPC.ts",
|
|
293
|
-
"/src/unstable-core-do-not-import/router.ts"
|
|
292
|
+
"/src/unstable-core-do-not-import/router.ts",
|
|
293
|
+
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
294
294
|
],
|
|
295
295
|
"percent": 1.4,
|
|
296
296
|
"reduction": 45.98
|
|
@@ -350,13 +350,13 @@
|
|
|
350
350
|
"removedExports": [],
|
|
351
351
|
"dependents": [
|
|
352
352
|
"/src/unstable-core-do-not-import.ts",
|
|
353
|
-
"/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
|
|
354
|
-
"/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
|
|
355
|
-
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
356
353
|
"/src/unstable-core-do-not-import/error/TRPCError.ts",
|
|
357
354
|
"/src/unstable-core-do-not-import/transformer.ts",
|
|
358
355
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
359
356
|
"/src/unstable-core-do-not-import/router.ts",
|
|
357
|
+
"/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
|
|
358
|
+
"/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
|
|
359
|
+
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
360
360
|
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
361
361
|
"/src/unstable-core-do-not-import/http/contentType.ts",
|
|
362
362
|
"/src/unstable-core-do-not-import/http/isAbortError.ts",
|
|
@@ -379,10 +379,10 @@
|
|
|
379
379
|
"removedExports": [],
|
|
380
380
|
"dependents": [
|
|
381
381
|
"/src/unstable-core-do-not-import.ts",
|
|
382
|
-
"/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
|
|
383
|
-
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
384
382
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
385
383
|
"/src/unstable-core-do-not-import/router.ts",
|
|
384
|
+
"/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
|
|
385
|
+
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
386
386
|
"/src/unstable-core-do-not-import/http/contentType.ts",
|
|
387
387
|
"/src/unstable-core-do-not-import/procedureBuilder.ts",
|
|
388
388
|
"/src/unstable-core-do-not-import/stream/sse.ts"
|
|
@@ -449,8 +449,8 @@
|
|
|
449
449
|
"removedExports": [],
|
|
450
450
|
"dependents": [
|
|
451
451
|
"/src/unstable-core-do-not-import.ts",
|
|
452
|
-
"/src/unstable-core-do-not-import/
|
|
453
|
-
"/src/unstable-core-do-not-import/
|
|
452
|
+
"/src/unstable-core-do-not-import/error/getErrorShape.ts",
|
|
453
|
+
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
454
454
|
],
|
|
455
455
|
"percent": 1.07,
|
|
456
456
|
"reduction": 18.54
|
|
@@ -855,31 +855,31 @@
|
|
|
855
855
|
"reduction": 93.9
|
|
856
856
|
},
|
|
857
857
|
{
|
|
858
|
-
"id": "/src/
|
|
858
|
+
"id": "/src/index.ts",
|
|
859
859
|
"size": 0,
|
|
860
|
-
"origSize":
|
|
860
|
+
"origSize": 32,
|
|
861
861
|
"renderedExports": [],
|
|
862
862
|
"removedExports": [],
|
|
863
|
-
"dependents": [
|
|
864
|
-
"/src/adapters/ws.ts"
|
|
865
|
-
],
|
|
863
|
+
"dependents": [],
|
|
866
864
|
"percent": 0,
|
|
867
865
|
"reduction": 100
|
|
868
866
|
},
|
|
869
867
|
{
|
|
870
|
-
"id": "/src/
|
|
868
|
+
"id": "/src/http.ts",
|
|
871
869
|
"size": 0,
|
|
872
|
-
"origSize":
|
|
870
|
+
"origSize": 37,
|
|
873
871
|
"renderedExports": [],
|
|
874
872
|
"removedExports": [],
|
|
875
|
-
"dependents": [
|
|
873
|
+
"dependents": [
|
|
874
|
+
"/src/adapters/ws.ts"
|
|
875
|
+
],
|
|
876
876
|
"percent": 0,
|
|
877
877
|
"reduction": 100
|
|
878
878
|
},
|
|
879
879
|
{
|
|
880
|
-
"id": "/src/
|
|
880
|
+
"id": "/src/rpc.ts",
|
|
881
881
|
"size": 0,
|
|
882
|
-
"origSize":
|
|
882
|
+
"origSize": 36,
|
|
883
883
|
"renderedExports": [],
|
|
884
884
|
"removedExports": [],
|
|
885
885
|
"dependents": [],
|
|
@@ -887,9 +887,9 @@
|
|
|
887
887
|
"reduction": 100
|
|
888
888
|
},
|
|
889
889
|
{
|
|
890
|
-
"id": "/src/
|
|
890
|
+
"id": "/src/shared.ts",
|
|
891
891
|
"size": 0,
|
|
892
|
-
"origSize":
|
|
892
|
+
"origSize": 653,
|
|
893
893
|
"renderedExports": [],
|
|
894
894
|
"removedExports": [],
|
|
895
895
|
"dependents": [],
|
|
@@ -946,16 +946,6 @@
|
|
|
946
946
|
"percent": 0,
|
|
947
947
|
"reduction": 100
|
|
948
948
|
},
|
|
949
|
-
{
|
|
950
|
-
"id": "/src/adapters/fetch/index.ts",
|
|
951
|
-
"size": 0,
|
|
952
|
-
"origSize": 64,
|
|
953
|
-
"renderedExports": [],
|
|
954
|
-
"removedExports": [],
|
|
955
|
-
"dependents": [],
|
|
956
|
-
"percent": 0,
|
|
957
|
-
"reduction": 100
|
|
958
|
-
},
|
|
959
949
|
{
|
|
960
950
|
"id": "/src/adapters/node-http/index.ts",
|
|
961
951
|
"size": 0,
|
|
@@ -971,6 +961,16 @@
|
|
|
971
961
|
],
|
|
972
962
|
"percent": 0,
|
|
973
963
|
"reduction": 100
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
"id": "/src/adapters/fetch/index.ts",
|
|
967
|
+
"size": 0,
|
|
968
|
+
"origSize": 64,
|
|
969
|
+
"renderedExports": [],
|
|
970
|
+
"removedExports": [],
|
|
971
|
+
"dependents": [],
|
|
972
|
+
"percent": 0,
|
|
973
|
+
"reduction": 100
|
|
974
974
|
}
|
|
975
975
|
],
|
|
976
976
|
"moduleCount": 63
|
|
@@ -1 +1 @@
|
|
|
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,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;
|
|
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,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;AAOF,QAAA,MAAM,wBAAwB,IAAI,CAAC;AACnC,KAAK,wBAAwB,GAAG,OAAO,wBAAwB,CAAC;AAChE,QAAA,MAAM,+BAA+B,IAAI,CAAC;AAC1C,KAAK,+BAA+B,GAAG,OAAO,+BAA+B,CAAC;AAE9E,QAAA,MAAM,wBAAwB,IAAI,CAAC;AACnC,KAAK,wBAAwB,GAAG,OAAO,wBAAwB,CAAC;AAChE,QAAA,MAAM,uBAAuB,IAAI,CAAC;AAClC,KAAK,uBAAuB,GAAG,OAAO,uBAAuB,CAAC;AAE9D,QAAA,MAAM,4BAA4B,IAAI,CAAC;AACvC,KAAK,4BAA4B,GAAG,OAAO,4BAA4B,CAAC;AACxE,Q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KAAK,EAAE,OAAO,CAAA;KAAE,KAAK,KAAK,CAAC;IAClD;;OAEG;IACH,eAAe,EAAE,eAAe,CAAC;CAClC;2BAxC+B,UAAU;qBArCvB,eAAe;;;;;;wBAiDL,OAAO;IA0JnC"}
|
|
@@ -86,7 +86,9 @@ function _ts_dispose_resources(env) {
|
|
|
86
86
|
return next();
|
|
87
87
|
})(env);
|
|
88
88
|
}
|
|
89
|
-
|
|
89
|
+
function isPlainObject(value) {
|
|
90
|
+
return Object.prototype.toString.call(value) === '[object Object]';
|
|
91
|
+
}
|
|
90
92
|
// ---------- types
|
|
91
93
|
const CHUNK_VALUE_TYPE_PROMISE = 0;
|
|
92
94
|
const CHUNK_VALUE_TYPE_ASYNC_ITERABLE = 1;
|
|
@@ -235,13 +237,6 @@ async function* createBatchStreamProducer(opts) {
|
|
|
235
237
|
[]
|
|
236
238
|
];
|
|
237
239
|
}
|
|
238
|
-
if (!utils.isObject(value)) {
|
|
239
|
-
return [
|
|
240
|
-
[
|
|
241
|
-
value
|
|
242
|
-
]
|
|
243
|
-
];
|
|
244
|
-
}
|
|
245
240
|
const reg = encodeAsync(value, path);
|
|
246
241
|
if (reg) {
|
|
247
242
|
return [
|
|
@@ -254,7 +249,7 @@ async function* createBatchStreamProducer(opts) {
|
|
|
254
249
|
]
|
|
255
250
|
];
|
|
256
251
|
}
|
|
257
|
-
if (
|
|
252
|
+
if (!isPlainObject(value)) {
|
|
258
253
|
return [
|
|
259
254
|
[
|
|
260
255
|
value
|
|
@@ -84,7 +84,9 @@ function _ts_dispose_resources(env) {
|
|
|
84
84
|
return next();
|
|
85
85
|
})(env);
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
function isPlainObject(value) {
|
|
88
|
+
return Object.prototype.toString.call(value) === '[object Object]';
|
|
89
|
+
}
|
|
88
90
|
// ---------- types
|
|
89
91
|
const CHUNK_VALUE_TYPE_PROMISE = 0;
|
|
90
92
|
const CHUNK_VALUE_TYPE_ASYNC_ITERABLE = 1;
|
|
@@ -233,13 +235,6 @@ async function* createBatchStreamProducer(opts) {
|
|
|
233
235
|
[]
|
|
234
236
|
];
|
|
235
237
|
}
|
|
236
|
-
if (!isObject(value)) {
|
|
237
|
-
return [
|
|
238
|
-
[
|
|
239
|
-
value
|
|
240
|
-
]
|
|
241
|
-
];
|
|
242
|
-
}
|
|
243
238
|
const reg = encodeAsync(value, path);
|
|
244
239
|
if (reg) {
|
|
245
240
|
return [
|
|
@@ -252,7 +247,7 @@ async function* createBatchStreamProducer(opts) {
|
|
|
252
247
|
]
|
|
253
248
|
];
|
|
254
249
|
}
|
|
255
|
-
if (
|
|
250
|
+
if (!isPlainObject(value)) {
|
|
256
251
|
return [
|
|
257
252
|
[
|
|
258
253
|
value
|
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.746+6c15b0575",
|
|
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": "6c15b0575d18179ddf964d89d8295aabad39f2cc"
|
|
156
156
|
}
|
|
@@ -22,7 +22,9 @@ export type NodeJSReadableStreamEsque = {
|
|
|
22
22
|
): NodeJSReadableStreamEsque;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
function isPlainObject(value: unknown): value is Record<string, unknown> {
|
|
26
|
+
return Object.prototype.toString.call(value) === '[object Object]';
|
|
27
|
+
}
|
|
26
28
|
|
|
27
29
|
// ---------- types
|
|
28
30
|
const CHUNK_VALUE_TYPE_PROMISE = 0;
|
|
@@ -230,19 +232,16 @@ async function* createBatchStreamProducer(
|
|
|
230
232
|
if (value === undefined) {
|
|
231
233
|
return [[]];
|
|
232
234
|
}
|
|
233
|
-
if (!isObject(value)) {
|
|
234
|
-
return [[value]];
|
|
235
|
-
}
|
|
236
|
-
|
|
237
235
|
const reg = encodeAsync(value, path);
|
|
238
236
|
if (reg) {
|
|
239
237
|
return [[placeholder], [null, ...reg]];
|
|
240
238
|
}
|
|
241
239
|
|
|
242
|
-
if (
|
|
240
|
+
if (!isPlainObject(value)) {
|
|
243
241
|
return [[value]];
|
|
244
242
|
}
|
|
245
|
-
|
|
243
|
+
|
|
244
|
+
const newObj: Record<string, unknown> = {};
|
|
246
245
|
const asyncValues: ChunkDefinition[] = [];
|
|
247
246
|
for (const [key, item] of Object.entries(value)) {
|
|
248
247
|
const transformed = encodeAsync(item, [...path, key]);
|
|
@@ -263,7 +262,7 @@ async function* createBatchStreamProducer(
|
|
|
263
262
|
|
|
264
263
|
yield newHead;
|
|
265
264
|
|
|
266
|
-
let iterable: AsyncIterable<
|
|
265
|
+
let iterable: AsyncIterable<ChunkData | typeof PING_SYM, void> =
|
|
267
266
|
mergedIterables;
|
|
268
267
|
if (opts.pingMs) {
|
|
269
268
|
iterable = withPing(mergedIterables, opts.pingMs);
|