///
import { Tail } from 'tail';
import { ProcessDescription, StartOptions as Pm2StartOptions } from 'pm2';
export default abstract class Runner {
protected options: Options;
protected command?: string;
protected color: string;
private _paths;
protected tails: Tail[];
protected intervals: NodeJS.Timeout[];
constructor(options: Options);
protected pm2Start(args: string | string[] | undefined, options: Partial, pm2StartOptions?: Partial, cb?: Pm2Callback): Promise;
protected pm2Stop(): Promise;
protected pm2Delete(): Promise;
protected pm2Restart(): Promise;
protected pm2Exists(): Promise;
protected pm2Alive(): Promise;
protected pm2Disconnect(): void;
private _tail;
private _tailFile;
private _pm2Connect;
private _pm2Describe;
private get _name();
private _pm2Start;
private _pm2Stop;
private _pm2Delete;
private _pm2Restart;
}
export interface RunnerOptions {
cwd?: string;
debug?: boolean;
name: string;
projectName?: string;
}
export declare type Pm2Callback = (processDescription: ProcessDescription) => any;
export interface RunnerStartOptions {
mode: RunnerMode;
}
export declare enum RunnerMode {
Detached = "DETACHED",
Foreground = "FOREGROUND",
Terminal = "TERMINAL"
}
export interface RunnerPaths {
script: string;
stderr: string;
stdout: string;
tmp: string;
}