@trpc/server 10.45.1-canary.17 → 10.45.1-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.
- package/dist/adapters/aws-lambda/index.d.ts +2 -2
- package/dist/adapters/aws-lambda/index.d.ts.map +1 -1
- package/dist/adapters/aws-lambda/utils.d.ts +1 -1
- package/dist/adapters/aws-lambda/utils.d.ts.map +1 -1
- package/dist/adapters/express.d.ts +2 -2
- package/dist/adapters/express.d.ts.map +1 -1
- package/dist/adapters/fastify/fastifyRequestHandler.d.ts +4 -4
- package/dist/adapters/fastify/fastifyRequestHandler.d.ts.map +1 -1
- package/dist/adapters/fastify/fastifyTRPCPlugin.d.ts +4 -4
- package/dist/adapters/fastify/fastifyTRPCPlugin.d.ts.map +1 -1
- package/dist/adapters/fetch/fetchRequestHandler.d.ts +2 -2
- package/dist/adapters/fetch/fetchRequestHandler.d.ts.map +1 -1
- package/dist/adapters/fetch/types.d.ts +2 -2
- package/dist/adapters/fetch/types.d.ts.map +1 -1
- package/dist/adapters/lambda/index.d.ts +3 -2
- package/dist/adapters/lambda/index.d.ts.map +1 -1
- package/dist/adapters/next.d.ts +2 -2
- package/dist/adapters/next.d.ts.map +1 -1
- package/dist/adapters/node-http/content-type/form-data/fileUploadHandler.d.ts +1 -1
- package/dist/adapters/node-http/content-type/form-data/fileUploadHandler.d.ts.map +1 -1
- package/dist/adapters/node-http/content-type/form-data/index.d.ts +2 -2
- package/dist/adapters/node-http/content-type/form-data/index.d.ts.map +1 -1
- package/dist/adapters/node-http/content-type/form-data/memoryUploadHandler.d.ts +1 -1
- package/dist/adapters/node-http/content-type/form-data/memoryUploadHandler.d.ts.map +1 -1
- package/dist/adapters/node-http/content-type/form-data/streamSlice.d.ts +2 -1
- package/dist/adapters/node-http/content-type/form-data/streamSlice.d.ts.map +1 -1
- package/dist/adapters/node-http/content-type/form-data/uploadHandler.d.ts +1 -1
- package/dist/adapters/node-http/content-type/form-data/uploadHandler.d.ts.map +1 -1
- package/dist/adapters/node-http/content-type/json/getPostBody.d.ts +2 -2
- package/dist/adapters/node-http/content-type/json/getPostBody.d.ts.map +1 -1
- package/dist/adapters/node-http/internals/contentType.d.ts +3 -3
- package/dist/adapters/node-http/internals/contentType.d.ts.map +1 -1
- package/dist/adapters/node-http/nodeHTTPRequestHandler.d.ts +2 -2
- package/dist/adapters/node-http/nodeHTTPRequestHandler.d.ts.map +1 -1
- package/dist/adapters/node-http/types.d.ts +5 -5
- package/dist/adapters/node-http/types.d.ts.map +1 -1
- package/dist/adapters/standalone.d.ts +2 -2
- package/dist/adapters/standalone.d.ts.map +1 -1
- package/dist/adapters/ws.d.ts +5 -5
- package/dist/adapters/ws.d.ts.map +1 -1
- package/dist/bundle-analysis.json +86 -86
- package/dist/core/initTRPC.d.ts +5 -5
- package/dist/core/initTRPC.d.ts.map +1 -1
- package/dist/core/internals/config.d.ts +1 -1
- package/dist/core/internals/config.d.ts.map +1 -1
- package/dist/core/internals/getParseFn.d.ts +1 -1
- package/dist/core/internals/getParseFn.d.ts.map +1 -1
- package/dist/core/internals/mergeRouters.d.ts +1 -1
- package/dist/core/internals/mergeRouters.d.ts.map +1 -1
- package/dist/core/internals/procedureBuilder.d.ts +7 -7
- package/dist/core/internals/procedureBuilder.d.ts.map +1 -1
- package/dist/core/internals/utils.d.ts +2 -2
- package/dist/core/internals/utils.d.ts.map +1 -1
- package/dist/core/middleware.d.ts +7 -7
- package/dist/core/middleware.d.ts.map +1 -1
- package/dist/core/procedure.d.ts +4 -4
- package/dist/core/procedure.d.ts.map +1 -1
- package/dist/core/router.d.ts +4 -4
- package/dist/core/router.d.ts.map +1 -1
- package/dist/core/types.d.ts +4 -4
- package/dist/core/types.d.ts.map +1 -1
- package/dist/deprecated/internals/middlewares.d.ts +2 -2
- package/dist/deprecated/internals/middlewares.d.ts.map +1 -1
- package/dist/deprecated/internals/procedure.d.ts +3 -3
- package/dist/deprecated/internals/procedure.d.ts.map +1 -1
- package/dist/deprecated/interop.d.ts +9 -9
- package/dist/deprecated/interop.d.ts.map +1 -1
- package/dist/deprecated/router.d.ts +7 -7
- package/dist/deprecated/router.d.ts.map +1 -1
- package/dist/error/TRPCError.d.ts +1 -1
- package/dist/error/TRPCError.d.ts.map +1 -1
- package/dist/error/formatter.d.ts +3 -3
- package/dist/error/formatter.d.ts.map +1 -1
- package/dist/http/contentType.d.ts +3 -3
- package/dist/http/contentType.d.ts.map +1 -1
- package/dist/http/getHTTPStatusCode.d.ts +3 -2
- package/dist/http/getHTTPStatusCode.d.ts.map +1 -1
- package/dist/http/internals/types.d.ts +5 -5
- package/dist/http/internals/types.d.ts.map +1 -1
- package/dist/http/resolveHTTPResponse.d.ts +5 -5
- package/dist/http/resolveHTTPResponse.d.ts.map +1 -1
- package/dist/http/types.d.ts +3 -3
- package/dist/http/types.d.ts.map +1 -1
- package/dist/internals/types.d.ts +3 -3
- package/dist/internals/types.d.ts.map +1 -1
- package/dist/observable/internals/observableToPromise.d.ts +1 -1
- package/dist/observable/internals/observableToPromise.d.ts.map +1 -1
- package/dist/observable/internals/pipe.d.ts +1 -1
- package/dist/observable/internals/pipe.d.ts.map +1 -1
- package/dist/observable/observable.d.ts +1 -1
- package/dist/observable/observable.d.ts.map +1 -1
- package/dist/observable/operators/map.d.ts +1 -1
- package/dist/observable/operators/map.d.ts.map +1 -1
- package/dist/observable/operators/share.d.ts +1 -1
- package/dist/observable/operators/share.d.ts.map +1 -1
- package/dist/observable/operators/tap.d.ts +1 -1
- package/dist/observable/operators/tap.d.ts.map +1 -1
- package/dist/rpc/envelopes.d.ts +2 -2
- package/dist/rpc/envelopes.d.ts.map +1 -1
- package/dist/shared/getErrorShape.d.ts +3 -3
- package/dist/shared/getErrorShape.d.ts.map +1 -1
- package/dist/shared/internal/serialize.d.ts +1 -1
- package/dist/shared/internal/serialize.d.ts.map +1 -1
- package/dist/shared/jsonify.d.ts +3 -3
- package/dist/shared/jsonify.d.ts.map +1 -1
- package/dist/shared/transformTRPCResponse.d.ts +2 -2
- package/dist/shared/transformTRPCResponse.d.ts.map +1 -1
- package/dist/subscription.d.ts +1 -1
- package/dist/subscription.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/adapters/aws-lambda/index.ts +7 -4
- package/src/adapters/aws-lambda/utils.ts +1 -1
- package/src/adapters/express.ts +3 -3
- package/src/adapters/fastify/fastifyRequestHandler.ts +6 -9
- package/src/adapters/fastify/fastifyTRPCPlugin.ts +6 -5
- package/src/adapters/fetch/fetchRequestHandler.ts +5 -4
- package/src/adapters/fetch/types.ts +2 -2
- package/src/adapters/lambda/index.ts +3 -5
- package/src/adapters/next.ts +3 -3
- package/src/adapters/node-http/content-type/form-data/fileUploadHandler.ts +2 -1
- package/src/adapters/node-http/content-type/form-data/index.ts +4 -7
- package/src/adapters/node-http/content-type/form-data/memoryUploadHandler.ts +2 -1
- package/src/adapters/node-http/content-type/form-data/streamSlice.ts +2 -1
- package/src/adapters/node-http/content-type/form-data/uploadHandler.ts +1 -1
- package/src/adapters/node-http/content-type/json/getPostBody.ts +2 -2
- package/src/adapters/node-http/internals/contentType.ts +3 -3
- package/src/adapters/node-http/nodeHTTPRequestHandler.ts +7 -6
- package/src/adapters/node-http/types.ts +5 -5
- package/src/adapters/standalone.ts +3 -3
- package/src/adapters/ws.ts +10 -8
- package/src/core/initTRPC.ts +12 -9
- package/src/core/internals/config.ts +1 -1
- package/src/core/internals/getParseFn.ts +1 -1
- package/src/core/internals/mergeRouters.ts +4 -8
- package/src/core/internals/procedureBuilder.ts +9 -10
- package/src/core/internals/utils.ts +2 -2
- package/src/core/middleware.ts +7 -7
- package/src/core/procedure.ts +4 -4
- package/src/core/router.ts +7 -6
- package/src/core/types.ts +4 -4
- package/src/deprecated/internals/middlewares.ts +2 -2
- package/src/deprecated/internals/procedure.ts +4 -7
- package/src/deprecated/interop.ts +10 -10
- package/src/deprecated/router.ts +11 -10
- package/src/error/TRPCError.ts +1 -1
- package/src/error/formatter.ts +3 -3
- package/src/http/contentType.ts +4 -4
- package/src/http/getHTTPStatusCode.ts +3 -2
- package/src/http/internals/types.ts +5 -5
- package/src/http/resolveHTTPResponse.ts +12 -10
- package/src/http/types.ts +3 -3
- package/src/internals/types.ts +3 -3
- package/src/observable/internals/observableToPromise.ts +1 -1
- package/src/observable/internals/pipe.ts +1 -1
- package/src/observable/observable.ts +6 -1
- package/src/observable/operators/map.ts +1 -1
- package/src/observable/operators/share.ts +5 -1
- package/src/observable/operators/tap.ts +1 -1
- package/src/rpc/envelopes.ts +2 -2
- package/src/shared/getErrorShape.ts +3 -3
- package/src/shared/internal/serialize.ts +1 -1
- package/src/shared/jsonify.ts +3 -3
- package/src/shared/transformTRPCResponse.ts +2 -2
- package/src/subscription.ts +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UnaryFunction } from '../types';
|
|
1
|
+
import type { UnaryFunction } from '../types';
|
|
2
2
|
/** @internal */
|
|
3
3
|
export declare function pipeFromArray<TSource, TReturn>(fns: UnaryFunction<TSource, TReturn>[]): UnaryFunction<TSource, TReturn>;
|
|
4
4
|
//# sourceMappingURL=pipe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipe.d.ts","sourceRoot":"","sources":["../../../src/observable/internals/pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"pipe.d.ts","sourceRoot":"","sources":["../../../src/observable/internals/pipe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,gBAAgB;AAChB,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAC5C,GAAG,EAAE,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,GACrC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAgBjC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Observable, Observer, TeardownLogic } from './types';
|
|
1
|
+
import type { Observable, Observer, TeardownLogic } from './types';
|
|
2
2
|
export type inferObservableValue<TObservable> = TObservable extends Observable<infer TValue, unknown> ? TValue : never;
|
|
3
3
|
export declare function isObservable(x: unknown): x is Observable<unknown, unknown>;
|
|
4
4
|
export declare function observable<TValue, TError = unknown>(subscribe: (observer: Observer<TValue, TError>) => TeardownLogic): Observable<TValue, TError>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observable.d.ts","sourceRoot":"","sources":["../../src/observable/observable.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"observable.d.ts","sourceRoot":"","sources":["../../src/observable/observable.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EAER,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,oBAAoB,CAAC,WAAW,IAAI,WAAW,SAAS,UAAU,CAC5E,MAAM,MAAM,EACZ,OAAO,CACR,GACG,MAAM,GACN,KAAK,CAAC;AAEV,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAE1E;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,EACjD,SAAS,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,aAAa,GAC/D,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,CA6D5B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { OperatorFunction } from '../types';
|
|
1
|
+
import type { OperatorFunction } from '../types';
|
|
2
2
|
export declare function map<TValueBefore, TError, TValueAfter>(project: (value: TValueBefore, index: number) => TValueAfter): OperatorFunction<TValueBefore, TError, TValueAfter, TError>;
|
|
3
3
|
//# sourceMappingURL=map.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../../src/observable/operators/map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../../src/observable/operators/map.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,wBAAgB,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EACnD,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,KAAK,WAAW,GAC3D,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAoB7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"share.d.ts","sourceRoot":"","sources":["../../../src/observable/operators/share.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"share.d.ts","sourceRoot":"","sources":["../../../src/observable/operators/share.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EAGzB,MAAM,UAAU,CAAC;AAElB,UAAU,WAAW;CAAG;AACxB,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAClC,KAAK,CAAC,EAAE,WAAW,GAClB,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,CA2D1C"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MonoTypeOperatorFunction, Observer } from '../types';
|
|
1
|
+
import type { MonoTypeOperatorFunction, Observer } from '../types';
|
|
2
2
|
export declare function tap<TValue, TError>(observer: Partial<Observer<TValue, TError>>): MonoTypeOperatorFunction<TValue, TError>;
|
|
3
3
|
//# sourceMappingURL=tap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tap.d.ts","sourceRoot":"","sources":["../../../src/observable/operators/tap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"tap.d.ts","sourceRoot":"","sources":["../../../src/observable/operators/tap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEnE,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAC1C,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,CAqB1C"}
|
package/dist/rpc/envelopes.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envelopes.d.ts","sourceRoot":"","sources":["../../src/rpc/envelopes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"envelopes.d.ts","sourceRoot":"","sources":["../../src/rpc/envelopes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,cAAc,CAC7B,KAAK,SAAS,MAAM,GAAG,sBAAsB,EAC7C,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAE/D,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,KAAK,CAAC;CACb;AAED;;GAEG;AACH,yBAAiB,QAAQ,CAAC;IACxB,KAAY,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAE/C;;OAEG;IACH,UAAiB,YAAY;QAC3B,EAAE,CAAC,EAAE,SAAS,CAAC;QACf,OAAO,CAAC,EAAE,KAAK,CAAC;KACjB;IAED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,yBAAyB,GAAG,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ProcedureType } from '../core';
|
|
2
|
-
import { TRPCError } from '../error/TRPCError';
|
|
3
|
-
import { AnyRootConfig } from '../internals';
|
|
1
|
+
import type { ProcedureType } from '../core';
|
|
2
|
+
import type { TRPCError } from '../error/TRPCError';
|
|
3
|
+
import type { AnyRootConfig } from '../internals';
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getErrorShape.d.ts","sourceRoot":"","sources":["../../src/shared/getErrorShape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"getErrorShape.d.ts","sourceRoot":"","sources":["../../src/shared/getErrorShape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAqB,MAAM,cAAc,CAAC;AAGrE;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,SAAS,aAAa,EAAE,IAAI,EAAE;IACjE,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,aAAa,GAAG,SAAS,CAAC;IAChC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;CAC3C,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,CAkBlC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { 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
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../../src/shared/internal/serialize.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../../src/shared/internal/serialize.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEnE;;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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C,0BAA0B,SAAS,IAAI,GACpC,oBAAoB,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,GACnE,iBAAiB,CAAC,CAAC,CAAC,SAAS,IAAI,GACjC,oBAAoB,CAAC,CAAC,CAAC,GACvB,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/shared/jsonify.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AnyProcedure } from '../core';
|
|
2
|
-
import { inferObservableValue } from '../observable';
|
|
3
|
-
import { DefaultDataTransformer } from '../transformer';
|
|
1
|
+
import type { AnyProcedure } from '../core';
|
|
2
|
+
import type { inferObservableValue } from '../observable';
|
|
3
|
+
import type { DefaultDataTransformer } from '../transformer';
|
|
4
4
|
import type { Serialize } from './internal/serialize';
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonify.d.ts","sourceRoot":"","sources":["../../src/shared/jsonify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"jsonify.d.ts","sourceRoot":"","sources":["../../src/shared/jsonify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,+BAA+B,CAAC,UAAU,SAAS,YAAY,IACzE,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,SAAS,sBAAsB,GACvE,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,GAC5C,UAAU,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC;AAExC,MAAM,MAAM,kCAAkC,CAC5C,UAAU,SAAS,YAAY,IAC7B,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,SAAS,sBAAsB,GAC3E,SAAS,CAAC,oBAAoB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,GAClE,oBAAoB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnyRootConfig } from '../internals';
|
|
2
|
-
import { TRPCResponse, TRPCResponseMessage } from '../rpc';
|
|
1
|
+
import type { AnyRootConfig } from '../internals';
|
|
2
|
+
import type { TRPCResponse, TRPCResponseMessage } from '../rpc';
|
|
3
3
|
/**
|
|
4
4
|
* Takes a unserialized `TRPCResponse` and serializes it with the router's transformers
|
|
5
5
|
**/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformTRPCResponse.d.ts","sourceRoot":"","sources":["../../src/shared/transformTRPCResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"transformTRPCResponse.d.ts","sourceRoot":"","sources":["../../src/shared/transformTRPCResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAyBhE;;IAEI;AACJ,wBAAgB,qBAAqB,CACnC,SAAS,SACL,YAAY,GACZ,YAAY,EAAE,GACd,mBAAmB,GACnB,mBAAmB,EAAE,EACzB,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS;;0FAI9C"}
|
package/dist/subscription.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../src/subscription.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../src/subscription.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGzD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,IAAI,EAAE;IACrD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC9D,GAAG,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CA6B/B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/server",
|
|
3
|
-
"version": "10.45.1-canary.
|
|
3
|
+
"version": "10.45.1-canary.20+82f73105d",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -173,5 +173,5 @@
|
|
|
173
173
|
"funding": [
|
|
174
174
|
"https://trpc.io/sponsor"
|
|
175
175
|
],
|
|
176
|
-
"gitHead": "
|
|
176
|
+
"gitHead": "82f73105de5f0d737dc409a18ba893fe8cbee909"
|
|
177
177
|
}
|
|
@@ -6,13 +6,16 @@ import type {
|
|
|
6
6
|
Context as APIGWContext,
|
|
7
7
|
} from 'aws-lambda';
|
|
8
8
|
import { TRPCError } from '../..';
|
|
9
|
-
import { AnyRouter, inferRouterContext } from '../../core';
|
|
10
|
-
import { HTTPRequest
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
9
|
+
import type { AnyRouter, inferRouterContext } from '../../core';
|
|
10
|
+
import type { HTTPRequest } from '../../http';
|
|
11
|
+
import { resolveHTTPResponse } from '../../http';
|
|
12
|
+
import type { HTTPResponse } from '../../http/internals/types';
|
|
13
|
+
import type {
|
|
13
14
|
APIGatewayEvent,
|
|
14
15
|
APIGatewayResult,
|
|
15
16
|
AWSLambdaOptions,
|
|
17
|
+
} from './utils';
|
|
18
|
+
import {
|
|
16
19
|
getHTTPMethod,
|
|
17
20
|
getPath,
|
|
18
21
|
isPayloadV1,
|
|
@@ -8,7 +8,7 @@ import type {
|
|
|
8
8
|
import type { AnyRouter, inferRouterContext } from '../../core';
|
|
9
9
|
import { TRPCError } from '../../error/TRPCError';
|
|
10
10
|
import type { HTTPHeaders, ResponseMetaFn } from '../../http/internals/types';
|
|
11
|
-
import { OnErrorFunction } from '../../internals/types';
|
|
11
|
+
import type { OnErrorFunction } from '../../internals/types';
|
|
12
12
|
|
|
13
13
|
export type APIGatewayEvent = APIGatewayProxyEvent | APIGatewayProxyEventV2;
|
|
14
14
|
export type APIGatewayResult =
|
package/src/adapters/express.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type * as express from 'express';
|
|
2
|
-
import { AnyRouter } from '../core';
|
|
3
|
-
import {
|
|
2
|
+
import type { AnyRouter } from '../core';
|
|
3
|
+
import type {
|
|
4
4
|
NodeHTTPCreateContextFnOptions,
|
|
5
5
|
NodeHTTPHandlerOptions,
|
|
6
|
-
nodeHTTPRequestHandler,
|
|
7
6
|
} from './node-http';
|
|
7
|
+
import { nodeHTTPRequestHandler } from './node-http';
|
|
8
8
|
|
|
9
9
|
export type CreateExpressContextOptions = NodeHTTPCreateContextFnOptions<
|
|
10
10
|
express.Request,
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { Readable } from 'node:stream';
|
|
2
|
-
import { FastifyReply, FastifyRequest } from 'fastify';
|
|
3
|
-
import { AnyRouter, inferRouterContext } from '../../core';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
HTTPRequest,
|
|
8
|
-
} from '../../http';
|
|
9
|
-
import { HTTPResponse, ResponseChunk } from '../../http/internals/types';
|
|
2
|
+
import type { FastifyReply, FastifyRequest } from 'fastify';
|
|
3
|
+
import type { AnyRouter, inferRouterContext } from '../../core';
|
|
4
|
+
import type { HTTPBaseHandlerOptions, HTTPRequest } from '../../http';
|
|
5
|
+
import { getBatchStreamFormatter } from '../../http';
|
|
6
|
+
import type { HTTPResponse, ResponseChunk } from '../../http/internals/types';
|
|
10
7
|
import { resolveHTTPResponse } from '../../http/resolveHTTPResponse';
|
|
11
|
-
import { NodeHTTPCreateContextOption } from '../node-http';
|
|
8
|
+
import type { NodeHTTPCreateContextOption } from '../node-http';
|
|
12
9
|
|
|
13
10
|
export type FastifyHandlerOptions<
|
|
14
11
|
TRouter extends AnyRouter,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="@fastify/websocket" />
|
|
2
|
-
import { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
3
|
-
import { FastifyHandlerOptions } from '.';
|
|
4
|
-
import { AnyRouter } from '../../core';
|
|
5
|
-
import { NodeHTTPCreateContextFnOptions } from '../node-http';
|
|
6
|
-
import {
|
|
2
|
+
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
3
|
+
import type { FastifyHandlerOptions } from '.';
|
|
4
|
+
import type { AnyRouter } from '../../core';
|
|
5
|
+
import type { NodeHTTPCreateContextFnOptions } from '../node-http';
|
|
6
|
+
import type { WSSHandlerOptions } from '../ws';
|
|
7
|
+
import { applyWSSHandler } from '../ws';
|
|
7
8
|
import { fastifyRequestHandler } from './fastifyRequestHandler';
|
|
8
9
|
|
|
9
10
|
export interface FastifyTRPCPluginOptions<TRouter extends AnyRouter> {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { AnyRouter } from '../../core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { AnyRouter } from '../../core';
|
|
2
|
+
import type { HTTPRequest } from '../../http';
|
|
3
|
+
import { getBatchStreamFormatter } from '../../http';
|
|
4
|
+
import type { HTTPResponse, ResponseChunk } from '../../http/internals/types';
|
|
4
5
|
import { resolveHTTPResponse } from '../../http/resolveHTTPResponse';
|
|
5
|
-
import { FetchHandlerOptions } from './types';
|
|
6
|
+
import type { FetchHandlerOptions } from './types';
|
|
6
7
|
|
|
7
8
|
export type FetchHandlerRequestOptions<TRouter extends AnyRouter> =
|
|
8
9
|
FetchHandlerOptions<TRouter> & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnyRouter, inferRouterContext } from '../../core';
|
|
2
|
-
import { HTTPBaseHandlerOptions } from '../../http';
|
|
1
|
+
import type { AnyRouter, inferRouterContext } from '../../core';
|
|
2
|
+
import type { HTTPBaseHandlerOptions } from '../../http';
|
|
3
3
|
|
|
4
4
|
export type FetchCreateContextFnOptions = {
|
|
5
5
|
req: Request;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from '../aws-lambda';
|
|
5
|
-
import { APIGatewayEvent } from '../aws-lambda/utils';
|
|
1
|
+
import type { CreateAWSLambdaContextOptions } from '../aws-lambda';
|
|
2
|
+
import { awsLambdaRequestHandler } from '../aws-lambda';
|
|
3
|
+
import type { APIGatewayEvent } from '../aws-lambda/utils';
|
|
6
4
|
|
|
7
5
|
export * from '../aws-lambda';
|
|
8
6
|
|
package/src/adapters/next.ts
CHANGED
|
@@ -3,14 +3,14 @@ import type {
|
|
|
3
3
|
NextApiRequest,
|
|
4
4
|
NextApiResponse,
|
|
5
5
|
} from 'next/types';
|
|
6
|
-
import { AnyRouter } from '../core';
|
|
6
|
+
import type { AnyRouter } from '../core';
|
|
7
7
|
import { TRPCError } from '../error/TRPCError';
|
|
8
8
|
import { getErrorShape } from '../shared/getErrorShape';
|
|
9
|
-
import {
|
|
9
|
+
import type {
|
|
10
10
|
NodeHTTPCreateContextFnOptions,
|
|
11
11
|
NodeHTTPHandlerOptions,
|
|
12
|
-
nodeHTTPRequestHandler,
|
|
13
12
|
} from './node-http';
|
|
13
|
+
import { nodeHTTPRequestHandler } from './node-http';
|
|
14
14
|
|
|
15
15
|
export type CreateNextContextOptions = NodeHTTPCreateContextFnOptions<
|
|
16
16
|
NextApiRequest,
|
|
@@ -18,7 +18,8 @@ import { basename, dirname, extname, resolve as resolvePath } from 'node:path';
|
|
|
18
18
|
import { finished, Readable } from 'node:stream';
|
|
19
19
|
import { promisify } from 'node:util';
|
|
20
20
|
import { streamSlice } from './streamSlice';
|
|
21
|
-
import {
|
|
21
|
+
import type { UploadHandler } from './uploadHandler';
|
|
22
|
+
import { MaxPartSizeExceededError } from './uploadHandler';
|
|
22
23
|
|
|
23
24
|
export async function readableStreamToString(
|
|
24
25
|
stream: ReadableStream<Uint8Array>,
|
|
@@ -13,15 +13,12 @@ import { Readable } from 'node:stream';
|
|
|
13
13
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
14
14
|
// @ts-ignore the type definitions for this package are borked
|
|
15
15
|
import { streamMultipart } from '@web3-storage/multipart-parser';
|
|
16
|
-
import { CombinedDataTransformer } from '../../../../transformer';
|
|
16
|
+
import type { CombinedDataTransformer } from '../../../../transformer';
|
|
17
17
|
import { createNodeHTTPContentTypeHandler } from '../../internals/contentType';
|
|
18
|
-
import { NodeHTTPRequest } from '../../types';
|
|
18
|
+
import type { NodeHTTPRequest } from '../../types';
|
|
19
19
|
import { NodeOnDiskFile } from './fileUploadHandler';
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
UploadHandler,
|
|
23
|
-
UploadHandlerPart,
|
|
24
|
-
} from './uploadHandler';
|
|
20
|
+
import type { UploadHandler, UploadHandlerPart } from './uploadHandler';
|
|
21
|
+
import { MaxBodySizeExceededError } from './uploadHandler';
|
|
25
22
|
|
|
26
23
|
const utfTextDecoder = new TextDecoder('utf-8');
|
|
27
24
|
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* @see https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/upload/memoryUploadHandler.ts
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
11
|
+
import type { UploadHandler } from './uploadHandler';
|
|
12
|
+
import { MaxPartSizeExceededError } from './uploadHandler';
|
|
12
13
|
|
|
13
14
|
export type MemoryUploadHandlerFilterArgs = {
|
|
14
15
|
filename?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TRPCError } from '../../../../error/TRPCError';
|
|
2
|
-
import { BodyResult } from '../../../../http/contentType';
|
|
3
|
-
import { NodeHTTPRequest } from '../../types';
|
|
2
|
+
import type { BodyResult } from '../../../../http/contentType';
|
|
3
|
+
import type { NodeHTTPRequest } from '../../types';
|
|
4
4
|
|
|
5
5
|
export async function getPostBody(opts: {
|
|
6
6
|
req: NodeHTTPRequest;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AnyRouter } from '../../../core';
|
|
2
|
-
import { BaseContentTypeHandler } from '../../../http/contentType';
|
|
3
|
-
import {
|
|
1
|
+
import type { AnyRouter } from '../../../core';
|
|
2
|
+
import type { BaseContentTypeHandler } from '../../../http/contentType';
|
|
3
|
+
import type {
|
|
4
4
|
NodeHTTPRequest,
|
|
5
5
|
NodeHTTPRequestHandlerOptions,
|
|
6
6
|
NodeHTTPResponse,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
2
|
-
import { AnyRouter } from '../../core';
|
|
3
|
-
import { inferRouterContext } from '../../core/types';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import type { AnyRouter } from '../../core';
|
|
3
|
+
import type { inferRouterContext } from '../../core/types';
|
|
4
|
+
import type { HTTPRequest } from '../../http';
|
|
5
|
+
import { getBatchStreamFormatter } from '../../http';
|
|
6
|
+
import type { HTTPResponse, ResponseChunk } from '../../http/internals/types';
|
|
6
7
|
import { resolveHTTPResponse } from '../../http/resolveHTTPResponse';
|
|
7
8
|
import { nodeHTTPJSONContentTypeHandler } from './content-type/json';
|
|
8
|
-
import { NodeHTTPContentTypeHandler } from './internals/contentType';
|
|
9
|
-
import {
|
|
9
|
+
import type { NodeHTTPContentTypeHandler } from './internals/contentType';
|
|
10
|
+
import type {
|
|
10
11
|
NodeHTTPRequest,
|
|
11
12
|
NodeHTTPRequestHandlerOptions,
|
|
12
13
|
NodeHTTPResponse,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IncomingMessage, ServerResponse } from 'http';
|
|
2
|
-
import { AnyRouter, inferRouterContext } from '../../core';
|
|
3
|
-
import { HTTPBaseHandlerOptions } from '../../http';
|
|
4
|
-
import { MaybePromise } from '../../types';
|
|
5
|
-
import { NodeHTTPContentTypeHandler } from './internals/contentType';
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from 'http';
|
|
2
|
+
import type { AnyRouter, inferRouterContext } from '../../core';
|
|
3
|
+
import type { HTTPBaseHandlerOptions } from '../../http';
|
|
4
|
+
import type { MaybePromise } from '../../types';
|
|
5
|
+
import type { NodeHTTPContentTypeHandler } from './internals/contentType';
|
|
6
6
|
|
|
7
7
|
interface ParsedQs {
|
|
8
8
|
[key: string]: ParsedQs | ParsedQs[] | string[] | string | undefined;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
2
2
|
import http from 'http';
|
|
3
|
-
import { AnyRouter } from '../core';
|
|
4
|
-
import {
|
|
3
|
+
import type { AnyRouter } from '../core';
|
|
4
|
+
import type {
|
|
5
5
|
NodeHTTPCreateContextFnOptions,
|
|
6
6
|
NodeHTTPHandlerOptions,
|
|
7
|
-
nodeHTTPRequestHandler,
|
|
8
7
|
} from './node-http';
|
|
8
|
+
import { nodeHTTPRequestHandler } from './node-http';
|
|
9
9
|
|
|
10
10
|
export type CreateHTTPHandlerOptions<TRouter extends AnyRouter> =
|
|
11
11
|
NodeHTTPHandlerOptions<TRouter, http.IncomingMessage, http.ServerResponse>;
|
package/src/adapters/ws.ts
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { IncomingMessage } from 'http';
|
|
2
|
-
import { WebSocket, WebSocketServer } from 'ws';
|
|
3
|
-
import { AnyRouter,
|
|
1
|
+
import type { IncomingMessage } from 'http';
|
|
2
|
+
import type { WebSocket, WebSocketServer } from 'ws';
|
|
3
|
+
import type { AnyRouter, inferRouterContext } from '../core';
|
|
4
|
+
import { callProcedure } from '../core';
|
|
4
5
|
import { getTRPCErrorFromUnknown, TRPCError } from '../error/TRPCError';
|
|
5
|
-
import { BaseHandlerOptions } from '../internals/types';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import type { BaseHandlerOptions } from '../internals/types';
|
|
7
|
+
import type { Unsubscribable } from '../observable';
|
|
8
|
+
import { isObservable } from '../observable';
|
|
9
|
+
import type {
|
|
8
10
|
JSONRPC2,
|
|
9
|
-
parseTRPCMessage,
|
|
10
11
|
TRPCClientOutgoingMessage,
|
|
11
12
|
TRPCReconnectNotification,
|
|
12
13
|
TRPCResponseMessage,
|
|
13
14
|
} from '../rpc';
|
|
15
|
+
import { parseTRPCMessage } from '../rpc';
|
|
14
16
|
import { getErrorShape } from '../shared/getErrorShape';
|
|
15
17
|
import { transformTRPCResponse } from '../shared/transformTRPCResponse';
|
|
16
|
-
import {
|
|
18
|
+
import type {
|
|
17
19
|
NodeHTTPCreateContextFnOptions,
|
|
18
20
|
NodeHTTPCreateContextOption,
|
|
19
21
|
} from './node-http';
|
package/src/core/initTRPC.ts
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
DefaultErrorShape,
|
|
3
|
-
defaultFormatter,
|
|
4
3
|
ErrorFormatter,
|
|
5
4
|
ErrorFormatterShape,
|
|
6
5
|
} from '../error/formatter';
|
|
6
|
+
import { defaultFormatter } from '../error/formatter';
|
|
7
7
|
import { createFlatProxy } from '../shared/createProxy';
|
|
8
|
-
import {
|
|
8
|
+
import type {
|
|
9
9
|
DataTransformerOptions,
|
|
10
10
|
DefaultDataTransformer,
|
|
11
|
-
defaultTransformer,
|
|
12
|
-
getDataTransformer,
|
|
13
11
|
} from '../transformer';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
12
|
+
import { defaultTransformer, getDataTransformer } from '../transformer';
|
|
13
|
+
import type { Unwrap } from '../types';
|
|
14
|
+
import type {
|
|
16
15
|
CreateRootConfigTypes,
|
|
17
|
-
isServerDefault,
|
|
18
16
|
RootConfig,
|
|
19
17
|
RootConfigTypes,
|
|
20
18
|
RuntimeConfig,
|
|
21
19
|
} from './internals/config';
|
|
20
|
+
import { isServerDefault } from './internals/config';
|
|
22
21
|
import { mergeRouters } from './internals/mergeRouters';
|
|
23
22
|
import { createBuilder } from './internals/procedureBuilder';
|
|
24
|
-
import {
|
|
23
|
+
import type {
|
|
24
|
+
Overwrite,
|
|
25
|
+
PickFirstDefined,
|
|
26
|
+
ValidateShape,
|
|
27
|
+
} from './internals/utils';
|
|
25
28
|
import { createMiddlewareFactory } from './middleware';
|
|
26
29
|
import { createCallerFactory, createRouterFactory } from './router';
|
|
27
30
|
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { defaultFormatter } from '../../error/formatter';
|
|
2
|
-
import { CombinedDataTransformer
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
createRouterFactory,
|
|
7
|
-
Router,
|
|
8
|
-
RouterDef,
|
|
9
|
-
} from '../router';
|
|
2
|
+
import type { CombinedDataTransformer } from '../../transformer';
|
|
3
|
+
import { defaultTransformer } from '../../transformer';
|
|
4
|
+
import type { AnyRouter, AnyRouterDef, Router, RouterDef } from '../router';
|
|
5
|
+
import { createRouterFactory } from '../router';
|
|
10
6
|
import { mergeWithoutOverrides } from './mergeWithoutOverrides';
|
|
11
7
|
|
|
12
8
|
/**
|