UNPKG

actionhero

Version:

actionhero.js is a multi-transport API Server with integrated cluster capabilities and delayed tasks

26 lines (25 loc) 905 B
/** * Create a new Actionhero CLI Command. The required properties of an CLI command. These can be defined statically (this.name) or as methods which return a value. */ export declare abstract class CLI { /**The name of the CLI command. */ name: string; /**The description of the CLI command (default this.name) */ description: string; /**An example of how to run this CLI command */ example: string; /**The inputs of the CLI command (default: {}) */ inputs: { [key: string]: any; }; constructor(); /** * The main "do something" method for this CLI command. It is an `async` method. * If error is thrown in this method, it will be logged to STDERR, and the process will terminate with a non-0 exit code. */ abstract run(data: { [key: string]: any; }): Promise<boolean>; private getDefaults; validate(): void; }