BREAKING CHANGE(client/streaming): Unify streaming APIs: remove raw()/streamNode() and standardize on web ReadableStream across runtimes

This commit is contained in:
2025-11-17 14:18:58 +00:00
parent 1305b92ebe
commit 0cf48b3688
15 changed files with 1273 additions and 1524 deletions

View File

@@ -72,20 +72,6 @@ export class CoreResponse<T = any>
return this.response.body;
}
/**
* Get response as a Node.js-style stream
* Bun supports Node.js streams, so we can provide this functionality
*
* Note: In Bun, you may also be able to use the web stream directly with stream() method
*/
streamNode(): never {
// Bun primarily uses web streams and has excellent compatibility
// For most use cases, use stream() which returns a standard ReadableStream
throw new Error(
'streamNode() is not available in Bun environment. Use stream() for web-style ReadableStream, which Bun fully supports.',
);
}
/**
* Get the raw Response object
*/