@trpc/server 11.0.0-next-beta.253 → 11.0.0-next-beta.254

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.
Files changed (60) hide show
  1. package/dist/adapters/aws-lambda/index.js +2 -2
  2. package/dist/adapters/aws-lambda/index.mjs +2 -2
  3. package/dist/adapters/aws-lambda/utils.js +1 -1
  4. package/dist/adapters/aws-lambda/utils.mjs +1 -1
  5. package/dist/adapters/fastify/fastifyRequestHandler.js +1 -1
  6. package/dist/adapters/fastify/fastifyRequestHandler.mjs +1 -1
  7. package/dist/adapters/fetch/fetchRequestHandler.js +1 -1
  8. package/dist/adapters/fetch/fetchRequestHandler.mjs +1 -1
  9. package/dist/adapters/next.js +2 -2
  10. package/dist/adapters/next.mjs +2 -2
  11. package/dist/adapters/node-http/content-type/json/getPostBody.js +1 -1
  12. package/dist/adapters/node-http/content-type/json/getPostBody.mjs +1 -1
  13. package/dist/adapters/node-http/content-type/json/index.js +1 -1
  14. package/dist/adapters/node-http/content-type/json/index.mjs +1 -1
  15. package/dist/adapters/node-http/nodeHTTPRequestHandler.js +1 -1
  16. package/dist/adapters/node-http/nodeHTTPRequestHandler.mjs +1 -1
  17. package/dist/adapters/ws.js +4 -4
  18. package/dist/adapters/ws.mjs +4 -4
  19. package/dist/bundle-analysis.json +76 -60
  20. package/dist/http.js +1 -1
  21. package/dist/http.mjs +1 -1
  22. package/dist/index.js +10 -10
  23. package/dist/index.mjs +5 -5
  24. package/dist/shared.js +3 -3
  25. package/dist/shared.mjs +2 -2
  26. package/dist/unstable-core-do-not-import/clientish/inference.d.ts +17 -0
  27. package/dist/unstable-core-do-not-import/clientish/inference.d.ts.map +1 -0
  28. package/dist/unstable-core-do-not-import/clientish/inferrable.d.ts +33 -0
  29. package/dist/unstable-core-do-not-import/clientish/inferrable.d.ts.map +1 -0
  30. package/dist/unstable-core-do-not-import/{serialize.d.ts → clientish/serialize.d.ts} +1 -1
  31. package/dist/unstable-core-do-not-import/clientish/serialize.d.ts.map +1 -0
  32. package/dist/unstable-core-do-not-import/procedure.d.ts +0 -9
  33. package/dist/unstable-core-do-not-import/procedure.d.ts.map +1 -1
  34. package/dist/unstable-core-do-not-import/rootConfig.d.ts +1 -1
  35. package/dist/unstable-core-do-not-import/rootConfig.d.ts.map +1 -1
  36. package/dist/unstable-core-do-not-import/router.d.ts +1 -6
  37. package/dist/unstable-core-do-not-import/router.d.ts.map +1 -1
  38. package/dist/unstable-core-do-not-import/types.js +11 -0
  39. package/dist/unstable-core-do-not-import/types.mjs +9 -0
  40. package/dist/unstable-core-do-not-import.d.ts +31 -0
  41. package/dist/unstable-core-do-not-import.d.ts.map +1 -0
  42. package/dist/unstable-core-do-not-import.js +64 -0
  43. package/dist/unstable-core-do-not-import.mjs +20 -0
  44. package/package.json +5 -5
  45. package/src/unstable-core-do-not-import/clientish/inference.ts +56 -0
  46. package/src/unstable-core-do-not-import/clientish/inferrable.ts +55 -0
  47. package/src/unstable-core-do-not-import/{serialize.ts → clientish/serialize.ts} +1 -1
  48. package/src/unstable-core-do-not-import/procedure.ts +0 -21
  49. package/src/unstable-core-do-not-import/rootConfig.ts +1 -1
  50. package/src/unstable-core-do-not-import/router.ts +1 -33
  51. package/src/unstable-core-do-not-import.ts +30 -0
  52. package/dist/unstable-core-do-not-import/TRPCInferrable.d.ts +0 -27
  53. package/dist/unstable-core-do-not-import/TRPCInferrable.d.ts.map +0 -1
  54. package/dist/unstable-core-do-not-import/index.d.ts +0 -38
  55. package/dist/unstable-core-do-not-import/index.d.ts.map +0 -1
  56. package/dist/unstable-core-do-not-import/index.js +0 -52
  57. package/dist/unstable-core-do-not-import/index.mjs +0 -17
  58. package/dist/unstable-core-do-not-import/serialize.d.ts.map +0 -1
  59. package/src/unstable-core-do-not-import/TRPCInferrable.ts +0 -44
  60. package/src/unstable-core-do-not-import/index.ts +0 -105
package/dist/index.js CHANGED
@@ -1,24 +1,24 @@
1
1
  'use strict';
2
2
 
3
- var TRPCError = require('./unstable-core-do-not-import/error/TRPCError.js');
3
+ var createProxy = require('./unstable-core-do-not-import/createProxy.js');
4
4
  var getErrorShape = require('./unstable-core-do-not-import/error/getErrorShape.js');
