fix docker stream backpressure (#1445)

This commit is contained in:
StefanSa authored and GitHub committed 2026-08-22 07:58:49 +02:00
1 parent a485c8580b
commit ca2cb80c3f
3 files changed
+87 -24

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
import { Readable } from 'node:stream';
/**
* Convert a Node readable to a Web stream while preserving Node backpressure.
* Cancellation and source errors are forwarded by Node's native adapter.
*/
export function toWebReadableStream(source: Readable): ReadableStream<Uint8Array> {
return Readable.toWeb(source) as ReadableStream<Uint8Array>;
}