@trpc/server 11.0.0-rc.708 → 11.0.0-rc.714

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": 193473,
3
- "bundleOrigSize": 224010,
4
- "bundleReduction": 13.63,
2
+ "bundleSize": 193504,
3
+ "bundleOrigSize": 223977,
4
+ "bundleReduction": 13.61,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
@@ -30,7 +30,7 @@
30
30
  "dependents": [
31
31
  "/src/adapters/fastify/fastifyTRPCPlugin.ts"
32
32
  ],
33
- "percent": 10.41,
33
+ "percent": 10.4,
34
34
  "reduction": 0
35
35
  },
36
36
  {
@@ -47,7 +47,7 @@
47
47
  "/src/unstable-core-do-not-import.ts",
48
48
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
49
49
  ],
50
- "percent": 10.35,
50
+ "percent": 10.34,
51
51
  "reduction": 0
52
52
  },
53
53
  {
@@ -111,8 +111,8 @@
111
111
  },
112
112
  {
113
113
  "id": "/src/unstable-core-do-not-import/router.ts",
114
- "size": 6417,
115
- "origSize": 10675,
114
+ "size": 6448,
115
+ "origSize": 10642,
116
116
  "renderedExports": [
117
117
  "createRouterFactory",
118
118
  "callProcedure",
@@ -124,8 +124,8 @@
124
124
  "/src/unstable-core-do-not-import.ts",
125
125
  "/src/unstable-core-do-not-import/initTRPC.ts"
126
126
  ],
127
- "percent": 3.32,
128
- "reduction": 39.89
127
+ "percent": 3.33,
128
+ "reduction": 39.41
129
129
  },
130
130
  {
131
131
  "id": "/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts",
@@ -223,7 +223,7 @@
223
223
  "/src/adapters/node-http/index.ts",
224
224
  "/src/adapters/node-http/nodeHTTPRequestHandler.ts"
225
225
  ],
226
- "percent": 2.03,
226
+ "percent": 2.02,
227
227
  "reduction": 17.53
228
228
  },
229
229
  {
@@ -859,9 +859,9 @@
859
859
  "reduction": 100
860
860
  },
861
861
  {
862
- "id": "/src/shared.ts",
862
+ "id": "/src/rpc.ts",
863
863
  "size": 0,
864
- "origSize": 653,
864
+ "origSize": 36,
865
865
  "renderedExports": [],
866
866
  "removedExports": [],
867
867
  "dependents": [],
@@ -869,9 +869,9 @@
869
869
  "reduction": 100
870
870
  },