5
+ var TRPCError = require('./unstable-core-do-not-import/error/TRPCError.js');
6
+ require('./unstable-core-do-not-import/rpc/codes.js');
7
+ var router = require('./unstable-core-do-not-import/router.js');
8
+ var transformer = require('./unstable-core-do-not-import/transformer.js');
5
9
  var initTRPC = require('./unstable-core-do-not-import/initTRPC.js');
6
10
  var middleware = require('./unstable-core-do-not-import/middleware.js');
7
11
  require('./unstable-core-do-not-import/rootConfig.js');
8
- var router = require('./unstable-core-do-not-import/router.js');
9
- var transformer = require('./unstable-core-do-not-import/transformer.js');
10
- var createProxy = require('./unstable-core-do-not-import/createProxy.js');
11
- require('./unstable-core-do-not-import/rpc/codes.js');
12
12
 
13
13
 
14
14
 
15
+ exports.createTRPCFlatProxy = createProxy.createFlatProxy;
16
+ exports.getErrorShape = getErrorShape.getErrorShape;
15
17
  exports.TRPCError = TRPCError.TRPCError;
16
18
  exports.getTRPCErrorFromUnknown = TRPCError.getTRPCErrorFromUnknown;
17
- exports.getErrorShape = getErrorShape.getErrorShape;
18
- exports.initTRPC = initTRPC.initTRPC;
19
- exports.experimental_standaloneMiddleware = middleware.experimental_standaloneMiddleware;
20
- exports.experimental_trpcMiddleware = middleware.experimental_standaloneMiddleware;
21
19
  exports.callProcedure = router.callProcedure;
22
20
  exports.callTRPCProcedure = router.callProcedure;
23
21
  exports.transformTRPCResponse = transformer.transformTRPCResponse;
24
- exports.createTRPCFlatProxy = createProxy.createFlatProxy;
22
+ exports.initTRPC = initTRPC.initTRPC;
23
+ exports.experimental_standaloneMiddleware = middleware.experimental_standaloneMiddleware;
24
+ exports.experimental_trpcMiddleware = middleware.experimental_standaloneMiddleware;
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- export { TRPCError, getTRPCErrorFromUnknown } from './unstable-core-do-not-import/error/TRPCError.mjs';
1
+ export { createFlatProxy as createTRPCFlatProxy } from './unstable-core-do-not-import/createProxy.mjs';
2
2
  export { getErrorShape } from './unstable-core-do-not-import/error/getErrorShape.mjs';
3
+ export { TRPCError, getTRPCErrorFromUnknown } from './unstable-core-do-not-import/error/TRPCError.mjs';
4
+ import './unstable-core-do-not-import/rpc/codes.mjs';
5
+ export { callProcedure, callProcedure as callTRPCProcedure } from './unstable-core-do-not-import/router.mjs';
6
+ export { transformTRPCResponse } from './unstable-core-do-not-import/transformer.mjs';
3
7
  export { initTRPC } from './unstable-core-do-not-import/initTRPC.mjs';
4
8
  export { experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware } from './unstable-core-do-not-import/middleware.mjs';
5
9
  import './unstable-core-do-not-import/rootConfig.mjs';
6
- export { callProcedure, callProcedure as callTRPCProcedure } from './unstable-core-do-not-import/router.mjs';
7
- export { transformTRPCResponse } from './unstable-core-do-not-import/transformer.mjs';
8
- export { createFlatProxy as createTRPCFlatProxy } from './unstable-core-do-not-import/createProxy.mjs';
9
- import './unstable-core-do-not-import/rpc/codes.mjs';
package/dist/shared.js CHANGED
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var getErrorShape = require('./unstable-core-do-not-import/error/getErrorShape.js');
4
3
  var createProxy = require('./unstable-core-do-not-import/createProxy.js');
5
- require('./unstable-core-do-not-import/rootConfig.js');
4
+ var getErrorShape = require('./unstable-core-do-not-import/error/getErrorShape.js');
6
5
  require('./unstable-core-do-not-import/rpc/codes.js');
6
+ require('./unstable-core-do-not-import/rootConfig.js');
7
7
 
8
8
 
9
9
 
10
- exports.getErrorShape = getErrorShape.getErrorShape;
11
10
  exports.createFlatProxy = createProxy.createFlatProxy;
11
+ exports.getErrorShape = getErrorShape.getErrorShape;
package/dist/shared.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { getErrorShape } from './unstable-core-do-not-import/error/getErrorShape.mjs';
2
1
  export { createFlatProxy } from './unstable-core-do-not-import/createProxy.mjs';
3
- import './unstable-core-do-not-import/rootConfig.mjs';
2
+ export { getErrorShape } from './unstable-core-do-not-import/error/getErrorShape.mjs';
4
3
  import './unstable-core-do-not-import/rpc/codes.mjs';
