| 8 | | ReadableStream |
| 9 | |
| 10 | export interface BunShell { |
| 11 | (strings: TemplateStringsArray, ...expressions: ShellExpression[]): BunShellPromise |
| 12 | |
| 13 | /** |
| 14 | * Perform bash-like brace expansion on the given pattern. |
| 15 | * @param pattern - Brace pattern to expand |
| 16 | */ |
| 17 | braces(pattern: string): string[] |
| 18 | |
| 19 | /** |
| 20 | * Escape strings for input into shell commands. |
| 21 | */ |
| 22 | escape(input: string): string |
| 23 | |
| 24 | /** |
| 25 | * Change the default environment variables for shells created by this instance. |
| 26 | */ |
| 27 | env(newEnv?: Record<string, string | undefined>): BunShell |
| 28 | |
| 29 | /** |
| 30 | * Default working directory to use for shells created by this instance. |
| 31 | */ |
| 32 | cwd(newCwd?: string): BunShell |
| 33 | |
| 34 | /** |
| 35 | * Configure the shell to not throw an exception on non-zero exit codes. |
| 36 | */ |
| 37 | nothrow(): BunShell |
| 38 | |
| 39 | /** |
| 40 | * Configure whether or not the shell should throw an exception on non-zero exit codes. |
| 41 | */ |
| 42 | throws(shouldThrow: boolean): BunShell |
| 43 | } |
| 44 | |
| 45 | export interface BunShellPromise extends Promise<BunShellOutput> { |
| 46 | readonly stdin: WritableStream |
no outgoing calls
no test coverage detected