@trpc/server 10.28.0 → 10.28.1

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.
Files changed (138) hide show
  1. package/dist/{TRPCError-61026c9a.js → TRPCError-7c3909ea.js} +47 -47
  2. package/dist/adapters/aws-lambda/index.d.ts +9 -9
  3. package/dist/adapters/aws-lambda/index.d.ts.map +1 -1
  4. package/dist/adapters/aws-lambda/utils.d.ts +37 -37
  5. package/dist/adapters/aws-lambda/utils.d.ts.map +1 -1
  6. package/dist/adapters/express.d.ts +5 -5
  7. package/dist/adapters/express.d.ts.map +1 -1
  8. package/dist/adapters/fastify/fastifyRequestHandler.d.ts +12 -12
  9. package/dist/adapters/fastify/fastifyRequestHandler.d.ts.map +1 -1
  10. package/dist/adapters/fastify/fastifyTRPCPlugin.d.ts +11 -11
  11. package/dist/adapters/fastify/fastifyTRPCPlugin.d.ts.map +1 -1
  12. package/dist/adapters/fastify/index.d.ts +2 -2
  13. package/dist/adapters/fetch/fetchRequestHandler.d.ts +7 -7
  14. package/dist/adapters/fetch/fetchRequestHandler.d.ts.map +1 -1
  15. package/dist/adapters/fetch/index.d.ts +2 -2
  16. package/dist/adapters/fetch/types.d.ts +19 -19
  17. package/dist/adapters/fetch/types.d.ts.map +1 -1
  18. package/dist/adapters/lambda/index.d.ts +11 -11
  19. package/dist/adapters/lambda/index.d.ts.map +1 -1
  20. package/dist/adapters/next.d.ts +5 -5
  21. package/dist/adapters/next.d.ts.map +1 -1
  22. package/dist/adapters/node-http/content-type/form-data/fileUploadHandler.d.ts +69 -69
  23. package/dist/adapters/node-http/content-type/form-data/fileUploadHandler.d.ts.map +1 -1
  24. package/dist/adapters/node-http/content-type/form-data/index.d.ts +23 -23
  25. package/dist/adapters/node-http/content-type/form-data/index.js +1 -3
  26. package/dist/adapters/node-http/content-type/form-data/index.mjs +1 -3
  27. package/dist/adapters/node-http/content-type/form-data/memoryUploadHandler.d.ts +30 -30
  28. package/dist/adapters/node-http/content-type/form-data/memoryUploadHandler.d.ts.map +1 -1
  29. package/dist/adapters/node-http/content-type/form-data/streamSlice.d.ts +10 -10
  30. package/dist/adapters/node-http/content-type/form-data/uploadHandler.d.ts +40 -39
  31. package/dist/adapters/node-http/content-type/form-data/uploadHandler.d.ts.map +1 -1
  32. package/dist/adapters/node-http/content-type/json/getPostBody.d.ts +6 -6
  33. package/dist/adapters/node-http/content-type/json/index.d.ts +1 -1
  34. package/dist/adapters/node-http/index.d.ts +2 -2
  35. package/dist/adapters/node-http/internals/contentType.d.ts +8 -8
  36. package/dist/adapters/node-http/nodeHTTPRequestHandler.d.ts +3 -3
  37. package/dist/adapters/node-http/types.d.ts +63 -63
  38. package/dist/adapters/node-http/types.d.ts.map +1 -1
  39. package/dist/adapters/standalone.d.ts +13 -13
  40. package/dist/adapters/standalone.d.ts.map +1 -1
  41. package/dist/adapters/ws.d.ts +21 -21
  42. package/dist/adapters/ws.d.ts.map +1 -1
  43. package/dist/{codes-b3c262d8.js → codes-1c9ad84e.js} +44 -44
  44. package/dist/{config-1a5a494d.js → config-54786004.js} +168 -168
  45. package/dist/{contentType-f27e4bfc.js → contentType-24c44bba.js} +2 -2
  46. package/dist/{contentType-a75c990c.js → contentType-7354963c.js} +54 -54
  47. package/dist/core/index.d.ts +8 -8
  48. package/dist/core/initTRPC.d.ts +104 -104
  49. package/dist/core/initTRPC.d.ts.map +1 -1
  50. package/dist/core/internals/config.d.ts +74 -74
  51. package/dist/core/internals/config.d.ts.map +1 -1
  52. package/dist/core/internals/getParseFn.d.ts +8 -8
  53. package/dist/core/internals/getParseFn.d.ts.map +1 -1
  54. package/dist/core/internals/mergeRouters.d.ts +17 -17
  55. package/dist/core/internals/mergeRouters.d.ts.map +1 -1
  56. package/dist/core/internals/mergeWithoutOverrides.d.ts +4 -4
  57. package/dist/core/internals/omitPrototype.d.ts +5 -5
  58. package/dist/core/internals/procedureBuilder.d.ts +115 -115
  59. package/dist/core/internals/procedureBuilder.d.ts.map +1 -1
  60. package/dist/core/internals/utils.d.ts +51 -51
  61. package/dist/core/internals/utils.d.ts.map +1 -1
  62. package/dist/core/middleware.d.ts +127 -127
  63. package/dist/core/middleware.d.ts.map +1 -1
  64. package/dist/core/parser.d.ts +27 -27
  65. package/dist/core/parser.d.ts.map +1 -1
  66. package/dist/core/procedure.d.ts +72 -72
  67. package/dist/core/procedure.d.ts.map +1 -1
  68. package/dist/core/router.d.ts +111 -111
  69. package/dist/core/router.d.ts.map +1 -1
  70. package/dist/core/types.d.ts +28 -28
  71. package/dist/core/types.d.ts.map +1 -1
  72. package/dist/deprecated/internals/middlewares.d.ts +51 -51
  73. package/dist/deprecated/internals/middlewares.d.ts.map +1 -1
  74. package/dist/deprecated/internals/procedure.d.ts +95 -95
  75. package/dist/deprecated/internals/procedure.d.ts.map +1 -1
  76. package/dist/deprecated/interop.d.ts +43 -43
  77. package/dist/deprecated/interop.d.ts.map +1 -1
  78. package/dist/deprecated/router.d.ts +203 -203
  79. package/dist/deprecated/router.d.ts.map +1 -1
  80. package/dist/error/TRPCError.d.ts +11 -11
  81. package/dist/error/formatter.d.ts +32 -32
  82. package/dist/error/formatter.d.ts.map +1 -1
  83. package/dist/error/utils.d.ts +5 -5
  84. package/dist/http/contentType.d.ts +28 -28
  85. package/dist/http/contentType.d.ts.map +1 -1
  86. package/dist/http/getHTTPStatusCode.d.ts +23 -23
  87. package/dist/http/getHTTPStatusCode.d.ts.map +1 -1
  88. package/dist/http/index.d.ts +3 -3
  89. package/dist/http/internals/types.d.ts +24 -24
  90. package/dist/http/internals/types.d.ts.map +1 -1
  91. package/dist/http/resolveHTTPResponse.d.ts +16 -16
  92. package/dist/http/types.d.ts +24 -24
  93. package/dist/{index-6d5795e9.js → index-ca9a128e.js} +88 -88
  94. package/dist/index.d.ts +6 -6
  95. package/dist/internals/invert.d.ts +11 -11
  96. package/dist/internals/invert.d.ts.map +1 -1
  97. package/dist/internals/types.d.ts +25 -25
  98. package/dist/internals/types.d.ts.map +1 -1
  99. package/dist/internals.d.ts +9 -9
  100. package/dist/{nodeHTTPRequestHandler-e424955c.js → nodeHTTPRequestHandler-bd47641d.js} +62 -62
  101. package/dist/observable/index.d.ts +4 -4
  102. package/dist/observable/internals/identity.d.ts +1 -1
  103. package/dist/observable/internals/observableToPromise.d.ts +9 -9
  104. package/dist/observable/internals/pipe.d.ts +3 -3
  105. package/dist/observable/observable.d.ts +4 -4
  106. package/dist/observable/observable.d.ts.map +1 -1
  107. package/dist/observable/operators/index.d.ts +3 -3
  108. package/dist/observable/operators/map.d.ts +2 -2
  109. package/dist/observable/operators/share.d.ts +5 -5
  110. package/dist/observable/operators/tap.d.ts +2 -2
  111. package/dist/observable/types.d.ts +28 -28
  112. package/dist/observable/types.d.ts.map +1 -1
  113. package/dist/{observable-a1c2103f.js → observable-15588f28.js} +76 -76
  114. package/dist/{resolveHTTPResponse-4e05c4f8.js → resolveHTTPResponse-ba557d3e.js} +162 -162
  115. package/dist/rpc/codes.d.ts +52 -52
  116. package/dist/rpc/codes.d.ts.map +1 -1
  117. package/dist/rpc/envelopes.d.ts +98 -98
  118. package/dist/rpc/envelopes.d.ts.map +1 -1
  119. package/dist/rpc/index.d.ts +2 -2
  120. package/dist/shared/createProxy/index.d.ts +18 -18
  121. package/dist/shared/createProxy/index.d.ts.map +1 -1
  122. package/dist/shared/getErrorShape.d.ts +14 -14
  123. package/dist/shared/index.d.ts +5 -5
  124. package/dist/shared/internal/serialize.d.ts +29 -29
  125. package/dist/shared/internal/serialize.d.ts.map +1 -1
  126. package/dist/shared/jsonify.d.ts +9 -9
  127. package/dist/shared/jsonify.d.ts.map +1 -1
  128. package/dist/shared/transformTRPCResponse.d.ts +8 -8
  129. package/dist/shared/transformTRPCResponse.d.ts.map +1 -1
  130. package/dist/subscription.d.ts +12 -12
  131. package/dist/{transformTRPCResponse-64a4fd96.js → transformTRPCResponse-7fcbe472.js} +48 -48
  132. package/dist/transformer.d.ts +73 -73
  133. package/dist/transformer.d.ts.map +1 -1
  134. package/dist/types.d.ts +77 -77
  135. package/dist/types.d.ts.map +1 -1
  136. package/package.json +5 -5
  137. package/src/adapters/node-http/content-type/form-data/fileUploadHandler.ts +3 -3
  138. package/src/adapters/node-http/content-type/form-data/uploadHandler.ts +3 -1
