@trpc/server 11.0.0-rc.682 → 11.0.0-rc.688
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/bundle-analysis.json +14 -14
- package/dist/unstable-core-do-not-import/stream/sse.d.ts +1 -1
- package/dist/unstable-core-do-not-import/stream/sse.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/stream/sse.js +1 -1
- package/dist/unstable-core-do-not-import/stream/sse.mjs +1 -1
- package/package.json +2 -2
- package/src/unstable-core-do-not-import/stream/sse.ts +22 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 14.
|
|
2
|
+
"bundleSize": 187247,
|
|
3
|
+
"bundleOrigSize": 219578,
|
|
4
|
+
"bundleReduction": 14.72,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependents": [
|
|
32
32
|
"/src/unstable-core-do-not-import.ts"
|
|
33
33
|
],
|
|
34
|
-
"percent": 11.
|
|
34
|
+
"percent": 11.28,
|
|
35
35
|
"reduction": 0
|
|
36
36
|
},
|
|
37
37
|
{
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
"id": "/src/unstable-core-do-not-import/stream/sse.ts",
|
|
55
|
-
"size":
|
|
56
|
-
"origSize":
|
|
55
|
+
"size": 12627,
|
|
56
|
+
"origSize": 12452,
|
|
57
57
|
"renderedExports": [
|
|
58
58
|
"sseStreamProducer",
|
|
59
59
|
"sseStreamConsumer",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"/src/unstable-core-do-not-import.ts",
|
|
65
65
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
66
66
|
],
|
|
67
|
-
"percent": 6.
|
|
67
|
+
"percent": 6.74,
|
|
68
68
|
"reduction": 0
|
|
69
69
|
},
|
|
70
70
|
{
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"/src/unstable-core-do-not-import.ts",
|
|
93
93
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
94
94
|
],
|
|
95
|
-
"percent": 4.
|
|
95
|
+
"percent": 4.1,
|
|
96
96
|
"reduction": 0
|
|
97
97
|
},
|
|
98
98
|
{
|
|
@@ -843,9 +843,9 @@
|
|
|
843
843
|
"reduction": 100
|
|
844
844
|
},
|
|
845
845
|
{
|
|
846
|
-
"id": "/src/
|
|
846
|
+
"id": "/src/rpc.ts",
|
|
847
847
|
"size": 0,
|
|
848
|
-
"origSize":
|
|
848
|
+
"origSize": 36,
|
|
849
849
|
"renderedExports": [],
|
|
850
850
|
"removedExports": [],
|
|
851
851
|
"dependents": [],
|
|
@@ -853,9 +853,9 @@
|
|
|
853
853
|
"reduction": 100
|
|
854
854
|
},
|
|
855
855
|
{
|
|
856
|
-
"id": "/src/
|
|
856
|
+
"id": "/src/shared.ts",
|
|
857
857
|
"size": 0,
|
|
858
|
-
"origSize":
|
|
858
|
+
"origSize": 653,
|
|
859
859
|
"renderedExports": [],
|
|
860
860
|
"removedExports": [],
|
|
861
861
|
"dependents": [],
|
|
@@ -870,8 +870,8 @@
|
|
|
870
870
|
"removedExports": [],
|
|
871
871
|
"dependents": [
|
|
872
872
|
"/src/adapters/express.ts",
|
|
873
|
-
"/src/adapters/standalone.ts",
|
|
874
873
|
"/src/adapters/next.ts",
|
|
874
|
+
"/src/adapters/standalone.ts",
|
|
875
875
|
"/src/adapters/ws.ts",
|
|
876
876
|
"/src/adapters/node-http/nodeHTTPRequestHandler.ts",
|
|
877
877
|
"/src/adapters/next-app-dir/nextAppDirCaller.ts",
|
|
@@ -930,8 +930,8 @@
|
|
|
930
930
|
"removedExports": [],
|
|
931
931
|
"dependents": [
|
|
932
932
|
"/src/adapters/express.ts",
|
|
933
|
-
"/src/adapters/standalone.ts",
|
|
934
933
|
"/src/adapters/next.ts",
|
|
934
|
+
"/src/adapters/standalone.ts",
|
|
935
935
|
"/src/adapters/ws.ts",
|
|
936
936
|
"/src/adapters/fastify/fastifyRequestHandler.ts"
|
|
937
937
|
],
|
|
@@ -54,7 +54,7 @@ export interface SSEStreamProducerOptions<TValue = unknown> {
|
|
|
54
54
|
*
|
|
55
55
|
* @see https://html.spec.whatwg.org/multipage/server-sent-events.html
|
|
56
56
|
*/
|
|
57
|
-
export declare function sseStreamProducer<TValue = unknown>(opts: SSEStreamProducerOptions<TValue>): ReadableStream<
|
|
57
|
+
export declare function sseStreamProducer<TValue = unknown>(opts: SSEStreamProducerOptions<TValue>): ReadableStream<Uint8Array<ArrayBufferLike>>;
|
|
58
58
|
interface ConsumerStreamResultBase<TConfig extends ConsumerConfig> {
|
|
59
59
|
eventSource: InstanceType<TConfig['EventSource']> | null;
|
|
60
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/stream/sse.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAWpD,KAAK,SAAS,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;AACrC,KAAK,WAAW,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC;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AC,GACtC,aAAa,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAiK9C;AAED,eAAO,MAAM,UAAU;;;;;CAKb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/server",
|
|
3
|
-
"version": "11.0.0-rc.
|
|
3
|
+
"version": "11.0.0-rc.688+87ea49ed1",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -152,5 +152,5 @@
|
|
|
152
152
|
"peerDependencies": {
|
|
153
153
|
"typescript": ">=5.7.2"
|
|
154
154
|
},
|
|
155
|
-
"gitHead": "
|
|
155
|
+
"gitHead": "87ea49ed1da187e72669ce6f638500369b16b749"
|
|
156
156
|
}
|
|
@@ -176,27 +176,30 @@ export function sseStreamProducer<TValue = unknown>(
|
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
+
|
|
179
180
|
const stream = readableStreamFrom(generatorWithErrorHandling());
|
|
180
181
|
|
|
181
|
-
return stream
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
182
|
+
return stream
|
|
183
|
+
.pipeThrough(
|
|
184
|
+
new TransformStream({
|
|
185
|
+
transform(chunk, controller: TransformStreamDefaultController<string>) {
|
|
186
|
+
if ('event' in chunk) {
|
|
187
|
+
controller.enqueue(`event: ${chunk.event}\n`);
|
|
188
|
+
}
|
|
189
|
+
if ('data' in chunk) {
|
|
190
|
+
controller.enqueue(`data: ${chunk.data}\n`);
|
|
191
|
+
}
|
|
192
|
+
if ('id' in chunk) {
|
|
193
|
+
controller.enqueue(`id: ${chunk.id}\n`);
|
|
194
|
+
}
|
|
195
|
+
if ('comment' in chunk) {
|
|
196
|
+
controller.enqueue(`: ${chunk.comment}\n`);
|
|
197
|
+
}
|
|
198
|
+
controller.enqueue('\n\n');
|
|
199
|
+
},
|
|
200
|
+
}),
|
|
201
|
+
)
|
|
202
|
+
.pipeThrough(new TextEncoderStream());
|
|
200
203
|
}
|
|
201
204
|
|
|
202
205
|
interface ConsumerStreamResultBase<TConfig extends ConsumerConfig> {
|