@trpc/server 11.0.0-rc.348 → 11.0.0-rc.351
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 +1 -0
- package/dist/@trpc/server/http.d.ts.map +1 -1
- package/dist/@trpc/server/index.d.ts +1 -2
- package/dist/@trpc/server/index.d.ts.map +1 -1
- package/dist/adapters/aws-lambda/index.d.ts.map +1 -1
- package/dist/adapters/aws-lambda/index.js +9 -19
- package/dist/adapters/aws-lambda/index.mjs +9 -19
- package/dist/adapters/aws-lambda/utils.d.ts +12 -3
- package/dist/adapters/aws-lambda/utils.d.ts.map +1 -1
- package/dist/adapters/aws-lambda/utils.js +1 -12
- package/dist/adapters/aws-lambda/utils.mjs +2 -12
- package/dist/adapters/express.d.ts.map +1 -1
- package/dist/adapters/express.js +1 -0
- package/dist/adapters/express.mjs +1 -0
- package/dist/adapters/fastify/fastifyRequestHandler.d.ts +9 -1
- package/dist/adapters/fastify/fastifyRequestHandler.d.ts.map +1 -1
- package/dist/adapters/fastify/fastifyRequestHandler.js +2 -10
- package/dist/adapters/fastify/fastifyRequestHandler.mjs +2 -10
- package/dist/adapters/fastify/fastifyTRPCPlugin.d.ts +1 -1
- package/dist/adapters/fastify/fastifyTRPCPlugin.d.ts.map +1 -1
- package/dist/adapters/fetch/fetchRequestHandler.d.ts +5 -1
- package/dist/adapters/fetch/fetchRequestHandler.d.ts.map +1 -1
- package/dist/adapters/fetch/fetchRequestHandler.js +2 -16
- package/dist/adapters/fetch/fetchRequestHandler.mjs +2 -16
- package/dist/adapters/fetch/types.d.ts +12 -9
- package/dist/adapters/fetch/types.d.ts.map +1 -1
- package/dist/adapters/next-app-dir/nextAppDirCaller.d.ts +7 -2
- package/dist/adapters/next-app-dir/nextAppDirCaller.d.ts.map +1 -1
- package/dist/adapters/next.d.ts.map +1 -1
- package/dist/adapters/next.js +1 -0
- package/dist/adapters/next.mjs +1 -0
- package/dist/adapters/node-http/content-type/form-data/fileUploadHandler.d.ts +73 -0
- package/dist/adapters/node-http/content-type/form-data/fileUploadHandler.d.ts.map +1 -0
- package/dist/adapters/node-http/content-type/form-data/fileUploadHandler.js +161 -0
- package/dist/adapters/node-http/content-type/form-data/fileUploadHandler.mjs +157 -0
- package/dist/adapters/node-http/content-type/form-data/index.d.ts +25 -4
- package/dist/adapters/node-http/content-type/form-data/index.d.ts.map +1 -1
- package/dist/adapters/node-http/content-type/form-data/index.js +128 -25
- package/dist/adapters/node-http/content-type/form-data/index.mjs +103 -25
- package/dist/adapters/node-http/content-type/form-data/memoryUploadHandler.d.ts +31 -0
- package/dist/adapters/node-http/content-type/form-data/memoryUploadHandler.d.ts.map +1 -0
- package/dist/adapters/node-http/content-type/form-data/memoryUploadHandler.js +29 -0
- package/dist/adapters/node-http/content-type/form-data/memoryUploadHandler.mjs +27 -0
- package/dist/adapters/node-http/content-type/form-data/streamSlice.d.ts +16 -0
- package/dist/adapters/node-http/content-type/form-data/streamSlice.d.ts.map +1 -0
- package/dist/adapters/node-http/content-type/form-data/streamSlice.js +46 -0
- package/dist/adapters/node-http/content-type/form-data/streamSlice.mjs +44 -0
- package/dist/adapters/node-http/content-type/form-data/uploadHandler.d.ts +45 -0
- package/dist/adapters/node-http/content-type/form-data/uploadHandler.d.ts.map +1 -0
- package/dist/adapters/node-http/content-type/form-data/uploadHandler.js +30 -0
- package/dist/adapters/node-http/content-type/form-data/uploadHandler.mjs +26 -0
- package/dist/adapters/node-http/content-type/json/getPostBody.d.ts.map +1 -1
- package/dist/adapters/node-http/content-type/json/getPostBody.js +12 -4
- package/dist/adapters/node-http/content-type/json/getPostBody.mjs +12 -4
- package/dist/adapters/node-http/content-type/json/index.d.ts +1 -4
- package/dist/adapters/node-http/content-type/json/index.d.ts.map +1 -1
- package/dist/adapters/node-http/content-type/json/index.js +10 -59
- package/dist/adapters/node-http/content-type/json/index.mjs +10 -59
- package/dist/adapters/node-http/internals/contentType.d.ts +9 -0
- package/dist/adapters/node-http/internals/contentType.d.ts.map +1 -0
- package/dist/adapters/node-http/internals/contentType.js +8 -0
- package/dist/adapters/node-http/internals/contentType.mjs +6 -0
- package/dist/adapters/node-http/nodeHTTPRequestHandler.d.ts.map +1 -1
- package/dist/adapters/node-http/nodeHTTPRequestHandler.js +21 -19
- package/dist/adapters/node-http/nodeHTTPRequestHandler.mjs +22 -20
- package/dist/adapters/node-http/types.d.ts +19 -8
- package/dist/adapters/node-http/types.d.ts.map +1 -1
- package/dist/adapters/standalone.d.ts.map +1 -1
- package/dist/adapters/standalone.js +1 -0
- package/dist/adapters/standalone.mjs +1 -0
- package/dist/adapters/ws.d.ts +12 -2
- package/dist/adapters/ws.d.ts.map +1 -1
- package/dist/bundle-analysis.json +233 -227
- package/dist/http.js +2 -0
- package/dist/http.mjs +1 -0
- package/dist/index.js +0 -2
- package/dist/index.mjs +0 -1
- package/dist/unstable-core-do-not-import/http/contentType.d.ts +15 -7
- package/dist/unstable-core-do-not-import/http/contentType.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/http/contentType.js +54 -0
- package/dist/unstable-core-do-not-import/http/contentType.mjs +52 -0
- package/dist/unstable-core-do-not-import/http/index.d.ts +1 -0
- package/dist/unstable-core-do-not-import/http/index.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.d.ts +5 -5
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.js +22 -25
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.mjs +22 -25
- package/dist/unstable-core-do-not-import/http/types.d.ts +2 -0
- package/dist/unstable-core-do-not-import/http/types.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/rootConfig.d.ts +0 -21
- package/dist/unstable-core-do-not-import/rootConfig.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import.js +2 -0
- package/dist/unstable-core-do-not-import.mjs +1 -0
- package/package.json +3 -2
- package/src/@trpc/server/http.ts +1 -0
- package/src/@trpc/server/index.ts +0 -4
- package/src/adapters/aws-lambda/index.ts +9 -24
- package/src/adapters/aws-lambda/utils.ts +15 -21
- package/src/adapters/express.ts +6 -1
- package/src/adapters/fastify/fastifyRequestHandler.ts +21 -15
- package/src/adapters/fastify/fastifyTRPCPlugin.ts +1 -1
- package/src/adapters/fetch/fetchRequestHandler.ts +10 -22
- package/src/adapters/fetch/types.ts +15 -22
- package/src/adapters/next-app-dir/nextAppDirCaller.ts +9 -2
- package/src/adapters/next.ts +6 -1
- package/src/adapters/node-http/content-type/form-data/fileUploadHandler.ts +277 -0
- package/src/adapters/node-http/content-type/form-data/index.ts +159 -33
- package/src/adapters/node-http/content-type/form-data/memoryUploadHandler.ts +56 -0
- package/src/adapters/node-http/content-type/form-data/streamSlice.ts +56 -0
- package/src/adapters/node-http/content-type/form-data/uploadHandler.ts +89 -0
- package/src/adapters/node-http/content-type/json/getPostBody.ts +18 -9
- package/src/adapters/node-http/content-type/json/index.ts +7 -87
- package/src/adapters/node-http/{content-type/types.ts → internals/contentType.ts} +14 -2
- package/src/adapters/node-http/nodeHTTPRequestHandler.ts +35 -22
- package/src/adapters/node-http/types.ts +46 -46
- package/src/adapters/standalone.ts +2 -1
- package/src/adapters/ws.ts +14 -9
- package/src/unstable-core-do-not-import/http/contentType.ts +85 -10
- package/src/unstable-core-do-not-import/http/index.ts +1 -0
- package/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts +28 -29
- package/src/unstable-core-do-not-import/http/types.ts +2 -0
- package/src/unstable-core-do-not-import/rootConfig.ts +0 -31
- package/dist/adapters/aws-lambda/content-type/json/index.d.ts +0 -10
- package/dist/adapters/aws-lambda/content-type/json/index.d.ts.map +0 -1
- package/dist/adapters/aws-lambda/content-type/json/index.js +0 -59
- package/dist/adapters/aws-lambda/content-type/json/index.mjs +0 -57
- package/dist/adapters/content-handlers/selectContentHandlerOrUnsupportedMediaType.d.ts +0 -10
- package/dist/adapters/content-handlers/selectContentHandlerOrUnsupportedMediaType.d.ts.map +0 -1
- package/dist/adapters/content-handlers/selectContentHandlerOrUnsupportedMediaType.js +0 -33
- package/dist/adapters/content-handlers/selectContentHandlerOrUnsupportedMediaType.mjs +0 -31
- package/dist/adapters/fastify/content-type/json/index.d.ts +0 -8
- package/dist/adapters/fastify/content-type/json/index.d.ts.map +0 -1
- package/dist/adapters/fastify/content-type/json/index.js +0 -59
- package/dist/adapters/fastify/content-type/json/index.mjs +0 -57
- package/dist/adapters/fastify/types.d.ts +0 -11
- package/dist/adapters/fastify/types.d.ts.map +0 -1
- package/dist/adapters/fetch/content-type/json/index.d.ts +0 -9
- package/dist/adapters/fetch/content-type/json/index.d.ts.map +0 -1
- package/dist/adapters/fetch/content-type/json/index.js +0 -58
- package/dist/adapters/fetch/content-type/json/index.mjs +0 -56
- package/dist/adapters/node-http/content-type/octet/index.d.ts +0 -5
- package/dist/adapters/node-http/content-type/octet/index.d.ts.map +0 -1
- package/dist/adapters/node-http/content-type/octet/index.js +0 -19
- package/dist/adapters/node-http/content-type/octet/index.mjs +0 -17
- package/dist/adapters/node-http/content-type/types.d.ts +0 -8
- package/dist/adapters/node-http/content-type/types.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/contentTypeParsers.d.ts +0 -16
- package/dist/unstable-core-do-not-import/contentTypeParsers.d.ts.map +0 -1
- package/dist/unstable-core-do-not-import/contentTypeParsers.js +0 -23
- package/dist/unstable-core-do-not-import/contentTypeParsers.mjs +0 -21
- package/src/adapters/aws-lambda/content-type/json/index.ts +0 -99
- package/src/adapters/content-handlers/selectContentHandlerOrUnsupportedMediaType.ts +0 -45
- package/src/adapters/fastify/content-type/json/index.ts +0 -97
- package/src/adapters/fastify/types.ts +0 -22
- package/src/adapters/fetch/content-type/json/index.ts +0 -94
- package/src/adapters/node-http/content-type/octet/index.ts +0 -27
- package/src/unstable-core-do-not-import/contentTypeParsers.ts +0 -37
|
@@ -3,5 +3,6 @@ export { resolveHTTPResponse } from '../../unstable-core-do-not-import';
|
|
|
3
3
|
export type { BaseHandlerOptions, HTTPBaseHandlerOptions, HTTPHeaders, HTTPRequest, HTTPResponse, OnErrorFunction, ProcedureCall, ResolveHTTPRequestOptionsContextFn, ResponseChunk, ResponseMeta, ResponseMetaFn, TRPCRequestInfo, } from '../../unstable-core-do-not-import';
|
|
4
4
|
export { getBatchStreamFormatter } from '../../unstable-core-do-not-import';
|
|
5
5
|
export type { BaseContentTypeHandler, BodyResult, } from '../../unstable-core-do-not-import';
|
|
6
|
+
export { getJsonContentTypeInputs } from '../../unstable-core-do-not-import';
|
|
6
7
|
export { toURL } from '../../unstable-core-do-not-import';
|
|
7
8
|
//# sourceMappingURL=http.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/@trpc/server/http.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,eAAe,EACf,aAAa,EACb,kCAAkC,EAClC,aAAa,EACb,YAAY,EACZ,cAAc,EACd,eAAe,GAChB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,YAAY,EACV,sBAAsB,EACtB,UAAU,GACX,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC"}
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/@trpc/server/http.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,eAAe,EACf,aAAa,EACb,kCAAkC,EAClC,aAAa,EACb,YAAY,EACZ,cAAc,EACd,eAAe,GAChB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,YAAY,EACV,sBAAsB,EACtB,UAAU,GACX,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -2,7 +2,7 @@ export { TRPCError,
|
|
|
2
2
|
/**
|
|
3
3
|
* @deprecated use `experimental_trpcMiddleware` instead
|
|
4
4
|
*/
|
|
5
|
-
experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware, initTRPC, callProcedure as callTRPCProcedure, getTRPCErrorFromUnknown, transformTRPCResponse, createFlatProxy as createTRPCFlatProxy, type inferProcedureInput, type inferProcedureOutput, type inferProcedureBuilderResolverOptions, type inferRouterError, type inferRouterInputs, type inferRouterOutputs, type inferRouterContext, type inferClientTypes as inferTRPCClientTypes, type AnyClientTypes as AnyTRPCClientTypes, type inferTransformedProcedureOutput, type inferTransformedSubscriptionOutput, type AnyProcedure as AnyTRPCProcedure, type AnyRouter as AnyTRPCRouter, type AnyMiddlewareFunction as AnyTRPCMiddlewareFunction, type CombinedDataTransformer as TRPCCombinedDataTransformer, type ProcedureType as TRPCProcedureType, type AnyMutationProcedure as AnyTRPCMutationProcedure, type AnyQueryProcedure as AnyTRPCQueryProcedure, type RouterRecord as TRPCRouterRecord, type AnySubscriptionProcedure as AnyTRPCSubscriptionProcedure, type ProcedureOptions as TRPCProcedureOptions, type
|
|
5
|
+
experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware, initTRPC, callProcedure as callTRPCProcedure, getTRPCErrorFromUnknown, transformTRPCResponse, createFlatProxy as createTRPCFlatProxy, type inferProcedureInput, type inferProcedureOutput, type inferProcedureBuilderResolverOptions, type inferRouterError, type inferRouterInputs, type inferRouterOutputs, type inferRouterContext, type inferClientTypes as inferTRPCClientTypes, type AnyClientTypes as AnyTRPCClientTypes, type inferTransformedProcedureOutput, type inferTransformedSubscriptionOutput, type AnyProcedure as AnyTRPCProcedure, type AnyRouter as AnyTRPCRouter, type AnyMiddlewareFunction as AnyTRPCMiddlewareFunction, type CombinedDataTransformer as TRPCCombinedDataTransformer, type ProcedureType as TRPCProcedureType, type AnyMutationProcedure as AnyTRPCMutationProcedure, type AnyQueryProcedure as AnyTRPCQueryProcedure, type RouterRecord as TRPCRouterRecord, type AnySubscriptionProcedure as AnyTRPCSubscriptionProcedure, type ProcedureOptions as TRPCProcedureOptions, type MutationProcedure as TRPCMutationProcedure, type QueryProcedure as TRPCQueryProcedure, type SubscriptionProcedure as TRPCSubscriptionProcedure, } from '../../unstable-core-do-not-import';
|
|
6
6
|
export type {
|
|
7
7
|
/**
|
|
8
8
|
* @deprecated use `AnyTRPCProcedure` instead
|
|
@@ -58,5 +58,4 @@ callProcedure, } from '../../unstable-core-do-not-import';
|
|
|
58
58
|
* Use `Awaited<ReturnType<typeof myFunction>>` instead
|
|
59
59
|
*/
|
|
60
60
|
export type inferAsyncReturnType<TFunction extends (...args: any[]) => any> = Awaited<ReturnType<TFunction>>;
|
|
61
|
-
export { parseOctetInput } from '../../unstable-core-do-not-import/contentTypeParsers';
|
|
62
61
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/@trpc/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS;AACT;;GAEG;AACH,iCAAiC,EACjC,iCAAiC,IAAI,2BAA2B,EAChE,QAAQ,EAER,aAAa,IAAI,iBAAiB,EAClC,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,IAAI,mBAAmB,EACtC,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,oCAAoC,EACzC,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,IAAI,oBAAoB,EAC7C,KAAK,cAAc,IAAI,kBAAkB,EACzC,KAAK,+BAA+B,EACpC,KAAK,kCAAkC,EACvC,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,SAAS,IAAI,aAAa,EAC/B,KAAK,qBAAqB,IAAI,yBAAyB,EACvD,KAAK,uBAAuB,IAAI,2BAA2B,EAC3D,KAAK,aAAa,IAAI,iBAAiB,EACvC,KAAK,oBAAoB,IAAI,wBAAwB,EACrD,KAAK,iBAAiB,IAAI,qBAAqB,EAC/C,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,wBAAwB,IAAI,4BAA4B,EAC7D,KAAK,gBAAgB,IAAI,oBAAoB,EAC7C,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/@trpc/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS;AACT;;GAEG;AACH,iCAAiC,EACjC,iCAAiC,IAAI,2BAA2B,EAChE,QAAQ,EAER,aAAa,IAAI,iBAAiB,EAClC,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,IAAI,mBAAmB,EACtC,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,oCAAoC,EACzC,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,IAAI,oBAAoB,EAC7C,KAAK,cAAc,IAAI,kBAAkB,EACzC,KAAK,+BAA+B,EACpC,KAAK,kCAAkC,EACvC,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,SAAS,IAAI,aAAa,EAC/B,KAAK,qBAAqB,IAAI,yBAAyB,EACvD,KAAK,uBAAuB,IAAI,2BAA2B,EAC3D,KAAK,aAAa,IAAI,iBAAiB,EACvC,KAAK,oBAAoB,IAAI,wBAAwB,EACrD,KAAK,iBAAiB,IAAI,qBAAqB,EAC/C,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,wBAAwB,IAAI,4BAA4B,EAC7D,KAAK,gBAAgB,IAAI,oBAAoB,EAC7C,KAAK,iBAAiB,IAAI,qBAAqB,EAC/C,KAAK,cAAc,IAAI,kBAAkB,EACzC,KAAK,qBAAqB,IAAI,yBAAyB,GACxD,MAAM,mCAAmC,CAAC;AAE3C,YAAY;AACV;;GAEG;AACH,YAAY;AACZ;;GAEG;AACH,SAAS;AACT;;GAEG;AACH,qBAAqB;AACrB;;GAEG;AACH,uBAAuB;AAEvB;;GAEG;AACH,IAAI;AAEJ;;GAEG;AACH,WAAW;AACX;;GAEG;AACH,aAAa;AACb;;GAEG;AACH,oBAAoB;AAEpB;;GAEG;AACH,iBAAiB;AACjB;;GAEG;AACH,wBAAwB,GACzB,MAAM,mCAAmC,CAAC;AAE3C,OAAO;AACL;;GAEG;AACH,aAAa;AAEb;;GAEG;AACH,aAAa,GACd,MAAM,mCAAmC,CAAC;AAE3C;;;GAGG;AACH,MAAM,MAAM,oBAAoB,CAAC,SAAS,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,IACxE,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/aws-lambda/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,iCAAiC,EACjC,OAAO,IAAI,YAAY,EACxB,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/aws-lambda/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,iCAAiC,EACjC,OAAO,IAAI,YAAY,EACxB,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AASpD,OAAO,KAAK,EACV,eAAe,EAEf,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAUjB,cAAc,SAAS,CAAC;AAqDxB;;IAEI;AACJ,KAAK,gBAAgB,CAAC,KAAK,IAAI,KAAK,SAAS,oBAAoB,GAC7D,qBAAqB,GACrB,KAAK,SAAS,sBAAsB,GACpC,iCAAiC,GACjC,KAAK,CAAC;AACV,wBAAgB,uBAAuB,CACrC,OAAO,SAAS,SAAS,EACzB,MAAM,SAAS,eAAe,EAC9B,OAAO,SAAS,gBAAgB,CAAC,MAAM,CAAC,EAExC,IAAI,EAAE,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,GACtC,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,OAAO,CAAC,CA0B5D"}
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
var TRPCError = require('../../unstable-core-do-not-import/error/TRPCError.js');
|
|
4
4
|
var resolveHTTPResponse = require('../../unstable-core-do-not-import/http/resolveHTTPResponse.js');
|
|
5
5
|
require('../../unstable-core-do-not-import/rootConfig.js');
|
|
6
|
-
var selectContentHandlerOrUnsupportedMediaType = require('../content-handlers/selectContentHandlerOrUnsupportedMediaType.js');
|
|
7
|
-
var index = require('./content-type/json/index.js');
|
|
8
6
|
var utils = require('./utils.js');
|
|
9
7
|
|
|
10
8
|
/**
|
|
@@ -23,10 +21,17 @@ function lambdaEventToHTTPRequest(event) {
|
|
|
23
21
|
query.append(key, value);
|
|
24
22
|
}
|
|
25
23
|
}
|
|
24
|
+
let body;
|
|
25
|
+
if (event.body && event.isBase64Encoded) {
|
|
26
|
+
body = Buffer.from(event.body, 'base64').toString('utf8');
|
|
27
|
+
} else {
|
|
28
|
+
body = event.body;
|
|
29
|
+
}
|
|
26
30
|
return {
|
|
27
31
|
method: utils.getHTTPMethod(event),
|
|
28
32
|
query: query,
|
|
29
|
-
headers: event.headers
|
|
33
|
+
headers: event.headers,
|
|
34
|
+
body: body
|
|
30
35
|
};
|
|
31
36
|
}
|
|
32
37
|
function tRPCOutputToAPIGatewayOutput(event, response) {
|
|
@@ -62,26 +67,12 @@ function awsLambdaRequestHandler(opts) {
|
|
|
62
67
|
...innerOpts
|
|
63
68
|
});
|
|
64
69
|
};
|
|
65
|
-
const [contentTypeHandler, unsupportedMediaTypeError] = selectContentHandlerOrUnsupportedMediaType.selectContentHandlerOrUnsupportedMediaType([
|
|
66
|
-
index.getLambdaHTTPJSONContentTypeHandler()
|
|
67
|
-
], {
|
|
68
|
-
...opts,
|
|
69
|
-
event,
|
|
70
|
-
req
|
|
71
|
-
});
|
|
72
70
|
const response = await resolveHTTPResponse.resolveHTTPResponse({
|
|
73
71
|
...opts,
|
|
74
72
|
createContext,
|
|
75
73
|
req,
|
|
76
74
|
path,
|
|
77
|
-
error:
|
|
78
|
-
async getInput (info) {
|
|
79
|
-
return await contentTypeHandler?.getInputs({
|
|
80
|
-
...opts,
|
|
81
|
-
event,
|
|
82
|
-
req
|
|
83
|
-
}, info);
|
|
84
|
-
},
|
|
75
|
+
error: null,
|
|
85
76
|
onError (o) {
|
|
86
77
|
opts?.onError?.({
|
|
87
78
|
...o,
|
|
@@ -98,6 +89,5 @@ exports.getHTTPMethod = utils.getHTTPMethod;
|
|
|
98
89
|
exports.getPath = utils.getPath;
|
|
99
90
|
exports.isPayloadV1 = utils.isPayloadV1;
|
|
100
91
|
exports.isPayloadV2 = utils.isPayloadV2;
|
|
101
|
-
exports.lambdaEventToHTTPBody = utils.lambdaEventToHTTPBody;
|
|
102
92
|
exports.transformHeaders = utils.transformHeaders;
|
|
103
93
|
exports.awsLambdaRequestHandler = awsLambdaRequestHandler;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { TRPCError } from '../../unstable-core-do-not-import/error/TRPCError.mjs';
|
|
2
2
|
import { resolveHTTPResponse } from '../../unstable-core-do-not-import/http/resolveHTTPResponse.mjs';
|
|
3
3
|
import '../../unstable-core-do-not-import/rootConfig.mjs';
|
|
4
|
-
import { selectContentHandlerOrUnsupportedMediaType } from '../content-handlers/selectContentHandlerOrUnsupportedMediaType.mjs';
|
|
5
|
-
import { getLambdaHTTPJSONContentTypeHandler } from './content-type/json/index.mjs';
|
|
6
4
|
import { getPath, getHTTPMethod, isPayloadV1, transformHeaders, isPayloadV2, UNKNOWN_PAYLOAD_FORMAT_VERSION_ERROR_MESSAGE } from './utils.mjs';
|
|
7
|
-
export { lambdaEventToHTTPBody } from './utils.mjs';
|
|
8
5
|
|
|
9
6
|
/**
|
|
10
7
|
* 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`
|
|
@@ -22,10 +19,17 @@ function lambdaEventToHTTPRequest(event) {
|
|
|
22
19
|
query.append(key, value);
|
|
23
20
|
}
|
|
24
21
|
}
|
|
22
|
+
let body;
|
|
23
|
+
if (event.body && event.isBase64Encoded) {
|
|
24
|
+
body = Buffer.from(event.body, 'base64').toString('utf8');
|
|
25
|
+
} else {
|
|
26
|
+
body = event.body;
|
|
27
|
+
}
|
|
25
28
|
return {
|
|
26
29
|
method: getHTTPMethod(event),
|
|
27
30
|
query: query,
|
|
28
|
-
headers: event.headers
|
|
31
|
+
headers: event.headers,
|
|
32
|
+
body: body
|
|
29
33
|
};
|
|
30
34
|
}
|
|
31
35
|
function tRPCOutputToAPIGatewayOutput(event, response) {
|
|
@@ -61,26 +65,12 @@ function awsLambdaRequestHandler(opts) {
|
|
|
61
65
|
...innerOpts
|
|
62
66
|
});
|
|
63
67
|
};
|
|
64
|
-
const [contentTypeHandler, unsupportedMediaTypeError] = selectContentHandlerOrUnsupportedMediaType([
|
|
65
|
-
getLambdaHTTPJSONContentTypeHandler()
|
|
66
|
-
], {
|
|
67
|
-
...opts,
|
|
68
|
-
event,
|
|
69
|
-
req
|
|
70
|
-
});
|
|
71
68
|
const response = await resolveHTTPResponse({
|
|
72
69
|
...opts,
|
|
73
70
|
createContext,
|
|
74
71
|
req,
|
|
75
72
|
path,
|
|
76
|
-
error:
|
|
77
|
-
async getInput (info) {
|
|
78
|
-
return await contentTypeHandler?.getInputs({
|
|
79
|
-
...opts,
|
|
80
|
-
event,
|
|
81
|
-
req
|
|
82
|
-
}, info);
|
|
83
|
-
},
|
|
73
|
+
error: null,
|
|
84
74
|
onError (o) {
|
|
85
75
|
opts?.onError?.({
|
|
86
76
|
...o,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* ```
|
|
9
9
|
*/
|
|
10
10
|
import type { APIGatewayProxyEvent, APIGatewayProxyEventV2, APIGatewayProxyResult, APIGatewayProxyStructuredResultV2, Context as APIGWContext } from 'aws-lambda';
|
|
11
|
-
import type { AnyRouter,
|
|
11
|
+
import type { AnyRouter, inferRouterContext } from '../../@trpc/server';
|
|
12
12
|
import type { HTTPBaseHandlerOptions, HTTPHeaders, TRPCRequestInfo } from '../../@trpc/server/http';
|
|
13
13
|
export type APIGatewayEvent = APIGatewayProxyEvent | APIGatewayProxyEventV2;
|
|
14
14
|
export type APIGatewayResult = APIGatewayProxyResult | APIGatewayProxyStructuredResultV2;
|
|
@@ -18,7 +18,17 @@ export type CreateAWSLambdaContextOptions<TEvent extends APIGatewayEvent> = {
|
|
|
18
18
|
info: TRPCRequestInfo;
|
|
19
19
|
};
|
|
20
20
|
export type AWSLambdaCreateContextFn<TRouter extends AnyRouter, TEvent extends APIGatewayEvent> = ({ event, context, info, }: CreateAWSLambdaContextOptions<TEvent>) => inferRouterContext<TRouter> | Promise<inferRouterContext<TRouter>>;
|
|
21
|
-
export type AWSLambdaOptions<TRouter extends AnyRouter, TEvent extends APIGatewayEvent> = HTTPBaseHandlerOptions<TRouter, TEvent> &
|
|
21
|
+
export type AWSLambdaOptions<TRouter extends AnyRouter, TEvent extends APIGatewayEvent> = HTTPBaseHandlerOptions<TRouter, TEvent> & ({
|
|
22
|
+
/**
|
|
23
|
+
* @link https://trpc.io/docs/v11/context
|
|
24
|
+
**/
|
|
25
|
+
createContext: AWSLambdaCreateContextFn<TRouter, TEvent>;
|
|
26
|
+
} | {
|
|
27
|
+
/**
|
|
28
|
+
* @link https://trpc.io/docs/v11/context
|
|
29
|
+
**/
|
|
30
|
+
createContext?: AWSLambdaCreateContextFn<TRouter, TEvent>;
|
|
31
|
+
});
|
|
22
32
|
export declare function isPayloadV1(event: APIGatewayEvent): event is APIGatewayProxyEvent;
|
|
23
33
|
export declare function isPayloadV2(event: APIGatewayEvent): event is APIGatewayProxyEventV2;
|
|
24
34
|
export declare function getHTTPMethod(event: APIGatewayEvent): string;
|
|
@@ -27,5 +37,4 @@ export declare function transformHeaders(headers: HTTPHeaders): APIGatewayResult
|
|
|
27
37
|
export type DefinedAPIGatewayPayloadFormats = '1.0' | '2.0';
|
|
28
38
|
export type APIGatewayPayloadFormatVersion = DefinedAPIGatewayPayloadFormats | 'custom';
|
|
29
39
|
export declare const UNKNOWN_PAYLOAD_FORMAT_VERSION_ERROR_MESSAGE: string;
|
|
30
|
-
export declare function lambdaEventToHTTPBody(event: APIGatewayEvent): string | null | undefined;
|
|
31
40
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/adapters/aws-lambda/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,iCAAiC,EACjC,OAAO,IAAI,YAAY,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/adapters/aws-lambda/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,iCAAiC,EACjC,OAAO,IAAI,YAAY,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAIxE,OAAO,KAAK,EACV,sBAAsB,EACtB,WAAW,EACX,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG,sBAAsB,CAAC;AAC5E,MAAM,MAAM,gBAAgB,GACxB,qBAAqB,GACrB,iCAAiC,CAAC;AAEtC,MAAM,MAAM,6BAA6B,CAAC,MAAM,SAAS,eAAe,IAAI;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,YAAY,CAAC;IACtB,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC;AACF,MAAM,MAAM,wBAAwB,CAClC,OAAO,SAAS,SAAS,EACzB,MAAM,SAAS,eAAe,IAC5B,CAAC,EACH,KAAK,EACL,OAAO,EACP,IAAI,GACL,EAAE,6BAA6B,CAAC,MAAM,CAAC,KACpC,kBAAkB,CAAC,OAAO,CAAC,GAC3B,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;AAEzC,MAAM,MAAM,gBAAgB,CAC1B,OAAO,SAAS,SAAS,EACzB,MAAM,SAAS,eAAe,IAE5B,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,GACrC,CACI;IACE;;QAEI;IACJ,aAAa,EAAE,wBAAwB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;CAC1D,GACD;IACE;;QAEI;IACJ,aAAa,CAAC,EAAE,wBAAwB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;CAC3D,CACJ,CAAC;AAER,wBAAgB,WAAW,CACzB,KAAK,EAAE,eAAe,GACrB,KAAK,IAAI,oBAAoB,CAE/B;AACD,wBAAgB,WAAW,CACzB,KAAK,EAAE,eAAe,GACrB,KAAK,IAAI,sBAAsB,CAEjC;AAoBD,wBAAgB,aAAa,CAAC,KAAK,EAAE,eAAe,UAWnD;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,eAAe,UA+B7C;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,WAAW,GACnB,gBAAgB,CAAC,SAAS,CAAC,CAU7B;AAED,MAAM,MAAM,+BAA+B,GAAG,KAAK,GAAG,KAAK,CAAC;AAC5D,MAAM,MAAM,8BAA8B,GACtC,+BAA+B,GAC/B,QAAQ,CAAC;AAEb,eAAO,MAAM,4CAA4C,QAEiD,CAAC"}
|
|
@@ -11,8 +11,7 @@ require('../../unstable-core-do-not-import/rootConfig.js');
|
|
|
11
11
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
12
12
|
* import type { HTTPBaseHandlerOptions } from '@trpc/server/http'
|
|
13
13
|
* ```
|
|
14
|
-
*/ //
|
|
15
|
-
// @trpc/server
|
|
14
|
+
*/ // @trpc/server
|
|
16
15
|
function isPayloadV1(event) {
|
|
17
16
|
return determinePayloadFormat(event) == '1.0';
|
|
18
17
|
}
|
|
@@ -92,20 +91,10 @@ function transformHeaders(headers) {
|
|
|
92
91
|
return obj;
|
|
93
92
|
}
|
|
94
93
|
const UNKNOWN_PAYLOAD_FORMAT_VERSION_ERROR_MESSAGE = 'Custom payload format version not handled by this adapter. Please use either 1.0 or 2.0. More information here' + 'https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html';
|
|
95
|
-
function lambdaEventToHTTPBody(event) {
|
|
96
|
-
let body;
|
|
97
|
-
if (event.body && event.isBase64Encoded) {
|
|
98
|
-
body = Buffer.from(event.body, 'base64').toString('utf8');
|
|
99
|
-
} else {
|
|
100
|
-
body = event.body;
|
|
101
|
-
}
|
|
102
|
-
return body;
|
|
103
|
-
}
|
|
104
94
|
|
|
105
95
|
exports.UNKNOWN_PAYLOAD_FORMAT_VERSION_ERROR_MESSAGE = UNKNOWN_PAYLOAD_FORMAT_VERSION_ERROR_MESSAGE;
|
|
106
96
|
exports.getHTTPMethod = getHTTPMethod;
|
|
107
97
|
exports.getPath = getPath;
|
|
108
98
|
exports.isPayloadV1 = isPayloadV1;
|
|
109
99
|
exports.isPayloadV2 = isPayloadV2;
|
|
110
|
-
exports.lambdaEventToHTTPBody = lambdaEventToHTTPBody;
|
|
111
100
|
exports.transformHeaders = transformHeaders;
|
|
@@ -9,8 +9,7 @@ import '../../unstable-core-do-not-import/rootConfig.mjs';
|
|
|
9
9
|
* import type { AnyTRPCRouter } from '@trpc/server'
|
|
10
10
|
* import type { HTTPBaseHandlerOptions } from '@trpc/server/http'
|
|
11
11
|
* ```
|
|
12
|
-
*/ //
|
|
13
|
-
// @trpc/server
|
|
12
|
+
*/ // @trpc/server
|
|
14
13
|
function isPayloadV1(event) {
|
|
15
14
|
return determinePayloadFormat(event) == '1.0';
|
|
16
15
|
}
|
|
@@ -90,14 +89,5 @@ function transformHeaders(headers) {
|
|
|
90
89
|
return obj;
|
|
91
90
|
}
|
|
92
91
|
const UNKNOWN_PAYLOAD_FORMAT_VERSION_ERROR_MESSAGE = 'Custom payload format version not handled by this adapter. Please use either 1.0 or 2.0. More information here' + 'https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html';
|
|
93
|
-
function lambdaEventToHTTPBody(event) {
|
|
94
|
-
let body;
|
|
95
|
-
if (event.body && event.isBase64Encoded) {
|
|
96
|
-
body = Buffer.from(event.body, 'base64').toString('utf8');
|
|
97
|
-
} else {
|
|
98
|
-
body = event.body;
|
|
99
|
-
}
|
|
100
|
-
return body;
|
|
101
|
-
}
|
|
102
92
|
|
|
103
|
-
export { UNKNOWN_PAYLOAD_FORMAT_VERSION_ERROR_MESSAGE, getHTTPMethod, getPath, isPayloadV1, isPayloadV2,
|
|
93
|
+
export { UNKNOWN_PAYLOAD_FORMAT_VERSION_ERROR_MESSAGE, getHTTPMethod, getPath, isPayloadV1, isPayloadV2, transformHeaders };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../../src/adapters/express.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,KAAK,OAAO,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EACV,8BAA8B,EAC9B,sBAAsB,EACvB,MAAM,aAAa,CAAC;AAGrB,MAAM,MAAM,2BAA2B,GAAG,8BAA8B,CACtE,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,QAAQ,CACjB,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,OAAO,SAAS,SAAS,EAC/D,IAAI,EAAE,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,GACvE,OAAO,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../../src/adapters/express.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,KAAK,OAAO,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EACV,8BAA8B,EAC9B,sBAAsB,EACvB,MAAM,aAAa,CAAC;AAGrB,MAAM,MAAM,2BAA2B,GAAG,8BAA8B,CACtE,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,QAAQ,CACjB,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,OAAO,SAAS,SAAS,EAC/D,IAAI,EAAE,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,GACvE,OAAO,CAAC,OAAO,CAgBjB"}
|
package/dist/adapters/express.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import type { FastifyReply, FastifyRequest } from 'fastify';
|
|
2
2
|
import type { AnyRouter } from '../../@trpc/server';
|
|
3
|
-
import type {
|
|
3
|
+
import type { HTTPBaseHandlerOptions } from '../../@trpc/server/http';
|
|
4
|
+
import type { NodeHTTPCreateContextOption } from '../node-http';
|
|
5
|
+
export type FastifyHandlerOptions<TRouter extends AnyRouter, TRequest extends FastifyRequest, TResponse extends FastifyReply> = HTTPBaseHandlerOptions<TRouter, TRequest> & NodeHTTPCreateContextOption<TRouter, TRequest, TResponse>;
|
|
6
|
+
type FastifyRequestHandlerOptions<TRouter extends AnyRouter, TRequest extends FastifyRequest, TResponse extends FastifyReply> = FastifyHandlerOptions<TRouter, TRequest, TResponse> & {
|
|
7
|
+
req: TRequest;
|
|
8
|
+
res: TResponse;
|
|
9
|
+
path: string;
|
|
10
|
+
};
|
|
4
11
|
export declare function fastifyRequestHandler<TRouter extends AnyRouter, TRequest extends FastifyRequest, TResponse extends FastifyReply>(opts: FastifyRequestHandlerOptions<TRouter, TRequest, TResponse>): Promise<never>;
|
|
12
|
+
export {};
|
|
5
13
|
//# sourceMappingURL=fastifyRequestHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fastifyRequestHandler.d.ts","sourceRoot":"","sources":["../../../src/adapters/fastify/fastifyRequestHandler.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"fastifyRequestHandler.d.ts","sourceRoot":"","sources":["../../../src/adapters/fastify/fastifyRequestHandler.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EACV,sBAAsB,EAKvB,MAAM,yBAAyB,CAAC;AAKjC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAEhE,MAAM,MAAM,qBAAqB,CAC/B,OAAO,SAAS,SAAS,EACzB,QAAQ,SAAS,cAAc,EAC/B,SAAS,SAAS,YAAY,IAC5B,sBAAsB,CAAC,OAAO,EAAE,QAAQ,CAAC,GAC3C,2BAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAE5D,KAAK,4BAA4B,CAC/B,OAAO,SAAS,SAAS,EACzB,QAAQ,SAAS,cAAc,EAC/B,SAAS,SAAS,YAAY,IAC5B,qBAAqB,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,GAAG;IACxD,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,SAAS,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,wBAAsB,qBAAqB,CACzC,OAAO,SAAS,SAAS,EACzB,QAAQ,SAAS,cAAc,EAC/B,SAAS,SAAS,YAAY,EAC9B,IAAI,EAAE,4BAA4B,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,kBAsFjE"}
|
|
@@ -4,8 +4,6 @@ var node_stream = require('node:stream');
|
|
|
4
4
|
var resolveHTTPResponse = require('../../unstable-core-do-not-import/http/resolveHTTPResponse.js');
|
|
5
5
|
var batchStreamFormatter = require('../../unstable-core-do-not-import/http/batchStreamFormatter.js');
|
|
6
6
|
require('../../unstable-core-do-not-import/rootConfig.js');
|
|
7
|
-
var selectContentHandlerOrUnsupportedMediaType = require('../content-handlers/selectContentHandlerOrUnsupportedMediaType.js');
|
|
8
|
-
var index = require('./content-type/json/index.js');
|
|
9
7
|
|
|
10
8
|
async function fastifyRequestHandler(opts) {
|
|
11
9
|
const createContext = async (innerOpts)=>{
|
|
@@ -18,7 +16,8 @@ async function fastifyRequestHandler(opts) {
|
|
|
18
16
|
const req = {
|
|
19
17
|
query,
|
|
20
18
|
method: opts.req.method,
|
|
21
|
-
headers: opts.req.headers
|
|
19
|
+
headers: opts.req.headers,
|
|
20
|
+
body: opts.req.body ?? 'null'
|
|
22
21
|
};
|
|
23
22
|
let resolve;
|
|
24
23
|
const promise = new Promise((r)=>resolve = r);
|
|
@@ -53,16 +52,9 @@ async function fastifyRequestHandler(opts) {
|
|
|
53
52
|
stream.push(formatter(index, string));
|
|
54
53
|
}
|
|
55
54
|
};
|
|
56
|
-
const [contentTypeHandler, unsupportedMediaTypeError] = selectContentHandlerOrUnsupportedMediaType.selectContentHandlerOrUnsupportedMediaType([
|
|
57
|
-
index.getFastifyHTTPJSONContentTypeHandler()
|
|
58
|
-
], opts);
|
|
59
55
|
resolveHTTPResponse.resolveHTTPResponse({
|
|
60
56
|
...opts,
|
|
61
57
|
req,
|
|
62
|
-
error: unsupportedMediaTypeError,
|
|
63
|
-
async getInput (info) {
|
|
64
|
-
return await contentTypeHandler?.getInputs(opts, info);
|
|
65
|
-
},
|
|
66
58
|
createContext,
|
|
67
59
|
onError (o) {
|
|
68
60
|
opts?.onError?.({
|
|
@@ -2,8 +2,6 @@ import { Readable } from 'node:stream';
|
|
|
2
2
|
import { resolveHTTPResponse } from '../../unstable-core-do-not-import/http/resolveHTTPResponse.mjs';
|
|
3
3
|
import { getBatchStreamFormatter } from '../../unstable-core-do-not-import/http/batchStreamFormatter.mjs';
|
|
4
4
|
import '../../unstable-core-do-not-import/rootConfig.mjs';
|
|
5
|
-
import { selectContentHandlerOrUnsupportedMediaType } from '../content-handlers/selectContentHandlerOrUnsupportedMediaType.mjs';
|
|
6
|
-
import { getFastifyHTTPJSONContentTypeHandler } from './content-type/json/index.mjs';
|
|
7
5
|
|
|
8
6
|
async function fastifyRequestHandler(opts) {
|
|
9
7
|
const createContext = async (innerOpts)=>{
|
|
@@ -16,7 +14,8 @@ async function fastifyRequestHandler(opts) {
|
|
|
16
14
|
const req = {
|
|
17
15
|
query,
|
|
18
16
|
method: opts.req.method,
|
|
19
|
-
headers: opts.req.headers
|
|
17
|
+
headers: opts.req.headers,
|
|
18
|
+
body: opts.req.body ?? 'null'
|
|
20
19
|
};
|
|
21
20
|
let resolve;
|
|
22
21
|
const promise = new Promise((r)=>resolve = r);
|
|
@@ -51,16 +50,9 @@ async function fastifyRequestHandler(opts) {
|
|
|
51
50
|
stream.push(formatter(index, string));
|
|
52
51
|
}
|
|
53
52
|
};
|
|
54
|
-
const [contentTypeHandler, unsupportedMediaTypeError] = selectContentHandlerOrUnsupportedMediaType([
|
|
55
|
-
getFastifyHTTPJSONContentTypeHandler()
|
|
56
|
-
], opts);
|
|
57
53
|
resolveHTTPResponse({
|
|
58
54
|
...opts,
|
|
59
55
|
req,
|
|
60
|
-
error: unsupportedMediaTypeError,
|
|
61
|
-
async getInput (info) {
|
|
62
|
-
return await contentTypeHandler?.getInputs(opts, info);
|
|
63
|
-
},
|
|
64
56
|
createContext,
|
|
65
57
|
onError (o) {
|
|
66
58
|
opts?.onError?.({
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* ```
|
|
9
9
|
*/
|
|
10
10
|
import type { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
|
11
|
+
import type { FastifyHandlerOptions } from '.';
|
|
11
12
|
import type { AnyRouter } from '../../@trpc/server';
|
|
12
13
|
import type { NodeHTTPCreateContextFnOptions } from '../node-http';
|
|
13
|
-
import type { FastifyHandlerOptions } from './types';
|
|
14
14
|
export interface FastifyTRPCPluginOptions<TRouter extends AnyRouter> {
|
|
15
15
|
prefix?: string;
|
|
16
16
|
useWSS?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fastifyTRPCPlugin.d.ts","sourceRoot":"","sources":["../../../src/adapters/fastify/fastifyTRPCPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"fastifyTRPCPlugin.d.ts","sourceRoot":"","sources":["../../../src/adapters/fastify/fastifyTRPCPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,GAAG,CAAC;AAE/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AAKnE,MAAM,WAAW,wBAAwB,CAAC,OAAO,SAAS,SAAS;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,qBAAqB,CAAC,OAAO,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;CAC3E;AAED,MAAM,MAAM,2BAA2B,GAAG,8BAA8B,CACtE,cAAc,EACd,YAAY,CACb,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,OAAO,SAAS,SAAS,EACzD,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,wBAAwB,CAAC,OAAO,CAAC,EACvC,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,KAAK,IAAI,QAmC5B"}
|
|
@@ -9,5 +9,9 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { AnyRouter } from '../../@trpc/server';
|
|
11
11
|
import type { FetchHandlerOptions } from './types';
|
|
12
|
-
export
|
|
12
|
+
export type FetchHandlerRequestOptions<TRouter extends AnyRouter> = FetchHandlerOptions<TRouter> & {
|
|
13
|
+
req: Request;
|
|
14
|
+
endpoint: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function fetchRequestHandler<TRouter extends AnyRouter>(opts: FetchHandlerRequestOptions<TRouter>): Promise<Response>;
|
|
13
17
|
//# sourceMappingURL=fetchRequestHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchRequestHandler.d.ts","sourceRoot":"","sources":["../../../src/adapters/fetch/fetchRequestHandler.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"fetchRequestHandler.d.ts","sourceRoot":"","sources":["../../../src/adapters/fetch/fetchRequestHandler.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAYpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,MAAM,0BAA0B,CAAC,OAAO,SAAS,SAAS,IAC9D,mBAAmB,CAAC,OAAO,CAAC,GAAG;IAC7B,GAAG,EAAE,OAAO,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AASJ,wBAAsB,mBAAmB,CAAC,OAAO,SAAS,SAAS,EACjE,IAAI,EAAE,0BAA0B,CAAC,OAAO,CAAC,GACxC,OAAO,CAAC,QAAQ,CAAC,CAuGnB"}
|
|
@@ -4,8 +4,6 @@ var resolveHTTPResponse = require('../../unstable-core-do-not-import/http/resolv
|
|
|
4
4
|
var batchStreamFormatter = require('../../unstable-core-do-not-import/http/batchStreamFormatter.js');
|
|
5
5
|
var toURL = require('../../unstable-core-do-not-import/http/toURL.js');
|
|
6
6
|
require('../../unstable-core-do-not-import/rootConfig.js');
|
|
7
|
-
var selectContentHandlerOrUnsupportedMediaType = require('../content-handlers/selectContentHandlerOrUnsupportedMediaType.js');
|
|
8
|
-
var index = require('./content-type/json/index.js');
|
|
9
7
|
|
|
10
8
|
/**
|
|
11
9
|
* 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`
|
|
@@ -37,7 +35,8 @@ async function fetchRequestHandler(opts) {
|
|
|
37
35
|
const req = {
|
|
38
36
|
query: url.searchParams,
|
|
39
37
|
method: opts.req.method,
|
|
40
|
-
headers: Object.fromEntries(opts.req.headers)
|
|
38
|
+
headers: Object.fromEntries(opts.req.headers),
|
|
39
|
+
body: opts.req.headers.get('content-type')?.startsWith('application/json') ? await opts.req.text() : ''
|
|
41
40
|
};
|
|
42
41
|
let resolve;
|
|
43
42
|
const promise = new Promise((r)=>resolve = r);
|
|
@@ -90,24 +89,11 @@ async function fetchRequestHandler(opts) {
|
|
|
90
89
|
controller.enqueue(encoder.encode(formatter(index, string)));
|
|
91
90
|
}
|
|
92
91
|
};
|
|
93
|
-
const [contentTypeHandler, unsupportedMediaTypeError] = selectContentHandlerOrUnsupportedMediaType.selectContentHandlerOrUnsupportedMediaType([
|
|
94
|
-
index.getFetchHTTPJSONContentTypeHandler()
|
|
95
|
-
], {
|
|
96
|
-
...opts,
|
|
97
|
-
url
|
|
98
|
-
});
|
|
99
92
|
resolveHTTPResponse.resolveHTTPResponse({
|
|
100
93
|
...opts,
|
|
101
94
|
req,
|
|
102
95
|
createContext,
|
|
103
96
|
path,
|
|
104
|
-
error: unsupportedMediaTypeError,
|
|
105
|
-
async getInput (info) {
|
|
106
|
-
return await contentTypeHandler?.getInputs({
|
|
107
|
-
...opts,
|
|
108
|
-
url
|
|
109
|
-
}, info);
|
|
110
|
-
},
|
|
111
97
|
onError (o) {
|
|
112
98
|
opts?.onError?.({
|
|
113
99
|
...o,
|
|
@@ -2,8 +2,6 @@ import { resolveHTTPResponse } from '../../unstable-core-do-not-import/http/reso
|
|
|
2
2
|
import { getBatchStreamFormatter } from '../../unstable-core-do-not-import/http/batchStreamFormatter.mjs';
|
|
3
3
|
import { toURL } from '../../unstable-core-do-not-import/http/toURL.mjs';
|
|
4
4
|
import '../../unstable-core-do-not-import/rootConfig.mjs';
|
|
5
|
-
import { selectContentHandlerOrUnsupportedMediaType } from '../content-handlers/selectContentHandlerOrUnsupportedMediaType.mjs';
|
|
6
|
-
import { getFetchHTTPJSONContentTypeHandler } from './content-type/json/index.mjs';
|
|
7
5
|
|
|
8
6
|
/**
|
|
9
7
|
* 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`
|
|
@@ -35,7 +33,8 @@ async function fetchRequestHandler(opts) {
|
|
|
35
33
|
const req = {
|
|
36
34
|
query: url.searchParams,
|
|
37
35
|
method: opts.req.method,
|
|
38
|
-
headers: Object.fromEntries(opts.req.headers)
|
|
36
|
+
headers: Object.fromEntries(opts.req.headers),
|
|
37
|
+
body: opts.req.headers.get('content-type')?.startsWith('application/json') ? await opts.req.text() : ''
|
|
39
38
|
};
|
|
40
39
|
let resolve;
|
|
41
40
|
const promise = new Promise((r)=>resolve = r);
|
|
@@ -88,24 +87,11 @@ async function fetchRequestHandler(opts) {
|
|
|
88
87
|
controller.enqueue(encoder.encode(formatter(index, string)));
|
|
89
88
|
}
|
|
90
89
|
};
|
|
91
|
-
const [contentTypeHandler, unsupportedMediaTypeError] = selectContentHandlerOrUnsupportedMediaType([
|
|
92
|
-
getFetchHTTPJSONContentTypeHandler()
|
|
93
|
-
], {
|
|
94
|
-
...opts,
|
|
95
|
-
url
|
|
96
|
-
});
|
|
97
90
|
resolveHTTPResponse({
|
|
98
91
|
...opts,
|
|
99
92
|
req,
|
|
100
93
|
createContext,
|
|
101
94
|
path,
|
|
102
|
-
error: unsupportedMediaTypeError,
|
|
103
|
-
async getInput (info) {
|
|
104
|
-
return await contentTypeHandler?.getInputs({
|
|
105
|
-
...opts,
|
|
106
|
-
url
|
|
107
|
-
}, info);
|
|
108
|
-
},
|
|
109
95
|
onError (o) {
|
|
110
96
|
opts?.onError?.({
|
|
111
97
|
...o,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* import type { HTTPBaseHandlerOptions } from '@trpc/server/http'
|
|
8
8
|
* ```
|
|
9
9
|
*/
|
|
10
|
-
import type { AnyRouter,
|
|
10
|
+
import type { AnyRouter, inferRouterContext } from '../../@trpc/server';
|
|
11
11
|
import type { HTTPBaseHandlerOptions, TRPCRequestInfo } from '../../@trpc/server/http';
|
|
12
12
|
export type FetchCreateContextFnOptions = {
|
|
13
13
|
req: Request;
|
|
@@ -15,13 +15,16 @@ export type FetchCreateContextFnOptions = {
|
|
|
15
15
|
info: TRPCRequestInfo;
|
|
16
16
|
};
|
|
17
17
|
export type FetchCreateContextFn<TRouter extends AnyRouter> = (opts: FetchCreateContextFnOptions) => inferRouterContext<TRouter> | Promise<inferRouterContext<TRouter>>;
|
|
18
|
-
export type FetchCreateContextOption<TRouter extends AnyRouter> =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
export type FetchCreateContextOption<TRouter extends AnyRouter> = unknown extends inferRouterContext<TRouter> ? {
|
|
19
|
+
/**
|
|
20
|
+
* @link https://trpc.io/docs/v11/context
|
|
21
|
+
**/
|
|
22
|
+
createContext?: FetchCreateContextFn<TRouter>;
|
|
23
|
+
} : {
|
|
24
|
+
/**
|
|
25
|
+
* @link https://trpc.io/docs/v11/context
|
|
26
|
+
**/
|
|
27
|
+
createContext: FetchCreateContextFn<TRouter>;
|
|
26
28
|
};
|
|
29
|
+
export type FetchHandlerOptions<TRouter extends AnyRouter> = FetchCreateContextOption<TRouter> & HTTPBaseHandlerOptions<TRouter, Request>;
|
|
27
30
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/adapters/fetch/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/adapters/fetch/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,2BAA2B,GAAG;IACxC,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,OAAO,SAAS,SAAS,IAAI,CAC5D,IAAI,EAAE,2BAA2B,KAC9B,kBAAkB,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;AAExE,MAAM,MAAM,wBAAwB,CAAC,OAAO,SAAS,SAAS,IAC5D,OAAO,SAAS,kBAAkB,CAAC,OAAO,CAAC,GACvC;IACE;;QAEI;IACJ,aAAa,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;CAC/C,GACD;IACE;;QAEI;IACJ,aAAa,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;CAC9C,CAAC;AAER,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,SAAS,IACvD,wBAAwB,CAAC,OAAO,CAAC,GAAG,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import type { CreateContextCallback } from '../../@trpc/server';
|
|
2
1
|
import type { ErrorHandlerOptions } from '../../unstable-core-do-not-import/procedure';
|
|
3
2
|
import type { CallerOverride } from '../../unstable-core-do-not-import/procedureBuilder';
|
|
4
3
|
import type { MaybePromise, Simplify } from '../../unstable-core-do-not-import/types';
|
|
4
|
+
type ContextCallback<TContext> = object extends TContext ? {
|
|
5
|
+
createContext?: () => MaybePromise<TContext>;
|
|
6
|
+
} : {
|
|
7
|
+
createContext: () => MaybePromise<TContext>;
|
|
8
|
+
};
|
|
5
9
|
/**
|
|
6
10
|
* Create a caller that works with Next.js React Server Components & Server Actions
|
|
7
11
|
*/
|
|
@@ -15,5 +19,6 @@ export declare function nextAppDirCaller<TContext>(config: Simplify<{
|
|
|
15
19
|
* Called when an error occurs in the handler
|
|
16
20
|
*/
|
|
17
21
|
onError?: (opts: ErrorHandlerOptions<TContext>) => void;
|
|
18
|
-
} &
|
|
22
|
+
} & ContextCallback<TContext>>): CallerOverride<TContext>;
|
|
23
|
+
export {};
|
|
19
24
|
//# sourceMappingURL=nextAppDirCaller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextAppDirCaller.d.ts","sourceRoot":"","sources":["../../../src/adapters/next-app-dir/nextAppDirCaller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nextAppDirCaller.d.ts","sourceRoot":"","sources":["../../../src/adapters/next-app-dir/nextAppDirCaller.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAGvF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AAGzF,OAAO,KAAK,EACV,YAAY,EACZ,QAAQ,EACT,MAAM,yCAAyC,CAAC;AAKjD,KAAK,eAAe,CAAC,QAAQ,IAAI,MAAM,SAAS,QAAQ,GACpD;IACE,aAAa,CAAC,EAAE,MAAM,YAAY,CAAC,QAAQ,CAAC,CAAC;CAC9C,GACD;IACE,aAAa,EAAE,MAAM,YAAY,CAAC,QAAQ,CAAC,CAAC;CAC7C,CAAC;AAEN;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EACvC,MAAM,EAAE,QAAQ,CACd;IACE;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,mBAAmB,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;CACzD,GAAG,eAAe,CAAC,QAAQ,CAAC,CAC9B,GACA,cAAc,CAAC,QAAQ,CAAC,CAsF1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../../src/adapters/next.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAE5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,KAAK,EACV,8BAA8B,EAC9B,sBAAsB,EACvB,MAAM,aAAa,CAAC;AAGrB,MAAM,MAAM,wBAAwB,GAAG,8BAA8B,CACnE,cAAc,EACd,eAAe,CAChB,CAAC;AAEF;;GAEG;AACH,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAE5E,wBAAgB,oBAAoB,CAAC,OAAO,SAAS,SAAS,EAC5D,IAAI,EAAE,sBAAsB,CAAC,OAAO,EAAE,cAAc,EAAE,eAAe,CAAC,GACrE,cAAc,
|
|
1
|
+
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../../src/adapters/next.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAE5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,KAAK,EACV,8BAA8B,EAC9B,sBAAsB,EACvB,MAAM,aAAa,CAAC;AAGrB,MAAM,MAAM,wBAAwB,GAAG,8BAA8B,CACnE,cAAc,EACd,eAAe,CAChB,CAAC;AAEF;;GAEG;AACH,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAE5E,wBAAgB,oBAAoB,CAAC,OAAO,SAAS,SAAS,EAC5D,IAAI,EAAE,sBAAsB,CAAC,OAAO,EAAE,cAAc,EAAE,eAAe,CAAC,GACrE,cAAc,CA8ChB"}
|
package/dist/adapters/next.js
CHANGED