871
871
  {
872
- "id": "/src/rpc.ts",
872
+ "id": "/src/shared.ts",
873
873
  "size": 0,
874
- "origSize": 36,
874
+ "origSize": 653,
875
875
  "renderedExports": [],
876
876
  "removedExports": [],
877
877
  "dependents": [],
@@ -886,9 +886,9 @@
886
886
  "removedExports": [],
887
887
  "dependents": [
888
888
  "/src/adapters/express.ts",
889
- "/src/adapters/standalone.ts",
890
889
  "/src/adapters/next.ts",
891
890
  "/src/adapters/ws.ts",
891
+ "/src/adapters/standalone.ts",
892
892
  "/src/adapters/node-http/nodeHTTPRequestHandler.ts",
893
893
  "/src/adapters/next-app-dir/nextAppDirCaller.ts",
894
894
  "/src/adapters/node-http/writeResponse.ts"
@@ -946,9 +946,9 @@
946
946
  "removedExports": [],
947
947
  "dependents": [
948
948
  "/src/adapters/express.ts",
949
- "/src/adapters/standalone.ts",
950
949
  "/src/adapters/next.ts",
951
950
  "/src/adapters/ws.ts",
951
+ "/src/adapters/standalone.ts",
952
952
  "/src/adapters/fastify/fastifyRequestHandler.ts"
953
953
  ],
954
954
  "percent": 0,
@@ -10,7 +10,7 @@ export type inferTransformedProcedureOutput<TInferrable extends InferrableClient
10
10
  /** @internal */
11
11
  export type inferTransformedSubscriptionOutput<TInferrable extends InferrableClientTypes, TProcedure extends AnyProcedure> = inferClientTypes<TInferrable>['transformer'] extends false ? Serialize<inferObservableValue<inferProcedureOutput<TProcedure>>> : inferObservableValue<inferProcedureOutput<TProcedure>>;
12
12
  export type GetInferenceHelpers<TType extends 'input' | 'output', TRoot extends AnyClientTypes, TRecord extends RouterRecord> = {
13
- [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends RouterRecord ? GetInferenceHelpers<TType, TRoot, $Value> : $Value extends AnyProcedure ? TType extends 'input' ? inferProcedureInput<$Value> : inferTransformedProcedureOutput<TRoot, $Value> : never : never;
13
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends AnyProcedure ? TType extends 'input' ? inferProcedureInput<$Value> : inferTransformedProcedureOutput<TRoot, $Value> : $Value extends RouterRecord ? GetInferenceHelpers<TType, TRoot, $Value> : never : never;
14
14
  };
15
15
  export type inferRouterInputs<TRouter extends AnyRouter> = GetInferenceHelpers<'input', TRouter['_def']['_config']['$types'], TRouter['_def']['record']>;
16
16
  export type inferRouterOutputs<TRouter extends AnyRouter> = GetInferenceHelpers<'output', TRouter['_def']['_config']['$types'], TRouter['_def']['record']>;
@@ -1 +1 @@
1
- {"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/clientish/inference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AAEH,MAAM,MAAM,+BAA+B,CACzC,WAAW,SAAS,qBAAqB,EACzC,UAAU,SAAS,YAAY,IAC7B,gBAAgB,CAAC,WAAW,CAAC,CAAC,aAAa,CAAC,SAAS,KAAK,GAC1D,SAAS,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,GAC3C,oBAAoB,CAAC,UAAU,CAAC,CAAC;AACrC,gBAAgB;AAEhB,MAAM,MAAM,kCAAkC,C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,MAAM,CAAC,GACzC,KAAK,GACT,KAAK;CACV,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,OAAO,SAAS,SAAS,IAAI,mBAAmB,CAC5E,OAAO,EACP,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EACpC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAC1B,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,OAAO,SAAS,SAAS,IAAI,mBAAmB,CAC7E,QAAQ,EACR,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EACpC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAC1B,CAAC"}
@@ -57,20 +57,12 @@ declare class TRPCBuilder<TContext extends object, TMeta extends object> {
57
57
  * Create a router
58
58
  * @see https://trpc.io/docs/v11/server/routers
59
59
  */
60
- router: {
61
- <TInput extends import("./router").RouterRecord>(input: TInput): import("./router").BuiltRouter<{
62
- ctx: TContext;
63
- meta: TMeta;
64
- errorShape: undefined extends TOptions["errorFormatter"] ? DefaultErrorShape : inferErrorFormatterShape<TOptions["errorFormatter"]>;
65
- transformer: undefined extends TOptions["transformer"] ? false : true;
66
- }, TInput>;
67
- <TInput extends import("./router").CreateRouterOptions>(input: TInput): import("./router").BuiltRouter<{
68
- ctx: TContext;
69
- meta: TMeta;
70
- errorShape: undefined extends TOptions["errorFormatter"] ? DefaultErrorShape : inferErrorFormatterShape<TOptions["errorFormatter"]>;
71
- transformer: undefined extends TOptions["transformer"] ? false : true;
72
- }, import("./router").DecorateCreateRouterOptions<TInput>>;
73
- };
60
+ router: <TInput extends import("./router").CreateRouterOptions>(input: TInput) => import("./router").BuiltRouter<{
61
+ ctx: TContext;
62
+ meta: TMeta;
63
+ errorShape: undefined extends TOptions["errorFormatter"] ? DefaultErrorShape : inferErrorFormatterShape<TOptions["errorFormatter"]>;
64
+ transformer: undefined extends TOptions["transformer"] ? false : true;
65
+ }, import("./router").DecorateCreateRouterOptions<TInput>>;
74
66
  /**
75
67
  * Merge Routers
76
68
  * @see https://trpc.io/docs/v11/server/merging-routers
@@ -1 +1 @@
1
- {"version":3,"file":"initTRPC.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/initTRPC.ts"],"names":[],"mappings":"AAAA,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,IACjC,KAAK,SAAS,cAAc,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC,GAAG,MAAM,GAAG,iBAAiB,CAAC;AAC/E,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,KAAK,eAAe,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAEpE,cAAM,WAAW,CAAC,QAAQ,SAAS,MAAM,EAAE,KAAK,SAAS,MAAM;IAC7D;;;OAGG;IACH,OAAO,CAAC,WAAW,SAAS,MAAM,GAAG,eAAe;IAOpD;;;OA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,CAAC;yBAC3C,SAAS,SAAS,QAAQ,CAAC,aAAa,CAAC,GAAG,KAAK,GAAG,IAAI;;;CAiE1E;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,6BAAoB,CAAC;AAC1C,YAAY,EAAE,WAAW,EAAE,CAAC"}
@@ -12,7 +12,7 @@ type DecorateProcedure<TProcedure extends AnyProcedure> = (input: inferProcedure
12
12
  * @internal
13
13
  */
14
14
  export type DecorateRouterRecord<TRecord extends RouterRecord> = {
15
- [TKey in keyof TRecord]: TRecord[TKey] extends AnyProcedure ? DecorateProcedure<TRecord[TKey]> : TRecord[TKey] extends RouterRecord ? DecorateRouterRecord<TRecord[TKey]> : never;
15
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends AnyProcedure ? DecorateProcedure<$Value> : $Value extends RouterRecord ? DecorateRouterRecord<$Value> : never : never;
16
16
  };
17
17
  /**
18
18
  * @internal
@@ -60,10 +60,7 @@ export type DecorateCreateRouterOptions<TRouterOptions extends CreateRouterOptio
60
60
  /**
61
61
  * @internal
62
62
  */
63
- export declare function createRouterFactory<TRoot extends AnyRootTypes>(config: RootConfig<TRoot>): {
64
- <TInput extends RouterRecord>(input: TInput): BuiltRouter<TRoot, TInput>;
65
- <TInput extends CreateRouterOptions>(input: TInput): BuiltRouter<TRoot, DecorateCreateRouterOptions<TInput>>;
66
- };
63
+ export declare function createRouterFactory<TRoot extends AnyRootTypes>(config: RootConfig<TRoot>): <TInput extends CreateRouterOptions>(input: TInput) => BuiltRouter<TRoot, DecorateCreateRouterOptions<TInput>>;
67
64
  /**
68
65
  * @internal
69
66
  */
@@ -1 +1 @@
1
- {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/router.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,EAA2B,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EACV,YAA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AAC,QAAQ,CAAC,CAoDxB"}
@@ -78,13 +78,14 @@ const emptyRouter = {
78
78
  ...emptyRouter,
79
79
  record
80
80
  };
81
- return {
81
+ const router = {
82
82
  ...record,
83
83
  _def,
84
84
  createCaller: createCallerFactory()({
85
85
  _def
86
86
  })
87
87
  };
88
+ return router;
88
89
  }
89
90
  return createRouterInner;
90
91
  }
@@ -76,13 +76,14 @@ const emptyRouter = {
76
76
  ...emptyRouter,
77
77
  record
78
78
  };
79
- return {
79
+ const router = {
80
80
  ...record,
81
81
  _def,
82
82
  createCaller: createCallerFactory()({
83
83
  _def
84
84
  })
85
85
  };
86
+ return router;
86
87
  }
87
88
  return createRouterInner;
88
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/server",
3
- "version": "11.0.0-rc.708+209e9ad21",
3
+ "version": "11.0.0-rc.714+9ed47ef3c",
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": "209e9ad216fe81d7952f7f23368ff01d0979a784"
155
+ "gitHead": "9ed47ef3c4568acc7d2f3473307317cbf00e165c"
156
156
  }
@@ -37,12 +37,12 @@ export type GetInferenceHelpers<
37
37
  TRecord extends RouterRecord,
38
38
  > = {
39
39
  [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value
40
- ? $Value extends RouterRecord
41
- ? GetInferenceHelpers<TType, TRoot, $Value>
42
- : $Value extends AnyProcedure
43
- ? TType extends 'input'
44
- ? inferProcedureInput<$Value>
45
- : inferTransformedProcedureOutput<TRoot, $Value>
40
+ ? $Value extends AnyProcedure
41
+ ? TType extends 'input'
42
+ ? inferProcedureInput<$Value>
43
+ : inferTransformedProcedureOutput<TRoot, $Value>
44
+ : $Value extends RouterRecord
45
+ ? GetInferenceHelpers<TType, TRoot, $Value>
46
46
  : never
47
47
  : never;
48
48
  };
@@ -33,11 +33,13 @@ type DecorateProcedure<TProcedure extends AnyProcedure> = (
33
33
  * @internal
34
34
  */
35
35
  export type DecorateRouterRecord<TRecord extends RouterRecord> = {
36
- [TKey in keyof TRecord]: TRecord[TKey] extends AnyProcedure
37
- ? DecorateProcedure<TRecord[TKey]>
38
- : TRecord[TKey] extends RouterRecord
39
- ? DecorateRouterRecord<TRecord[TKey]>
40
- : never;
36
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value
37
+ ? $Value extends AnyProcedure
38
+ ? DecorateProcedure<$Value>
39
+ : $Value extends RouterRecord
40
+ ? DecorateRouterRecord<$Value>
41
+ : never
42
+ : never;
41
43
  };
42
44
 
43
45
  /**
@@ -159,13 +161,9 @@ export type DecorateCreateRouterOptions<
159
161
  export function createRouterFactory<TRoot extends AnyRootTypes>(
160
162
  config: RootConfig<TRoot>,
161
163
  ) {
162
- function createRouterInner<TInput extends RouterRecord>(
163
- input: TInput,
164
- ): BuiltRouter<TRoot, TInput>;
165
164
  function createRouterInner<TInput extends CreateRouterOptions>(
166
165
  input: TInput,
167
- ): BuiltRouter<TRoot, DecorateCreateRouterOptions<TInput>>;
168
- function createRouterInner(input: RouterRecord | CreateRouterOptions) {
166
+ ): BuiltRouter<TRoot, DecorateCreateRouterOptions<TInput>> {
169
167
  const reservedWordsUsed = new Set(
170
168
  Object.keys(input).filter((v) => reservedWords.includes(v)),
171
169
  );
@@ -213,13 +211,14 @@ export function createRouterFactory<TRoot extends AnyRootTypes>(
213
211
  record,
214
212
  };
215
213
 
216
- return {
217
- ...record,
214
+ const router: BuiltRouter<TRoot, {}> = {
215
+ ...(record as {}),
218
216
  _def,
219
217
  createCaller: createCallerFactory<TRoot>()({
220
218
  _def,
221
219
  }),
222
220
  };
221
+ return router as BuiltRouter<TRoot, DecorateCreateRouterOptions<TInput>>;
223
222
  }
224
223
 
225
224
  return createRouterInner;