4
+ import './unstable-core-do-not-import/rootConfig.mjs';
@@ -0,0 +1,17 @@
1
+ import type { inferObservableValue } from '../../observable';
2
+ import type { AnyProcedure, inferProcedureInput } from '../procedure';
3
+ import type { AnyRouter, RouterRecord } from '../router';
4
+ import type { AnyClientRootTypes, InferrableClientTypes, inferRootTypes } from './inferrable';
5
+ import type { Serialize } from './serialize';
6
+ /**
7
+ * @internal
8
+ */
9
+ export type inferTransformedProcedureOutput<TInferrable extends InferrableClientTypes, TProcedure extends AnyProcedure> = inferRootTypes<TInferrable>['transformer'] extends false ? Serialize<TProcedure['_def']['_output_out']> : TProcedure['_def']['_output_out'];
10
+ /** @internal */
11
+ export type inferTransformedSubscriptionOutput<TInferrable extends InferrableClientTypes, TProcedure extends AnyProcedure> = inferRootTypes<TInferrable>['transformer'] extends false ? Serialize<inferObservableValue<TProcedure['_def']['_output_out']>> : inferObservableValue<TProcedure['_def']['_output_out']>;
12
+ export type GetInferenceHelpers<TType extends 'input' | 'output', TRoot extends AnyClientRootTypes, 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;
14
+ };
15
+ export type inferRouterInputs<TRouter extends AnyRouter> = GetInferenceHelpers<'input', TRouter['_def']['_config']['$types'], TRouter['_def']['record']>;
16
+ export type inferRouterOutputs<TRouter extends AnyRouter> = GetInferenceHelpers<'output', TRouter['_def']['_config']['$types'], TRouter['_def']['record']>;
17
+ //# sourceMappingURL=inference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../src/unstable-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CAAC,GACzC,MAAM,SAAS,YAAY,GAC3B,KAAK,SAAS,OAAO,GACnB,mBAAmB,CAAC,MAAM,CAAC,GAC3B,+BAA+B,CAAC,KAAK,EAAE,MAAM,CAAC,GAChD,KAAK,GACP,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"}
@@ -0,0 +1,33 @@
1
+ import type { AnyRootTypes } from '../rootConfig';
2
+ export type AnyClientRootTypes = Pick<AnyRootTypes, 'errorShape' | 'transformer'>;
3
+ /**
4
+ * Result of `initTRPC.create()`
5
+ */
6
+ type InitLike = {
7
+ _config: {
8
+ $types: AnyClientRootTypes;
9
+ };
10
+ };
11
+ /**
12
+ * Result of `initTRPC.create().router()`
13
+ */
14
+ type RouterLike = {
15
+ _def: InitLike;
16
+ };
17
+ /**
18
+ * Result of `initTRPC.create()._config`
19
+ */
20
+ type RootConfigLike = {
21
+ $types: AnyClientRootTypes;
22
+ };
23
+ /**
24
+ * Anything that can be inferred to the root config types needed for a TRPC client
25
+ */
26
+ export type InferrableClientTypes = RouterLike | InitLike | RootConfigLike | AnyClientRootTypes;
27
+ /**
28
+ * Infer the root types from a InferrableClientTypes
29
+ */
30
+ export type inferRootTypes<TInferrable extends InferrableClientTypes> = TInferrable extends AnyClientRootTypes ? TInferrable : TInferrable extends RootConfigLike ? TInferrable['$types'] : TInferrable extends InitLike ? TInferrable['_config']['$types'] : TInferrable extends RouterLike ? TInferrable['_def']['_config']['$types'] : never;
31
+ export type inferErrorShape<TInferrable extends InferrableClientTypes> = inferRootTypes<TInferrable>['errorShape'];
32
+ export {};
33
+ //# sourceMappingURL=inferrable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inferrable.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/clientish/inferrable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,YAAY,EACZ,YAAY,GAAG,aAAa,CAC7B,CAAC;AAEF;;GAEG;AACH,KAAK,QAAQ,GAAG;IACd,OAAO,EAAE;QACP,MAAM,EAAE,kBAAkB,CAAC;KAC5B,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,kBAAkB,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAC7B,UAAU,GACV,QAAQ,GACR,cAAc,GACd,kBAAkB,CAAC;AAEvB;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,WAAW,SAAS,qBAAqB,IAClE,WAAW,SAAS,kBAAkB,GAClC,WAAW,GACX,WAAW,SAAS,cAAc,GAClC,WAAW,CAAC,QAAQ,CAAC,GACrB,WAAW,SAAS,QAAQ,GAC5B,WAAW,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,GAChC,WAAW,SAAS,UAAU,GAC9B,WAAW,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,GACxC,KAAK,CAAC;AAEZ,MAAM,MAAM,eAAe,CAAC,WAAW,SAAS,qBAAqB,IACnE,cAAc,CAAC,WAAW,CAAC,CAAC,YAAY,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Simplify, WithoutIndexSignature } from './types';
1
+ import type { Simplify, WithoutIndexSignature } from '../types';
2
2
  /**
3
3
  * @link https://github.com/remix-run/remix/blob/2248669ed59fd716e267ea41df5d665d4781f4a9/packages/remix-server-runtime/serialize.ts
4
4
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/clientish/serialize.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEhE;;GAEG;AACH,KAAK,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAEtD,KAAK,gBAAgB,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAKtD,KAAK,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AAK/C,KAAK,cAAc,GAAG,aAAa,GAAG,SAAS,CAAC;AAEhD,KAAK,QAAQ,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,qBAAqB,CAAC,CAAC,CAAC,SAAS,KAAK,GAC1E,IAAI,GACJ,KAAK,CAAC;AAGV,MAAM,MAAM,SAAS,CAAC,CAAC,IACrB,KAAK,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,GAAG,GAC3B,OAAO,SAAS,CAAC,GAAG,OAAO,GAC3B,CAAC,SAAS,cAAc,GAAG,CAAC,GAC5B,CAAC,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAC3C,CAAC,SAAS,gBAAgB,GAAG,KAAK,GAClC,CAAC,SAAS;IAAE,MAAM,IAAI,MAAM,CAAC,CAAA;CAAE,GAAG,CAAC,GACnC,CAAC,SAAS,EAAE,GAAG,EAAE,GACjB,CAAC,SAAS,CAAC,OAAO,E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iB,CAAC,CAAC,CAAC,SAAS,IAAI,GACjC,oBAAoB,CAAC,CAAC,CAAC,GACvB,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -1,7 +1,4 @@
1
- import type { inferObservableValue } from '../observable';
2
1
  import type { ProcedureCallOptions } from './procedureBuilder';
3
- import type { Serialize } from './serialize';
4
- import type { inferRootTypes, TRPCInferrable } from './TRPCInferrable';
5
2
  export declare const procedureTypes: readonly ["query", "mutation", "subscription"];
6
3
  /**
7
4
  * @public
@@ -53,12 +50,6 @@ export type AnyQueryProcedure = QueryProcedure<any>;
53
50
  export type AnyMutationProcedure = MutationProcedure<any>;
54
51
  export type AnySubscriptionProcedure = SubscriptionProcedure<any>;
55
52
  export type AnyProcedure = Procedure<ProcedureType, any>;
56
- /**
57
- * @internal
58
- */
59
- export type inferTransformedProcedureOutput<TInferrable extends TRPCInferrable, TProcedure extends AnyProcedure> = inferRootTypes<TInferrable>['transformer'] extends false ? Serialize<TProcedure['_def']['_output_out']> : TProcedure['_def']['_output_out'];
60
- /** @internal */
61
- export type inferTransformedSubscriptionOutput<TInferrable extends TRPCInferrable, TProcedure extends AnyProcedure> = inferRootTypes<TInferrable>['transformer'] extends false ? Serialize<inferObservableValue<TProcedure['_def']['_output_out']>> : inferObservableValue<TProcedure['_def']['_output_out']>;
62
53
  export type inferProcedureInput<TProcedure extends AnyProcedure> = undefined extends inferProcedureParams<TProcedure>['_input_in'] ? void | inferProcedureParams<TProcedure>['_input_in'] : inferProcedureParams<TProcedure>['_input_in'];