@@ -1,24 +1,24 @@
1
- /**
2
- * Copyright 2021 Remix Software Inc.
3
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
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
- */
7
- import { NodeHTTPRequest } from '../../types';
8
- import { UploadHandler } from './uploadHandler';
9
- /**
10
- * Allows you to handle multipart forms (file uploads) for your app.
11
- *
12
- * TODO: Update this comment
13
- * @see https://remix.run/utils/parse-multipart-form-data
14
- */
15
- declare function parseMultipartFormData(request: NodeHTTPRequest, uploadHandler: UploadHandler): Promise<FormData>;
16
- declare function isMultipartFormDataRequest(req: NodeHTTPRequest): boolean;
17
- export declare const nodeHTTPFormDataContentTypeHandler: <TRequest extends NodeHTTPRequest, TResponse extends import("../../types").NodeHTTPResponse>() => import("../../internals/contentType").NodeHTTPContentTypeHandler<TRequest, TResponse>;
18
- export { parseMultipartFormData as experimental_parseMultipartFormData };
19
- export { createMemoryUploadHandler as experimental_createMemoryUploadHandler } from './memoryUploadHandler';
20
- export { createFileUploadHandler as experimental_createFileUploadHandler } from './fileUploadHandler';
21
- export { composeUploadHandlers as experimental_composeUploadHandlers } from './uploadHandler';
22
- export { type UploadHandler } from './uploadHandler';
23
- export { isMultipartFormDataRequest as experimental_isMultipartFormDataRequest };
1
+ /**
2
+ * Copyright 2021 Remix Software Inc.
3
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
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
+ */
7
+ import { NodeHTTPRequest } from '../../types';
8
+ import { UploadHandler } from './uploadHandler';
9
+ /**
10
+ * Allows you to handle multipart forms (file uploads) for your app.
11
+ *
12
+ * TODO: Update this comment
13
+ * @see https://remix.run/utils/parse-multipart-form-data
14
+ */
15
+ declare function parseMultipartFormData(request: NodeHTTPRequest, uploadHandler: UploadHandler): Promise<FormData>;
16
+ declare function isMultipartFormDataRequest(req: NodeHTTPRequest): boolean;
17
+ export declare const nodeHTTPFormDataContentTypeHandler: <TRequest extends NodeHTTPRequest, TResponse extends import("../../types").NodeHTTPResponse>() => import("../../internals/contentType").NodeHTTPContentTypeHandler<TRequest, TResponse>;
18
+ export { parseMultipartFormData as experimental_parseMultipartFormData };
19
+ export { createMemoryUploadHandler as experimental_createMemoryUploadHandler } from './memoryUploadHandler';
20
+ export { createFileUploadHandler as experimental_createFileUploadHandler } from './fileUploadHandler';
21
+ export { composeUploadHandlers as experimental_composeUploadHandlers } from './uploadHandler';
22
+ export { type UploadHandler } from './uploadHandler';
23
+ export { isMultipartFormDataRequest as experimental_isMultipartFormDataRequest };
24
24
  //# sourceMappingURL=index.d.ts.map
