feat(core): Add Bun and Deno runtime support, unify core loader, unix-socket support and cross-runtime streaming/tests

This commit is contained in:
2025-11-16 22:50:19 +00:00
parent 32332309dc
commit 6211acd60b
22 changed files with 1447 additions and 92 deletions

View File

@@ -147,6 +147,12 @@ export class CoreRequest extends AbstractCoreRequest<
this.options.requestBody.pipe(request).on('finish', () => {
request.end();
});
} else if (this.options.requestBody instanceof ReadableStream) {
// Convert web ReadableStream to Node.js Readable stream
const nodeStream = plugins.stream.Readable.fromWeb(this.options.requestBody as any);
nodeStream.pipe(request).on('finish', () => {
request.end();
});
} else {
// Write body as-is - caller is responsible for serialization
const bodyData =