@trpc/server 11.0.0-next-alpha.175 → 11.0.0-next-beta.178

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.
@@ -28,12 +28,12 @@ export type AWSLambdaOptions<TRouter extends AnyRouter, TEvent extends APIGatewa
28
28
  responseMeta?: ResponseMetaFn<TRouter>;
29
29
  } & ({
30
30
  /**
31
- * @link https://trpc.io/docs/context
31
+ * @link https://trpc.io/docs/v11/context
32
32
  **/
33
33
  createContext: AWSLambdaCreateContextFn<TRouter, TEvent>;
34
34
  } | {
35
35
  /**
36
- * @link https://trpc.io/docs/context
36
+ * @link https://trpc.io/docs/v11/context
37
37
  **/
38
38
  createContext?: AWSLambdaCreateContextFn<TRouter, TEvent>;
39
39
  });
@@ -18,12 +18,12 @@ export type FetchCreateContextFnOptions = {
18
18
  export type FetchCreateContextFn<TRouter extends AnyRouter> = (opts: FetchCreateContextFnOptions) => inferRouterContext<TRouter> | Promise<inferRouterContext<TRouter>>;
19
19
  export type FetchCreateContextOption<TRouter extends AnyRouter> = unknown extends inferRouterContext<TRouter> ? {
20
20
  /**
21
- * @link https://trpc.io/docs/context
21
+ * @link https://trpc.io/docs/v11/context
22
22
  **/
23
23
  createContext?: FetchCreateContextFn<TRouter>;
24
24
  } : {
25
25
  /**
26
- * @link https://trpc.io/docs/context
26
+ * @link https://trpc.io/docs/v11/context
27
27
  **/
28
28
  createContext: FetchCreateContextFn<TRouter>;
29
29
  };
@@ -14,7 +14,7 @@ import type { UploadHandler } from './uploadHandler';
14
14
  * @param uploadHandler A function that handles file uploads and returns a value to be used in the request body. If uploaded to disk, the returned value is a NodeOnDiskFile. If uploaded to memory, the returned value is a File.
15
15
  * @param maxBodySize The maximum size of the request body in bytes. Defaults to Infinity.
16
16
  *
17
- * @see https://remix.run/utils/parse-multipart-form-data
17
+ * @link https://remix.run/utils/parse-multipart-form-data
18
18
  */
19
19
  declare function parseMultipartFormData(request: NodeHTTPRequest, uploadHandler: UploadHandler, maxBodySize?: number): Promise<FormData>;
20
20
  declare function isMultipartFormDataRequest(req: NodeHTTPRequest): boolean;
@@ -662,7 +662,7 @@ const utfTextDecoder = new TextDecoder('utf-8');
662
662
  * @param uploadHandler A function that handles file uploads and returns a value to be used in the request body. If uploaded to disk, the returned value is a NodeOnDiskFile. If uploaded to memory, the returned value is a File.
663
663
  * @param maxBodySize The maximum size of the request body in bytes. Defaults to Infinity.
664
664
  *
665
- * @see https://remix.run/utils/parse-multipart-form-data
665
+ * @link https://remix.run/utils/parse-multipart-form-data
666
666
  */ async function parseMultipartFormData(request, uploadHandler, maxBodySize = Infinity) {
667
667
  const contentType = request.headers['content-type'] ?? '';
668
668
  const [type, boundary] = contentType.split(/\s*;\s*boundary=/);
@@ -639,7 +639,7 @@ const utfTextDecoder = new TextDecoder('utf-8');
639
639
  * @param uploadHandler A function that handles file uploads and returns a value to be used in the request body. If uploaded to disk, the returned value is a NodeOnDiskFile. If uploaded to memory, the returned value is a File.
640
640
  * @param maxBodySize The maximum size of the request body in bytes. Defaults to Infinity.
641
641
  *
642
- * @see https://remix.run/utils/parse-multipart-form-data
642
+ * @link https://remix.run/utils/parse-multipart-form-data
643
643
  */ async function parseMultipartFormData(request, uploadHandler, maxBodySize = Infinity) {
644
644
  const contentType = request.headers['content-type'] ?? '';
645
645
  const [type, boundary] = contentType.split(/\s*;\s*boundary=/);
@@ -5,7 +5,7 @@
5
5
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6
6
  */
7
7
  /**
8
- * @see https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/upload/memoryUploadHandler.ts
8
+ * @link https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/upload/memoryUploadHandler.ts
9
9
  */
10
10
  import type { UploadHandler } from './uploadHandler';
11
11
  export type MemoryUploadHandlerFilterArgs = {
@@ -1,6 +1,6 @@
1
1
  import type { NodeOnDiskFile } from './fileUploadHandler';
2
2
  /**
3
- * @see https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/formData.ts
3
+ * @link https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/formData.ts
4
4
  */
5
5
  export type UploadHandlerPart = {
6
6
  name: string;
@@ -34,12 +34,12 @@ export type NodeHTTPResponse = ServerResponse & {
34
34
  };
35
35
  export type NodeHTTPCreateContextOption<TRouter extends AnyRouter, TRequest, TResponse> = object extends inferRouterContext<TRouter> ? {
36
36
  /**
37
- * @link https://trpc.io/docs/context
37
+ * @link https://trpc.io/docs/v11/context
38
38
  **/
39
39
  createContext?: NodeHTTPCreateContextFn<TRouter, TRequest, TResponse>;
40
40
  } : {
41
41
  /**
42
- * @link https://trpc.io/docs/context
42
+ * @link https://trpc.io/docs/v11/context
43
43
  **/
44
44
  createContext: NodeHTTPCreateContextFn<TRouter, TRequest, TResponse>;
45
45
  };
@@ -20,12 +20,12 @@ export type CreateWSSContextFn<TRouter extends AnyRouter> = (opts: CreateWSSCont
20
20
  */
21
21
  export type WSSHandlerOptions<TRouter extends AnyRouter> = BaseHandlerOptions<TRouter, IncomingMessage> & (object extends inferRouterContext<TRouter> ? {
22
22
  /**
23
- * @link https://trpc.io/docs/context
23
+ * @link https://trpc.io/docs/v11/context
24
24
  **/
25
25
  createContext?: CreateWSSContextFn<TRouter>;
26
26
  } : {
27
27
  /**
28
- * @link https://trpc.io/docs/context
28
+ * @link https://trpc.io/docs/v11/context
29
29
  **/
30
30
  createContext: CreateWSSContextFn<TRouter>;
31
31
  }) & {
@@ -8,7 +8,7 @@ var core = require('@trpc/core');
8
8
 
9
9
  /**
10
10
  * Importing ws causes a build error
11
- * @see https://github.com/trpc/trpc/pull/5279
11
+ * @link https://github.com/trpc/trpc/pull/5279
12
12
  */ const WEBSOCKET_OPEN = 1; /* ws.WebSocket.OPEN */
13
13
  function applyWSSHandler(opts) {
14
14
  const { wss , createContext , router } = opts;
@@ -4,7 +4,7 @@ import { TRPCError, getErrorShape, getTRPCErrorFromUnknown, transformTRPCRespons
4
4
 
5
5
  /**
6
6
  * Importing ws causes a build error
7
- * @see https://github.com/trpc/trpc/pull/5279
7
+ * @link https://github.com/trpc/trpc/pull/5279
8
8
  */ const WEBSOCKET_OPEN = 1; /* ws.WebSocket.OPEN */
9
9
  function applyWSSHandler(opts) {
10
10
  const { wss , createContext , router } = opts;
@@ -1,12 +1,12 @@
1
1
  {
2
- "bundleSize": 54488,
3
- "bundleOrigSize": 75434,
4
- "bundleReduction": 27.77,
2
+ "bundleSize": 54490,
3
+ "bundleOrigSize": 75456,
4
+ "bundleReduction": 27.79,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/adapters/ws.ts",
8
- "size": 9737,
9
- "origSize": 9121,
8
+ "size": 9738,
9
+ "origSize": 9130,
10
10
  "renderedExports": [
11
11
  "applyWSSHandler"
12
12
  ],
@@ -36,7 +36,7 @@
36
36
  {
37
37
  "id": "/src/adapters/node-http/content-type/form-data/fileUploadHandler.ts",
38
38
  "size": 4939,
39
- "origSize": 7870,
39
+ "origSize": 7871,
40
40
  "renderedExports": [
41
41
  "readableStreamToString",
42
42
  "createFileUploadHandler",
@@ -47,7 +47,7 @@
47
47
  "/src/adapters/node-http/content-type/form-data/index.ts"
48
48
  ],
49
49
  "percent": 9.06,
50
- "reduction": 37.24
50
+ "reduction": 37.25
51
51
  },
52
52
  {
53
53
  "id": "/home/runner/work/trpc/trpc/node_modules/.pnpm/@web3-storage+multipart-parser@1.0.0/node_modules/@web3-storage/multipart-parser/esm/src/search.js",
@@ -75,8 +75,8 @@
75
75
  },
76
76
  {
77
77
  "id": "/src/adapters/node-http/content-type/form-data/index.ts",
78
- "size": 4353,
79
- "origSize": 6714,
78
+ "size": 4354,
79
+ "origSize": 6716,
80
80
  "renderedExports": [
81
81
  "nodeHTTPFormDataContentTypeHandler",
82
82
  "experimental_parseMultipartFormData",
@@ -118,7 +118,7 @@
118
118
  {
119
119
  "id": "/src/adapters/aws-lambda/utils.ts",
120
120
  "size": 3337,
121
- "origSize": 5226,
121
+ "origSize": 5234,
122
122
  "renderedExports": [
123
123
  "isPayloadV1",
124
124
  "isPayloadV2",
@@ -132,7 +132,7 @@
132
132
  "/src/adapters/aws-lambda/index.ts"
133
133
  ],
134
134
  "percent": 6.12,
135
- "reduction": 36.15
135
+ "reduction": 36.24
136
136
  },
137
137
  {
138
138
  "id": "/src/adapters/fastify/fastifyRequestHandler.ts",
@@ -218,7 +218,7 @@
218
218
  {
219
219
  "id": "/src/adapters/node-http/content-type/form-data/uploadHandler.ts",
220
220
  "size": 726,
221
- "origSize": 2234,
221
+ "origSize": 2235,
222
222
  "renderedExports": [
223
223
  "composeUploadHandlers",
224
224
  "MaxPartSizeExceededError",
@@ -233,7 +233,7 @@
233
233
  "/src/adapters/node-http/content-type/form-data/index.ts"
234
234
  ],
235
235
  "percent": 1.33,
236
- "reduction": 67.5
236
+ "reduction": 67.52
237
237
  },
238
238
  {
239
239
  "id": "/home/runner/work/trpc/trpc/node_modules/.pnpm/@web3-storage+multipart-parser@1.0.0/node_modules/@web3-storage/multipart-parser/esm/src/utils.js",
@@ -256,7 +256,7 @@
256
256
  {
257
257
  "id": "/src/adapters/node-http/content-type/form-data/memoryUploadHandler.ts",
258
258
  "size": 685,
259
- "origSize": 2427,
259
+ "origSize": 2428,
260
260
  "renderedExports": [
261
261
  "createMemoryUploadHandler"
262
262
  ],
@@ -265,7 +265,7 @@
265
265
  "/src/adapters/node-http/content-type/form-data/index.ts"
266
266
  ],
267
267
  "percent": 1.26,
268
- "reduction": 71.78
268
+ "reduction": 71.79
269
269
  },
270
270
  {
271
271
  "id": "/src/adapters/standalone.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/server",
3
- "version": "11.0.0-next-alpha.175+2d1b3f6ac",
3
+ "version": "11.0.0-next-beta.178+f6674ef59",
4
4
  "description": "The tRPC server library",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -115,7 +115,7 @@
115
115
  "access": "public"
116
116
  },
117
117
  "dependencies": {
118
- "@trpc/core": "11.0.0-next-alpha.175+2d1b3f6ac"
118
+ "@trpc/core": "11.0.0-next-beta.178+f6674ef59"
119
119
  },
120
120
  "devDependencies": {
121
121
  "@fastify/websocket": "^7.1.2",
@@ -154,5 +154,5 @@
154
154
  "funding": [
155
155
  "https://trpc.io/sponsor"
156
156
  ],
157
- "gitHead": "2d1b3f6ac5bcb646f634bd27cd6ff04155feab8e"
157
+ "gitHead": "f6674ef5901fe558e9f482918fe2b7b2218185cc"
158
158
  }
@@ -61,13 +61,13 @@ export type AWSLambdaOptions<
61
61
  } & (
62
62
  | {
63
63
  /**
64
- * @link https://trpc.io/docs/context
64
+ * @link https://trpc.io/docs/v11/context
65
65
  **/
66
66
  createContext: AWSLambdaCreateContextFn<TRouter, TEvent>;
67
67
  }
68
68
  | {
69
69
  /**
70
- * @link https://trpc.io/docs/context
70
+ * @link https://trpc.io/docs/v11/context
71
71
  **/
72
72
  createContext?: AWSLambdaCreateContextFn<TRouter, TEvent>;
73
73
  }
@@ -30,13 +30,13 @@ export type FetchCreateContextOption<TRouter extends AnyRouter> =
30
30
  unknown extends inferRouterContext<TRouter>
31
31
  ? {
32
32
  /**
33
- * @link https://trpc.io/docs/context
33
+ * @link https://trpc.io/docs/v11/context
34
34
  **/
35
35
  createContext?: FetchCreateContextFn<TRouter>;
36
36
  }
37
37
  : {
38
38
  /**
39
- * @link https://trpc.io/docs/context
39
+ * @link https://trpc.io/docs/v11/context
40
40
  **/
41
41
  createContext: FetchCreateContextFn<TRouter>;
42
42
  };
@@ -8,7 +8,7 @@
8
8
  */
9
9
 
10
10
  /**
11
- * @see https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-node/upload/fileUploadHandler.ts
11
+ * @link https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-node/upload/fileUploadHandler.ts
12
12
  */
13
13
  import { randomBytes } from 'node:crypto';
14
14
  import { createReadStream, createWriteStream, statSync } from 'node:fs';
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  /**
9
- * @see https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/formData.ts
9
+ * @link https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/formData.ts
10
10
  */
11
11
  import * as fs from 'fs/promises';
12
12
  import { Readable } from 'node:stream';
@@ -31,7 +31,7 @@ const utfTextDecoder = new TextDecoder('utf-8');
31
31
  * @param uploadHandler A function that handles file uploads and returns a value to be used in the request body. If uploaded to disk, the returned value is a NodeOnDiskFile. If uploaded to memory, the returned value is a File.
32
32
  * @param maxBodySize The maximum size of the request body in bytes. Defaults to Infinity.
33
33
  *
34
- * @see https://remix.run/utils/parse-multipart-form-data
34
+ * @link https://remix.run/utils/parse-multipart-form-data
35
35
  */
36
36
  async function parseMultipartFormData(
37
37
  request: NodeHTTPRequest,
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  /**
9
- * @see https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/upload/memoryUploadHandler.ts
9
+ * @link https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/upload/memoryUploadHandler.ts
10
10
  */
11
11
  import type { UploadHandler } from './uploadHandler';
12
12
  import { MaxPartSizeExceededError } from './uploadHandler';
@@ -1,7 +1,7 @@
1
1
  import type { NodeOnDiskFile } from './fileUploadHandler';
2
2
 
3
3
  /**
4
- * @see https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/formData.ts
4
+ * @link https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/formData.ts
5
5
  */
6
6
  export type UploadHandlerPart = {
7
7
  name: string;
@@ -47,13 +47,13 @@ export type NodeHTTPCreateContextOption<
47
47
  > = object extends inferRouterContext<TRouter>
48
48
  ? {
49
49
  /**
50
- * @link https://trpc.io/docs/context
50
+ * @link https://trpc.io/docs/v11/context
51
51
  **/
52
52
  createContext?: NodeHTTPCreateContextFn<TRouter, TRequest, TResponse>;
53
53
  }
54
54
  : {
55
55
  /**
56
- * @link https://trpc.io/docs/context
56
+ * @link https://trpc.io/docs/v11/context
57
57
  **/
58
58
  createContext: NodeHTTPCreateContextFn<TRouter, TRequest, TResponse>;
59
59
  };
@@ -24,7 +24,7 @@ import type { NodeHTTPCreateContextFnOptions } from './node-http';
24
24
 
25
25
  /**
26
26
  * Importing ws causes a build error
27
- * @see https://github.com/trpc/trpc/pull/5279
27
+ * @link https://github.com/trpc/trpc/pull/5279
28
28
  */
29
29
  const WEBSOCKET_OPEN = 1; /* ws.WebSocket.OPEN */
30
30
 
@@ -53,13 +53,13 @@ export type WSSHandlerOptions<TRouter extends AnyRouter> = BaseHandlerOptions<
53
53
  (object extends inferRouterContext<TRouter>
54
54
  ? {
55
55
  /**
56
- * @link https://trpc.io/docs/context
56
+ * @link https://trpc.io/docs/v11/context
57
57
  **/
58
58
  createContext?: CreateWSSContextFn<TRouter>;
59
59
  }
60
60
  : {
61
61
  /**
62
- * @link https://trpc.io/docs/context
62
+ * @link https://trpc.io/docs/v11/context
63
63
  **/
64
64
  createContext: CreateWSSContextFn<TRouter>;
65
65
  }) & {