63
54
  export type inferProcedureParams<TProcedure> = TProcedure extends AnyProcedure ? TProcedure['_def'] : never;
64
55
  export type inferProcedureOutput<TProcedure> = inferProcedureParams<TProcedure>['_output_out'];
@@ -1 +1 @@
1
- {"version":3,"file":"procedure.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/procedure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,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AM,WAAW,iBAAiB,CAAC,IAAI,SAAS,iBAAiB,CAC/D,SAAQ,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC;CAAG;AAExC,MAAM,WAAW,qBAAqB,CAAC,IAAI,SAAS,iBAAiB,CACnE,SAAQ,SAAS,CAAC,cAAc,EAAE,IAAI,CAAC;CAAG;AAE5C,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;AACpD,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;AAC1D,MAAM,MAAM,wBAAwB,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC;AAClE,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;AAEzD,MAAM,MAAM,mBAAmB,CAAC,UAAU,SAAS,YAAY,IAC7D,SAAS,SAAS,oBAAoB,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,GAC3D,IAAI,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,GACpD,oBAAoB,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,CAAC;AAEpD,MAAM,MAAM,oBAAoB,CAAC,UAAU,IAAI,UAAU,SAAS,YAAY,GAC1E,UAAU,CAAC,MAAM,CAAC,GAClB,KAAK,CAAC;AACV,MAAM,MAAM,oBAAoB,CAAC,UAAU,IACzC,oBAAoB,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { CombinedDataTransformer } from '.';
1
+ import type { CombinedDataTransformer } from '../unstable-core-do-not-import';
2
2
  import type { DefaultErrorShape, ErrorFormatter } from './error/formatter';
3
3
  /**
4
4
  * The initial generics that are used in the init function
@@ -1 +1 @@
1
- {"version":3,"file":"rootConfig.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/rootConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,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AO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE3E;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,iBAAiB,CAAC;IAC9B,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,OAMmB,CAAC;AAElD;;;GAGG;AACH,MAAM,WAAW,UAAU,CAAC,MAAM,SAAS,SAAS;IAClD;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,EAAE,uBAAuB,CAAC;IACrC;;;OAGG;IACH,cAAc,EAAE,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;IACpE;;;;OAIG;IACH,oBAAoB,EAAE,OAAO,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;CACtE;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,SAAS,SAAS,SAAS,IAAI,SAAS,CAAC;AAErE,MAAM,MAAM,YAAY,GAAG,eAAe,CAAC;IACzC,GAAG,EAAE,GAAG,CAAC;IACT,IAAI,EAAE,GAAG,CAAC;IACV,UAAU,EAAE,GAAG,CAAC;IAChB,WAAW,EAAE,GAAG,CAAC;CAClB,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { AnyProcedure, inferProcedureInput, inferTransformedProcedureOutput } from './procedure';
1
+ import type { AnyProcedure, inferProcedureInput } from './procedure';
2
2
  import type { ProcedureCallOptions } from './procedureBuilder';
3
3
  import type { AnyRootTypes, RootConfig } from './rootConfig';
4
4
  import type { MaybePromise } from './types';
@@ -42,11 +42,6 @@ export type inferRouterRootTypes<TRouter extends AnyRouter> = TRouter['_def']['_
42
42
  export type inferRouterContext<TRouter extends AnyRouter> = inferRouterRootTypes<TRouter>['ctx'];
43
43
  export type inferRouterError<TRouter extends AnyRouter> = inferRouterRootTypes<TRouter>['errorShape'];
44
44
  export type inferRouterMeta<TRouter extends AnyRouter> = inferRouterRootTypes<TRouter>['meta'];
45
- export type GetInferenceHelpers<TType extends 'input' | 'output', TRoot extends AnyRootTypes, TRecord extends RouterRecord> = {
46
- [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;
47
- };
48
- export type inferRouterInputs<TRouter extends AnyRouter> = GetInferenceHelpers<'input', TRouter['_def']['_config']['$types'], TRouter['_def']['record']>;
49
- export type inferRouterOutputs<TRouter extends AnyRouter> = GetInferenceHelpers<'output', TRouter['_def']['_config']['$types'], TRouter['_def']['record']>;
50
45
  export type CreateRouterOptions = {
51
46
  [key: string]: AnyProcedure | AnyRouter | CreateRouterOptions;
52
47
  };
@@ -1 +1 @@
1
- {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/router.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,+BAA+B,EAChC,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,KAAK,EAAE,YAAY,EAAW,MAAM,SAAS,CAAC;AAGrD,MAAM,WAAW,YAAY;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,YAAY,CAAC;CAC5C;A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Q,CAAC,GAC3B,YAAY,CAAC,QAAQ,CAAC,CAoDxB"}
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * ================================
5
+ * Useful utility types that doesn't have anything to do with tRPC in particular
6
+ * ================================
7
+ */ /**
8
+ * @public
9
+ */ const ERROR_SYMBOL = Symbol('TypeError');
10
+
11
+ exports.ERROR_SYMBOL = ERROR_SYMBOL;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * ================================
3
+ * Useful utility types that doesn't have anything to do with tRPC in particular
4
+ * ================================
5
+ */ /**
6
+ * @public
7
+ */ const ERROR_SYMBOL = Symbol('TypeError');
8
+
9
+ export { ERROR_SYMBOL };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * **DO NOT IMPORT FROM HERE FILE**
3
+ *
4
+ * This file is here to:
5
+ * - make TypeScript happy and prevent _"The inferred type of 'createContext' cannot be named without a reference to [...]"_.
6
+ * - the the glue between the official `@trpc/*`-packages
7
+ *
8
+ *
9
+ * If you seem to need to import anything from here, please open an issue at https://github.com/trpc/trpc/issues
10
+ */
11
+ export * from './unstable-core-do-not-import/clientish/inference';
12
+ export * from './unstable-core-do-not-import/clientish/inferrable';
13
+ export * from './unstable-core-do-not-import/clientish/serialize';
14
+ export * from './unstable-core-do-not-import/createProxy';
15
+ export * from './unstable-core-do-not-import/error/formatter';
16
+ export * from './unstable-core-do-not-import/error/getErrorShape';
17
+ export * from './unstable-core-do-not-import/error/TRPCError';
18
+ export * from './unstable-core-do-not-import/http';
19
+ export * from './unstable-core-do-not-import/initTRPC';
20
+ export * from './unstable-core-do-not-import/middleware';
21
+ export * from './unstable-core-do-not-import/parser';
22
+ export * from './unstable-core-do-not-import/procedure';
23
+ export * from './unstable-core-do-not-import/procedureBuilder';
24
+ export * from './unstable-core-do-not-import/rootConfig';
25
+ export * from './unstable-core-do-not-import/router';
26
+ export * from './unstable-core-do-not-import/router';
27
+ export * from './unstable-core-do-not-import/rpc';
28
+ export * from './unstable-core-do-not-import/transformer';
29
+ export * from './unstable-core-do-not-import/types';
30
+ export * from './unstable-core-do-not-import/utils';
31
+ //# sourceMappingURL=unstable-core-do-not-import.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unstable-core-do-not-import.d.ts","sourceRoot":"","sources":["../src/unstable-core-do-not-import.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,cAAc,mDAAmD,CAAC;AAClE,cAAc,oDAAoD,CAAC;AACnE,cAAc,mDAAmD,CAAC;AAClE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mDAAmD,CAAC;AAClE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC"}
@@ -0,0 +1,64 @@
1
+ 'use strict';
2
+
3
+ var createProxy = require('./unstable-core-do-not-import/createProxy.js');
4
+ var formatter = require('./unstable-core-do-not-import/error/formatter.js');
5
+ var getErrorShape = require('./unstable-core-do-not-import/error/getErrorShape.js');
6
+ var TRPCError = require('./unstable-core-do-not-import/error/TRPCError.js');
7
+ var getHTTPStatusCode = require('./unstable-core-do-not-import/http/getHTTPStatusCode.js');
8
+ var resolveHTTPResponse = require('./unstable-core-do-not-import/http/resolveHTTPResponse.js');
9
+ var batchStreamFormatter = require('./unstable-core-do-not-import/http/batchStreamFormatter.js');
10
+ var contentType = require('./unstable-core-do-not-import/http/contentType.js');
11
+ var initTRPC = require('./unstable-core-do-not-import/initTRPC.js');
12
+ var middleware = require('./unstable-core-do-not-import/middleware.js');
13
+ var parser = require('./unstable-core-do-not-import/parser.js');
14
+ var procedure = require('./unstable-core-do-not-import/procedure.js');
15
+ var procedureBuilder = require('./unstable-core-do-not-import/procedureBuilder.js');
16
+ var rootConfig = require('./unstable-core-do-not-import/rootConfig.js');
17
+ var router = require('./unstable-core-do-not-import/router.js');
18
+ var codes = require('./unstable-core-do-not-import/rpc/codes.js');
19
+ var parseTRPCMessage = require('./unstable-core-do-not-import/rpc/parseTRPCMessage.js');
20
+ var transformer = require('./unstable-core-do-not-import/transformer.js');
21
+ var types = require('./unstable-core-do-not-import/types.js');
22
+ var utils = require('./unstable-core-do-not-import/utils.js');
23
+
24
+
25
+
26
+ exports.createFlatProxy = createProxy.createFlatProxy;
27
+ exports.createRecursiveProxy = createProxy.createRecursiveProxy;
28
+ exports.defaultFormatter = formatter.defaultFormatter;
29
+ exports.getErrorShape = getErrorShape.getErrorShape;
30
+ exports.TRPCError = TRPCError.TRPCError;
31
+ exports.getCauseFromUnknown = TRPCError.getCauseFromUnknown;
32
+ exports.getTRPCErrorFromUnknown = TRPCError.getTRPCErrorFromUnknown;
33
+ exports.getHTTPStatusCode = getHTTPStatusCode.getHTTPStatusCode;
34
+ exports.getHTTPStatusCodeFromError = getHTTPStatusCode.getHTTPStatusCodeFromError;
35
+ exports.resolveHTTPResponse = resolveHTTPResponse.resolveHTTPResponse;
36
+ exports.getBatchStreamFormatter = batchStreamFormatter.getBatchStreamFormatter;
37
+ exports.getJsonContentTypeInputs = contentType.getJsonContentTypeInputs;
38
+ exports.initTRPC = initTRPC.initTRPC;
39
+ exports.createInputMiddleware = middleware.createInputMiddleware;
40
+ exports.createMiddlewareFactory = middleware.createMiddlewareFactory;
41
+ exports.createOutputMiddleware = middleware.createOutputMiddleware;
42
+ exports.experimental_standaloneMiddleware = middleware.experimental_standaloneMiddleware;
43
+ exports.middlewareMarker = middleware.middlewareMarker;
44
+ exports.getParseFn = parser.getParseFn;
45
+ exports.procedureTypes = procedure.procedureTypes;
46
+ exports.createBuilder = procedureBuilder.createBuilder;
47
+ exports.unsetMarker = procedureBuilder.unsetMarker;
48
+ exports.isServerDefault = rootConfig.isServerDefault;
49
+ exports.callProcedure = router.callProcedure;
50
+ exports.createCallerFactory = router.createCallerFactory;
51
+ exports.createRouterFactory = router.createRouterFactory;
52
+ exports.mergeRouters = router.mergeRouters;
53
+ exports.TRPC_ERROR_CODES_BY_KEY = codes.TRPC_ERROR_CODES_BY_KEY;
54
+ exports.TRPC_ERROR_CODES_BY_NUMBER = codes.TRPC_ERROR_CODES_BY_NUMBER;
55
+ exports.parseTRPCMessage = parseTRPCMessage.parseTRPCMessage;
56
+ exports.defaultTransformer = transformer.defaultTransformer;
57
+ exports.getDataTransformer = transformer.getDataTransformer;
58
+ exports.transformResult = transformer.transformResult;
59
+ exports.transformTRPCResponse = transformer.transformTRPCResponse;
60
+ exports.ERROR_SYMBOL = types.ERROR_SYMBOL;
61
+ exports.invert = utils.invert;
62
+ exports.isObject = utils.isObject;
63
+ exports.mergeWithoutOverrides = utils.mergeWithoutOverrides;
64
+ exports.omitPrototype = utils.omitPrototype;
@@ -0,0 +1,20 @@
1
+ export { createFlatProxy, createRecursiveProxy } from './unstable-core-do-not-import/createProxy.mjs';
2
+ export { defaultFormatter } from './unstable-core-do-not-import/error/formatter.mjs';
3
+ export { getErrorShape } from './unstable-core-do-not-import/error/getErrorShape.mjs';
4
+ export { TRPCError, getCauseFromUnknown, getTRPCErrorFromUnknown } from './unstable-core-do-not-import/error/TRPCError.mjs';
5
+ export { getHTTPStatusCode, getHTTPStatusCodeFromError } from './unstable-core-do-not-import/http/getHTTPStatusCode.mjs';
6
+ export { resolveHTTPResponse } from './unstable-core-do-not-import/http/resolveHTTPResponse.mjs';
7
+ export { getBatchStreamFormatter } from './unstable-core-do-not-import/http/batchStreamFormatter.mjs';
8
+ export { getJsonContentTypeInputs } from './unstable-core-do-not-import/http/contentType.mjs';
9
+ export { initTRPC } from './unstable-core-do-not-import/initTRPC.mjs';
10
+ export { createInputMiddleware, createMiddlewareFactory, createOutputMiddleware, experimental_standaloneMiddleware, middlewareMarker } from './unstable-core-do-not-import/middleware.mjs';
11
+ export { getParseFn } from './unstable-core-do-not-import/parser.mjs';
12
+ export { procedureTypes } from './unstable-core-do-not-import/procedure.mjs';
13
+ export { createBuilder, unsetMarker } from './unstable-core-do-not-import/procedureBuilder.mjs';
14
+ export { isServerDefault } from './unstable-core-do-not-import/rootConfig.mjs';
15
+ export { callProcedure, createCallerFactory, createRouterFactory, mergeRouters } from './unstable-core-do-not-import/router.mjs';
16
+ export { TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER } from './unstable-core-do-not-import/rpc/codes.mjs';
17
+ export { parseTRPCMessage } from './unstable-core-do-not-import/rpc/parseTRPCMessage.mjs';
18
+ export { defaultTransformer, getDataTransformer, transformResult, transformTRPCResponse } from './unstable-core-do-not-import/transformer.mjs';
19
+ export { ERROR_SYMBOL } from './unstable-core-do-not-import/types.mjs';
20
+ export { invert, isObject, mergeWithoutOverrides, omitPrototype } from './unstable-core-do-not-import/utils.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/server",
3
- "version": "11.0.0-next-beta.253+9bcf00a0f",
3
+ "version": "11.0.0-next-beta.254+b085bbd8e",
4
4
  "description": "The tRPC server library",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -99,9 +99,9 @@
99
99
  "default": "./dist/shared.js"
100
100
  },
