UNPKG

1.29 kBTypeScriptView Raw
1import { CliCommandConfigType, CliCommandType, CliProgramConfigType, CliProgramType } from './CliTypes';
2import { AbstractCommand } from '../Command/AbstractCommand';
3export declare class Cli {
4 /**
5 * Convenience method to help format a command.
6 *
7 * ┌─1─┐┌──2────┐ ┌4┐
8 * stix generate module user -v
9 * │ └───────3─────────────┘
10 * └─────────5────────────────┘
11 *
12 * Legend:
13 * 1. Command name Maps to Command
14 * 2. Token Maps to action
15 * 3. Arguments Passed to the action
16 * 4. Options Passed to the action as part of arguments
17 * 5. Command line The full command line, maps to command.
18 *
19 * @param {string} commandLine
20 * @param {AbstractCommand} Command
21 * @param {string} action
22 * @param {CliCommandConfigType} config
23 *
24 * @return {CliCommandType}
25 */
26 static command(commandLine: string, Command: typeof AbstractCommand, action: string, config?: CliCommandConfigType): CliCommandType;
27 static program(program: string, config?: CliProgramConfigType): CliProgramType;
28}