import { CommandTrigger } from "../command.run";
import { CrossbowConfiguration } from "../config";
import { Task } from "../task.resolve";
import { EventEmitter } from 'events';
export interface CommandOptions {
    cwd: string;
    env: any;
    stdio: any;
}
export interface CrossbowSpawnError extends Error {
    code: string;
    errno: string;
    syscall: string;
    file: string;
}
export interface CBEmitter extends EventEmitter {
    stdin: any;
    stdout: any;
    stderr: any;
    raw: any;
    kill: any;
}
declare function runCommand(args: string[], options: CommandOptions): CBEmitter;
/**
 * Add the local ./node_modules/.bin directory to the beginning
 * of the users PATH - this will allow it to find local scripts
 * @param {process.env} process
 * @param {Immutable.Map} config
 * @returns {object}
 */
declare function getEnv(process: any, config: CrossbowConfiguration): any;
export interface CommandArgs {
    stringInput?: string;
    cmd?: string[];
    errors: Error[];
}
declare function getArgs(command: string): CommandArgs;
export declare function teardown(emitter: any, task: Task): void;
export declare function getStdio(trigger: CommandTrigger): (string | NodeJS.WritableStream | NodeJS.ReadableStream)[];
export declare function handleExit(emitter: any, done: any): void;
/**
 * The main export is the function this will be run in the sequence
 * @returns {Function}
 */
export default function (task: Task, trigger: CommandTrigger): (opts: any, ctx: any, done: any) => () => void;
export { runCommand, getArgs, getEnv };