101
101
  "./unstable-core-do-not-import": {
102
- "import": "./dist/unstable-core-do-not-import/index.mjs",
103
- "require": "./dist/unstable-core-do-not-import/index.js",
104
- "default": "./dist/unstable-core-do-not-import/index.js"
102
+ "import": "./dist/unstable-core-do-not-import.mjs",
103
+ "require": "./dist/unstable-core-do-not-import.js",
104
+ "default": "./dist/unstable-core-do-not-import.js"
105
105
  }
106
106
  },
107
107
  "files": [
@@ -157,5 +157,5 @@
157
157
  "funding": [
158
158
  "https://trpc.io/sponsor"
159
159
  ],
160
- "gitHead": "9bcf00a0f8367a70c4a9e72a1f194abc0bf702f6"
160
+ "gitHead": "b085bbd8ef1b8fed81ce8f0ca73b896e32905c24"
161
161
  }
@@ -0,0 +1,56 @@
1
+ import type { inferObservableValue } from '../../observable';
2
+ import type { AnyProcedure, inferProcedureInput } from '../procedure';
3
+ import type { AnyRouter, RouterRecord } from '../router';
4
+ import type {
5
+ AnyClientRootTypes,
6
+ InferrableClientTypes,
7
+ inferRootTypes,
8
+ } from './inferrable';
9
+ import type { Serialize } from './serialize';
10
+
11
+ /**
12
+ * @internal
13
+ */
14
+
15
+ export type inferTransformedProcedureOutput<
16
+ TInferrable extends InferrableClientTypes,
17
+ TProcedure extends AnyProcedure,
18
+ > = inferRootTypes<TInferrable>['transformer'] extends false
19
+ ? Serialize<TProcedure['_def']['_output_out']>
20
+ : TProcedure['_def']['_output_out'];
21
+ /** @internal */
22
+
23
+ export type inferTransformedSubscriptionOutput<
24
+ TInferrable extends InferrableClientTypes,
25
+ TProcedure extends AnyProcedure,
26
+ > = inferRootTypes<TInferrable>['transformer'] extends false
27
+ ? Serialize<inferObservableValue<TProcedure['_def']['_output_out']>>
28
+ : inferObservableValue<TProcedure['_def']['_output_out']>;
29
+
30
+ export type GetInferenceHelpers<
31
+ TType extends 'input' | 'output',
32
+ TRoot extends AnyClientRootTypes,
33
+ TRecord extends RouterRecord,
34
+ > = {
35
+ [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value
36
+ ? $Value extends RouterRecord
37
+ ? GetInferenceHelpers<TType, TRoot, $Value>
38
+ : $Value extends AnyProcedure
39
+ ? TType extends 'input'
40
+ ? inferProcedureInput<$Value>
41
+ : inferTransformedProcedureOutput<TRoot, $Value>
42
+ : never
43
+ : never;
44
+ };
45
+
46
+ export type inferRouterInputs<TRouter extends AnyRouter> = GetInferenceHelpers<
47
+ 'input',
48
+ TRouter['_def']['_config']['$types'],
49
+ TRouter['_def']['record']
50
+ >;
51
+
52
+ export type inferRouterOutputs<TRouter extends AnyRouter> = GetInferenceHelpers<
53
+ 'output',
54
+ TRouter['_def']['_config']['$types'],
55
+ TRouter['_def']['record']
56
+ >;
@@ -0,0 +1,55 @@
1
+ import type { AnyRootTypes } from '../rootConfig';
2
+
3
+ export type AnyClientRootTypes = Pick<
4
+ AnyRootTypes,
5
+ 'errorShape' | 'transformer'
6
+ >;
7
+
8
+ /**
9
+ * Result of `initTRPC.create()`
10
+ */
11
+ type InitLike = {
12
+ _config: {
13
+ $types: AnyClientRootTypes;
14
+ };
15
+ };
16
+
17
+ /**
18
+ * Result of `initTRPC.create().router()`
19
+ */
20
+ type RouterLike = {
21
+ _def: InitLike;
22
+ };
23
+
24
+ /**
25
+ * Result of `initTRPC.create()._config`
26
+ */
27
+ type RootConfigLike = {
28
+ $types: AnyClientRootTypes;
29
+ };
30
+
31
+ /**
32
+ * Anything that can be inferred to the root config types needed for a TRPC client
33
+ */
34
+ export type InferrableClientTypes =
35
+ | RouterLike
36
+ | InitLike
37
+ | RootConfigLike
38
+ | AnyClientRootTypes;
39
+
40
+ /**
41
+ * Infer the root types from a InferrableClientTypes
42
+ */
43
+ export type inferRootTypes<TInferrable extends InferrableClientTypes> =
44
+ TInferrable extends AnyClientRootTypes
45
+ ? TInferrable
46
+ : TInferrable extends RootConfigLike
47
+ ? TInferrable['$types']
48
+ : TInferrable extends InitLike
49
+ ? TInferrable['_config']['$types']
50
+ : TInferrable extends RouterLike
51
+ ? TInferrable['_def']['_config']['$types']
52
+ : never;
53
+
54
+ export type inferErrorShape<TInferrable extends InferrableClientTypes> =
55
+ inferRootTypes<TInferrable>['errorShape'];
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/naming-convention */
2
- import type { Simplify, WithoutIndexSignature } from './types';
2
+ import type { Simplify, WithoutIndexSignature } from '../types';
3
3
 
4
4
  /**
5
5
  * @link https://github.com/remix-run/remix/blob/2248669ed59fd716e267ea41df5d665d4781f4a9/packages/remix-server-runtime/serialize.ts
@@ -1,7 +1,4 @@
1
- import type { inferObservableValue } from '../observable';
2
1
  import type { ProcedureCallOptions } from './procedureBuilder';
3
- import type { Serialize } from './serialize';
4
- import type { inferRootTypes, TRPCInferrable } from './TRPCInferrable';
5
2
 
6
3
  export const procedureTypes = ['query', 'mutation', 'subscription'] as const;
7
4
  /**
@@ -65,24 +62,6 @@ export type AnyMutationProcedure = MutationProcedure<any>;
65
62
  export type AnySubscriptionProcedure = SubscriptionProcedure<any>;
66
63
  export type AnyProcedure = Procedure<ProcedureType, any>;
67
64
 
68
- /**
69
- * @internal
70
- */
71
- export type inferTransformedProcedureOutput<
72
- TInferrable extends TRPCInferrable,
73
- TProcedure extends AnyProcedure,
74
- > = inferRootTypes<TInferrable>['transformer'] extends false
75
- ? Serialize<TProcedure['_def']['_output_out']>
76
- : TProcedure['_def']['_output_out'];
77
-
78
- /** @internal */
79
- export type inferTransformedSubscriptionOutput<
80
- TInferrable extends TRPCInferrable,
81
- TProcedure extends AnyProcedure,
82
- > = inferRootTypes<TInferrable>['transformer'] extends false
83
- ? Serialize<inferObservableValue<TProcedure['_def']['_output_out']>>
84
- : inferObservableValue<TProcedure['_def']['_output_out']>;
85
-
86
65
  export type inferProcedureInput<TProcedure extends AnyProcedure> =
87
66
  undefined extends inferProcedureParams<TProcedure>['_input_in']
88
67
  ? void | inferProcedureParams<TProcedure>['_input_in']
@@ -1,4 +1,4 @@
1
- import type { CombinedDataTransformer } from '.';
1
+ import type { CombinedDataTransformer } from '../unstable-core-do-not-import';
2
2
  import type { DefaultErrorShape, ErrorFormatter } from './error/formatter';
3
3
 
4
4
  /**