@trpc/server
Advanced tools
Comparing version 11.0.0-rc.682 to 11.0.0-rc.688
{ | ||
"bundleSize": 187210, | ||
"bundleOrigSize": 219494, | ||
"bundleReduction": 14.71, | ||
"bundleSize": 187247, | ||
"bundleOrigSize": 219578, | ||
"bundleReduction": 14.72, | ||
"modules": [ | ||
@@ -34,3 +34,3 @@ { | ||
], | ||
"percent": 11.29, | ||
"percent": 11.28, | ||
"reduction": 0 | ||
@@ -56,4 +56,4 @@ }, | ||
"id": "/src/unstable-core-do-not-import/stream/sse.ts", | ||
"size": 12590, | ||
"origSize": 12368, | ||
"size": 12627, | ||
"origSize": 12452, | ||
"renderedExports": [ | ||
@@ -69,3 +69,3 @@ "sseStreamProducer", | ||
], | ||
"percent": 6.73, | ||
"percent": 6.74, | ||
"reduction": 0 | ||
@@ -98,3 +98,3 @@ }, | ||
], | ||
"percent": 4.11, | ||
"percent": 4.1, | ||
"reduction": 0 | ||
@@ -850,5 +850,5 @@ }, | ||
{ | ||
"id": "/src/shared.ts", | ||
"id": "/src/rpc.ts", | ||
"size": 0, | ||
"origSize": 653, | ||
"origSize": 36, | ||
"renderedExports": [], | ||
@@ -861,5 +861,5 @@ "removedExports": [], | ||
{ | ||
"id": "/src/rpc.ts", | ||
"id": "/src/shared.ts", | ||
"size": 0, | ||
"origSize": 36, | ||
"origSize": 653, | ||
"renderedExports": [], | ||
@@ -879,4 +879,4 @@ "removedExports": [], | ||
"/src/adapters/express.ts", | ||
"/src/adapters/next.ts", | ||
"/src/adapters/standalone.ts", | ||
"/src/adapters/next.ts", | ||
"/src/adapters/ws.ts", | ||
@@ -940,4 +940,4 @@ "/src/adapters/node-http/nodeHTTPRequestHandler.ts", | ||
"/src/adapters/express.ts", | ||
"/src/adapters/next.ts", | ||
"/src/adapters/standalone.ts", | ||
"/src/adapters/next.ts", | ||
"/src/adapters/ws.ts", | ||
@@ -944,0 +944,0 @@ "/src/adapters/fastify/fastifyRequestHandler.ts" |
@@ -57,3 +57,3 @@ import type { MaybePromise } from '../types'; | ||
*/ | ||
export declare function sseStreamProducer<TValue = unknown>(opts: SSEStreamProducerOptions<TValue>): ReadableStream<string>; | ||
export declare function sseStreamProducer<TValue = unknown>(opts: SSEStreamProducerOptions<TValue>): ReadableStream<Uint8Array<ArrayBufferLike>>; | ||
interface ConsumerStreamResultBase<TConfig extends ConsumerConfig> { | ||
@@ -60,0 +60,0 @@ eventSource: InstanceType<TConfig['EventSource']> | null; |
@@ -177,3 +177,3 @@ 'use strict'; | ||
} | ||
})); | ||
})).pipeThrough(new TextEncoderStream()); | ||
} | ||
@@ -180,0 +180,0 @@ async function withTimeout(opts) { |
{ | ||
"name": "@trpc/server", | ||
"version": "11.0.0-rc.682+8650a22e8", | ||
"version": "11.0.0-rc.688+87ea49ed1", | ||
"description": "The tRPC server library", | ||
@@ -155,3 +155,3 @@ "author": "KATT", | ||
}, | ||
"gitHead": "8650a22e8631ae04091209daf09830563d8dcac1" | ||
"gitHead": "87ea49ed1da187e72669ce6f638500369b16b749" | ||
} |
@@ -179,23 +179,26 @@ import { Unpromise } from '../../vendor/unpromise'; | ||
} | ||
const stream = readableStreamFrom(generatorWithErrorHandling()); | ||
return stream.pipeThrough( | ||
new TransformStream({ | ||
transform(chunk, controller: TransformStreamDefaultController<string>) { | ||
if ('event' in chunk) { | ||
controller.enqueue(`event: ${chunk.event}\n`); | ||
} | ||
if ('data' in chunk) { | ||
controller.enqueue(`data: ${chunk.data}\n`); | ||
} | ||
if ('id' in chunk) { | ||
controller.enqueue(`id: ${chunk.id}\n`); | ||
} | ||
if ('comment' in chunk) { | ||
controller.enqueue(`: ${chunk.comment}\n`); | ||
} | ||
controller.enqueue('\n\n'); | ||
}, | ||
}), | ||
); | ||
return stream | ||
.pipeThrough( | ||
new TransformStream({ | ||
transform(chunk, controller: TransformStreamDefaultController<string>) { | ||
if ('event' in chunk) { | ||
controller.enqueue(`event: ${chunk.event}\n`); | ||
} | ||
if ('data' in chunk) { | ||
controller.enqueue(`data: ${chunk.data}\n`); | ||
} | ||
if ('id' in chunk) { | ||
controller.enqueue(`id: ${chunk.id}\n`); | ||
} | ||
if ('comment' in chunk) { | ||
controller.enqueue(`: ${chunk.comment}\n`); | ||
} | ||
controller.enqueue('\n\n'); | ||
}, | ||
}), | ||
) | ||
.pipeThrough(new TextEncoderStream()); | ||
} | ||
@@ -202,0 +205,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
911262
23258