@trpc/server 11.0.0-alpha-tmp.163 → 11.0.0-alpha-tmp.173

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.
@@ -2,5 +2,6 @@ import { AnyRouter } from '@trpc/core';
2
2
  import type { NextApiHandler, NextApiRequest, NextApiResponse } from 'next/types';
3
3
  import { NodeHTTPCreateContextFnOptions, NodeHTTPHandlerOptions } from './node-http';
4
4
  export type CreateNextContextOptions = NodeHTTPCreateContextFnOptions<NextApiRequest, NextApiResponse>;
5
+ export type { NextApiHandler, NextApiRequest, NextApiResponse, } from 'next/types';
5
6
  export declare function createNextApiHandler<TRouter extends AnyRouter>(opts: NodeHTTPHandlerOptions<TRouter, NextApiRequest, NextApiResponse>): NextApiHandler;
6
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,EACV,cAAc,EACd,cAAc,EACd,eAAe,EAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,EAEvB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,wBAAwB,GAAG,8BAA8B,CACnE,cAAc,EACd,eAAe,CAChB,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,OAAO,SAAS,SAAS,EAC5D,IAAI,EAAE,sBAAsB,CAAC,OAAO,EAAE,cAAc,EAAE,eAAe,CAAC,GACrE,cAAc,CA8ChB"}
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,EACV,cAAc,EACd,cAAc,EACd,eAAe,EAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,EAEvB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,wBAAwB,GAAG,8BAA8B,CACnE,cAAc,EACd,eAAe,CAChB,CAAC;AACF,YAAY,EACV,cAAc,EACd,cAAc,EACd,eAAe,GAChB,MAAM,YAAY,CAAC;AAMpB,wBAAgB,oBAAoB,CAAC,OAAO,SAAS,SAAS,EAC5D,IAAI,EAAE,sBAAsB,CAAC,OAAO,EAAE,cAAc,EAAE,eAAe,CAAC,GACrE,cAAc,CA8ChB"}
@@ -9,6 +9,10 @@ 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';
12
16
  function createNextApiHandler(opts) {
13
17
  return async (req, res)=>{
14
18
  function getPath() {
@@ -5,6 +5,10 @@ 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';
8
12
  function createNextApiHandler(opts) {
9
13
  return async (req, res)=>{
10
14
  function getPath() {
@@ -1,7 +1,7 @@
1
1
  {
2
- "bundleSize": 52040,
3
- "bundleOrigSize": 71917,
4
- "bundleReduction": 27.64,
2
+ "bundleSize": 52159,
3
+ "bundleOrigSize": 72091,
4
+ "bundleReduction": 27.65,
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.45,
17
+ "percent": 18.41,
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.3,
33
+ "percent": 11.27,
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,
49
+ "percent": 9.47,
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.56,
73
+ "percent": 8.54,
74
74
  "reduction": 35.63
75
75
  },
76
76
  {
@@ -84,13 +84,13 @@
84
84
  ],
85
85
  "removedExports": [],
86
86
  "dependents": [],
87
- "percent": 8.36,
87
+ "percent": 8.35,
88
88
  "reduction": 34.46
89
89
  },
90
90
  {
91
91
  "id": "/src/adapters/node-http/nodeHTTPRequestHandler.ts",
92
92
  "size": 3539,
93
- "origSize": 4089,
93
+ "origSize": 4084,
94
94
  "renderedExports": [
95
95
  "nodeHTTPRequestHandler"
96
96
  ],
@@ -98,8 +98,8 @@
98
98
  "dependents": [
99
99
  "/src/adapters/node-http/index.ts"
100
100
  ],
101
- "percent": 6.8,
102
- "reduction": 13.45
101
+ "percent": 6.79,
102
+ "reduction": 13.34
103
103
  },
104
104
  {
105
105
  "id": "/src/adapters/fetch/fetchRequestHandler.ts",
@@ -112,7 +112,7 @@
112
112
  "dependents": [
113
113
  "/src/adapters/fetch/index.ts"
114
114
  ],
115
- "percent": 6.11,
115
+ "percent": 6.1,
116
116
  "reduction": 9.29
117
117
  },
118
118
  {
@@ -131,7 +131,7 @@
131
131
  "dependents": [
132
132
  "/src/adapters/aws-lambda/index.ts"
133
133
  ],
134
- "percent": 5.69,
134
+ "percent": 5.68,
135
135
  "reduction": 39.31
136
136
  },
137
137
  {
@@ -146,7 +146,7 @@
146
146
  "/src/adapters/fastify/fastifyTRPCPlugin.ts",
147
147
  "/src/adapters/fastify/index.ts"
148
148
  ],
149
- "percent": 4.92,
149
+ "percent": 4.91,
150
150
  "reduction": 28.7
151
151
  },
152
152
  {
@@ -158,7 +158,7 @@
158
158
  ],
159
159
  "removedExports": [],
160
160
  "dependents": [],
161
- "percent": 4.11,
161
+ "percent": 4.1,
162
162
  "reduction": 34.12
163
163
  },
164
164
  {
@@ -172,20 +172,20 @@
172
172
  "dependents": [
173
173
  "/src/adapters/node-http/content-type/form-data/fileUploadHandler.ts"
174
174
  ],
175
- "percent": 2.68,
175
+ "percent": 2.67,
176
176
  "reduction": 0
177
177
  },
178
178
  {
179
179
  "id": "/src/adapters/next.ts",
180
- "size": 1253,
181
- "origSize": 1664,
180
+ "size": 1390,
181
+ "origSize": 1891,
182
182
  "renderedExports": [
183
183
  "createNextApiHandler"
184
184
  ],
185
185
  "removedExports": [],
186
186
  "dependents": [],
187
- "percent": 2.41,
188
- "reduction": 24.7
187
+ "percent": 2.66,
188
+ "reduction": 26.49
189
189
  },
190
190
  {
191
191
  "id": "/src/adapters/fastify/fastifyTRPCPlugin.ts",
@@ -198,7 +198,7 @@
198
198
  "dependents": [
199
199
  "/src/adapters/fastify/index.ts"
200
200
  ],
201
- "percent": 2.3,
201
+ "percent": 2.29,
202
202
  "reduction": 36.52
203
203
  },
204
204
  {
@@ -212,7 +212,7 @@
212
212
  "dependents": [
213
213
  "/src/adapters/node-http/content-type/json/index.ts"
214
214
  ],
215
- "percent": 2.11,
215
+ "percent": 2.1,
216
216
  "reduction": 0
217
217
  },
218
218
  {
@@ -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.4,
235
+ "percent": 1.39,
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.32,
267
+ "percent": 1.31,
268
268
  "reduction": 71.31
269
269
  },
270
270
  {
@@ -321,18 +321,6 @@
321
321
  "percent": 0.19,
322
322
  "reduction": 87.45
323
323
  },
324
- {
325
- "id": "/src/index.ts",
326
- "size": 18,
327
- "origSize": 799,
328
- "renderedExports": [
329
- "foo"
330
- ],
331
- "removedExports": [],
332
- "dependents": [],
333
- "percent": 0.03,
334
- "reduction": 97.75
335
- },
336
324
  {
337
325
  "id": "/src/adapters/fastify/index.ts",
338
326
  "size": 0,
@@ -373,6 +361,18 @@
373
361
  "origSize": 106,
374
362
  "renderedExports": [],
375
363
  "removedExports": [],
364
+ "dependents": [
365
+ "/src/adapters/node-http/nodeHTTPRequestHandler.ts"
366
+ ],
367
+ "percent": 0,
368
+ "reduction": 100
369
+ },
370
+ {
371
+ "id": "/src/index.ts",
372
+ "size": 0,
373
+ "origSize": 751,
374
+ "renderedExports": [],
375
+ "removedExports": [],
376
376
  "dependents": [],
377
377
  "percent": 0,
378
378
  "reduction": 100
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file is here to make TypeScript happy.
3
+ *
4
+ * If you need to import anything from here, please open an issue.
5
+ */
6
+ export * from '@trpc/core';
7
+ //# sourceMappingURL=index.core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.core.d.ts","sourceRoot":"","sources":["../src/index.core.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,YAAY,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,23 +1,21 @@
1
- export { TRPCError } from '@trpc/core';
2
- export { initTRPC,
1
+ export { initTRPC, TRPCError,
3
2
  /**
4
3
  * @deprecated use `experimental_trpcMiddleware` instead
5
4
  */
6
- experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware, type inferRouterInputs, type inferRouterOutputs, type inferProcedureInput, type inferProcedureOutput, type inferRouterError, } from '@trpc/core';
5
+ experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware, type inferProcedureInput, type inferProcedureOutput, type inferRouterError, type inferRouterInputs, type inferRouterOutputs, } from './index.core';
7
6
  export type {
8
7
  /**
9
8
  * @deprecated
10
9
  * Use `Awaited<ReturnType<T>>` instead
11
10
  */
12
- inferAsyncReturnType, } from '@trpc/core';
13
- export type { AnyRouter as AnyTRPCRouter, AnyProcedure as AnyTRPCProcedure,
11
+ inferAsyncReturnType, } from './index.core';
12
+ export type {
14
13
  /**
15
- * @deprecated use `AnyTRPCRouter` instead
14
+ * @deprecated use `AnyTRPCProcedure` instead
16
15
  */
17
- AnyRouter,
16
+ AnyProcedure,
18
17
  /**
19
- * @deprecated use `AnyTRPCProcedure` instead
18
+ * @deprecated use `AnyTRPCRouter` instead
20
19
  */
21
- AnyProcedure, } from '@trpc/core';
22
- export declare const foo = "bar";
20
+ AnyRouter, AnyProcedure as AnyTRPCProcedure, AnyRouter as AnyTRPCRouter, } from './index.core';
23
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EACL,QAAQ;AACR;;GAEG;AACH,iCAAiC,EACjC,iCAAiC,IAAI,2BAA2B,EAChE,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,GACtB,MAAM,YAAY,CAAC;AAEpB,YAAY;AACV;;;GAGG;AACH,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,SAAS,IAAI,aAAa,EAC1B,YAAY,IAAI,gBAAgB;AAChC;;GAEG;AACH,SAAS;AACT;;GAEG;AACH,YAAY,GACb,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,SAAS;AACT;;GAEG;AACH,iCAAiC,EACjC,iCAAiC,IAAI,2BAA2B,EAChE,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACxB,MAAM,cAAc,CAAC;AAEtB,YAAY;AACV;;;GAGG;AACH,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAEtB,YAAY;AACV;;GAEG;AACH,YAAY;AACZ;;GAEG;AACH,SAAS,EACT,YAAY,IAAI,gBAAgB,EAChC,SAAS,IAAI,aAAa,GAC3B,MAAM,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var core = require('@trpc/core');
6
6
 
7
- const foo = 'bar';
7
+
8
8
 
9
9
  Object.defineProperty(exports, 'TRPCError', {
10
10
  enumerable: true,
@@ -22,4 +22,3 @@ Object.defineProperty(exports, 'initTRPC', {
22
22
  enumerable: true,
23
23
  get: function () { return core.initTRPC; }
24
24
  });
25
- exports.foo = foo;
package/dist/index.mjs CHANGED
@@ -1,5 +1 @@
1
1
  export { TRPCError, experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware, initTRPC } from '@trpc/core';
2
-
3
- const foo = 'bar';
4
-
5
- export { foo };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/server",
3
- "version": "11.0.0-alpha-tmp.163+f6495f6a1",
3
+ "version": "11.0.0-alpha-tmp.173+6814aa9e0",
4
4
  "description": "The tRPC server library",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -131,7 +131,7 @@
131
131
  "access": "public"
132
132
  },
133
133
  "dependencies": {
134
- "@trpc/core": "11.0.0-alpha-tmp.163+f6495f6a1"
134
+ "@trpc/core": "11.0.0-alpha-tmp.173+6814aa9e0"
135
135
  },
136
136
  "devDependencies": {
137
137
  "@fastify/websocket": "^7.1.2",
@@ -170,5 +170,5 @@
170
170
  "funding": [
171
171
  "https://trpc.io/sponsor"
172
172
  ],
173
- "gitHead": "f6495f6a14491373b56df2fc8383c8fbebfd4225"
173
+ "gitHead": "6814aa9e0e066337d5f18728f6354422393ab290"
174
174
  }
@@ -15,6 +15,15 @@ export type CreateNextContextOptions = NodeHTTPCreateContextFnOptions<
15
15
  NextApiRequest,
16
16
  NextApiResponse
17
17
  >;
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';
18
27
 
19
28
  export function createNextApiHandler<TRouter extends AnyRouter>(
20
29
  opts: NodeHTTPHandlerOptions<TRouter, NextApiRequest, NextApiResponse>,
@@ -7,7 +7,7 @@ import {
7
7
  ResolveHTTPRequestOptionsContextFn,
8
8
  resolveHTTPResponse,
9
9
  ResponseChunk,
10
- } from '@trpc/core/http';
10
+ } from '../../http';
11
11
  import { nodeHTTPJSONContentTypeHandler } from './content-type/json';
12
12
  import { NodeHTTPContentTypeHandler } from './internals/contentType';
13
13
  import {
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file is here to make TypeScript happy.
3
+ *
4
+ * If you need to import anything from here, please open an issue.
5
+ */
6
+ export * from '@trpc/core';
package/src/index.ts CHANGED
@@ -1,17 +1,17 @@
1
- export { TRPCError } from '@trpc/core';
2
1
  export {
3
2
  initTRPC,
3
+ TRPCError,
4
4
  /**
5
5
  * @deprecated use `experimental_trpcMiddleware` instead
6
6
  */
7
7
  experimental_standaloneMiddleware,
8
8
  experimental_standaloneMiddleware as experimental_trpcMiddleware,
9
- type inferRouterInputs,
10
- type inferRouterOutputs,
11
9
  type inferProcedureInput,
12
10
  type inferProcedureOutput,
13
11
  type inferRouterError,
14
- } from '@trpc/core';
12
+ type inferRouterInputs,
13
+ type inferRouterOutputs,
14
+ } from './index.core';
15
15
 
16
16
  export type {
17
17
  /**
@@ -19,19 +19,17 @@ export type {
19
19
  * Use `Awaited<ReturnType<T>>` instead
20
20
  */
21
21
  inferAsyncReturnType,
22
- } from '@trpc/core';
22
+ } from './index.core';
23
23
 
24
24
  export type {
25
- AnyRouter as AnyTRPCRouter,
26
- AnyProcedure as AnyTRPCProcedure,
27
- /**
28
- * @deprecated use `AnyTRPCRouter` instead
29
- */
30
- AnyRouter,
31
25
  /**
32
26
  * @deprecated use `AnyTRPCProcedure` instead
33
27
  */
34
28
  AnyProcedure,
35
- } from '@trpc/core';
36
-
37
- export const foo = 'bar';
29
+ /**
30
+ * @deprecated use `AnyTRPCRouter` instead
31
+ */
32
+ AnyRouter,
33
+ AnyProcedure as AnyTRPCProcedure,
34
+ AnyRouter as AnyTRPCRouter,
35
+ } from './index.core';