refactor(cli): use Response(stream).text() instead of Bun.readableStreamToText
bun-install.ts streamToText() was reachable from the plugin bundle via the cli/config-manager barrel re-export. Replace with the WHATWG standard `new Response(stream).text()` pattern which works identically in Bun and Node and avoids the last raw Bun.* runtime call in dist/index.js.
This commit is contained in:
@@ -26,10 +26,6 @@ declare function clearTimeout(timeout: number): void
|
||||
|
||||
type ProcessOutputStream = ReturnType<typeof spawnWithWindowsHide>["stdout"]
|
||||
|
||||
declare const Bun: {
|
||||
readableStreamToText(stream: NonNullable<ProcessOutputStream>): Promise<string>
|
||||
}
|
||||
|
||||
export interface BunInstallResult {
|
||||
success: boolean
|
||||
timedOut?: boolean
|
||||
@@ -50,7 +46,7 @@ function readProcessOutput(stream: ProcessOutputStream): Promise<string> {
|
||||
return Promise.resolve("")
|
||||
}
|
||||
|
||||
return Bun.readableStreamToText(stream)
|
||||
return new Response(stream).text()
|
||||
}
|
||||
|
||||
function logCapturedOutputOnFailure(outputMode: BunInstallOutputMode, output: BunInstallOutput): void {
|
||||
|
||||
Reference in New Issue
Block a user