UNPKG

@eris/image-cli

Version:

CLI wrapper and standalone executable API for @eris/image.

31 lines (30 loc) 1.11 kB
/// <reference types="node" /> import * as EventEmitter from 'events'; import { IConfigEntry } from './config-entry'; import { IJsonReporterEntryFinishedLog, IJsonReporterEntryErroredLog } from './reporters/json-reporter'; export declare type IEntryResult = IJsonReporterEntryFinishedLog['data'] | IJsonReporterEntryErroredLog['data']; export interface ICLIClientOptions { executablePath: string; } export interface ICLIWaitForExitOptions { failLoudly?: boolean; } export declare class CLIInstance extends EventEmitter { private _finished; private _error; private readonly _entries; private _stdout; private _stderr; private readonly _childProcess; constructor(cmd: string, args: string[]); private _emitDone; private _processChunk; private _listenToProcessEvents; private _entriesToPromise; waitForExit(options?: ICLIWaitForExitOptions): Promise<IEntryResult[]>; } export declare class CLIClient { private readonly _options; constructor(options: Partial<ICLIClientOptions>); run(config: string | IConfigEntry | IConfigEntry[]): CLIInstance; }