UNPKG

@auttam/easycli

Version:

A quick and easy way of creating cli for your npm package.

32 lines (31 loc) 949 B
export declare enum RuntimeStates { CREATED = "created", READY = "ready", RUNNING = "running", ERROR = "error" } export declare class RuntimeContext { private _program; private _id; private _state; private _progArgs; private _requestedCommand; private _commandIteration; private _maxCommandIteration; constructor(_program: any); get state(): RuntimeStates; get contextId(): number; get requestedCommand(): string; get helpRequested(): boolean; get versionRequested(): boolean; private mapOptions; private mapParams; private createMethodArgs; private callDefaultCommand; private validateProgram; init(): void; call(methodName: string, ...details: any[]): any; runProgram(): Promise<any>; runCommand(reqCommandName: string): Promise<any>; exitProgram(error: any, executionResult: any, exitCode?: number): any; }