@@ -406,9 +406,7 @@ async function* streamMultipart(body, boundary) {
406
406
  }
407
407
  }
408
408
 
409
- /**
410
- * @see https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/formData.ts
411
- */ function composeUploadHandlers(...handlers) {
409
+ function composeUploadHandlers(...handlers) {
412
410
  return async (part)=>{
413
411
  for (const handler of handlers){
414
412
  const value = await handler(part);
@@ -396,9 +396,7 @@ async function* streamMultipart(body, boundary) {
396
396
  }
397
397
  }
398
398
 
399
- /**
400
- * @see https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/formData.ts
401
- */ function composeUploadHandlers(...handlers) {
399
+ function composeUploadHandlers(...handlers) {
402
400
  return async (part)=>{
403
401
  for (const handler of handlers){
404
402
  const value = await handler(part);
@@ -1,31 +1,31 @@
1
- /**
2
- * Copyright 2021 Remix Software Inc.
3
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
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
- */
7
- /**
8
- * @see https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/upload/memoryUploadHandler.ts
9
- */
10
- import { UploadHandler } from './uploadHandler';
11
- export declare type MemoryUploadHandlerFilterArgs = {
12
- filename?: string;
13
- contentType: string;
14
- name: string;
15
- };
16
- export declare type MemoryUploadHandlerOptions = {
17
- /**
18
- * The maximum upload size allowed. If the size is exceeded an error will be thrown.
19
- * Defaults to 3000000B (3MB).
20
- */
21
- maxPartSize?: number;
22
- /**
23
- *
24
- * @param filename
25
- * @param mimetype
26
- * @param encoding
27
- */
28
- filter?(args: MemoryUploadHandlerFilterArgs): boolean | Promise<boolean>;
29
- };
30
- export declare function createMemoryUploadHandler({ filter, maxPartSize, }?: MemoryUploadHandlerOptions): UploadHandler;
1
+ /**
2
+ * Copyright 2021 Remix Software Inc.
3
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
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
+ */
7
+ /**
8
+ * @see https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/upload/memoryUploadHandler.ts
9
+ */
10
+ import { UploadHandler } from './uploadHandler';
11
+ export type MemoryUploadHandlerFilterArgs = {
12
+ filename?: string;
13
+ contentType: string;
14
+ name: string;
15
+ };
16
+ export type MemoryUploadHandlerOptions = {
17
+ /**
18
+ * The maximum upload size allowed. If the size is exceeded an error will be thrown.
19
+ * Defaults to 3000000B (3MB).
20
+ */
21
+ maxPartSize?: number;
22
+ /**
23
+ *
24
+ * @param filename
25
+ * @param mimetype
26
+ * @param encoding
27
+ */
28
+ filter?(args: MemoryUploadHandlerFilterArgs): boolean | Promise<boolean>;
29
+ };
30
+ export declare function createMemoryUploadHandler({ filter, maxPartSize, }?: MemoryUploadHandlerOptions): UploadHandler;
31
31
  //# sourceMappingURL=memoryUploadHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"memoryUploadHandler.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/node-http/content-type/form-data/memoryUploadHandler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,OAAO,EAA4B,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE1E,oBAAY,6BAA6B,GAAG;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,0BAA0B,GAAG;IACvC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,MAAM,CAAC,CAAC,IAAI,EAAE,6BAA6B,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1E,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,EACxC,MAAM,EACN,WAAqB,GACtB,GAAE,0BAA+B,GAAG,aAAa,CAsBjD"}
1
+ {"version":3,"file":"memoryUploadHandler.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/node-http/content-type/form-data/memoryUploadHandler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,OAAO,EAA4B,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE1E,MAAM,MAAM,6BAA6B,GAAG;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,MAAM,CAAC,CAAC,IAAI,EAAE,6BAA6B,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1E,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,EACxC,MAAM,EACN,WAAqB,GACtB,GAAE,0BAA+B,GAAG,aAAa,CAsBjD"}
@@ -1,11 +1,11 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- import { Transform, TransformCallback } from 'node:stream';
4
- declare class SliceStream extends Transform {
5
- #private;
6
- constructor(start?: number, end?: number);
7
- _transform(chunk: any, _: BufferEncoding, done: TransformCallback): void;
8
- }
9
- export declare function streamSlice(start?: number, end?: number): SliceStream;
10
- export {};
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import { Transform, TransformCallback } from 'node:stream';
4
+ declare class SliceStream extends Transform {
5
+ #private;
6
+ constructor(start?: number, end?: number);
7
+ _transform(chunk: any, _: BufferEncoding, done: TransformCallback): void;
8
+ }
9
+ export declare function streamSlice(start?: number, end?: number): SliceStream;
10
+ export {};
11
11
  //# sourceMappingURL=streamSlice.d.ts.map
@@ -1,40 +1,41 @@
1
- /**
2
- * @see https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/formData.ts
3
- */
4
- export declare type UploadHandlerPart = {
5
- name: string;
6
- filename?: string;
7
- contentType: string;
8
- data: AsyncIterable<Uint8Array>;
9
- };
10
- export declare type UploadHandler = (part: UploadHandlerPart) => Promise<File | string | null | undefined>;
11
- export declare function composeUploadHandlers(...handlers: UploadHandler[]): UploadHandler;
12
- export declare class MaxPartSizeExceededError extends Error {
13
- field: string;
14
- maxBytes: number;
15
- constructor(field: string, maxBytes: number);
16
- }
17
- export declare type MemoryUploadHandlerFilterArgs = {
18
- filename?: string;
19
- contentType: string;
20
- name: string;
21
- };
22
- export declare type MemoryUploadHandlerOptions = {
23
- /**
24
- * The maximum upload size allowed. If the size is exceeded an error will be thrown.
25
- * Defaults to 3000000B (3MB).
26
- */
27
- maxPartSize?: number;
28
- /**
29
- *
30
- * @param filename
31
- * @param mimetype
32
- * @param encoding
33
- */
34
- filter?(args: MemoryUploadHandlerFilterArgs): boolean | Promise<boolean>;
35
- };
36
- /**
37
- * @see
38
- */
39
- export declare function createMemoryUploadHandler({ filter, maxPartSize, }?: MemoryUploadHandlerOptions): UploadHandler;
1
+ import { NodeOnDiskFile } from './fileUploadHandler';
2
+ /**
3
+ * @see https://github.com/remix-run/remix/blob/0bcb4a304dd2f08f6032c3bf0c3aa7eb5b976901/packages/remix-server-runtime/formData.ts
4
+ */
5
+ export type UploadHandlerPart = {
6
+ name: string;
7
+ filename?: string;
8
+ contentType: string;
9
+ data: AsyncIterable<Uint8Array>;
10
+ };
11
+ export type UploadHandler = (part: UploadHandlerPart) => Promise<NodeOnDiskFile | File | string | null | undefined>;
12
+ export declare function composeUploadHandlers(...handlers: UploadHandler[]): UploadHandler;
13
+ export declare class MaxPartSizeExceededError extends Error {
14
+ field: string;
15
+ maxBytes: number;
16
+ constructor(field: string, maxBytes: number);
17
+ }
18
+ export type MemoryUploadHandlerFilterArgs = {
19
+ filename?: string;
20
+ contentType: string;
21
+ name: string;
22
+ };
23
+ export type MemoryUploadHandlerOptions = {
24
+ /**
25
+ * The maximum upload size allowed. If the size is exceeded an error will be thrown.
26
+ * Defaults to 3000000B (3MB).
27
+ */
28
+ maxPartSize?: number;
29
+ /**
30
+ *
31
+ * @param filename
32
+ * @param mimetype
33
+ * @param encoding
34
+ */
35
+ filter?(args: MemoryUploadHandlerFilterArgs): boolean | Promise<boolean>;
36
+ };
37
+ /**
38
+ * @see
39
+ */
40
+ export declare function createMemoryUploadHandler({ filter, maxPartSize, }?: MemoryUploadHandlerOptions): UploadHandler;
40
41
  //# sourceMappingURL=uploadHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"uploadHandler.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/node-http/content-type/form-data/uploadHandler.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CACjC,CAAC;AAEF,oBAAY,aAAa,GAAG,CAC1B,IAAI,EAAE,iBAAiB,KACpB,OAAO,CAAC,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAE/C,wBAAgB,qBAAqB,CACnC,GAAG,QAAQ,EAAE,aAAa,EAAE,GAC3B,aAAa,CAWf;AAED,qBAAa,wBAAyB,SAAQ,KAAK;IAC9B,KAAK,EAAE,MAAM;IAAS,QAAQ,EAAE,MAAM;gBAAtC,KAAK,EAAE,MAAM,EAAS,QAAQ,EAAE,MAAM;CAG1D;AAED,oBAAY,6BAA6B,GAAG;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,0BAA0B,GAAG;IACvC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,MAAM,CAAC,CAAC,IAAI,EAAE,6BAA6B,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1E,CAAC;AAEF;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,MAAM,EACN,WAAqB,GACtB,GAAE,0BAA+B,GAAG,aAAa,CAsBjD"}
1
+ {"version":3,"file":"uploadHandler.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/node-http/content-type/form-data/uploadHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,CAC1B,IAAI,EAAE,iBAAiB,KACpB,OAAO,CAAC,cAAc,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAEhE,wBAAgB,qBAAqB,CACnC,GAAG,QAAQ,EAAE,aAAa,EAAE,GAC3B,aAAa,CAWf;AAED,qBAAa,wBAAyB,SAAQ,KAAK;IAC9B,KAAK,EAAE,MAAM;IAAS,QAAQ,EAAE,MAAM;gBAAtC,KAAK,EAAE,MAAM,EAAS,QAAQ,EAAE,MAAM;CAG1D;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,MAAM,CAAC,CAAC,IAAI,EAAE,6BAA6B,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1E,CAAC;AAEF;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,MAAM,EACN,WAAqB,GACtB,GAAE,0BAA+B,GAAG,aAAa,CAsBjD"}
@@ -1,7 +1,7 @@
1
- import { BodyResult } from '../../../../http/contentType';
2
- import { NodeHTTPRequest } from '../../types';
3
- export declare function getPostBody(opts: {
4
- req: NodeHTTPRequest;
5
- maxBodySize?: number;
6
- }): Promise<BodyResult>;
1
+ import { BodyResult } from '../../../../http/contentType';
2
+ import { NodeHTTPRequest } from '../../types';
3
+ export declare function getPostBody(opts: {
4
+ req: NodeHTTPRequest;
5
+ maxBodySize?: number;
6
+ }): Promise<BodyResult>;
7
7
  //# sourceMappingURL=getPostBody.d.ts.map
@@ -1,2 +1,2 @@
1
- export declare const nodeHTTPJSONContentTypeHandler: <TRequest extends import("../..").NodeHTTPRequest, TResponse extends import("../..").NodeHTTPResponse>() => import("../../internals/contentType").NodeHTTPContentTypeHandler<TRequest, TResponse>;
1
+ export declare const nodeHTTPJSONContentTypeHandler: <TRequest extends import("../..").NodeHTTPRequest, TResponse extends import("../..").NodeHTTPResponse>() => import("../../internals/contentType").NodeHTTPContentTypeHandler<TRequest, TResponse>;
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- export * from './nodeHTTPRequestHandler';
2
- export * from './types';
1
+ export * from './nodeHTTPRequestHandler';
2
+ export * from './types';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,9 +1,9 @@
1
- import { AnyRouter } from '../../../core';
2
- import { BaseContentTypeHandler } from '../../../http/contentType';
3
- import { NodeHTTPRequest, NodeHTTPRequestHandlerOptions, NodeHTTPResponse } from '../types';
4
- export interface NodeHTTPContentTypeHandler<TRequest extends NodeHTTPRequest, TResponse extends NodeHTTPResponse> extends BaseContentTypeHandler<NodeHTTPRequestHandlerOptions<AnyRouter, TRequest, TResponse> & {
5
- query: URLSearchParams;
6
- }> {
7
- }
8
- export declare function createNodeHTTPContentTypeHandler(contentTypeHandler: NodeHTTPContentTypeHandler<NodeHTTPRequest, NodeHTTPResponse>): <TRequest extends NodeHTTPRequest, TResponse extends NodeHTTPResponse>() => NodeHTTPContentTypeHandler<TRequest, TResponse>;
1
+ import { AnyRouter } from '../../../core';
2
+ import { BaseContentTypeHandler } from '../../../http/contentType';
3
+ import { NodeHTTPRequest, NodeHTTPRequestHandlerOptions, NodeHTTPResponse } from '../types';
4
+ export interface NodeHTTPContentTypeHandler<TRequest extends NodeHTTPRequest, TResponse extends NodeHTTPResponse> extends BaseContentTypeHandler<NodeHTTPRequestHandlerOptions<AnyRouter, TRequest, TResponse> & {
5
+ query: URLSearchParams;
6
+ }> {
7
+ }
8
+ export declare function createNodeHTTPContentTypeHandler(contentTypeHandler: NodeHTTPContentTypeHandler<NodeHTTPRequest, NodeHTTPResponse>): <TRequest extends NodeHTTPRequest, TResponse extends NodeHTTPResponse>() => NodeHTTPContentTypeHandler<TRequest, TResponse>;
9
9
  //# sourceMappingURL=contentType.d.ts.map
@@ -1,4 +1,4 @@
1
- import { AnyRouter } from '../../core';
2
- import { NodeHTTPRequest, NodeHTTPRequestHandlerOptions, NodeHTTPResponse } from './types';
3
- export declare function nodeHTTPRequestHandler<TRouter extends AnyRouter, TRequest extends NodeHTTPRequest, TResponse extends NodeHTTPResponse>(opts: NodeHTTPRequestHandlerOptions<TRouter, TRequest, TResponse>): Promise<void>;
1
+ import { AnyRouter } from '../../core';
2
+ import { NodeHTTPRequest, NodeHTTPRequestHandlerOptions, NodeHTTPResponse } from './types';
3
+ export declare function nodeHTTPRequestHandler<TRouter extends AnyRouter, TRequest extends NodeHTTPRequest, TResponse extends NodeHTTPResponse>(opts: NodeHTTPRequestHandlerOptions<TRouter, TRequest, TResponse>): Promise<void>;
4
4
  //# sourceMappingURL=nodeHTTPRequestHandler.d.ts.map
@@ -1,64 +1,64 @@
1
- /// <reference types="node" />
2
- import { IncomingMessage, ServerResponse } from 'http';
3
- import { AnyRouter, inferRouterContext } from '../../core';
4
- import { HTTPBaseHandlerOptions } from '../../http';
5
- import { MaybePromise } from '../../types';
6
- import { NodeHTTPContentTypeHandler } from './internals/contentType';
7
- interface ParsedQs {
8
- [key: string]: undefined | string | string[] | ParsedQs | ParsedQs[];
9
- }
10
- export declare type NodeHTTPRequest = IncomingMessage & {
11
- query?: ParsedQs;
12
- body?: unknown;
13
- };
14
- export declare type NodeHTTPResponse = ServerResponse;
15
- export declare type NodeHTTPCreateContextOption<TRouter extends AnyRouter, TRequest, TResponse> = object extends inferRouterContext<TRouter> ? {
16
- /**
17
- * @link https://trpc.io/docs/context
18
- **/
19
- createContext?: NodeHTTPCreateContextFn<TRouter, TRequest, TResponse>;
20
- } : {
21
- /**
22
- * @link https://trpc.io/docs/context
23
- **/
24
- createContext: NodeHTTPCreateContextFn<TRouter, TRequest, TResponse>;
25
- };
26
- /**
27
- * @internal
28
- */
29
- interface ConnectMiddleware<TRequest extends NodeHTTPRequest = NodeHTTPRequest, TResponse extends NodeHTTPResponse = NodeHTTPResponse> {
30
- (req: TRequest, res: TResponse, next: (err?: any) => any): void;
31
- }
32
- export declare type NodeHTTPHandlerOptions<TRouter extends AnyRouter, TRequest extends NodeHTTPRequest, TResponse extends NodeHTTPResponse> = HTTPBaseHandlerOptions<TRouter, TRequest> & {
33
- /**
34
- * By default, http `OPTIONS` requests are not handled, and CORS headers are not returned.
35
- *
36
- * This can be used to handle them manually or via the `cors` npm package: https://www.npmjs.com/package/cors
37
- *
38
- * ```ts
39
- * import cors from 'cors'
40
- *
41
- * nodeHTTPRequestHandler({
42
- * cors: cors()
43
- * })
44
- * ```
45
- *
46
- * You can also use it for other needs which a connect/node.js compatible middleware can solve,
47
- * though you might wish to consider an alternative solution like the Express adapter if your needs are complex.
48
- */
49
- middleware?: ConnectMiddleware;
50
- maxBodySize?: number;
51
- experimental_contentTypeHandlers?: NodeHTTPContentTypeHandler<TRequest, TResponse>[];
52
- } & NodeHTTPCreateContextOption<TRouter, TRequest, TResponse>;
53
- export declare type NodeHTTPRequestHandlerOptions<TRouter extends AnyRouter, TRequest extends NodeHTTPRequest, TResponse extends NodeHTTPResponse> = {
54
- req: TRequest;
55
- res: TResponse;
56
- path: string;
57
- } & NodeHTTPHandlerOptions<TRouter, TRequest, TResponse>;
58
- export declare type NodeHTTPCreateContextFnOptions<TRequest, TResponse> = {
59
- req: TRequest;
60
- res: TResponse;
61
- };
62
- export declare type NodeHTTPCreateContextFn<TRouter extends AnyRouter, TRequest, TResponse> = (opts: NodeHTTPCreateContextFnOptions<TRequest, TResponse>) => MaybePromise<inferRouterContext<TRouter>>;
63
- export {};
1
+ /// <reference types="node" />
2
+ import { IncomingMessage, ServerResponse } from 'http';
3
+ import { AnyRouter, inferRouterContext } from '../../core';
4
+ import { HTTPBaseHandlerOptions } from '../../http';
5
+ import { MaybePromise } from '../../types';
6
+ import { NodeHTTPContentTypeHandler } from './internals/contentType';
7
+ interface ParsedQs {
8
+ [key: string]: undefined | string | string[] | ParsedQs | ParsedQs[];
9
+ }
10
+ export type NodeHTTPRequest = IncomingMessage & {
11
+ query?: ParsedQs;
12
+ body?: unknown;
13
+ };
14
+ export type NodeHTTPResponse = ServerResponse;
15
+ export type NodeHTTPCreateContextOption<TRouter extends AnyRouter, TRequest, TResponse> = object extends inferRouterContext<TRouter> ? {
16
+ /**
17
+ * @link https://trpc.io/docs/context
18
+ **/
19
+ createContext?: NodeHTTPCreateContextFn<TRouter, TRequest, TResponse>;
20
+ } : {
21
+ /**
22
+ * @link https://trpc.io/docs/context
23
+ **/
24
+ createContext: NodeHTTPCreateContextFn<TRouter, TRequest, TResponse>;
25
+ };
26
+ /**
27
+ * @internal
28
+ */
29
+ interface ConnectMiddleware<TRequest extends NodeHTTPRequest = NodeHTTPRequest, TResponse extends NodeHTTPResponse = NodeHTTPResponse> {
30
+ (req: TRequest, res: TResponse, next: (err?: any) => any): void;
31
+ }
32
+ export type NodeHTTPHandlerOptions<TRouter extends AnyRouter, TRequest extends NodeHTTPRequest, TResponse extends NodeHTTPResponse> = HTTPBaseHandlerOptions<TRouter, TRequest> & {
33
+ /**
34
+ * By default, http `OPTIONS` requests are not handled, and CORS headers are not returned.
35
+ *
36
+ * This can be used to handle them manually or via the `cors` npm package: https://www.npmjs.com/package/cors
37
+ *
38
+ * ```ts
39
+ * import cors from 'cors'
40
+ *
41
+ * nodeHTTPRequestHandler({
42
+ * cors: cors()
43
+ * })
44
+ * ```
45
+ *
46
+ * You can also use it for other needs which a connect/node.js compatible middleware can solve,
47
+ * though you might wish to consider an alternative solution like the Express adapter if your needs are complex.
48
+ */
49
+ middleware?: ConnectMiddleware;
50
+ maxBodySize?: number;
51
+ experimental_contentTypeHandlers?: NodeHTTPContentTypeHandler<TRequest, TResponse>[];
52
+ } & NodeHTTPCreateContextOption<TRouter, TRequest, TResponse>;
53
+ export type NodeHTTPRequestHandlerOptions<TRouter extends AnyRouter, TRequest extends NodeHTTPRequest, TResponse extends NodeHTTPResponse> = {
54
+ req: TRequest;
55
+ res: TResponse;
56
+ path: string;
57
+ } & NodeHTTPHandlerOptions<TRouter, TRequest, TResponse>;
58
+ export type NodeHTTPCreateContextFnOptions<TRequest, TResponse> = {
59
+ req: TRequest;
60
+ res: TResponse;
61
+ };
62
+ export type NodeHTTPCreateContextFn<TRouter extends AnyRouter, TRequest, TResponse> = (opts: NodeHTTPCreateContextFnOptions<TRequest, TResponse>) => MaybePromise<inferRouterContext<TRouter>>;
63
+ export {};
64
64
  //# sourceMappingURL=types.d.ts.map
@@ -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,C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SAAS,CAAC,CAAC;AAE9D,MAAM,MAAM,6BAA6B,CACvC,OAAO,SAAS,SAAS,EACzB,QAAQ,SAAS,eAAe,EAChC,SAAS,SAAS,gBAAgB,IAChC;IACF,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,SAAS,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,sBAAsB,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAEzD,MAAM,MAAM,8BAA8B,CAAC,QAAQ,EAAE,SAAS,IAAI;IAChE,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,SAAS,CAAC;CAChB,CAAC;AACF,MAAM,MAAM,uBAAuB,CACjC,OAAO,SAAS,SAAS,EACzB,QAAQ,EACR,SAAS,IACP,CACF,IAAI,EAAE,8BAA8B,CAAC,QAAQ,EAAE,SAAS,CAAC,KACtD,YAAY,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC"}
@@ -1,14 +1,14 @@
1
- /// <reference types="node" />
2
- import http from 'http';
3
- import { AnyRouter } from '../core';
4
- import { NodeHTTPCreateContextFnOptions, NodeHTTPHandlerOptions } from './node-http';
5
- export declare type CreateHTTPHandlerOptions<TRouter extends AnyRouter> = NodeHTTPHandlerOptions<TRouter, http.IncomingMessage, http.ServerResponse>;
6
- export declare type CreateHTTPContextOptions = NodeHTTPCreateContextFnOptions<http.IncomingMessage, http.ServerResponse>;
7
- export declare function createHTTPHandler<TRouter extends AnyRouter>(opts: CreateHTTPHandlerOptions<TRouter>): (req: http.IncomingMessage, res: http.ServerResponse) => Promise<void>;
8
- export declare function createHTTPServer<TRouter extends AnyRouter>(opts: CreateHTTPHandlerOptions<TRouter>): {
9
- server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
10
- listen: (port?: number, hostname?: string) => {
11
- port: number | undefined;
12
- };
13
- };
1
+ /// <reference types="node" />
2
+ import http from 'http';
3
+ import { AnyRouter } from '../core';
4
+ import { NodeHTTPCreateContextFnOptions, NodeHTTPHandlerOptions } from './node-http';
5
+ export type CreateHTTPHandlerOptions<TRouter extends AnyRouter> = NodeHTTPHandlerOptions<TRouter, http.IncomingMessage, http.ServerResponse>;
6
+ export type CreateHTTPContextOptions = NodeHTTPCreateContextFnOptions<http.IncomingMessage, http.ServerResponse>;
7
+ export declare function createHTTPHandler<TRouter extends AnyRouter>(opts: CreateHTTPHandlerOptions<TRouter>): (req: http.IncomingMessage, res: http.ServerResponse) => Promise<void>;
8
+ export declare function createHTTPServer<TRouter extends AnyRouter>(opts: CreateHTTPHandlerOptions<TRouter>): {
9
+ server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
10
+ listen: (port?: number, hostname?: string) => {
11
+ port: number | undefined;
12
+ };
13
+ };
14
14
  //# sourceMappingURL=standalone.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"standalone.d.ts","sourceRoot":"","sources":["../../src/adapters/standalone.ts"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,EAEvB,MAAM,aAAa,CAAC;AAErB,oBAAY,wBAAwB,CAAC,OAAO,SAAS,SAAS,IAC5D,sBAAsB,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;AAE7E,oBAAY,wBAAwB,GAAG,8BAA8B,CACnE,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,cAAc,CACpB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,OAAO,SAAS,SAAS,EACzD,IAAI,EAAE,wBAAwB,CAAC,OAAO,CAAC,SAEpB,KAAK,eAAe,OAAO,KAAK,cAAc,mBAiBlE;AAED,wBAAgB,gBAAgB,CAAC,OAAO,SAAS,SAAS,EACxD,IAAI,EAAE,wBAAwB,CAAC,OAAO,CAAC;;oBAOrB,MAAM,aAAa,MAAM;;;EAU5C"}
1
+ {"version":3,"file":"standalone.d.ts","sourceRoot":"","sources":["../../src/adapters/standalone.ts"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,EAEvB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,wBAAwB,CAAC,OAAO,SAAS,SAAS,IAC5D,sBAAsB,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;AAE7E,MAAM,MAAM,wBAAwB,GAAG,8BAA8B,CACnE,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,cAAc,CACpB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,OAAO,SAAS,SAAS,EACzD,IAAI,EAAE,wBAAwB,CAAC,OAAO,CAAC,SAEpB,KAAK,eAAe,OAAO,KAAK,cAAc,mBAiBlE;AAED,wBAAgB,gBAAgB,CAAC,OAAO,SAAS,SAAS,EACxD,IAAI,EAAE,wBAAwB,CAAC,OAAO,CAAC;;oBAOrB,MAAM,aAAa,MAAM;;;EAU5C"}
@@ -1,22 +1,22 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- import { IncomingMessage } from 'http';
4
- import ws from 'ws';
5
- import { AnyRouter } from '../core';
6
- import { BaseHandlerOptions } from '../internals/types';
7
- import { TRPCClientOutgoingMessage } from '../rpc';
8
- import { CombinedDataTransformer } from '../transformer';
9
- import { NodeHTTPCreateContextFnOptions, NodeHTTPCreateContextOption } from './node-http';
10
- export declare function parseMessage(obj: unknown, transformer: CombinedDataTransformer): TRPCClientOutgoingMessage;
11
- /**
12
- * Web socket server handler
13
- */
14
- export declare type WSSHandlerOptions<TRouter extends AnyRouter> = BaseHandlerOptions<TRouter, IncomingMessage> & {
15
- wss: ws.Server;
16
- process?: NodeJS.Process;
17
- } & NodeHTTPCreateContextOption<TRouter, IncomingMessage, ws>;
18
- export declare type CreateWSSContextFnOptions = NodeHTTPCreateContextFnOptions<IncomingMessage, ws>;
19
- export declare function applyWSSHandler<TRouter extends AnyRouter>(opts: WSSHandlerOptions<TRouter>): {
20
- broadcastReconnectNotification: () => void;
21
- };
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import { IncomingMessage } from 'http';
4
+ import ws from 'ws';
5
+ import { AnyRouter } from '../core';
6
+ import { BaseHandlerOptions } from '../internals/types';
7
+ import { TRPCClientOutgoingMessage } from '../rpc';
8
+ import { CombinedDataTransformer } from '../transformer';
9
+ import { NodeHTTPCreateContextFnOptions, NodeHTTPCreateContextOption } from './node-http';
10
+ export declare function parseMessage(obj: unknown, transformer: CombinedDataTransformer): TRPCClientOutgoingMessage;
11
+ /**
12
+ * Web socket server handler
13
+ */
14
+ export type WSSHandlerOptions<TRouter extends AnyRouter> = BaseHandlerOptions<TRouter, IncomingMessage> & {
15
+ wss: ws.Server;
16
+ process?: NodeJS.Process;
17
+ } & NodeHTTPCreateContextOption<TRouter, IncomingMessage, ws>;
18
+ export type CreateWSSContextFnOptions = NodeHTTPCreateContextFnOptions<IncomingMessage, ws>;
19
+ export declare function applyWSSHandler<TRouter extends AnyRouter>(opts: WSSHandlerOptions<TRouter>): {
20
+ broadcastReconnectNotification: () => void;
21
+ };
22
22
  //# sourceMappingURL=ws.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ws.d.ts","sourceRoot":"","sources":["../../src/adapters/ws.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EACL,SAAS,EAIV,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAEL,yBAAyB,EAG1B,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,uBAAuB,EAAE,MAAM,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