@trpc/server 11.0.0-next-beta.284 → 11.0.0-next-beta.288

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.
@@ -2,7 +2,7 @@ export { TRPCError,
2
2
  /**
3
3
  * @deprecated use `experimental_trpcMiddleware` instead
4
4
  */
5
- experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware, initTRPC, callProcedure as callTRPCProcedure, getTRPCErrorFromUnknown, transformTRPCResponse, createFlatProxy as createTRPCFlatProxy, type inferProcedureInput, type inferProcedureOutput, type inferProcedureBuilderResolverOptions, type inferRouterError, type inferRouterInputs, type inferRouterOutputs, type inferRouterContext, type inferTransformedProcedureOutput, type inferTransformedSubscriptionOutput, type AnyProcedure as AnyTRPCProcedure, type AnyRouter as AnyTRPCRouter, type AnyMiddlewareFunction as AnyTRPCMiddlewareFunction, type CombinedDataTransformer as TRPCCombinedDataTransformer, type ProcedureType as TRPCProcedureType, type AnyMutationProcedure as AnyTRPCMutationProcedure, type AnyQueryProcedure as AnyTRPCQueryProcedure, type RouterRecord as TRPCRouterRecord, type AnySubscriptionProcedure as AnyTRPCSubscriptionProcedure, type ProcedureOptions as TRPCProcedureOptions, } from '../../unstable-core-do-not-import';
5
+ experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware, initTRPC, callProcedure as callTRPCProcedure, getTRPCErrorFromUnknown, transformTRPCResponse, createFlatProxy as createTRPCFlatProxy, type inferProcedureInput, type inferProcedureOutput, type inferProcedureBuilderResolverOptions, type inferRouterError, type inferRouterInputs, type inferRouterOutputs, type inferRouterContext, type inferClientTypes as inferTRPCClientTypes, type inferTransformedProcedureOutput, type inferTransformedSubscriptionOutput, type AnyProcedure as AnyTRPCProcedure, type AnyRouter as AnyTRPCRouter, type AnyMiddlewareFunction as AnyTRPCMiddlewareFunction, type CombinedDataTransformer as TRPCCombinedDataTransformer, type ProcedureType as TRPCProcedureType, type AnyMutationProcedure as AnyTRPCMutationProcedure, type AnyQueryProcedure as AnyTRPCQueryProcedure, type RouterRecord as TRPCRouterRecord, type AnySubscriptionProcedure as AnyTRPCSubscriptionProcedure, type ProcedureOptions as TRPCProcedureOptions, } from '../../unstable-core-do-not-import';
6
6
  export type {
7
7
  /**
8
8
  * @deprecated use `AnyTRPCProcedure` instead
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/@trpc/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS;AACT;;GAEG;AACH,iCAAiC,EACjC,iCAAiC,IAAI,2BAA2B,EAChE,QAAQ,EAER,aAAa,IAAI,iBAAiB,EAClC,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,IAAI,mBAAmB,EACtC,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,oCAAoC,EACzC,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,EACpC,KAAK,kCAAkC,EACvC,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,SAAS,IAAI,aAAa,EAC/B,KAAK,qBAAqB,IAAI,yBAAyB,EACvD,KAAK,uBAAuB,IAAI,2BAA2B,EAC3D,KAAK,aAAa,IAAI,iBAAiB,EACvC,KAAK,oBAAoB,IAAI,wBAAwB,EACrD,KAAK,iBAAiB,IAAI,qBAAqB,EAC/C,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,wBAAwB,IAAI,4BAA4B,EAC7D,KAAK,gBAAgB,IAAI,oBAAoB,GAC9C,MAAM,mCAAmC,CAAC;AAE3C,YAAY;AACV;;GAEG;AACH,YAAY;AACZ;;GAEG;AACH,SAAS;AACT;;GAEG;AACH,qBAAqB;AACrB;;GAEG;AACH,uBAAuB;AAEvB;;GAEG;AACH,IAAI;AAEJ;;GAEG;AACH,WAAW;AACX;;GAEG;AACH,aAAa;AACb;;GAEG;AACH,oB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AACT;;GAEG;AACH,qBAAqB;AACrB;;GAEG;AACH,uBAAuB;AAEvB;;GAEG;AACH,IAAI;AAEJ;;GAEG;AACH,WAAW;AACX;;GAEG;AACH,aAAa;AACb;;GAEG;AACH,oBAAoB;AAEpB;;GAEG;AACH,iBAAiB;AACjB;;GAEG;AACH,wBAAwB,GACzB,MAAM,mCAAmC,CAAC;AAE3C,OAAO;AACL;;GAEG;AACH,aAAa;AAEb;;GAEG;AACH,aAAa,GACd,MAAM,mCAAmC,CAAC;AAE3C;;;GAGG;AACH,MAAM,MAAM,oBAAoB,CAAC,SAAS,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,IACxE,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  {
2
- "bundleSize": 92285,
3
- "bundleOrigSize": 146562,
4
- "bundleReduction": 37.03,
2
+ "bundleSize": 92133,
3
+ "bundleOrigSize": 146326,
4
+ "bundleReduction": 37.04,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/adapters/ws.ts",
@@ -14,7 +14,7 @@
14
14
  "dependents": [
15
15
  "/src/adapters/fastify/fastifyTRPCPlugin.ts"
16
16
  ],
17
- "percent": 10.8,
17
+ "percent": 10.82,
18
18
  "reduction": 0
19
19
  },
20
20
  {
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "removedExports": [],
28
28
  "dependents": [],
29
- "percent": 10.03,
29
+ "percent": 10.05,
30
30
  "reduction": 21.53
31
31
  },
32
32
  {
@@ -42,10 +42,10 @@
42
42
  "removedExports": [],
43
43
  "dependents": [
44
44
  "/src/unstable-core-do-not-import.ts",
45
- "/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts",
46
- "/src/unstable-core-do-not-import/initTRPC.ts"
45
+ "/src/unstable-core-do-not-import/initTRPC.ts",
46
+ "/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts"
47
47
  ],
48
- "percent": 6.54,
48
+ "percent": 6.56,
49
49
  "reduction": 38.32
50
50
  },
51
51
  {
@@ -61,7 +61,7 @@
61
61
  "/src/unstable-core-do-not-import.ts",
62
62
  "/src/unstable-core-do-not-import/initTRPC.ts"
63
63
  ],
64
- "percent": 6.07,
64
+ "percent": 6.08,
65
65
  "reduction": 56.15
66
66
  },
67
67
  {
@@ -77,7 +77,7 @@
77
77
  "dependents": [
78
78
  "/src/adapters/node-http/content-type/form-data/index.ts"
79
79
  ],
80
- "percent": 5.39,
80
+ "percent": 5.4,
81
81
  "reduction": 36.77
82
82
  },
83
83
  {
@@ -91,7 +91,7 @@
91
91
  ],
92
92
  "removedExports": [],
93
93
  "dependents": [],
94
- "percent": 4.79,
94
+ "percent": 4.8,
95
95
  "reduction": 32.71
96
96
  },
97
97
  {
@@ -119,7 +119,7 @@
119
119
  "dependents": [
120
120
  "/src/adapters/fetch/index.ts"
121
121
  ],
122
- "percent": 3.85,
122
+ "percent": 3.86,
123
123
  "reduction": 9.5
124
124
  },
125
125
  {
@@ -154,7 +154,7 @@
154
154
  "dependents": [
155
155
  "/src/adapters/aws-lambda/index.ts"
156
156
  ],
157
- "percent": 3.58,
157
+ "percent": 3.59,
158
158
  "reduction": 36.48
159
159
  },
160
160
  {
@@ -173,20 +173,6 @@
173
173
  "percent": 3.23,
174
174
  "reduction": 0
175
175
  },
176
- {
177
- "id": "/src/unstable-core-do-not-import/initTRPC.ts",
178
- "size": 2879,
179
- "origSize": 4716,
180
- "renderedExports": [
181
- "initTRPC"
182
- ],
183
- "removedExports": [],
184
- "dependents": [
185
- "/src/unstable-core-do-not-import.ts"
186
- ],
187
- "percent": 3.12,
188
- "reduction": 38.95
189
- },
190
176
  {
191
177
  "id": "/src/unstable-core-do-not-import/transformer.ts",
192
178
  "size": 2744,
@@ -200,13 +186,27 @@
200
186
  "removedExports": [],
201
187
  "dependents": [
202
188
  "/src/unstable-core-do-not-import.ts",
203
- "/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts",
204
189
  "/src/unstable-core-do-not-import/router.ts",
205
- "/src/unstable-core-do-not-import/initTRPC.ts"
190
+ "/src/unstable-core-do-not-import/initTRPC.ts",
191
+ "/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts"
206
192
  ],
207
- "percent": 2.97,
193
+ "percent": 2.98,
208
194
  "reduction": 45.94
209
195
  },
196
+ {
197
+ "id": "/src/unstable-core-do-not-import/initTRPC.ts",
198
+ "size": 2727,
199
+ "origSize": 4480,
200
+ "renderedExports": [
201
+ "initTRPC"
202
+ ],
203
+ "removedExports": [],
204
+ "dependents": [
205
+ "/src/unstable-core-do-not-import.ts"
206
+ ],
207
+ "percent": 2.96,
208
+ "reduction": 39.13
209
+ },
210
210
  {
211
211
  "id": "/src/adapters/fastify/fastifyRequestHandler.ts",
212
212
  "size": 2590,
@@ -239,7 +239,7 @@
239
239
  "/src/unstable-core-do-not-import/initTRPC.ts",
240
240
  "/src/unstable-core-do-not-import/procedureBuilder.ts"
241
241
  ],
242
- "percent": 2.79,
242
+ "percent": 2.8,
243
243
  "reduction": 55.95
244
244
  },
245
245
  {
@@ -251,7 +251,7 @@
251
251
  ],
252
252
  "removedExports": [],
253
253
  "dependents": [],
254
- "percent": 2.75,
254
+ "percent": 2.76,
255
255
  "reduction": 31.37
256
256
  },
257
257
  {
@@ -266,10 +266,10 @@
266
266
  "removedExports": [],
267
267
  "dependents": [
268
268
  "/src/unstable-core-do-not-import.ts",
269
- "/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts",
270
- "/src/unstable-core-do-not-import/http/contentType.ts",
271
269
  "/src/unstable-core-do-not-import/router.ts",
272
270
  "/src/unstable-core-do-not-import/middleware.ts",
271
+ "/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts",
272
+ "/src/unstable-core-do-not-import/http/contentType.ts",
273
273
  "/src/unstable-core-do-not-import/procedureBuilder.ts"
274
274
  ],
275
275
  "percent": 1.88,
@@ -341,7 +341,7 @@
341
341
  "/src/unstable-core-do-not-import/router.ts",
342
342
  "/src/unstable-core-do-not-import/initTRPC.ts"
343
343
  ],
344
- "percent": 1.63,
344
+ "percent": 1.64,
345
345
  "reduction": 5.58
346
346
  },
347
347
  {
@@ -368,8 +368,8 @@
368
368
  ],
369
369
  "removedExports": [],
370
370
  "dependents": [
371
- "/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts",
372
- "/src/unstable-core-do-not-import/error/getErrorShape.ts"
371
+ "/src/unstable-core-do-not-import/error/getErrorShape.ts",
372
+ "/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts"
373
373
  ],
374
374
  "percent": 1.34,
375
375
  "reduction": 23.32
@@ -414,13 +414,13 @@
414
414
  "removedExports": [],
415
415
  "dependents": [
416
416
  "/src/unstable-core-do-not-import.ts",
417
- "/src/unstable-core-do-not-import/rpc/codes.ts",
418
417
  "/src/unstable-core-do-not-import/error/TRPCError.ts",
418
+ "/src/unstable-core-do-not-import/rpc/codes.ts",
419
419
  "/src/unstable-core-do-not-import/router.ts",
420
420
  "/src/unstable-core-do-not-import/transformer.ts",
421
421
  "/src/unstable-core-do-not-import/middleware.ts",
422
- "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
423
- "/src/unstable-core-do-not-import/procedureBuilder.ts"
422
+ "/src/unstable-core-do-not-import/procedureBuilder.ts",
423
+ "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts"
424
424
  ],
425
425
  "percent": 1.09,
426
426
  "reduction": 35.76
@@ -628,9 +628,9 @@
628
628
  "reduction": 93.8
629
629
  },
630
630
  {
631
- "id": "/src/http.ts",
631
+ "id": "/src/index.ts",
632
632
  "size": 0,
633
- "origSize": 37,
633
+ "origSize": 32,
634
634
  "renderedExports": [],
635
635
  "removedExports": [],
636
636
  "dependents": [],
@@ -638,9 +638,9 @@
638
638
  "reduction": 100
639
639
  },
640
640
  {
641
- "id": "/src/index.ts",
641
+ "id": "/src/shared.ts",
642
642
  "size": 0,
643
- "origSize": 32,
643
+ "origSize": 653,
644
644
  "renderedExports": [],
645
645
  "removedExports": [],
646
646
  "dependents": [],
@@ -648,9 +648,9 @@
648
648
  "reduction": 100
649
649
  },
650
650
  {
651
- "id": "/src/rpc.ts",
651
+ "id": "/src/unstable-core-do-not-import.ts",
652
652
  "size": 0,
653
- "origSize": 36,
653
+ "origSize": 1552,
654
654
  "renderedExports": [],
655
655
  "removedExports": [],
656
656
  "dependents": [],
@@ -658,9 +658,9 @@
658
658
  "reduction": 100
659
659
  },
660
660
  {
661
- "id": "/src/shared.ts",
661
+ "id": "/src/rpc.ts",
662
662
  "size": 0,
663
- "origSize": 653,
663
+ "origSize": 36,
664
664
  "renderedExports": [],
665
665
  "removedExports": [],
666
666
  "dependents": [],
@@ -668,9 +668,9 @@
668
668
  "reduction": 100
669
669
  },
670
670
  {
671
- "id": "/src/unstable-core-do-not-import.ts",
671
+ "id": "/src/http.ts",
672
672
  "size": 0,
673
- "origSize": 1552,
673
+ "origSize": 37,
674
674
  "renderedExports": [],
675
675
  "removedExports": [],
676
676
  "dependents": [],
@@ -716,8 +716,8 @@
716
716
  "renderedExports": [],
717
717
  "removedExports": [],
718
718
  "dependents": [
719
- "/src/adapters/express.ts",
720
719
  "/src/adapters/next.ts",
720
+ "/src/adapters/express.ts",
721
721
  "/src/adapters/standalone.ts"
722
722
  ],
723
723
  "percent": 0,
@@ -39,8 +39,8 @@ declare class TRPCBuilder<TContext extends object, TMeta extends object> {
39
39
  _config: RootConfig<{
40
40
  ctx: TContext;
41
41
  meta: TMeta;
42
- errorShape: undefined extends TOptions["errorFormatter"] ? DefaultErrorShape : inferErrorFormatterShape<TOptions["errorFormatter"]>;
43
- transformer: undefined extends TOptions["transformer"] ? false : true;
42
+ errorShape: undefined extends TOptions['errorFormatter'] ? DefaultErrorShape : inferErrorFormatterShape<TOptions['errorFormatter']>;
43
+ transformer: undefined extends TOptions['transformer'] ? false : true;
44
44
  }>;
45
45
  /**
46
46
  * Builder object for creating procedures
@@ -60,14 +60,14 @@ declare class TRPCBuilder<TContext extends object, TMeta extends object> {
60
60
  <TInput extends import("./router").RouterRecord>(input: TInput): import("./router").BuiltRouter<{
61
61
  ctx: TContext;
62
62
  meta: TMeta;
63
- errorShape: undefined extends TOptions["errorFormatter"] ? DefaultErrorShape : inferErrorFormatterShape<TOptions["errorFormatter"]>;
64
- transformer: undefined extends TOptions["transformer"] ? false : true;
63
+ errorShape: undefined extends TOptions['errorFormatter'] ? DefaultErrorShape : inferErrorFormatterShape<TOptions['errorFormatter']>;
64
+ transformer: undefined extends TOptions['transformer'] ? false : true;
65
65
  }, TInput>;
66
66
  <TInput_1 extends import("./router").CreateRouterOptions>(input: TInput_1): import("./router").BuiltRouter<{
67
67
  ctx: TContext;
68
68
  meta: TMeta;
69
- errorShape: undefined extends TOptions["errorFormatter"] ? DefaultErrorShape : inferErrorFormatterShape<TOptions["errorFormatter"]>;
70
- transformer: undefined extends TOptions["transformer"] ? false : true;
69
+ errorShape: undefined extends TOptions['errorFormatter'] ? DefaultErrorShape : inferErrorFormatterShape<TOptions['errorFormatter']>;
70
+ transformer: undefined extends TOptions['transformer'] ? false : true;
71
71
  }, import("./router").DecorateCreateRouterOptions<TInput_1>>;
72
72
  };
73
73
  /**
@@ -82,13 +82,13 @@ declare class TRPCBuilder<TContext extends object, TMeta extends object> {
82
82
  createCallerFactory: <TRecord extends import("./router").RouterRecord>(router: import("./router").Router<{
83
83
  ctx: TContext;
84
84
  meta: TMeta;
85
- errorShape: undefined extends TOptions["errorFormatter"] ? DefaultErrorShape : inferErrorFormatterShape<TOptions["errorFormatter"]>;
86
- transformer: undefined extends TOptions["transformer"] ? false : true;
85
+ errorShape: undefined extends TOptions['errorFormatter'] ? DefaultErrorShape : inferErrorFormatterShape<TOptions['errorFormatter']>;
86
+ transformer: undefined extends TOptions['transformer'] ? false : true;
87
87
  }, TRecord>) => import("./router").RouterCaller<{
88
88
  ctx: TContext;
89
89
  meta: TMeta;
90
- errorShape: undefined extends TOptions["errorFormatter"] ? DefaultErrorShape : inferErrorFormatterShape<TOptions["errorFormatter"]>;
91
- transformer: undefined extends TOptions["transformer"] ? false : true;
90
+ errorShape: undefined extends TOptions['errorFormatter'] ? DefaultErrorShape : inferErrorFormatterShape<TOptions['errorFormatter']>;
91
+ transformer: undefined extends TOptions['transformer'] ? false : true;
92
92
  }, TRecord>;
93
93
  };
94
94
  }
@@ -1 +1 @@
1
- {"version":3,"file":"initTRPC.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/initTRPC.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAGL,YAAY,EACb,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAErD,KAAK,wBAAwB,CAAC,KAAK,IAAI,KAAK,SAAS,cAAc,CACjE,GAAG,EACH,MAAM,MAAM,CACb,GACG,MAAM,GACN,iBAAiB,CAAC;AACtB,UAAU,oBAAoB,CAAC,QAAQ,SAAS,MAAM,EAAE,KAAK,SAAS,MAAM,CAC1E,SAAQ,OAAO,CACb,IAAI,CACF,UAAU,CAAC;IACT,GAAG,EAAE,QAAQ,CAAC;IACd,IAAI,EAAE,KAAK,CAAC;IACZ,UAAU,EAAE,GAAG,CAAC;IAChB,WAAW,EAAE,GAAG,CAAC;CAClB,CAAC,EACF,QAAQ,GAAG,aAAa,CACzB,CACF;IACD;;;OAGG;IACH,WAAW,CAAC,EAAE,sBAAsB,CAAC;CACtC;AAED,cAAM,WAAW,CAAC,QAAQ,SAAS,MAAM,EAAE,KAAK,SAAS,MAAM;IAC7D;;;OAGG;IACH,OAAO,CAAC,WAAW,SAAS,MAAM,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK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AAC,CAAC;6BAC3C,SAAS,SAAS,QAAQ,CAAC,aAAa,CAAC,GAAG,KAAK,GAAG,IAAI;;;QAqDrE;;;WAGG;;QAEH;;;WAGG;;iBAlEE,QAAQ;kBACP,KAAK;wBACC,SAAS,SAAS,QAAQ,CAAC,gBAAgB,CAAC,GACpD,iBAAiB,GACjB,yBAAyB,QAAQ,CAAC,gBAAgB,CAAC,CAAC;yBAC3C,SAAS,SAAS,QAAQ,CAAC,aAAa,CAAC,GAAG,KAAK,GAAG,IAAI;;iBALhE,QAAQ;kBACP,KAAK;wBACC,SAAS,SAAS,QAAQ,CAAC,gBAAgB,CAAC,GACpD,iBAAiB,GACjB,yBAAyB,QAAQ,CAAC,gBAAgB,CAAC,CAAC;yBAC3C,SAAS,SAAS,QAAQ,CAAC,aAAa,CAAC,GAAG,KAAK,GAAG,IAAI;;;CAiE1E;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,6BAAoB,CAAC"}
@@ -25,14 +25,11 @@ class TRPCBuilder {
25
25
  * Create the root object
26
26
  * @link https://trpc.io/docs/v11/server/routers#initialize-trpc
27
27
  */ create(opts) {
28
- const errorFormatter = opts?.errorFormatter ?? formatter.defaultFormatter;
29
- const transformer$1 = transformer.getDataTransformer(opts?.transformer ?? transformer.defaultTransformer);
30
28
  const config = {
31
- transformer: transformer$1,
32
- isDev: opts?.isDev ?? // eslint-disable-next-line @typescript-eslint/dot-notation
33
- globalThis.process?.env?.['NODE_ENV'] !== 'production',
29
+ transformer: transformer.getDataTransformer(opts?.transformer ?? transformer.defaultTransformer),
30
+ isDev: opts?.isDev ?? globalThis.process?.env?.NODE_ENV !== 'production',
34
31
  allowOutsideOfServer: opts?.allowOutsideOfServer ?? false,
35
- errorFormatter,
32
+ errorFormatter: opts?.errorFormatter ?? formatter.defaultFormatter,
36
33
  isServer: opts?.isServer ?? rootConfig.isServerDefault,
37
34
  /**
38
35
  * These are just types, they can't be used at runtime
@@ -23,14 +23,11 @@ class TRPCBuilder {
23
23
  * Create the root object
24
24
  * @link https://trpc.io/docs/v11/server/routers#initialize-trpc
25
25
  */ create(opts) {
26
- const errorFormatter = opts?.errorFormatter ?? defaultFormatter;
27
- const transformer = getDataTransformer(opts?.transformer ?? defaultTransformer);
28
26
  const config = {
29
- transformer,
30
- isDev: opts?.isDev ?? // eslint-disable-next-line @typescript-eslint/dot-notation
31
- globalThis.process?.env?.['NODE_ENV'] !== 'production',
27
+ transformer: getDataTransformer(opts?.transformer ?? defaultTransformer),
28
+ isDev: opts?.isDev ?? globalThis.process?.env?.NODE_ENV !== 'production',
32
29
  allowOutsideOfServer: opts?.allowOutsideOfServer ?? false,
33
- errorFormatter,
30
+ errorFormatter: opts?.errorFormatter ?? defaultFormatter,
34
31
  isServer: opts?.isServer ?? isServerDefault,
35
32
  /**
36
33
  * These are just types, they can't be used at runtime
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/server",
3
- "version": "11.0.0-next-beta.284+1960156a1",
3
+ "version": "11.0.0-next-beta.288+afafc1160",
4
4
  "description": "The tRPC server library",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -157,5 +157,5 @@
157
157
  "funding": [
158
158
  "https://trpc.io/sponsor"
159
159
  ],
160
- "gitHead": "1960156a1b30fe76a3828cbf8096e78f85593f11"
160
+ "gitHead": "afafc116094b25f410b81b90baeba6cbfc75e786"
161
161
  }
@@ -18,6 +18,7 @@ export {
18
18
  type inferRouterInputs,
19
19
  type inferRouterOutputs,
20
20
  type inferRouterContext,
21
+ type inferClientTypes as inferTRPCClientTypes,
21
22
  type inferTransformedProcedureOutput,
22
23
  type inferTransformedSubscriptionOutput,
23
24
  type AnyProcedure as AnyTRPCProcedure,
@@ -68,33 +68,20 @@ class TRPCBuilder<TContext extends object, TMeta extends object> {
68
68
  | ValidateShape<TOptions, RuntimeConfigOptions<TContext, TMeta>>
69
69
  | undefined,
70
70
  ) {
71
- type $Transformer = undefined extends TOptions['transformer']
72
- ? false
73
- : true;
74
- type $ErrorShape = undefined extends TOptions['errorFormatter']
75
- ? DefaultErrorShape
76
- : inferErrorFormatterShape<TOptions['errorFormatter']>;
77
-
78
71
  type $Root = CreateRootTypes<{
79
72
  ctx: TContext;
80
73
  meta: TMeta;
81
- errorShape: $ErrorShape;
82
- transformer: $Transformer;
74
+ errorShape: undefined extends TOptions['errorFormatter']
75
+ ? DefaultErrorShape
76
+ : inferErrorFormatterShape<TOptions['errorFormatter']>;
77
+ transformer: undefined extends TOptions['transformer'] ? false : true;
83
78
  }>;
84
79
 
85
- const errorFormatter = opts?.errorFormatter ?? defaultFormatter;
86
- const transformer = getDataTransformer(
87
- opts?.transformer ?? defaultTransformer,
88
- );
89
-
90
80
  const config: RootConfig<$Root> = {
91
- transformer,
92
- isDev:
93
- opts?.isDev ??
94
- // eslint-disable-next-line @typescript-eslint/dot-notation
95
- globalThis.process?.env?.['NODE_ENV'] !== 'production',
81
+ transformer: getDataTransformer(opts?.transformer ?? defaultTransformer),
82
+ isDev: opts?.isDev ?? globalThis.process?.env?.NODE_ENV !== 'production',
96
83
  allowOutsideOfServer: opts?.allowOutsideOfServer ?? false,
97
- errorFormatter,
84
+ errorFormatter: opts?.errorFormatter ?? defaultFormatter,
98
85
  isServer: opts?.isServer ?? isServerDefault,
99
86
  /**
100
87
  * These are just types, they can't be used at runtime