@trpc/server 11.1.3-canary.15 → 11.1.3-canary.20

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": 202497,
3
- "bundleOrigSize": 235256,
4
- "bundleReduction": 13.92,
2
+ "bundleSize": 202416,
3
+ "bundleOrigSize": 235191,
4
+ "bundleReduction": 13.94,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
@@ -14,7 +14,7 @@
14
14
  "dependents": [
15
15
  "/src/unstable-core-do-not-import.ts"
16
16
  ],
17
- "percent": 10.41,
17
+ "percent": 10.42,
18
18
  "reduction": 0
19
19
  },
20
20
  {
@@ -98,7 +98,7 @@
98
98
  "/src/unstable-core-do-not-import/initTRPC.ts",
99
99
  "/src/unstable-core-do-not-import/http/contentType.ts"
100
100
  ],
101
- "percent": 5.01,
101
+ "percent": 5.02,
102
102
  "reduction": 29.54
103
103
  },
104
104
  {
@@ -381,13 +381,29 @@
381
381
  "/src/unstable-core-do-not-import/stream/jsonl.ts",
382
382
  "/src/unstable-core-do-not-import/stream/sse.ts"
383
383
  ],
384
- "percent": 1.21,
384
+ "percent": 1.22,
385
385
  "reduction": 17.51
386
386
  },
387
+ {
388
+ "id": "/src/unstable-core-do-not-import/createProxy.ts",
389
+ "size": 2305,
390
+ "origSize": 2225,
391
+ "renderedExports": [
392
+ "createRecursiveProxy",
393
+ "createFlatProxy"
394
+ ],
395
+ "removedExports": [],
396
+ "dependents": [
397
+ "/src/unstable-core-do-not-import.ts",
398
+ "/src/unstable-core-do-not-import/router.ts"
399
+ ],
400
+ "percent": 1.14,
401
+ "reduction": 0
402
+ },
387
403
  {
388
404
  "id": "/src/unstable-core-do-not-import/error/TRPCError.ts",
389
- "size": 2350,
390
- "origSize": 2143,
405
+ "size": 2269,
406
+ "origSize": 2078,
391
407
  "renderedExports": [
392
408
  "getCauseFromUnknown",
393
409
  "getTRPCErrorFromUnknown",
@@ -404,23 +420,7 @@
404
420
  "/src/unstable-core-do-not-import/procedureBuilder.ts",
405
421
  "/src/unstable-core-do-not-import/stream/sse.ts"
406
422
  ],
407
- "percent": 1.16,
408
- "reduction": 0
409
- },
410
- {
411
- "id": "/src/unstable-core-do-not-import/createProxy.ts",
412
- "size": 2305,
413
- "origSize": 2225,
414
- "renderedExports": [
415
- "createRecursiveProxy",
416
- "createFlatProxy"
417
- ],
418
- "removedExports": [],
419
- "dependents": [
420
- "/src/unstable-core-do-not-import.ts",
421
- "/src/unstable-core-do-not-import/router.ts"
422
- ],
423
- "percent": 1.14,
423
+ "percent": 1.12,
424
424
  "reduction": 0
425
425
  },
426
426
  {
@@ -571,7 +571,7 @@
571
571
  ],
572
572
  "removedExports": [],
573
573
  "dependents": [],
574
- "percent": 0.65,
574
+ "percent": 0.66,
575
575
  "reduction": 35.1
576
576
  },
577
577
  {
@@ -588,7 +588,7 @@
588
588
  "/src/adapters/next-app-dir/nextAppDirCaller.ts",
589
589
  "/src/adapters/next-app-dir/rethrowNextErrors.ts"
590
590
  ],
591
- "percent": 0.65,
591
+ "percent": 0.66,
592
592
  "reduction": 0
593
593
  },
