@trpc/server 11.0.0-alpha-tmp-export-from-main-nuke-core.239 → 11.0.0-alpha-tmp-export-from-main.220
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/@trpc-server/http.d.ts +2 -0
- package/dist/@trpc-server/http.d.ts.map +1 -0
- package/dist/adapters/aws-lambda/index.d.ts +2 -1
- package/dist/adapters/aws-lambda/index.d.ts.map +1 -1
- package/dist/adapters/aws-lambda/index.js +4 -6
- package/dist/adapters/aws-lambda/index.mjs +2 -4
- package/dist/adapters/aws-lambda/utils.d.ts +3 -2
- package/dist/adapters/aws-lambda/utils.d.ts.map +1 -1
- package/dist/adapters/aws-lambda/utils.js +4 -5
- package/dist/adapters/aws-lambda/utils.mjs +2 -3
- package/dist/adapters/express.d.ts +2 -1
- package/dist/adapters/express.d.ts.map +1 -1
- package/dist/adapters/fastify/fastifyRequestHandler.d.ts +2 -2
- package/dist/adapters/fastify/fastifyRequestHandler.d.ts.map +1 -1
- package/dist/adapters/fastify/fastifyRequestHandler.js +3 -6
- package/dist/adapters/fastify/fastifyRequestHandler.mjs +1 -4
- package/dist/adapters/fastify/fastifyTRPCPlugin.d.ts +2 -1
- package/dist/adapters/fastify/fastifyTRPCPlugin.d.ts.map +1 -1
- package/dist/adapters/fastify/fastifyTRPCPlugin.js +1 -0
- package/dist/adapters/fastify/fastifyTRPCPlugin.mjs +1 -0
- package/dist/adapters/fetch/fetchRequestHandler.d.ts +2 -1
- package/dist/adapters/fetch/fetchRequestHandler.d.ts.map +1 -1
- package/dist/adapters/fetch/fetchRequestHandler.js +4 -6
- package/dist/adapters/fetch/fetchRequestHandler.mjs +2 -4
- package/dist/adapters/fetch/types.d.ts +3 -2
- package/dist/adapters/fetch/types.d.ts.map +1 -1
- package/dist/adapters/next.d.ts +3 -1
- package/dist/adapters/next.d.ts.map +1 -1
- package/dist/adapters/next.js +4 -6
- package/dist/adapters/next.mjs +2 -4
- package/dist/adapters/node-http/content-type/json/getPostBody.d.ts +1 -1
- package/dist/adapters/node-http/content-type/json/getPostBody.d.ts.map +1 -1
- package/dist/adapters/node-http/content-type/json/getPostBody.js +2 -4
- package/dist/adapters/node-http/content-type/json/getPostBody.mjs +1 -3
- package/dist/adapters/node-http/content-type/json/index.js +2 -4
- package/dist/adapters/node-http/content-type/json/index.mjs +1 -3
- package/dist/adapters/node-http/internals/contentType.d.ts +2 -2
- package/dist/adapters/node-http/internals/contentType.d.ts.map +1 -1
- package/dist/adapters/node-http/nodeHTTPRequestHandler.d.ts +2 -1
- package/dist/adapters/node-http/nodeHTTPRequestHandler.d.ts.map +1 -1
- package/dist/adapters/node-http/nodeHTTPRequestHandler.js +4 -6
- package/dist/adapters/node-http/nodeHTTPRequestHandler.mjs +2 -4
- package/dist/adapters/node-http/types.d.ts +4 -3
- package/dist/adapters/node-http/types.d.ts.map +1 -1
- package/dist/adapters/standalone.d.ts +2 -1
- package/dist/adapters/standalone.d.ts.map +1 -1
- package/dist/adapters/standalone.js +0 -1
- package/dist/adapters/standalone.mjs +0 -1
- package/dist/adapters/ws.d.ts +2 -3
- package/dist/adapters/ws.d.ts.map +1 -1
- package/dist/adapters/ws.js +26 -33
- package/dist/adapters/ws.mjs +1 -8
- package/dist/http.d.ts +6 -1
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +21 -11
- package/dist/http.mjs +1 -6
- package/dist/index.d.ts +70 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +45 -18
- package/dist/index.mjs +1 -8
- package/dist/observable.d.ts +3 -0
- package/dist/observable.d.ts.map +1 -0
- package/dist/observable.js +30 -0
- package/dist/observable.mjs +1 -0
- package/dist/rpc.d.ts +2 -1
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +13 -6
- package/dist/rpc.mjs +1 -3
- package/dist/shared.d.ts +1 -1
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +9 -6
- package/dist/shared.mjs +1 -4
- package/dist/unstableDontImportMe.d.ts +10 -0
- package/dist/unstableDontImportMe.d.ts.map +1 -0
- package/dist/unstableDontImportMe.js +142 -0
- package/dist/unstableDontImportMe.mjs +1 -0
- package/package.json +135 -52
- package/src/@trpc-server/http.ts +2 -0
- package/src/adapters/aws-lambda/index.ts +5 -4
- package/src/adapters/aws-lambda/utils.ts +4 -3
- package/src/adapters/express.ts +3 -1
- package/src/adapters/fastify/fastifyRequestHandler.ts +4 -6
- package/src/adapters/fastify/fastifyTRPCPlugin.ts +2 -1
- package/src/adapters/fetch/fetchRequestHandler.ts +4 -6
- package/src/adapters/fetch/types.ts +3 -2
- package/src/adapters/next.ts +4 -2
- package/src/adapters/node-http/content-type/form-data/index.ts +1 -1
- package/src/adapters/node-http/content-type/json/getPostBody.ts +2 -2
- package/src/adapters/node-http/content-type/json/index.ts +1 -1
- package/src/adapters/node-http/internals/contentType.ts +2 -2
- package/src/adapters/node-http/nodeHTTPRequestHandler.ts +4 -6
- package/src/adapters/node-http/types.ts +5 -4
- package/src/adapters/standalone.ts +2 -2
- package/src/adapters/ws.ts +13 -14
- package/src/http.ts +26 -1
- package/src/index.ts +109 -1
- package/src/observable.ts +16 -0
- package/src/rpc.ts +26 -1
- package/src/shared.ts +1 -1
- package/src/unstableDontImportMe.ts +146 -0
- package/unstableDontImportMe/index.d.ts +1 -0
- package/unstableDontImportMe/index.js +1 -0
- package/dist/@trpc/server/http.d.ts +0 -7
- package/dist/@trpc/server/http.d.ts.map +0 -1
- package/dist/@trpc/server/index.d.ts +0 -69
- package/dist/@trpc/server/index.d.ts.map +0 -1
- package/dist/@trpc/server/rpc.d.ts +0 -3
- package/dist/@trpc/server/rpc.d.ts.map +0 -1
- package/dist/bundle-analysis.json +0 -757
- package/dist/observable/index.d.ts +0 -5
- package/dist/observable/index.d.ts.map +0 -1
- package/dist/observable/index.js +0 -13
- package/dist/observable/index.mjs +0 -2
- package/dist/observable/observable.d.ts +0 -13
- package/dist/observable/observable.d.ts.map +0 -1
- package/dist/observable/observable.js +0 -126
- package/dist/observable/observable.mjs +0 -122
- package/dist/observable/operators.d.ts +0 -8
- package/dist/observable/operators.d.ts.map +0 -1
- package/dist/observable/operators.js +0 -103
- package/dist/observable/operators.mjs +0 -99
- package/dist/observable/types.d.ts +0 -26
- package/dist/observable/types.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/TRPCInferrable.d.ts +0 -6
- package/dist/unstable-core-do-not-import/TRPCInferrable.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/createProxy.d.ts +0 -19
- package/dist/unstable-core-do-not-import/createProxy.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/createProxy.js +0 -52
- package/dist/unstable-core-do-not-import/createProxy.mjs +0 -49
- package/dist/unstable-core-do-not-import/error/TRPCError.d.ts +0 -13
- package/dist/unstable-core-do-not-import/error/TRPCError.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/error/TRPCError.js +0 -67
- package/dist/unstable-core-do-not-import/error/TRPCError.mjs +0 -63
- package/dist/unstable-core-do-not-import/error/formatter.d.ts +0 -33
- package/dist/unstable-core-do-not-import/error/formatter.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/error/formatter.js +0 -7
- package/dist/unstable-core-do-not-import/error/formatter.mjs +0 -5
- package/dist/unstable-core-do-not-import/error/getErrorShape.d.ts +0 -15
- package/dist/unstable-core-do-not-import/error/getErrorShape.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/error/getErrorShape.js +0 -31
- package/dist/unstable-core-do-not-import/error/getErrorShape.mjs +0 -29
- package/dist/unstable-core-do-not-import/http/batchStreamFormatter.d.ts +0 -24
- package/dist/unstable-core-do-not-import/http/batchStreamFormatter.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/http/batchStreamFormatter.js +0 -32
- package/dist/unstable-core-do-not-import/http/batchStreamFormatter.mjs +0 -30
- package/dist/unstable-core-do-not-import/http/contentType.d.ts +0 -29
- package/dist/unstable-core-do-not-import/http/contentType.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/http/contentType.js +0 -54
- package/dist/unstable-core-do-not-import/http/contentType.mjs +0 -52
- package/dist/unstable-core-do-not-import/http/getHTTPStatusCode.d.ts +0 -5
- package/dist/unstable-core-do-not-import/http/getHTTPStatusCode.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/http/getHTTPStatusCode.js +0 -51
- package/dist/unstable-core-do-not-import/http/getHTTPStatusCode.mjs +0 -48
- package/dist/unstable-core-do-not-import/http/index.d.ts +0 -7
- package/dist/unstable-core-do-not-import/http/index.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.d.ts +0 -51
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.js +0 -295
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.mjs +0 -293
- package/dist/unstable-core-do-not-import/http/types.d.ts +0 -96
- package/dist/unstable-core-do-not-import/http/types.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/index.d.ts +0 -37
- package/dist/unstable-core-do-not-import/index.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/index.js +0 -48
- package/dist/unstable-core-do-not-import/index.mjs +0 -16
- package/dist/unstable-core-do-not-import/initTRPC.d.ts +0 -96
- package/dist/unstable-core-do-not-import/initTRPC.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/initTRPC.js +0 -95
- package/dist/unstable-core-do-not-import/initTRPC.mjs +0 -93
- package/dist/unstable-core-do-not-import/middleware.d.ts +0 -105
- package/dist/unstable-core-do-not-import/middleware.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/middleware.js +0 -95
- package/dist/unstable-core-do-not-import/middleware.mjs +0 -89
- package/dist/unstable-core-do-not-import/parser.d.ts +0 -30
- package/dist/unstable-core-do-not-import/parser.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/parser.js +0 -37
- package/dist/unstable-core-do-not-import/parser.mjs +0 -35
- package/dist/unstable-core-do-not-import/procedure.d.ts +0 -72
- package/dist/unstable-core-do-not-import/procedure.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/procedure.js +0 -9
- package/dist/unstable-core-do-not-import/procedure.mjs +0 -7
- package/dist/unstable-core-do-not-import/procedureBuilder.d.ts +0 -101
- package/dist/unstable-core-do-not-import/procedureBuilder.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/procedureBuilder.js +0 -176
- package/dist/unstable-core-do-not-import/procedureBuilder.mjs +0 -173
- package/dist/unstable-core-do-not-import/rootConfig.d.ts +0 -75
- package/dist/unstable-core-do-not-import/rootConfig.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/rootConfig.js +0 -8
- package/dist/unstable-core-do-not-import/rootConfig.mjs +0 -6
- package/dist/unstable-core-do-not-import/router.d.ts +0 -85
- package/dist/unstable-core-do-not-import/router.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/router.js +0 -156
- package/dist/unstable-core-do-not-import/router.mjs +0 -151
- package/dist/unstable-core-do-not-import/rpc/codes.d.ts +0 -51
- package/dist/unstable-core-do-not-import/rpc/codes.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/rpc/codes.js +0 -38
- package/dist/unstable-core-do-not-import/rpc/codes.mjs +0 -35
- package/dist/unstable-core-do-not-import/rpc/envelopes.d.ts +0 -97
- package/dist/unstable-core-do-not-import/rpc/envelopes.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/rpc/index.d.ts +0 -5
- package/dist/unstable-core-do-not-import/rpc/index.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/rpc/parseTRPCMessage.d.ts +0 -5
- package/dist/unstable-core-do-not-import/rpc/parseTRPCMessage.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/rpc/parseTRPCMessage.js +0 -59
- package/dist/unstable-core-do-not-import/rpc/parseTRPCMessage.mjs +0 -57
- package/dist/unstable-core-do-not-import/serialize.d.ts +0 -62
- package/dist/unstable-core-do-not-import/serialize.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/transformer.d.ts +0 -107
- package/dist/unstable-core-do-not-import/transformer.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/transformer.js +0 -107
- package/dist/unstable-core-do-not-import/transformer.mjs +0 -102
- package/dist/unstable-core-do-not-import/types.d.ts +0 -98
- package/dist/unstable-core-do-not-import/types.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/utils.d.ts +0 -27
- package/dist/unstable-core-do-not-import/utils.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/utils.js +0 -44
- package/dist/unstable-core-do-not-import/utils.mjs +0 -39
- package/src/@trpc/server/http.ts +0 -26
- package/src/@trpc/server/index.ts +0 -105
- package/src/@trpc/server/rpc.ts +0 -26
- package/src/observable/index.ts +0 -10
- package/src/observable/observable.ts +0 -158
- package/src/observable/operators.ts +0 -119
- package/src/observable/types.ts +0 -76
- package/src/unstable-core-do-not-import/TRPCInferrable.ts +0 -9
- package/src/unstable-core-do-not-import/createProxy.ts +0 -59
- package/src/unstable-core-do-not-import/error/TRPCError.ts +0 -82
- package/src/unstable-core-do-not-import/error/formatter.ts +0 -51
- package/src/unstable-core-do-not-import/error/getErrorShape.ts +0 -36
- package/src/unstable-core-do-not-import/http/batchStreamFormatter.ts +0 -29
- package/src/unstable-core-do-not-import/http/contentType.ts +0 -99
- package/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts +0 -57
- package/src/unstable-core-do-not-import/http/index.ts +0 -23
- package/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts +0 -458
- package/src/unstable-core-do-not-import/http/types.ts +0 -111
- package/src/unstable-core-do-not-import/index.ts +0 -110
- package/src/unstable-core-do-not-import/initTRPC.ts +0 -206
- package/src/unstable-core-do-not-import/middleware.ts +0 -233
- package/src/unstable-core-do-not-import/parser.ts +0 -94
- package/src/unstable-core-do-not-import/procedure.ts +0 -108
- package/src/unstable-core-do-not-import/procedureBuilder.ts +0 -458
- package/src/unstable-core-do-not-import/rootConfig.ts +0 -90
- package/src/unstable-core-do-not-import/router.ts +0 -370
- package/src/unstable-core-do-not-import/rpc/codes.ts +0 -44
- package/src/unstable-core-do-not-import/rpc/envelopes.ts +0 -136
- package/src/unstable-core-do-not-import/rpc/index.ts +0 -21
- package/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts +0 -85
- package/src/unstable-core-do-not-import/serialize.ts +0 -122
- package/src/unstable-core-do-not-import/transformer.ts +0 -202
- package/src/unstable-core-do-not-import/types.ts +0 -151
- package/src/unstable-core-do-not-import/utils.ts +0 -59
- package/unstable-core-do-not-import/index.d.ts +0 -1
- package/unstable-core-do-not-import/index.js +0 -1
package/dist/shared.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var createProxy = require('./unstable-core-do-not-import/createProxy.js');
|
|
5
|
-
require('./unstable-core-do-not-import/rootConfig.js');
|
|
6
|
-
require('./unstable-core-do-not-import/rpc/codes.js');
|
|
3
|
+
var core = require('@trpc/core');
|
|
7
4
|
|
|
8
5
|
|
|
9
6
|
|
|
10
|
-
exports
|
|
11
|
-
|
|
7
|
+
Object.defineProperty(exports, "createFlatProxy", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return core.createFlatProxy; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "getErrorShape", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return core.getErrorShape; }
|
|
14
|
+
});
|
package/dist/shared.mjs
CHANGED
|
@@ -1,4 +1 @@
|
|
|
1
|
-
export { getErrorShape } from '
|
|
2
|
-
export { createFlatProxy } from './unstable-core-do-not-import/createProxy.mjs';
|
|
3
|
-
import './unstable-core-do-not-import/rootConfig.mjs';
|
|
4
|
-
import './unstable-core-do-not-import/rpc/codes.mjs';
|
|
1
|
+
export { createFlatProxy, getErrorShape } from '@trpc/core';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is here to make TypeScript happy and prevent _"The inferred type of 'createContext' cannot be named without a reference to [...]"_.
|
|
3
|
+
*
|
|
4
|
+
* We're basically just re-exporting everything from @trpc/core here.
|
|
5
|
+
*
|
|
6
|
+
* If you need to import anything from here, please open an issue at https://github.com/trpc/trpc/issues
|
|
7
|
+
*/
|
|
8
|
+
export type { AnyMiddlewareFunction, AnyRouter, AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootConfig, AnyRouterDef, AnySubscriptionProcedure, BaseContentTypeHandler, BaseHandlerOptions, BodyResult, CombinedDataTransformer, CombinedDataTransformerClient, CreateRouterInner, DataTransformer, DataTransformerOptions, DeepPartial, DefaultDataTransformer, DefaultErrorData, DefaultErrorShape, Dict, DistributiveOmit, Filter, FilterKeys, HTTPBaseHandlerOptions, HTTPHeaders, HTTPRequest, HTTPResponse, IntersectionError, JSONRPC2, Maybe, MaybePromise, MiddlewareBuilder, MiddlewareFunction, MutationProcedure, Observable, Observer, OnErrorFunction, Overwrite, PickFirstDefined, Procedure, ProcedureArgs, ProcedureBuilder, ProcedureCall, ProcedureOptions, ProcedureRecord, ProcedureRouterRecord, ProcedureType, ProtectedIntersection, QueryProcedure, ResolveHTTPRequestOptionsContextFn, ResponseChunk, ResponseMeta, ResponseMetaFn, RootConfig, Router, RouterCaller, Serialize, SerializeObject, Simplify, SubscriptionProcedure, TRPCClientIncomingMessage, TRPCClientIncomingRequest, TRPCClientOutgoingMessage, TRPCClientOutgoingRequest, TRPCErrorResponse, TRPCErrorShape, TRPCInferrable, TRPCReconnectNotification, TRPCRequest, TRPCRequestInfo, TRPCRequestMessage, TRPCResponse, TRPCResponseMessage, TRPCResult, TRPCResultMessage, TRPCSubscriptionStopNotification, TRPCSuccessResponse, TRPC_ERROR_CODE_KEY, TRPC_ERROR_CODE_NUMBER, TeardownLogic, Unsubscribable, UnsubscribeFn, Unwrap, ValidateShape, WithoutIndexSignature, inferErrorShape, inferHandlerInput, inferObservableValue, inferParser, inferProcedureInput, inferProcedureOutput, inferProcedureParams, inferRouterContext, inferRouterError, inferRouterInputs, inferRouterMeta, inferRouterOutputs, inferTransformedProcedureOutput, inferTransformedSubscriptionOutput, } from '@trpc/core';
|
|
9
|
+
export { TRPCError, TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER, callProcedure, createBuilder, createFlatProxy, createInputMiddleware, createOutputMiddleware, createRecursiveProxy, createRouterFactory, experimental_standaloneMiddleware, getBatchStreamFormatter, getCauseFromUnknown, getErrorShape, getHTTPStatusCode, getHTTPStatusCodeFromError, getJsonContentTypeInputs, getTRPCErrorFromUnknown, initTRPC, isObject, isObservable, map, mergeRouters, middlewareMarker, observable, observableToPromise, parseTRPCMessage, procedureTypes, resolveHTTPResponse, share, tap, transformResult, transformTRPCResponse, unsetMarker, } from '@trpc/core';
|
|
10
|
+
//# sourceMappingURL=unstableDontImportMe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unstableDontImportMe.d.ts","sourceRoot":"","sources":["../src/unstableDontImportMe.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,qBAAqB,EACrB,SAAS,EACT,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,wBAAwB,EACxB,sBAAsB,EACtB,kBAAkB,EAClB,UAAU,EACV,uBAAuB,EACvB,6BAA6B,EAC7B,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,WAAW,EACX,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,IAAI,EACJ,gBAAgB,EAChB,MAAM,EACN,UAAU,EACV,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,kCAAkC,EAClC,aAAa,EACb,YAAY,EACZ,cAAc,EACd,UAAU,EACV,MAAM,EACN,YAAY,EACZ,SAAS,EACT,eAAe,EACf,QAAQ,EACR,qBAAqB,EACrB,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EACzB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,yBAAyB,EACzB,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACV,iBAAiB,EACjB,gCAAgC,EAChC,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,EACb,cAAc,EACd,aAAa,EACb,MAAM,EACN,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACX,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,+BAA+B,EAC/B,kCAAkC,GACnC,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,SAAS,EACT,uBAAuB,EACvB,0BAA0B,EAC1B,aAAa,EACb,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,iCAAiC,EACjC,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB,EACvB,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,GAAG,EACH,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,KAAK,EACL,GAAG,EACH,eAAe,EACf,qBAAqB,EACrB,WAAW,GACZ,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@trpc/core');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "TRPCError", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return core.TRPCError; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "TRPC_ERROR_CODES_BY_KEY", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return core.TRPC_ERROR_CODES_BY_KEY; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "TRPC_ERROR_CODES_BY_NUMBER", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return core.TRPC_ERROR_CODES_BY_NUMBER; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "callProcedure", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return core.callProcedure; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "createBuilder", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return core.createBuilder; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "createFlatProxy", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return core.createFlatProxy; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "createInputMiddleware", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return core.createInputMiddleware; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "createOutputMiddleware", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return core.createOutputMiddleware; }
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "createRecursiveProxy", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () { return core.createRecursiveProxy; }
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "createRouterFactory", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return core.createRouterFactory; }
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(exports, "experimental_standaloneMiddleware", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function () { return core.experimental_standaloneMiddleware; }
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, "getBatchStreamFormatter", {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () { return core.getBatchStreamFormatter; }
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "getCauseFromUnknown", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () { return core.getCauseFromUnknown; }
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(exports, "getErrorShape", {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function () { return core.getErrorShape; }
|
|
62
|
+
});
|
|
63
|
+
Object.defineProperty(exports, "getHTTPStatusCode", {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
get: function () { return core.getHTTPStatusCode; }
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(exports, "getHTTPStatusCodeFromError", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function () { return core.getHTTPStatusCodeFromError; }
|
|
70
|
+
});
|
|
71
|
+
Object.defineProperty(exports, "getJsonContentTypeInputs", {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
get: function () { return core.getJsonContentTypeInputs; }
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(exports, "getTRPCErrorFromUnknown", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function () { return core.getTRPCErrorFromUnknown; }
|
|
78
|
+
});
|
|
79
|
+
Object.defineProperty(exports, "initTRPC", {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
get: function () { return core.initTRPC; }
|
|
82
|
+
});
|
|
83
|
+
Object.defineProperty(exports, "isObject", {
|
|
84
|
+
enumerable: true,
|
|
85
|
+
get: function () { return core.isObject; }
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(exports, "isObservable", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () { return core.isObservable; }
|
|
90
|
+
});
|
|
91
|
+
Object.defineProperty(exports, "map", {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
get: function () { return core.map; }
|
|
94
|
+
});
|
|
95
|
+
Object.defineProperty(exports, "mergeRouters", {
|
|
96
|
+
enumerable: true,
|
|
97
|
+
get: function () { return core.mergeRouters; }
|
|
98
|
+
});
|
|
99
|
+
Object.defineProperty(exports, "middlewareMarker", {
|
|
100
|
+
enumerable: true,
|
|
101
|
+
get: function () { return core.middlewareMarker; }
|
|
102
|
+
});
|
|
103
|
+
Object.defineProperty(exports, "observable", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function () { return core.observable; }
|
|
106
|
+
});
|
|
107
|
+
Object.defineProperty(exports, "observableToPromise", {
|
|
108
|
+
enumerable: true,
|
|
109
|
+
get: function () { return core.observableToPromise; }
|
|
110
|
+
});
|
|
111
|
+
Object.defineProperty(exports, "parseTRPCMessage", {
|
|
112
|
+
enumerable: true,
|
|
113
|
+
get: function () { return core.parseTRPCMessage; }
|
|
114
|
+
});
|
|
115
|
+
Object.defineProperty(exports, "procedureTypes", {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
get: function () { return core.procedureTypes; }
|
|
118
|
+
});
|
|
119
|
+
Object.defineProperty(exports, "resolveHTTPResponse", {
|
|
120
|
+
enumerable: true,
|
|
121
|
+
get: function () { return core.resolveHTTPResponse; }
|
|
122
|
+
});
|
|
123
|
+
Object.defineProperty(exports, "share", {
|
|
124
|
+
enumerable: true,
|
|
125
|
+
get: function () { return core.share; }
|
|
126
|
+
});
|
|
127
|
+
Object.defineProperty(exports, "tap", {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
get: function () { return core.tap; }
|
|
130
|
+
});
|
|
131
|
+
Object.defineProperty(exports, "transformResult", {
|
|
132
|
+
enumerable: true,
|
|
133
|
+
get: function () { return core.transformResult; }
|
|
134
|
+
});
|
|
135
|
+
Object.defineProperty(exports, "transformTRPCResponse", {
|
|
136
|
+
enumerable: true,
|
|
137
|
+
get: function () { return core.transformTRPCResponse; }
|
|
138
|
+
});
|
|
139
|
+
Object.defineProperty(exports, "unsetMarker", {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
get: function () { return core.unsetMarker; }
|
|
142
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TRPCError, TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER, callProcedure, createBuilder, createFlatProxy, createInputMiddleware, createOutputMiddleware, createRecursiveProxy, createRouterFactory, experimental_standaloneMiddleware, getBatchStreamFormatter, getCauseFromUnknown, getErrorShape, getHTTPStatusCode, getHTTPStatusCodeFromError, getJsonContentTypeInputs, getTRPCErrorFromUnknown, initTRPC, isObject, isObservable, map, mergeRouters, middlewareMarker, observable, observableToPromise, parseTRPCMessage, procedureTypes, resolveHTTPResponse, share, tap, transformResult, transformTRPCResponse, unsetMarker } from '@trpc/core';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/server",
|
|
3
|
-
"version": "11.0.0-alpha-tmp-export-from-main
|
|
3
|
+
"version": "11.0.0-alpha-tmp-export-from-main.220+74b18bc61",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,84 +24,164 @@
|
|
|
24
24
|
"exports": {
|
|
25
25
|
"./package.json": "./package.json",
|
|
26
26
|
".": {
|
|
27
|
-
"import":
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
"import": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"default": "./dist/index.mjs"
|
|
30
|
+
},
|
|
31
|
+
"require": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"default": "./dist/index.js"
|
|
34
|
+
}
|
|
30
35
|
},
|
|
31
36
|
"./adapters/aws-lambda": {
|
|
32
|
-
"import":
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
"import": {
|
|
38
|
+
"types": "./dist/adapters/aws-lambda/index.d.ts",
|
|
39
|
+
"default": "./dist/adapters/aws-lambda/index.mjs"
|
|
40
|
+
},
|
|
41
|
+
"require": {
|
|
42
|
+
"types": "./dist/adapters/aws-lambda/index.d.ts",
|
|
43
|
+
"default": "./dist/adapters/aws-lambda/index.js"
|
|
44
|
+
}
|
|
35
45
|
},
|
|
36
46
|
"./adapters/express": {
|
|
37
|
-
"import":
|
|
38
|
-
|
|
39
|
-
|
|
47
|
+
"import": {
|
|
48
|
+
"types": "./dist/adapters/express.d.ts",
|
|
49
|
+
"default": "./dist/adapters/express.mjs"
|
|
50
|
+
},
|
|
51
|
+
"require": {
|
|
52
|
+
"types": "./dist/adapters/express.d.ts",
|
|
53
|
+
"default": "./dist/adapters/express.js"
|
|
54
|
+
}
|
|
40
55
|
},
|
|
41
56
|
"./adapters/fastify": {
|
|
42
|
-
"import":
|
|
43
|
-
|
|
44
|
-
|
|
57
|
+
"import": {
|
|
58
|
+
"types": "./dist/adapters/fastify/index.d.ts",
|
|
59
|
+
"default": "./dist/adapters/fastify/index.mjs"
|
|
60
|
+
},
|
|
61
|
+
"require": {
|
|
62
|
+
"types": "./dist/adapters/fastify/index.d.ts",
|
|
63
|
+
"default": "./dist/adapters/fastify/index.js"
|
|
64
|
+
}
|
|
45
65
|
},
|
|
46
66
|
"./adapters/fetch": {
|
|
47
|
-
"import":
|
|
48
|
-
|
|
49
|
-
|
|
67
|
+
"import": {
|
|
68
|
+
"types": "./dist/adapters/fetch/index.d.ts",
|
|
69
|
+
"default": "./dist/adapters/fetch/index.mjs"
|
|
70
|
+
},
|
|
71
|
+
"require": {
|
|
72
|
+
"types": "./dist/adapters/fetch/index.d.ts",
|
|
73
|
+
"default": "./dist/adapters/fetch/index.js"
|
|
74
|
+
}
|
|
50
75
|
},
|
|
51
76
|
"./adapters/next": {
|
|
52
|
-
"import":
|
|
53
|
-
|
|
54
|
-
|
|
77
|
+
"import": {
|
|
78
|
+
"types": "./dist/adapters/next.d.ts",
|
|
79
|
+
"default": "./dist/adapters/next.mjs"
|
|
80
|
+
},
|
|
81
|
+
"require": {
|
|
82
|
+
"types": "./dist/adapters/next.d.ts",
|
|
83
|
+
"default": "./dist/adapters/next.js"
|
|
84
|
+
}
|
|
55
85
|
},
|
|
56
86
|
"./adapters/node-http/content-type/form-data": {
|
|
57
|
-
"import":
|
|
58
|
-
|
|
59
|
-
|
|
87
|
+
"import": {
|
|
88
|
+
"types": "./dist/adapters/node-http/content-type/form-data/index.d.ts",
|
|
89
|
+
"default": "./dist/adapters/node-http/content-type/form-data/index.mjs"
|
|
90
|
+
},
|
|
91
|
+
"require": {
|
|
92
|
+
"types": "./dist/adapters/node-http/content-type/form-data/index.d.ts",
|
|
93
|
+
"default": "./dist/adapters/node-http/content-type/form-data/index.js"
|
|
94
|
+
}
|
|
60
95
|
},
|
|
61
96
|
"./adapters/node-http/content-type/json": {
|
|
62
|
-
"import":
|
|
63
|
-
|
|
64
|
-
|
|
97
|
+
"import": {
|
|
98
|
+
"types": "./dist/adapters/node-http/content-type/json/index.d.ts",
|
|
99
|
+
"default": "./dist/adapters/node-http/content-type/json/index.mjs"
|
|
100
|
+
},
|
|
101
|
+
"require": {
|
|
102
|
+
"types": "./dist/adapters/node-http/content-type/json/index.d.ts",
|
|
103
|
+
"default": "./dist/adapters/node-http/content-type/json/index.js"
|
|
104
|
+
}
|
|
65
105
|
},
|
|
66
106
|
"./adapters/node-http": {
|
|
67
|
-
"import":
|
|
68
|
-
|
|
69
|
-
|
|
107
|
+
"import": {
|
|
108
|
+
"types": "./dist/adapters/node-http/index.d.ts",
|
|
109
|
+
"default": "./dist/adapters/node-http/index.mjs"
|
|
110
|
+
},
|
|
111
|
+
"require": {
|
|
112
|
+
"types": "./dist/adapters/node-http/index.d.ts",
|
|
113
|
+
"default": "./dist/adapters/node-http/index.js"
|
|
114
|
+
}
|
|
70
115
|
},
|
|
71
116
|
"./adapters/standalone": {
|
|
72
|
-
"import":
|
|
73
|
-
|
|
74
|
-
|
|
117
|
+
"import": {
|
|
118
|
+
"types": "./dist/adapters/standalone.d.ts",
|
|
119
|
+
"default": "./dist/adapters/standalone.mjs"
|
|
120
|
+
},
|
|
121
|
+
"require": {
|
|
122
|
+
"types": "./dist/adapters/standalone.d.ts",
|
|
123
|
+
"default": "./dist/adapters/standalone.js"
|
|
124
|
+
}
|
|
75
125
|
},
|
|
76
126
|
"./adapters/ws": {
|
|
77
|
-
"import":
|
|
78
|
-
|
|
79
|
-
|
|
127
|
+
"import": {
|
|
128
|
+
"types": "./dist/adapters/ws.d.ts",
|
|
129
|
+
"default": "./dist/adapters/ws.mjs"
|
|
130
|
+
},
|
|
131
|
+
"require": {
|
|
132
|
+
"types": "./dist/adapters/ws.d.ts",
|
|
133
|
+
"default": "./dist/adapters/ws.js"
|
|
134
|
+
}
|
|
80
135
|
},
|
|
81
136
|
"./http": {
|
|
82
|
-
"import":
|
|
83
|
-
|
|
84
|
-
|
|
137
|
+
"import": {
|
|
138
|
+
"types": "./dist/http.d.ts",
|
|
139
|
+
"default": "./dist/http.mjs"
|
|
140
|
+
},
|
|
141
|
+
"require": {
|
|
142
|
+
"types": "./dist/http.d.ts",
|
|
143
|
+
"default": "./dist/http.js"
|
|
144
|
+
}
|
|
85
145
|
},
|
|
86
146
|
"./observable": {
|
|
87
|
-
"import":
|
|
88
|
-
|
|
89
|
-
|
|
147
|
+
"import": {
|
|
148
|
+
"types": "./dist/observable.d.ts",
|
|
149
|
+
"default": "./dist/observable.mjs"
|
|
150
|
+
},
|
|
151
|
+
"require": {
|
|
152
|
+
"types": "./dist/observable.d.ts",
|
|
153
|
+
"default": "./dist/observable.js"
|
|
154
|
+
}
|
|
90
155
|
},
|
|
91
156
|
"./rpc": {
|
|
92
|
-
"import":
|
|
93
|
-
|
|
94
|
-
|
|
157
|
+
"import": {
|
|
158
|
+
"types": "./dist/rpc.d.ts",
|
|
159
|
+
"default": "./dist/rpc.mjs"
|
|
160
|
+
},
|
|
161
|
+
"require": {
|
|
162
|
+
"types": "./dist/rpc.d.ts",
|
|
163
|
+
"default": "./dist/rpc.js"
|
|
164
|
+
}
|
|
95
165
|
},
|
|
96
166
|
"./shared": {
|
|
97
|
-
"import":
|
|
98
|
-
|
|
99
|
-
|
|
167
|
+
"import": {
|
|
168
|
+
"types": "./dist/shared.d.ts",
|
|
169
|
+
"default": "./dist/shared.mjs"
|
|
170
|
+
},
|
|
171
|
+
"require": {
|
|
172
|
+
"types": "./dist/shared.d.ts",
|
|
173
|
+
"default": "./dist/shared.js"
|
|
174
|
+
}
|
|
100
175
|
},
|
|
101
|
-
"./
|
|
102
|
-
"import":
|
|
103
|
-
|
|
104
|
-
|
|
176
|
+
"./unstableDontImportMe": {
|
|
177
|
+
"import": {
|
|
178
|
+
"types": "./dist/unstableDontImportMe.d.ts",
|
|
179
|
+
"default": "./dist/unstableDontImportMe.mjs"
|
|
180
|
+
},
|
|
181
|
+
"require": {
|
|
182
|
+
"types": "./dist/unstableDontImportMe.d.ts",
|
|
183
|
+
"default": "./dist/unstableDontImportMe.js"
|
|
184
|
+
}
|
|
105
185
|
}
|
|
106
186
|
},
|
|
107
187
|
"files": [
|
|
@@ -114,12 +194,15 @@
|
|
|
114
194
|
"observable",
|
|
115
195
|
"rpc",
|
|
116
196
|
"shared",
|
|
117
|
-
"
|
|
197
|
+
"unstableDontImportMe",
|
|
118
198
|
"!**/*.test.*"
|
|
119
199
|
],
|
|
120
200
|
"publishConfig": {
|
|
121
201
|
"access": "public"
|
|
122
202
|
},
|
|
203
|
+
"dependencies": {
|
|
204
|
+
"@trpc/core": "11.0.0-alpha-tmp-export-from-main.220+74b18bc61"
|
|
205
|
+
},
|
|
123
206
|
"devDependencies": {
|
|
124
207
|
"@fastify/websocket": "^7.1.2",
|
|
125
208
|
"@tanstack/react-query": "^5.0.0",
|
|
@@ -157,5 +240,5 @@
|
|
|
157
240
|
"funding": [
|
|
158
241
|
"https://trpc.io/sponsor"
|
|
159
242
|
],
|
|
160
|
-
"gitHead": "
|
|
243
|
+
"gitHead": "74b18bc6129a058b7da7a32f88bdb730298a008f"
|
|
161
244
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`
|
|
3
3
|
*
|
|
4
|
+
* Do **not** import from `@trpc/core`
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
@@ -15,15 +16,15 @@ import type {
|
|
|
15
16
|
Context as APIGWContext,
|
|
16
17
|
} from 'aws-lambda';
|
|
17
18
|
// @trpc/server
|
|
18
|
-
import type { AnyRouter } from '
|
|
19
|
+
import type { AnyRouter } from '../..';
|
|
19
20
|
// @trpc/server
|
|
20
|
-
import { TRPCError } from '
|
|
21
|
+
import { TRPCError } from '../..';
|
|
21
22
|
import type {
|
|
22
23
|
HTTPRequest,
|
|
23
24
|
HTTPResponse,
|
|
24
25
|
ResolveHTTPRequestOptionsContextFn,
|
|
25
|
-
} from '
|
|
26
|
-
import { resolveHTTPResponse } from '
|
|
26
|
+
} from '../../http';
|
|
27
|
+
import { resolveHTTPResponse } from '../../http';
|
|
27
28
|
import type {
|
|
28
29
|
APIGatewayEvent,
|
|
29
30
|
APIGatewayResult,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`
|
|
3
3
|
*
|
|
4
|
+
* Do **not** import from `@trpc/core`
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
@@ -14,16 +15,16 @@ import type {
|
|
|
14
15
|
APIGatewayProxyStructuredResultV2,
|
|
15
16
|
Context as APIGWContext,
|
|
16
17
|
} from 'aws-lambda';
|
|
17
|
-
import type { AnyRouter, inferRouterContext } from '
|
|
18
|
+
import type { AnyRouter, inferRouterContext } from '../..'; // import @trpc/server
|
|
18
19
|
|
|
19
20
|
// @trpc/server
|
|
20
|
-
import { TRPCError } from '
|
|
21
|
+
import { TRPCError } from '../..';
|
|
21
22
|
import type {
|
|
22
23
|
HTTPHeaders,
|
|
23
24
|
OnErrorFunction,
|
|
24
25
|
ResponseMetaFn,
|
|
25
26
|
TRPCRequestInfo,
|
|
26
|
-
} from '
|
|
27
|
+
} from '../../http';
|
|
27
28
|
|
|
28
29
|
export type APIGatewayEvent = APIGatewayProxyEvent | APIGatewayProxyEventV2;
|
|
29
30
|
export type APIGatewayResult =
|
package/src/adapters/express.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`
|
|
3
3
|
*
|
|
4
|
+
* Do **not** import from `@trpc/core`
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
@@ -8,7 +9,8 @@
|
|
|
8
9
|
* ```
|
|
9
10
|
*/
|
|
10
11
|
import type * as express from 'express';
|
|
11
|
-
|
|
12
|
+
// @trpc/server
|
|
13
|
+
import type { AnyRouter } from '..';
|
|
12
14
|
import type {
|
|
13
15
|
NodeHTTPCreateContextFnOptions,
|
|
14
16
|
NodeHTTPHandlerOptions,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`
|
|
3
3
|
*
|
|
4
|
+
* Do **not** import from `@trpc/core`
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
@@ -10,18 +11,15 @@
|
|
|
10
11
|
import { Readable } from 'node:stream';
|
|
11
12
|
import type { FastifyReply, FastifyRequest } from 'fastify';
|
|
12
13
|
// @trpc/server
|
|
13
|
-
import type { AnyRouter } from '
|
|
14
|
+
import type { AnyRouter } from '../..';
|
|
14
15
|
import type {
|
|
15
16
|
HTTPBaseHandlerOptions,
|
|
16
17
|
HTTPRequest,
|
|
17
18
|
HTTPResponse,
|
|
18
19
|
ResolveHTTPRequestOptionsContextFn,
|
|
19
20
|
ResponseChunk,
|
|
20
|
-
} from '
|
|
21
|
-
import {
|
|
22
|
-
getBatchStreamFormatter,
|
|
23
|
-
resolveHTTPResponse,
|
|
24
|
-
} from '../../@trpc/server/http';
|
|
21
|
+
} from '../../http';
|
|
22
|
+
import { getBatchStreamFormatter, resolveHTTPResponse } from '../../http';
|
|
25
23
|
import type { NodeHTTPCreateContextOption } from '../node-http';
|
|
26
24
|
|
|
27
25
|
export type FastifyHandlerOptions<
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`
|
|
3
3
|
*
|
|
4
|
+
* Do **not** import from `@trpc/core`
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
@@ -11,7 +12,7 @@
|
|
|
11
12
|
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
12
13
|
import type { FastifyHandlerOptions } from '.';
|
|
13
14
|
// @trpc/server
|
|
14
|
-
import type { AnyRouter } from '
|
|
15
|
+
import type { AnyRouter } from '../..';
|
|
15
16
|
import type { NodeHTTPCreateContextFnOptions } from '../node-http';
|
|
16
17
|
import type { WSSHandlerOptions } from '../ws';
|
|
17
18
|
import { applyWSSHandler } from '../ws';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`
|
|
3
3
|
*
|
|
4
|
+
* Do **not** import from `@trpc/core`
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
@@ -8,17 +9,14 @@
|
|
|
8
9
|
* ```
|
|
9
10
|
*/
|
|
10
11
|
// @trpc/server
|
|
11
|
-
import type { AnyRouter } from '
|
|
12
|
+
import type { AnyRouter } from '../..';
|
|
12
13
|
import type {
|
|
13
14
|
HTTPRequest,
|
|
14
15
|
HTTPResponse,
|
|
15
16
|
ResolveHTTPRequestOptionsContextFn,
|
|
16
17
|
ResponseChunk,
|
|
17
|
-
} from '
|
|
18
|
-
import {
|
|
19
|
-
getBatchStreamFormatter,
|
|
20
|
-
resolveHTTPResponse,
|
|
21
|
-
} from '../../@trpc/server/http';
|
|
18
|
+
} from '../../http';
|
|
19
|
+
import { getBatchStreamFormatter, resolveHTTPResponse } from '../../http';
|
|
22
20
|
import type { FetchHandlerOptions } from './types';
|
|
23
21
|
|
|
24
22
|
export type FetchHandlerRequestOptions<TRouter extends AnyRouter> =
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`
|
|
3
3
|
*
|
|
4
|
+
* Do **not** import from `@trpc/core`
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
@@ -8,12 +9,12 @@
|
|
|
8
9
|
* ```
|
|
9
10
|
*/
|
|
10
11
|
// @trpc/server
|
|
11
|
-
import type { AnyRouter, inferRouterContext } from '
|
|
12
|
+
import type { AnyRouter, inferRouterContext } from '../..';
|
|
12
13
|
// @trpc/server/http
|
|
13
14
|
import type {
|
|
14
15
|
HTTPBaseHandlerOptions,
|
|
15
16
|
TRPCRequestInfo,
|
|
16
|
-
} from '../../@trpc
|
|
17
|
+
} from '../../@trpc-server/http';
|
|
17
18
|
|
|
18
19
|
export type FetchCreateContextFnOptions = {
|
|
19
20
|
req: Request;
|
package/src/adapters/next.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If you're making an adapter for tRPC and looking at this file for reference, you should import types and functions from `@trpc/server` and `@trpc/server/http`
|
|
3
3
|
*
|
|
4
|
+
* Do **not** import from `@trpc/core`
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
@@ -9,9 +10,9 @@
|
|
|
9
10
|
*/
|
|
10
11
|
import type { NextApiHandler, NextApiRequest, NextApiResponse } from 'next';
|
|
11
12
|
// @trpc/server
|
|
12
|
-
import type { AnyRouter } from '
|
|
13
|
+
import type { AnyRouter } from '..';
|
|
13
14
|
// @trpc/server
|
|
14
|
-
import { getErrorShape, TRPCError } from '
|
|
15
|
+
import { getErrorShape, TRPCError } from '..';
|
|
15
16
|
import type {
|
|
16
17
|
NodeHTTPCreateContextFnOptions,
|
|
17
18
|
NodeHTTPHandlerOptions,
|
|
@@ -22,6 +23,7 @@ export type CreateNextContextOptions = NodeHTTPCreateContextFnOptions<
|
|
|
22
23
|
NextApiRequest,
|
|
23
24
|
NextApiResponse
|
|
24
25
|
>;
|
|
26
|
+
export type { NextApiHandler, NextApiRequest, NextApiResponse } from 'next';
|
|
25
27
|
|
|
26
28
|
export function createNextApiHandler<TRouter extends AnyRouter>(
|
|
27
29
|
opts: NodeHTTPHandlerOptions<TRouter, NextApiRequest, NextApiResponse>,
|