@trpc/server 11.0.0-next-beta.316 → 11.0.0-next-beta.317
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/node-http/content-type/form-data/fileUploadHandler.d.ts +5 -2
- package/dist/adapters/node-http/content-type/form-data/fileUploadHandler.d.ts.map +1 -1
- package/dist/adapters/ws.d.ts +0 -3
- package/dist/adapters/ws.d.ts.map +1 -1
- package/dist/bundle-analysis.json +33 -33
- package/dist/unstable-core-do-not-import/initTRPC.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/initTRPC.js +2 -1
- package/dist/unstable-core-do-not-import/initTRPC.mjs +2 -1
- package/package.json +2 -2
- package/src/adapters/node-http/content-type/form-data/fileUploadHandler.ts +8 -2
- package/src/adapters/ws.ts +0 -1
- package/src/unstable-core-do-not-import/initTRPC.ts +4 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
2
|
import type { UploadHandler } from './uploadHandler';
|
|
4
3
|
export declare function readableStreamToString(stream: ReadableStream<Uint8Array>, encoding?: BufferEncoding): Promise<string>;
|
|
5
4
|
export type FileUploadHandlerFilterArgs = {
|
|
@@ -46,6 +45,9 @@ export type FileUploadHandlerOptions = {
|
|
|
46
45
|
filter?(args: FileUploadHandlerFilterArgs): Promise<boolean> | boolean;
|
|
47
46
|
};
|
|
48
47
|
export declare function createFileUploadHandler({ directory, avoidFileConflicts, file, filter, maxPartSize, }?: FileUploadHandlerOptions): UploadHandler;
|
|
48
|
+
type NodeJSReadableStreamEsque = {
|
|
49
|
+
on(eventName: string | symbol, listener: (...args: any[]) => void): NodeJSReadableStreamEsque;
|
|
50
|
+
};
|
|
49
51
|
export declare class NodeOnDiskFile {
|
|
50
52
|
private filepath;
|
|
51
53
|
type: string;
|
|
@@ -61,10 +63,11 @@ export declare class NodeOnDiskFile {
|
|
|
61
63
|
slice(start?: number, end?: number, type?: string): NodeOnDiskFile;
|
|
62
64
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
63
65
|
stream(): ReadableStream<any>;
|
|
64
|
-
stream():
|
|
66
|
+
stream(): NodeJSReadableStreamEsque;
|
|
65
67
|
text(): Promise<string>;
|
|
66
68
|
readonly [Symbol.toStringTag] = "File";
|
|
67
69
|
remove(): Promise<void>;
|
|
68
70
|
getFilePath(): string;
|
|
69
71
|
}
|
|
72
|
+
export {};
|
|
70
73
|
//# sourceMappingURL=fileUploadHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileUploadHandler.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/node-http/content-type/form-data/fileUploadHandler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fileUploadHandler.d.ts","sourceRoot":"","sources":["../../../../../src/adapters/node-http/content-type/form-data/fileUploadHandler.ts"],"names":[],"mappings":";AAoBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,EAClC,QAAQ,CAAC,EAAE,cAAc,mBAoB1B;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAC1C,IAAI,EAAE,iCAAiC,KACpC,MAAM,GAAG,SAAS,CAAC;AAExB,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;OAEG;IACH,SAAS,CAAC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CAAC;IAGvB,WAAW,IAAI,MAAM;CAGtB"}
|
package/dist/adapters/ws.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
/// <reference types="./types/global" />
|
|
3
|
-
/// <reference types="node" />
|
|
4
2
|
import type { IncomingMessage } from 'http';
|
|
5
3
|
import type ws from 'ws';
|
|
6
4
|
import type { AnyRouter, inferRouterContext } from '../@trpc/server';
|
|
@@ -31,7 +29,6 @@ export type WSConnectionHandlerOptions<TRouter extends AnyRouter> = BaseHandlerO
|
|
|
31
29
|
*/
|
|
32
30
|
export type WSSHandlerOptions<TRouter extends AnyRouter> = WSConnectionHandlerOptions<TRouter> & {
|
|
33
31
|
wss: ws.WebSocketServer;
|
|
34
|
-
process?: NodeJS.Process;
|
|
35
32
|
prefix?: string;
|
|
36
33
|
};
|
|
37
34
|
export declare function getWSConnectionHandler<TRouter extends AnyRouter>(opts: WSConnectionHandlerOptions<TRouter>): (client: ws.WebSocket, req: IncomingMessage) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws.d.ts","sourceRoot":"","sources":["../../src/adapters/ws.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ws.d.ts","sourceRoot":"","sources":["../../src/adapters/ws.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAQrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAY/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAQlE;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,8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|
|
8
8
|
"size": 10170,
|
|
9
|
-
"origSize":
|
|
9
|
+
"origSize": 9668,
|
|
10
10
|
"renderedExports": [
|
|
11
11
|
"getWSConnectionHandler",
|
|
12
12
|
"applyWSSHandler"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dependents": [
|
|
16
16
|
"/src/adapters/fastify/fastifyTRPCPlugin.ts"
|
|
17
17
|
],
|
|
18
|
-
"percent":
|
|
18
|
+
"percent": 10.99,
|
|
19
19
|
"reduction": 0
|
|
20
20
|
},
|
|
21
21
|
{
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
],
|
|
28
28
|
"removedExports": [],
|
|
29
29
|
"dependents": [],
|
|
30
|
-
"percent": 10.
|
|
30
|
+
"percent": 10.24,
|
|
31
31
|
"reduction": 20.86
|
|
32
32
|
},
|
|
33
33
|
{
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
{
|
|
69
69
|
"id": "/src/adapters/node-http/content-type/form-data/fileUploadHandler.ts",
|
|
70
70
|
"size": 4977,
|
|
71
|
-
"origSize":
|
|
71
|
+
"origSize": 8027,
|
|
72
72
|
"renderedExports": [
|
|
73
73
|
"readableStreamToString",
|
|
74
74
|
"createFileUploadHandler",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"/src/adapters/node-http/content-type/form-data/index.ts"
|
|
80
80
|
],
|
|
81
81
|
"percent": 5.38,
|
|
82
|
-
"reduction":
|
|
82
|
+
"reduction": 38
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
"id": "/src/adapters/node-http/content-type/form-data/index.ts",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"dependents": [
|
|
140
140
|
"/src/adapters/aws-lambda/index.ts"
|
|
141
141
|
],
|
|
142
|
-
"percent": 3.
|
|
142
|
+
"percent": 3.57,
|
|
143
143
|
"reduction": 34.98
|
|
144
144
|
},
|
|
145
145
|
{
|
|
@@ -159,6 +159,20 @@
|
|
|
159
159
|
"percent": 3.38,
|
|
160
160
|
"reduction": 0.67
|
|
161
161
|
},
|
|
162
|
+
{
|
|
163
|
+
"id": "/src/unstable-core-do-not-import/initTRPC.ts",
|
|
164
|
+
"size": 2801,
|
|
165
|
+
"origSize": 4689,
|
|
166
|
+
"renderedExports": [
|
|
167
|
+
"initTRPC"
|
|
168
|
+
],
|
|
169
|
+
"removedExports": [],
|
|
170
|
+
"dependents": [
|
|
171
|
+
"/src/unstable-core-do-not-import.ts"
|
|
172
|
+
],
|
|
173
|
+
"percent": 3.03,
|
|
174
|
+
"reduction": 40.26
|
|
175
|
+
},
|
|
162
176
|
{
|
|
163
177
|
"id": "/src/observable/operators.ts",
|
|
164
178
|
"size": 2756,
|
|
@@ -195,20 +209,6 @@
|
|
|
195
209
|
"percent": 2.97,
|
|
196
210
|
"reduction": 45.94
|
|
197
211
|
},
|
|
198
|
-
{
|
|
199
|
-
"id": "/src/unstable-core-do-not-import/initTRPC.ts",
|
|
200
|
-
"size": 2727,
|
|
201
|
-
"origSize": 4603,
|
|
202
|
-
"renderedExports": [
|
|
203
|
-
"initTRPC"
|
|
204
|
-
],
|
|
205
|
-
"removedExports": [],
|
|
206
|
-
"dependents": [
|
|
207
|
-
"/src/unstable-core-do-not-import.ts"
|
|
208
|
-
],
|
|
209
|
-
"percent": 2.95,
|
|
210
|
-
"reduction": 40.76
|
|
211
|
-
},
|
|
212
212
|
{
|
|
213
213
|
"id": "/src/unstable-core-do-not-import/middleware.ts",
|
|
214
214
|
"size": 2627,
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
"dependents": [
|
|
289
289
|
"/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts"
|
|
290
290
|
],
|
|
291
|
-
"percent": 1.
|
|
291
|
+
"percent": 1.77,
|
|
292
292
|
"reduction": 34.79
|
|
293
293
|
},
|
|
294
294
|
{
|
|
@@ -457,7 +457,7 @@
|
|
|
457
457
|
"/src/adapters/node-http/content-type/form-data/fileUploadHandler.ts",
|
|
458
458
|
"/src/adapters/node-http/content-type/form-data/memoryUploadHandler.ts"
|
|
459
459
|
],
|
|
460
|
-
"percent": 0.
|
|
460
|
+
"percent": 0.78,
|
|
461
461
|
"reduction": 67.52
|
|
462
462
|
},
|
|
463
463
|
{
|
|
@@ -590,8 +590,8 @@
|
|
|
590
590
|
],
|
|
591
591
|
"removedExports": [],
|
|
592
592
|
"dependents": [
|
|
593
|
-
"/src/adapters/node-http/content-type/
|
|
594
|
-
"/src/adapters/node-http/content-type/
|
|
593
|
+
"/src/adapters/node-http/content-type/json/index.ts",
|
|
594
|
+
"/src/adapters/node-http/content-type/form-data/index.ts"
|
|
595
595
|
],
|
|
596
596
|
"percent": 0.13,
|
|
597
597
|
"reduction": 86.68
|
|
@@ -690,9 +690,9 @@
|
|
|
690
690
|
"reduction": 100
|
|
691
691
|
},
|
|
692
692
|
{
|
|
693
|
-
"id": "/src/adapters/
|
|
693
|
+
"id": "/src/adapters/fetch/index.ts",
|
|
694
694
|
"size": 0,
|
|
695
|
-
"origSize":
|
|
695
|
+
"origSize": 64,
|
|
696
696
|
"renderedExports": [],
|
|
697
697
|
"removedExports": [],
|
|
698
698
|
"dependents": [],
|
|
@@ -700,9 +700,9 @@
|
|
|
700
700
|
"reduction": 100
|
|
701
701
|
},
|
|
702
702
|
{
|
|
703
|
-
"id": "/src/adapters/
|
|
703
|
+
"id": "/src/adapters/fastify/index.ts",
|
|
704
704
|
"size": 0,
|
|
705
|
-
"origSize":
|
|
705
|
+
"origSize": 78,
|
|
706
706
|
"renderedExports": [],
|
|
707
707
|
"removedExports": [],
|
|
708
708
|
"dependents": [],
|
|
@@ -717,8 +717,8 @@
|
|
|
717
717
|
"removedExports": [],
|
|
718
718
|
"dependents": [
|
|
719
719
|
"/src/adapters/express.ts",
|
|
720
|
-
"/src/adapters/
|
|
721
|
-
"/src/adapters/
|
|
720
|
+
"/src/adapters/standalone.ts",
|
|
721
|
+
"/src/adapters/next.ts"
|
|
722
722
|
],
|
|
723
723
|
"percent": 0,
|
|
724
724
|
"reduction": 100
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initTRPC.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/initTRPC.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAGL,YAAY,EACb,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAErD,KAAK,wBAAwB,CAAC,KAAK,IAAI,KAAK,SAAS,cAAc,CACjE,GAAG,EACH,MAAM,MAAM,CACb,GACG,MAAM,GACN,iBAAiB,CAAC;AACtB,UAAU,oBAAoB,CAAC,QAAQ,SAAS,MAAM,EAAE,KAAK,SAAS,MAAM,CAC1E,SAAQ,OAAO,CACb,IAAI,CACF,UAAU,CAAC;IACT,GAAG,EAAE,QAAQ,CAAC;IACd,IAAI,EAAE,KAAK,CAAC;IACZ,UAAU,EAAE,GAAG,CAAC;IAChB,WAAW,EAAE,GAAG,CAAC;CAClB,CAAC,EACF,QAAQ,GAAG,aAAa,CACzB,CACF;IACD;;;OAGG;IACH,WAAW,CAAC,EAAE,sBAAsB,CAAC;CACtC;AAED,KAAK,eAAe,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAEpE,cAAM,WAAW,CAAC,QAAQ,SAAS,MAAM,EAAE,KAAK,SAAS,MAAM;IAC7D;;;OAGG;IACH,OAAO,CAAC,WAAW,SAAS,MAAM,GAAG,eAAe;IAOpD;;;OAGG;IACH,IAAI,CAAC,QAAQ,SAAS,MAAM;IAI5B;;;OAGG;IACH,MAAM,CAAC,QAAQ,SA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,SAAS,QAAQ,CAAC,gBAAgB,CAAC,GACpD,iBAAiB,GACjB,yBAAyB,QAAQ,CAAC,gBAAgB,CAAC,CAAC;yBAC3C,SAAS,SAAS,QAAQ,CAAC,aAAa,CAAC,GAAG,KAAK,GAAG,IAAI;;;CAoE1E;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,6BAAoB,CAAC"}
|
|
@@ -27,7 +27,8 @@ class TRPCBuilder {
|
|
|
27
27
|
*/ create(opts) {
|
|
28
28
|
const config = {
|
|
29
29
|
transformer: transformer.getDataTransformer(opts?.transformer ?? transformer.defaultTransformer),
|
|
30
|
-
isDev: opts?.isDev ??
|
|
30
|
+
isDev: opts?.isDev ?? // eslint-disable-next-line @typescript-eslint/dot-notation
|
|
31
|
+
globalThis.process?.env['NODE_ENV'] !== 'production',
|
|
31
32
|
allowOutsideOfServer: opts?.allowOutsideOfServer ?? false,
|
|
32
33
|
errorFormatter: opts?.errorFormatter ?? formatter.defaultFormatter,
|
|
33
34
|
isServer: opts?.isServer ?? rootConfig.isServerDefault,
|
|
@@ -25,7 +25,8 @@ class TRPCBuilder {
|
|
|
25
25
|
*/ create(opts) {
|
|
26
26
|
const config = {
|
|
27
27
|
transformer: getDataTransformer(opts?.transformer ?? defaultTransformer),
|
|
28
|
-
isDev: opts?.isDev ??
|
|
28
|
+
isDev: opts?.isDev ?? // eslint-disable-next-line @typescript-eslint/dot-notation
|
|
29
|
+
globalThis.process?.env['NODE_ENV'] !== 'production',
|
|
29
30
|
allowOutsideOfServer: opts?.allowOutsideOfServer ?? false,
|
|
30
31
|
errorFormatter: opts?.errorFormatter ?? defaultFormatter,
|
|
31
32
|
isServer: opts?.isServer ?? isServerDefault,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/server",
|
|
3
|
-
"version": "11.0.0-next-beta.
|
|
3
|
+
"version": "11.0.0-next-beta.317+927c2417a",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -156,5 +156,5 @@
|
|
|
156
156
|
"funding": [
|
|
157
157
|
"https://trpc.io/sponsor"
|
|
158
158
|
],
|
|
159
|
-
"gitHead": "
|
|
159
|
+
"gitHead": "927c2417a71b5eb7c1b9d774ca0f8e380da0b064"
|
|
160
160
|
}
|
|
@@ -184,6 +184,12 @@ export function createFileUploadHandler({
|
|
|
184
184
|
return new NodeOnDiskFile(filepath, contentType);
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
|
+
type NodeJSReadableStreamEsque = {
|
|
188
|
+
on(
|
|
189
|
+
eventName: string | symbol,
|
|
190
|
+
listener: (...args: any[]) => void,
|
|
191
|
+
): NodeJSReadableStreamEsque;
|
|
192
|
+
};
|
|
187
193
|
|
|
188
194
|
export class NodeOnDiskFile {
|
|
189
195
|
name: string;
|
|
@@ -246,8 +252,8 @@ export class NodeOnDiskFile {
|
|
|
246
252
|
}
|
|
247
253
|
|
|
248
254
|
stream(): ReadableStream<any>;
|
|
249
|
-
stream():
|
|
250
|
-
stream():
|
|
255
|
+
stream(): NodeJSReadableStreamEsque;
|
|
256
|
+
stream(): NodeJSReadableStreamEsque | ReadableStream<any> {
|
|
251
257
|
let stream: Readable = createReadStream(this.filepath);
|
|
252
258
|
if (this.slicer) {
|
|
253
259
|
stream = stream.pipe(streamSlice(this.slicer.start, this.slicer.end));
|
package/src/adapters/ws.ts
CHANGED
|
@@ -84,7 +84,10 @@ class TRPCBuilder<TContext extends object, TMeta extends object> {
|
|
|
84
84
|
|
|
85
85
|
const config: RootConfig<$Root> = {
|
|
86
86
|
transformer: getDataTransformer(opts?.transformer ?? defaultTransformer),
|
|
87
|
-
isDev:
|
|
87
|
+
isDev:
|
|
88
|
+
opts?.isDev ??
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
90
|
+
globalThis.process?.env['NODE_ENV'] !== 'production',
|
|
88
91
|
allowOutsideOfServer: opts?.allowOutsideOfServer ?? false,
|
|
89
92
|
errorFormatter: opts?.errorFormatter ?? defaultFormatter,
|
|
90
93
|
isServer: opts?.isServer ?? isServerDefault,
|