594
594
  {
@@ -924,8 +924,8 @@
924
924
  "removedExports": [],
925
925
  "dependents": [
926
926
  "/src/adapters/express.ts",
927
- "/src/adapters/standalone.ts",
928
927
  "/src/adapters/next.ts",
928
+ "/src/adapters/standalone.ts",
929
929
  "/src/adapters/ws.ts",
930
930
  "/src/adapters/node-http/nodeHTTPRequestHandler.ts",
931
931
  "/src/adapters/next-app-dir/nextAppDirCaller.ts",
@@ -957,25 +957,19 @@
957
957
  "reduction": 100
958
958
  },
959
959
  {
960
- "id": "/src/adapters/node-http/index.ts",
960
+ "id": "/src/adapters/fastify/index.ts",
961
961
  "size": 0,
962
- "origSize": 111,
962
+ "origSize": 78,
963
963
  "renderedExports": [],
964
964
  "removedExports": [],
965
- "dependents": [
966
- "/src/adapters/express.ts",
967
- "/src/adapters/standalone.ts",
968
- "/src/adapters/next.ts",
969
- "/src/adapters/ws.ts",
970
- "/src/adapters/fastify/fastifyRequestHandler.ts"
971
- ],
965
+ "dependents": [],
972
966
  "percent": 0,
973
967
  "reduction": 100
974
968
  },
975
969
  {
976
- "id": "/src/adapters/fastify/index.ts",
970
+ "id": "/src/adapters/fetch/index.ts",
977
971
  "size": 0,
978
- "origSize": 78,
972
+ "origSize": 64,
979
973
  "renderedExports": [],
980
974
  "removedExports": [],
981
975
  "dependents": [],
@@ -983,12 +977,18 @@
983
977
  "reduction": 100
984
978
  },
985
979
  {
986
- "id": "/src/adapters/fetch/index.ts",
980
+ "id": "/src/adapters/node-http/index.ts",
987
981
  "size": 0,
988
- "origSize": 64,
982
+ "origSize": 111,
989
983
  "renderedExports": [],
990
984
  "removedExports": [],
991
- "dependents": [],
985
+ "dependents": [
986
+ "/src/adapters/express.ts",
987
+ "/src/adapters/next.ts",
988
+ "/src/adapters/standalone.ts",
989
+ "/src/adapters/ws.ts",
990
+ "/src/adapters/fastify/fastifyRequestHandler.ts"
991
+ ],
992
992
  "percent": 0,
993
993
  "reduction": 100
994
994
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TRPCError.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/error/TRPCError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMxD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CA0BrE;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CAoBjE;AAED,qBAAa,SAAU,SAAQ,KAAK;IAGlC,SAAyB,KAAK,CAAC,EAAE,KAAK,CAAC;IACvC,SAAgB,IAAI,4XAAC;gBAET,IAAI,EAAE;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,mBAAmB,CAAC;QAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CAYF"}
1
+ {"version":3,"file":"TRPCError.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/error/TRPCError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMxD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CAsBrE;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CAoBjE;AAED,qBAAa,SAAU,SAAQ,KAAK;IAGlC,SAAyB,KAAK,CAAC,EAAE,KAAK,CAAC;IACvC,SAAgB,IAAI,4XAAC;gBAET,IAAI,EAAE;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,mBAAmB,CAAC;QAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CAYF"}
@@ -32,11 +32,7 @@ function getCauseFromUnknown(cause) {
32
32
  }
33
33
  // If it's an object, we'll create a synthetic error
34
34
  if (utils.isObject(cause)) {
35
- const err = new UnknownCauseError();
36
- for(const key in cause){
37
- err[key] = cause[key];
38
- }
39
- return err;
35
+ return Object.assign(new UnknownCauseError(), cause);
40
36
  }
41
37
  return undefined;
42
38
  }
@@ -30,11 +30,7 @@ function getCauseFromUnknown(cause) {
30
30
  }
31
31
  // If it's an object, we'll create a synthetic error
32
32
  if (isObject(cause)) {
33
- const err = new UnknownCauseError();
34
- for(const key in cause){
35
- err[key] = cause[key];
36
- }
37
- return err;
33
+ return Object.assign(new UnknownCauseError(), cause);
38
34
  }
39
35
  return undefined;
40
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/server",
3
- "version": "11.1.3-canary.15+420dcc579",
3
+ "version": "11.1.3-canary.20+95d1997b9",
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": "420dcc5791b3d9e2213e181501779eb3b29b45fa"
155
+ "gitHead": "95d1997b9f7926775ce01ae96a32ea1ea5f737dc"
156
156
  }
@@ -22,11 +22,7 @@ export function getCauseFromUnknown(cause: unknown): Error | undefined {
22
22
 
23
23
  // If it's an object, we'll create a synthetic error
24
24
  if (isObject(cause)) {
25
- const err = new UnknownCauseError();
26
- for (const key in cause) {
27
- err[key] = cause[key];
28
- }
29
- return err;
25
+ return Object.assign(new UnknownCauseError(), cause);
30
26
  }
31
27
 
32
28
  return undefined;