chore: use Readable.from instead to convert the stream

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2023-11-20 14:03:09 +01:00
parent 89faef0e7a
commit f386befaa7
@@ -72,7 +72,7 @@ export class ReadUrlResponseFactory {
oldStyleStream: NodeJS.ReadableStream,
options?: ReadUrlResponseFactoryFromStreamOptions,
): Promise<ReadUrlResponse> {
const readable = new Readable().wrap(oldStyleStream);
const readable = Readable.from(oldStyleStream);
return ReadUrlResponseFactory.fromReadable(readable, options);
}
}