@trpc/server 11.0.0-alpha-tmp.173 → 11.0.0-alpha-tmp.179
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/aws-lambda/index.d.ts.map +1 -1
- package/dist/adapters/aws-lambda/utils.d.ts +2 -2
- package/dist/adapters/aws-lambda/utils.d.ts.map +1 -1
- package/dist/adapters/fastify/fastifyRequestHandler.d.ts +1 -1
- package/dist/adapters/fastify/fastifyRequestHandler.d.ts.map +1 -1
- package/dist/adapters/fetch/types.d.ts +1 -1
- package/dist/adapters/fetch/types.d.ts.map +1 -1
- package/dist/adapters/next.d.ts +2 -2
- package/dist/adapters/next.d.ts.map +1 -1
- package/dist/adapters/next.js +0 -4
- package/dist/adapters/next.mjs +0 -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/internals/contentType.d.ts +1 -1
- package/dist/adapters/node-http/internals/contentType.d.ts.map +1 -1
- package/dist/adapters/node-http/types.d.ts +1 -1
- package/dist/adapters/node-http/types.d.ts.map +1 -1
- package/dist/adapters/ws.d.ts +1 -0
- package/dist/adapters/ws.d.ts.map +1 -1
- package/dist/bundle-analysis.json +37 -49
- package/dist/http.d.ts.map +1 -1
- package/package.json +3 -9
- package/src/adapters/aws-lambda/index.ts +6 -6
- package/src/adapters/aws-lambda/utils.ts +2 -2
- package/src/adapters/fastify/fastifyRequestHandler.ts +2 -2
- package/src/adapters/fetch/fetchRequestHandler.ts +1 -1
- package/src/adapters/fetch/types.ts +1 -1
- package/src/adapters/next.ts +2 -14
- package/src/adapters/node-http/content-type/json/getPostBody.ts +1 -1
- package/src/adapters/node-http/content-type/json/index.ts +1 -1
- package/src/adapters/node-http/internals/contentType.ts +1 -1
- package/src/adapters/node-http/types.ts +1 -1
- package/src/http.ts +0 -1
- package/dist/http.js +0 -14
- package/dist/http.mjs +0 -1
- package/http/index.d.ts +0 -1
- package/http/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/aws-lambda/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/aws-lambda/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,iCAAiC,EACjC,OAAO,IAAI,YAAY,EACxB,MAAM,YAAY,CAAC;AAOpB,OAAO,EACL,eAAe,EAEf,gBAAgB,EAOjB,MAAM,SAAS,CAAC;AAEjB,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,CA4B5D"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { AnyRouter, inferRouterContext } from '@trpc/core';
|
|
2
|
-
import { TRPCRequestInfo } from '@trpc/core/http';
|
|
3
|
-
import type { HTTPHeaders, ResponseMetaFn } from '@trpc/core/http';
|
|
4
2
|
import { OnErrorFunction } from '@trpc/core/internals';
|
|
5
3
|
import type { APIGatewayProxyEvent, APIGatewayProxyEventV2, APIGatewayProxyResult, APIGatewayProxyStructuredResultV2, Context as APIGWContext } from 'aws-lambda';
|
|
4
|
+
import { TRPCRequestInfo } from '../../http';
|
|
5
|
+
import type { HTTPHeaders, ResponseMetaFn } from '../../http';
|
|
6
6
|
export type APIGatewayEvent = APIGatewayProxyEvent | APIGatewayProxyEventV2;
|
|
7
7
|
export type APIGatewayResult = APIGatewayProxyResult | APIGatewayProxyStructuredResultV2;
|
|
8
8
|
export type CreateAWSLambdaContextOptions<TEvent extends APIGatewayEvent> = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/adapters/aws-lambda/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/adapters/aws-lambda/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,iCAAiC,EACjC,OAAO,IAAI,YAAY,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE9D,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,EAA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,CAAC;AAEb,eAAO,MAAM,4CAA4C,QAEiD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnyRouter } from '@trpc/core';
|
|
2
|
-
import { HTTPBaseHandlerOptions } from '@trpc/core/http';
|
|
3
2
|
import { FastifyReply, FastifyRequest } from 'fastify';
|
|
3
|
+
import { HTTPBaseHandlerOptions } from '../../http';
|
|
4
4
|
import { NodeHTTPCreateContextOption } from '../node-http';
|
|
5
5
|
export type FastifyHandlerOptions<TRouter extends AnyRouter, TRequest extends FastifyRequest, TResponse extends FastifyReply> = HTTPBaseHandlerOptions<TRouter, TRequest> & NodeHTTPCreateContextOption<TRouter, TRequest, TResponse>;
|
|
6
6
|
type FastifyRequestHandlerOptions<TRouter extends AnyRouter, TRequest extends FastifyRequest, TResponse extends FastifyReply> = FastifyHandlerOptions<TRouter, TRequest, TResponse> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fastifyRequestHandler.d.ts","sourceRoot":"","sources":["../../../src/adapters/fastify/fastifyRequestHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,
|
|
1
|
+
{"version":3,"file":"fastifyRequestHandler.d.ts","sourceRoot":"","sources":["../../../src/adapters/fastify/fastifyRequestHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAEL,sBAAsB,EAMvB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAE3D,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,kBAyFjE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnyRouter, inferRouterContext } from '@trpc/core';
|
|
2
|
-
import { HTTPBaseHandlerOptions, TRPCRequestInfo } from '
|
|
2
|
+
import { HTTPBaseHandlerOptions, TRPCRequestInfo } from '../../http';
|
|
3
3
|
export type FetchCreateContextFnOptions = {
|
|
4
4
|
req: Request;
|
|
5
5
|
resHeaders: Headers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/adapters/fetch/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/adapters/fetch/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAErE,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"}
|
package/dist/adapters/next.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnyRouter } from '@trpc/core';
|
|
2
|
-
import type { NextApiHandler, NextApiRequest, NextApiResponse } from 'next
|
|
2
|
+
import type { NextApiHandler, NextApiRequest, NextApiResponse } from 'next';
|
|
3
3
|
import { NodeHTTPCreateContextFnOptions, NodeHTTPHandlerOptions } from './node-http';
|
|
4
4
|
export type CreateNextContextOptions = NodeHTTPCreateContextFnOptions<NextApiRequest, NextApiResponse>;
|
|
5
|
-
export type { NextApiHandler, NextApiRequest, NextApiResponse
|
|
5
|
+
export type { NextApiHandler, NextApiRequest, NextApiResponse } from 'next';
|
|
6
6
|
export declare function createNextApiHandler<TRouter extends AnyRouter>(opts: NodeHTTPHandlerOptions<TRouter, NextApiRequest, NextApiResponse>): NextApiHandler;
|
|
7
7
|
//# sourceMappingURL=next.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../../src/adapters/next.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,YAAY,CAAC;AAElD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../../src/adapters/next.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,YAAY,CAAC;AAElD,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAC5E,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,EAEvB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,wBAAwB,GAAG,8BAA8B,CACnE,cAAc,EACd,eAAe,CAChB,CAAC;AACF,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
|
@@ -9,10 +9,6 @@ require('@trpc/core/http');
|
|
|
9
9
|
require('./node-http/content-type/json/index.js');
|
|
10
10
|
require('../contentType-8c16408e.js');
|
|
11
11
|
|
|
12
|
-
// export * from '@trpc/core/http';
|
|
13
|
-
// export * from '@trpc/core/shared';
|
|
14
|
-
// export * from '@trpc/core';
|
|
15
|
-
// export * from './node-http';
|
|
16
12
|
function createNextApiHandler(opts) {
|
|
17
13
|
return async (req, res)=>{
|
|
18
14
|
function getPath() {
|
package/dist/adapters/next.mjs
CHANGED
|
@@ -5,10 +5,6 @@ import '@trpc/core/http';
|
|
|
5
5
|
import './node-http/content-type/json/index.mjs';
|
|
6
6
|
import '../contentType-3194ed5f.mjs';
|
|
7
7
|
|
|
8
|
-
// export * from '@trpc/core/http';
|
|
9
|
-
// export * from '@trpc/core/shared';
|
|
10
|
-
// export * from '@trpc/core';
|
|
11
|
-
// export * from './node-http';
|
|
12
8
|
function createNextApiHandler(opts) {
|
|
13
9
|
return async (req, res)=>{
|
|
14
10
|
function getPath() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPostBody.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/node-http/content-type/json/getPostBody.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"getPostBody.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/node-http/content-type/json/getPostBody.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,wBAAsB,WAAW,CAAC,IAAI,EAAE;IACtC,GAAG,EAAE,eAAe,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,OAAO,CAAC,UAAU,CAAC,CAiCtB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnyRouter } from '@trpc/core';
|
|
2
|
-
import { BaseContentTypeHandler } from '
|
|
2
|
+
import { BaseContentTypeHandler } from '../../../http';
|
|
3
3
|
import { NodeHTTPRequest, NodeHTTPRequestHandlerOptions, NodeHTTPResponse } from '../types';
|
|
4
4
|
export interface NodeHTTPContentTypeHandler<TRequest extends NodeHTTPRequest, TResponse extends NodeHTTPResponse> extends BaseContentTypeHandler<NodeHTTPRequestHandlerOptions<AnyRouter, TRequest, TResponse> & {
|
|
5
5
|
query: URLSearchParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentType.d.ts","sourceRoot":"","sources":["../../../../src/adapters/node-http/internals/contentType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"contentType.d.ts","sourceRoot":"","sources":["../../../../src/adapters/node-http/internals/contentType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EACL,eAAe,EACf,6BAA6B,EAC7B,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,0BAA0B,CACzC,QAAQ,SAAS,eAAe,EAChC,SAAS,SAAS,gBAAgB,CAClC,SAAQ,sBAAsB,CAC5B,6BAA6B,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,GAAG;IAC9D,KAAK,EAAE,eAAe,CAAC;CACxB,CACF;CAAG;AAEN,wBAAgB,gCAAgC,CAC9C,kBAAkB,EAAE,0BAA0B,CAC5C,eAAe,EACf,gBAAgB,CACjB,+HAOF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { IncomingMessage, ServerResponse } from 'http';
|
|
3
3
|
import { AnyRouter, inferRouterContext, MaybePromise } from '@trpc/core';
|
|
4
|
-
import { HTTPBaseHandlerOptions, TRPCRequestInfo } from '
|
|
4
|
+
import { HTTPBaseHandlerOptions, TRPCRequestInfo } from '../../http';
|
|
5
5
|
import { NodeHTTPContentTypeHandler } from './internals/contentType';
|
|
6
6
|
interface ParsedQs {
|
|
7
7
|
[key: string]: ParsedQs | ParsedQs[] | string[] | string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/adapters/node-http/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"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ction": 27.
|
|
2
|
+
"bundleSize": 52022,
|
|
3
|
+
"bundleOrigSize": 71792,
|
|
4
|
+
"bundleReduction": 27.54,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/adapters/ws.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dependents": [
|
|
15
15
|
"/src/adapters/fastify/fastifyTRPCPlugin.ts"
|
|
16
16
|
],
|
|
17
|
-
"percent": 18.
|
|
17
|
+
"percent": 18.46,
|
|
18
18
|
"reduction": 0
|
|
19
19
|
},
|
|
20
20
|
{
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependents": [
|
|
31
31
|
"/src/adapters/node-http/content-type/form-data/index.ts"
|
|
32
32
|
],
|
|
33
|
-
"percent": 11.
|
|
33
|
+
"percent": 11.3,
|
|
34
34
|
"reduction": 7.43
|
|
35
35
|
},
|
|
36
36
|
{
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dependents": [
|
|
47
47
|
"/src/adapters/node-http/content-type/form-data/index.ts"
|
|
48
48
|
],
|
|
49
|
-
"percent": 9.
|
|
49
|
+
"percent": 9.49,
|
|
50
50
|
"reduction": 36.93
|
|
51
51
|
},
|
|
52
52
|
{
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"dependents": [
|
|
71
71
|
"/home/runner/work/trpc/trpc/node_modules/.pnpm/@web3-storage+multipart-parser@1.0.0/node_modules/@web3-storage/multipart-parser/esm/src/index.js"
|
|
72
72
|
],
|
|
73
|
-
"percent": 8.
|
|
73
|
+
"percent": 8.56,
|
|
74
74
|
"reduction": 35.63
|
|
75
75
|
},
|
|
76
76
|
{
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
],
|
|
85
85
|
"removedExports": [],
|
|
86
86
|
"dependents": [],
|
|
87
|
-
"percent": 8.
|
|
87
|
+
"percent": 8.37,
|
|
88
88
|
"reduction": 34.46
|
|
89
89
|
},
|
|
90
90
|
{
|
|
@@ -98,13 +98,13 @@
|
|
|
98
98
|
"dependents": [
|
|
99
99
|
"/src/adapters/node-http/index.ts"
|
|
100
100
|
],
|
|
101
|
-
"percent": 6.
|
|
101
|
+
"percent": 6.8,
|
|
102
102
|
"reduction": 13.34
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"id": "/src/adapters/fetch/fetchRequestHandler.ts",
|
|
106
106
|
"size": 3182,
|
|
107
|
-
"origSize":
|
|
107
|
+
"origSize": 3503,
|
|
108
108
|
"renderedExports": [
|
|
109
109
|
"fetchRequestHandler"
|
|
110
110
|
],
|
|
@@ -112,13 +112,13 @@
|
|
|
112
112
|
"dependents": [
|
|
113
113
|
"/src/adapters/fetch/index.ts"
|
|
114
114
|
],
|
|
115
|
-
"percent": 6.
|
|
116
|
-
"reduction": 9.
|
|
115
|
+
"percent": 6.12,
|
|
116
|
+
"reduction": 9.16
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
119
|
"id": "/src/adapters/aws-lambda/utils.ts",
|
|
120
120
|
"size": 2961,
|
|
121
|
-
"origSize":
|
|
121
|
+
"origSize": 4869,
|
|
122
122
|
"renderedExports": [
|
|
123
123
|
"isPayloadV1",
|
|
124
124
|
"isPayloadV2",
|
|
@@ -131,13 +131,13 @@
|
|
|
131
131
|
"dependents": [
|
|
132
132
|
"/src/adapters/aws-lambda/index.ts"
|
|
133
133
|
],
|
|
134
|
-
"percent": 5.
|
|
135
|
-
"reduction": 39.
|
|
134
|
+
"percent": 5.69,
|
|
135
|
+
"reduction": 39.19
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
138
|
"id": "/src/adapters/fastify/fastifyRequestHandler.ts",
|
|
139
139
|
"size": 2559,
|
|
140
|
-
"origSize":
|
|
140
|
+
"origSize": 3584,
|
|
141
141
|
"renderedExports": [
|
|
142
142
|
"fastifyRequestHandler"
|
|
143
143
|
],
|
|
@@ -146,20 +146,20 @@
|
|
|
146
146
|
"/src/adapters/fastify/fastifyTRPCPlugin.ts",
|
|
147
147
|
"/src/adapters/fastify/index.ts"
|
|
148
148
|
],
|
|
149
|
-
"percent": 4.
|
|
150
|
-
"reduction": 28.
|
|
149
|
+
"percent": 4.92,
|
|
150
|
+
"reduction": 28.6
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
"id": "/src/adapters/aws-lambda/index.ts",
|
|
154
154
|
"size": 2141,
|
|
155
|
-
"origSize":
|
|
155
|
+
"origSize": 3240,
|
|
156
156
|
"renderedExports": [
|
|
157
157
|
"awsLambdaRequestHandler"
|
|
158
158
|
],
|
|
159
159
|
"removedExports": [],
|
|
160
160
|
"dependents": [],
|
|
161
|
-
"percent": 4.
|
|
162
|
-
"reduction":
|
|
161
|
+
"percent": 4.12,
|
|
162
|
+
"reduction": 33.92
|
|
163
163
|
},
|
|
164
164
|
{
|
|
165
165
|
"id": "/src/adapters/node-http/content-type/form-data/streamSlice.ts",
|
|
@@ -172,20 +172,20 @@
|
|
|
172
172
|
"dependents": [
|
|
173
173
|
"/src/adapters/node-http/content-type/form-data/fileUploadHandler.ts"
|
|
174
174
|
],
|
|
175
|
-
"percent": 2.
|
|
175
|
+
"percent": 2.68,
|
|
176
176
|
"reduction": 0
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
179
|
"id": "/src/adapters/next.ts",
|
|
180
|
-
"size":
|
|
181
|
-
"origSize":
|
|
180
|
+
"size": 1253,
|
|
181
|
+
"origSize": 1728,
|
|
182
182
|
"renderedExports": [
|
|
183
183
|
"createNextApiHandler"
|
|
184
184
|
],
|
|
185
185
|
"removedExports": [],
|
|
186
186
|
"dependents": [],
|
|
187
|
-
"percent": 2.
|
|
188
|
-
"reduction":
|
|
187
|
+
"percent": 2.41,
|
|
188
|
+
"reduction": 27.49
|
|
189
189
|
},
|
|
190
190
|
{
|
|
191
191
|
"id": "/src/adapters/fastify/fastifyTRPCPlugin.ts",
|
|
@@ -198,13 +198,13 @@
|
|
|
198
198
|
"dependents": [
|
|
199
199
|
"/src/adapters/fastify/index.ts"
|
|
200
200
|
],
|
|
201
|
-
"percent": 2.
|
|
201
|
+
"percent": 2.3,
|
|
202
202
|
"reduction": 36.52
|
|
203
203
|
},
|
|
204
204
|
{
|
|
205
205
|
"id": "/src/adapters/node-http/content-type/json/getPostBody.ts",
|
|
206
206
|
"size": 1097,
|
|
207
|
-
"origSize":
|
|
207
|
+
"origSize": 1098,
|
|
208
208
|
"renderedExports": [
|
|
209
209
|
"getPostBody"
|
|
210
210
|
],
|
|
@@ -212,8 +212,8 @@
|
|
|
212
212
|
"dependents": [
|
|
213
213
|
"/src/adapters/node-http/content-type/json/index.ts"
|
|
214
214
|
],
|
|
215
|
-
"percent": 2.
|
|
216
|
-
"reduction": 0
|
|
215
|
+
"percent": 2.11,
|
|
216
|
+
"reduction": 0.09
|
|
217
217
|
},
|
|
218
218
|
{
|
|
219
219
|
"id": "/src/adapters/node-http/content-type/form-data/uploadHandler.ts",
|
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
"/src/adapters/node-http/content-type/form-data/memoryUploadHandler.ts",
|
|
233
233
|
"/src/adapters/node-http/content-type/form-data/index.ts"
|
|
234
234
|
],
|
|
235
|
-
"percent": 1.
|
|
235
|
+
"percent": 1.4,
|
|
236
236
|
"reduction": 67.43
|
|
237
237
|
},
|
|
238
238
|
{
|
|
@@ -264,7 +264,7 @@
|
|
|
264
264
|
"dependents": [
|
|
265
265
|
"/src/adapters/node-http/content-type/form-data/index.ts"
|
|
266
266
|
],
|
|
267
|
-
"percent": 1.
|
|
267
|
+
"percent": 1.32,
|
|
268
268
|
"reduction": 71.31
|
|
269
269
|
},
|
|
270
270
|
{
|
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
{
|
|
296
296
|
"id": "/src/adapters/node-http/content-type/json/index.ts",
|
|
297
297
|
"size": 271,
|
|
298
|
-
"origSize":
|
|
298
|
+
"origSize": 437,
|
|
299
299
|
"renderedExports": [
|
|
300
300
|
"nodeHTTPJSONContentTypeHandler"
|
|
301
301
|
],
|
|
@@ -304,12 +304,12 @@
|
|
|
304
304
|
"/src/adapters/node-http/nodeHTTPRequestHandler.ts"
|
|
305
305
|
],
|
|
306
306
|
"percent": 0.52,
|
|
307
|
-
"reduction": 37.
|
|
307
|
+
"reduction": 37.99
|
|
308
308
|
},
|
|
309
309
|
{
|
|
310
310
|
"id": "/src/adapters/node-http/internals/contentType.ts",
|
|
311
311
|
"size": 100,
|
|
312
|
-
"origSize":
|
|
312
|
+
"origSize": 795,
|
|
313
313
|
"renderedExports": [
|
|
314
314
|
"createNodeHTTPContentTypeHandler"
|
|
315
315
|
],
|
|
@@ -319,7 +319,7 @@
|
|
|
319
319
|
"/src/adapters/node-http/content-type/form-data/index.ts"
|
|
320
320
|
],
|
|
321
321
|
"percent": 0.19,
|
|
322
|
-
"reduction": 87.
|
|
322
|
+
"reduction": 87.42
|
|
323
323
|
},
|
|
324
324
|
{
|
|
325
325
|
"id": "/src/adapters/fastify/index.ts",
|
|
@@ -355,18 +355,6 @@
|
|
|
355
355
|
"percent": 0,
|
|
356
356
|
"reduction": 100
|
|
357
357
|
},
|
|
358
|
-
{
|
|
359
|
-
"id": "/src/http.ts",
|
|
360
|
-
"size": 0,
|
|
361
|
-
"origSize": 106,
|
|
362
|
-
"renderedExports": [],
|
|
363
|
-
"removedExports": [],
|
|
364
|
-
"dependents": [
|
|
365
|
-
"/src/adapters/node-http/nodeHTTPRequestHandler.ts"
|
|
366
|
-
],
|
|
367
|
-
"percent": 0,
|
|
368
|
-
"reduction": 100
|
|
369
|
-
},
|
|
370
358
|
{
|
|
371
359
|
"id": "/src/index.ts",
|
|
372
360
|
"size": 0,
|
|
@@ -408,5 +396,5 @@
|
|
|
408
396
|
"reduction": 100
|
|
409
397
|
}
|
|
410
398
|
],
|
|
411
|
-
"moduleCount":
|
|
399
|
+
"moduleCount": 28
|
|
412
400
|
}
|
package/dist/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/server",
|
|
3
|
-
"version": "11.0.0-alpha-tmp.
|
|
3
|
+
"version": "11.0.0-alpha-tmp.179+d1cd50814",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -94,11 +94,6 @@
|
|
|
94
94
|
"require": "./dist/adapters/ws.js",
|
|
95
95
|
"default": "./dist/adapters/ws.js"
|
|
96
96
|
},
|
|
97
|
-
"./http": {
|
|
98
|
-
"import": "./dist/http.mjs",
|
|
99
|
-
"require": "./dist/http.js",
|
|
100
|
-
"default": "./dist/http.js"
|
|
101
|
-
},
|
|
102
97
|
"./observable": {
|
|
103
98
|
"import": "./dist/observable.mjs",
|
|
104
99
|
"require": "./dist/observable.js",
|
|
@@ -121,7 +116,6 @@
|
|
|
121
116
|
"README.md",
|
|
122
117
|
"package.json",
|
|
123
118
|
"adapters",
|
|
124
|
-
"http",
|
|
125
119
|
"observable",
|
|
126
120
|
"rpc",
|
|
127
121
|
"shared",
|
|
@@ -131,7 +125,7 @@
|
|
|
131
125
|
"access": "public"
|
|
132
126
|
},
|
|
133
127
|
"dependencies": {
|
|
134
|
-
"@trpc/core": "11.0.0-alpha-tmp.
|
|
128
|
+
"@trpc/core": "11.0.0-alpha-tmp.179+d1cd50814"
|
|
135
129
|
},
|
|
136
130
|
"devDependencies": {
|
|
137
131
|
"@fastify/websocket": "^7.1.2",
|
|
@@ -170,5 +164,5 @@
|
|
|
170
164
|
"funding": [
|
|
171
165
|
"https://trpc.io/sponsor"
|
|
172
166
|
],
|
|
173
|
-
"gitHead": "
|
|
167
|
+
"gitHead": "d1cd50814f10f4a3245de841064e00e9fe180b2f"
|
|
174
168
|
}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { AnyRouter, TRPCError } from '@trpc/core';
|
|
2
|
-
import {
|
|
3
|
-
HTTPRequest,
|
|
4
|
-
ResolveHTTPRequestOptionsContextFn,
|
|
5
|
-
resolveHTTPResponse,
|
|
6
|
-
} from '@trpc/core/http';
|
|
7
|
-
import type { HTTPResponse } from '@trpc/core/http';
|
|
8
2
|
import type {
|
|
9
3
|
APIGatewayProxyEvent,
|
|
10
4
|
APIGatewayProxyEventV2,
|
|
@@ -12,6 +6,12 @@ import type {
|
|
|
12
6
|
APIGatewayProxyStructuredResultV2,
|
|
13
7
|
Context as APIGWContext,
|
|
14
8
|
} from 'aws-lambda';
|
|
9
|
+
import type { HTTPResponse } from '../../http';
|
|
10
|
+
import {
|
|
11
|
+
HTTPRequest,
|
|
12
|
+
ResolveHTTPRequestOptionsContextFn,
|
|
13
|
+
resolveHTTPResponse,
|
|
14
|
+
} from '../../http';
|
|
15
15
|
import {
|
|
16
16
|
APIGatewayEvent,
|
|
17
17
|
APIGatewayResult,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { AnyRouter, inferRouterContext } from '@trpc/core';
|
|
2
2
|
import { TRPCError } from '@trpc/core';
|
|
3
|
-
import { TRPCRequestInfo } from '@trpc/core/http';
|
|
4
|
-
import type { HTTPHeaders, ResponseMetaFn } from '@trpc/core/http';
|
|
5
3
|
import { OnErrorFunction } from '@trpc/core/internals';
|
|
6
4
|
import type {
|
|
7
5
|
APIGatewayProxyEvent,
|
|
@@ -10,6 +8,8 @@ import type {
|
|
|
10
8
|
APIGatewayProxyStructuredResultV2,
|
|
11
9
|
Context as APIGWContext,
|
|
12
10
|
} from 'aws-lambda';
|
|
11
|
+
import { TRPCRequestInfo } from '../../http';
|
|
12
|
+
import type { HTTPHeaders, ResponseMetaFn } from '../../http';
|
|
13
13
|
|
|
14
14
|
export type APIGatewayEvent = APIGatewayProxyEvent | APIGatewayProxyEventV2;
|
|
15
15
|
export type APIGatewayResult =
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Readable } from 'node:stream';
|
|
2
2
|
import { AnyRouter } from '@trpc/core';
|
|
3
|
+
import { FastifyReply, FastifyRequest } from 'fastify';
|
|
3
4
|
import {
|
|
4
5
|
getBatchStreamFormatter,
|
|
5
6
|
HTTPBaseHandlerOptions,
|
|
@@ -8,8 +9,7 @@ import {
|
|
|
8
9
|
ResolveHTTPRequestOptionsContextFn,
|
|
9
10
|
resolveHTTPResponse,
|
|
10
11
|
ResponseChunk,
|
|
11
|
-
} from '
|
|
12
|
-
import { FastifyReply, FastifyRequest } from 'fastify';
|
|
12
|
+
} from '../../http';
|
|
13
13
|
import { NodeHTTPCreateContextOption } from '../node-http';
|
|
14
14
|
|
|
15
15
|
export type FastifyHandlerOptions<
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnyRouter, inferRouterContext } from '@trpc/core';
|
|
2
|
-
import { HTTPBaseHandlerOptions, TRPCRequestInfo } from '
|
|
2
|
+
import { HTTPBaseHandlerOptions, TRPCRequestInfo } from '../../http';
|
|
3
3
|
|
|
4
4
|
export type FetchCreateContextFnOptions = {
|
|
5
5
|
req: Request;
|
package/src/adapters/next.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { AnyRouter, TRPCError } from '@trpc/core';
|
|
2
2
|
import { getErrorShape } from '@trpc/core/shared';
|
|
3
|
-
import type {
|
|
4
|
-
NextApiHandler,
|
|
5
|
-
NextApiRequest,
|
|
6
|
-
NextApiResponse,
|
|
7
|
-
} from 'next/types';
|
|
3
|
+
import type { NextApiHandler, NextApiRequest, NextApiResponse } from 'next';
|
|
8
4
|
import {
|
|
9
5
|
NodeHTTPCreateContextFnOptions,
|
|
10
6
|
NodeHTTPHandlerOptions,
|
|
@@ -15,15 +11,7 @@ export type CreateNextContextOptions = NodeHTTPCreateContextFnOptions<
|
|
|
15
11
|
NextApiRequest,
|
|
16
12
|
NextApiResponse
|
|
17
13
|
>;
|
|
18
|
-
export type {
|
|
19
|
-
NextApiHandler,
|
|
20
|
-
NextApiRequest,
|
|
21
|
-
NextApiResponse,
|
|
22
|
-
} from 'next/types';
|
|
23
|
-
// export * from '@trpc/core/http';
|
|
24
|
-
// export * from '@trpc/core/shared';
|
|
25
|
-
// export * from '@trpc/core';
|
|
26
|
-
// export * from './node-http';
|
|
14
|
+
export type { NextApiHandler, NextApiRequest, NextApiResponse } from 'next';
|
|
27
15
|
|
|
28
16
|
export function createNextApiHandler<TRouter extends AnyRouter>(
|
|
29
17
|
opts: NodeHTTPHandlerOptions<TRouter, NextApiRequest, NextApiResponse>,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IncomingMessage, ServerResponse } from 'http';
|
|
2
2
|
import { AnyRouter, inferRouterContext, MaybePromise } from '@trpc/core';
|
|
3
|
-
import { HTTPBaseHandlerOptions, TRPCRequestInfo } from '
|
|
3
|
+
import { HTTPBaseHandlerOptions, TRPCRequestInfo } from '../../http';
|
|
4
4
|
import { NodeHTTPContentTypeHandler } from './internals/contentType';
|
|
5
5
|
|
|
6
6
|
interface ParsedQs {
|
package/src/http.ts
CHANGED
package/dist/http.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var http = require('@trpc/core/http');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.keys(http).forEach(function (k) {
|
|
10
|
-
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () { return http[k]; }
|
|
13
|
-
});
|
|
14
|
-
});
|
package/dist/http.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@trpc/core/http';
|
package/http/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../dist/http';
|
package/http/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('../dist/http');
|