import * as child_process from 'child_process'; import type { SubprocessOutputDestination } from './asset-handler'; export type ShellEventType = 'open' | 'data_stdout' | 'data_stderr' | 'close'; export type ShellEventPublisher = (event: ShellEventType, message: string) => void; export interface ShellOptions extends child_process.SpawnOptions { readonly shellEventPublisher: ShellEventPublisher; readonly input?: string; readonly subprocessOutputDestination?: SubprocessOutputDestination; } /** * OS helpers * * Shell function which both prints to stdout and collects the output into a * string. */ export declare function shell(command: string[], options: ShellOptions): Promise; export type ProcessFailedError = ProcessFailed; declare class ProcessFailed extends Error { readonly exitCode: number | null; readonly signal: NodeJS.Signals | null; readonly code = "PROCESS_FAILED"; constructor(exitCode: number | null, signal: NodeJS.Signals | null, message: string); } export {};