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:
YeonGyu-Kim
2026-05-12 12:46:31 +09:00
parent 22c7e4eb8e
commit 11529394aa
+1 -5
View File
@@ -26,10 +26,6 @@ declare function clearTimeout(timeout: number): void
type ProcessOutputStream = ReturnType<typeof spawnWithWindowsHide>["stdout"] type ProcessOutputStream = ReturnType<typeof spawnWithWindowsHide>["stdout"]
declare const Bun: {
readableStreamToText(stream: NonNullable<ProcessOutputStream>): Promise<string>
}
export interface BunInstallResult { export interface BunInstallResult {
success: boolean success: boolean
timedOut?: boolean timedOut?: boolean
@@ -50,7 +46,7 @@ function readProcessOutput(stream: ProcessOutputStream): Promise<string> {
return Promise.resolve("") return Promise.resolve("")
} }
return Bun.readableStreamToText(stream) return new Response(stream).text()
} }
function logCapturedOutputOnFailure(outputMode: BunInstallOutputMode, output: BunInstallOutput): void { function logCapturedOutputOnFailure(outputMode: BunInstallOutputMode, output: BunInstallOutput): void {