UNPKG

1.22 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3class 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, Command, action, config) {
27 return { commandLine, Command, action, config };
28 }
29 static program(program, config) {
30 return { program, config };
31 }
32}
33exports.Cli = Cli;
34//# sourceMappingURL=Cli.js.map
\No newline at end of file