CLI
class
CLI
sourceexport class CLI export class CLIconstructor(options: CLI.Options) constructor(options: CLI.Options)| Param | Type | Required |
|---|---|---|
| | Yes |
get source
.isDebugging()
isDebugging(): boolean isDebugging(): booleanReturns:
boolean booleanparse(argv?: string[]): Promise<this> parse(argv?: string[]): Promise<this>| Param | Type | Required |
|---|---|---|
| | No |
Returns:
Promise<this> Promise<this>.loadCommands()
loadCommands(): Promise<void> loadCommands(): Promise<void>Returns:
Promise<void> Promise<void>.handlePreAction(...)
handlePreAction(cmd: Command, action: Command): Promise<void> handlePreAction(cmd: Command, action: Command): Promise<void>| Param | Type | Required |
|---|---|---|
| | Yes |
| | Yes |
Returns:
Promise<void> Promise<void>.setCurrentDirectory(...)
setCurrentDirectory(cwd?: string): Promise<void> setCurrentDirectory(cwd?: string): Promise<void>| Param | Type | Required |
|---|---|---|
| | No |
Returns:
Promise<void> Promise<void>getFlags<Flags extends Record<string, any>>(command: Command|string, mergeDefault?: false): Flags|undefined getFlags<Flags extends Record<string, any>>(command: Command|string, mergeDefault?: false): Flags|undefined| Param | Type | Required |
|---|---|---|
| | Yes |
| | No |
Returns:
Flags|undefined Flags|undefinedpublic source
.getCommand(...)
getCommand(name: string): Command|undefined getCommand(name: string): Command|undefined| Param | Type | Required |
|---|---|---|
| | Yes |
Returns:
Command|undefined Command|undefined