| 1 | import { CommandOptions } from './legacy-command'; |
| 2 | |
| 3 | export interface Command { |
| 4 | /** |
| 5 | * Name of command with arguments: |
| 6 | * <> for mandatory arguments. |
| 7 | * [] for optional arguments. |
| 8 | * e.g. 'add <path>' |
| 9 | */ |
| 10 | name: string; |
| 11 | |
| 12 | /** |
| 13 | * command alias (for example: 't' for 'tag') |
| 14 | */ |
| 15 | alias?: string; |
| 16 | |
| 17 | /** |
| 18 | * Description of the command in commands summery |
| 19 | * `bit -h` |
| 20 | * `bit` |
| 21 | */ |
| 22 | shortDescription?: string; |
| 23 | |
| 24 | /** |
| 25 | * The description of the command. Will be seen in bit command help. |
| 26 | * `bit add --help` |
| 27 | */ |
| 28 | description?: string; |
| 29 | |
| 30 | /** |
| 31 | * allow grouping of commands to hint summery renderer |
| 32 | * Places in default automatic help |
| 33 | */ |
| 34 | group?: string; |
| 35 | |
| 36 | /** |
| 37 | * should a command be exposed to the user. |
| 38 | * e.g. experimental commands or commands created for the ssh communication should not be exposed |
| 39 | */ |
| 40 | private?: boolean; |
| 41 | |
| 42 | /** |
| 43 | * command that is not running on the terminal, such as "_fetch", "_put". |
| 44 | * in case an error is thrown, it is serialized so it's easier to parse it later |
| 45 | */ |
| 46 | internal?: boolean; |
| 47 | |
| 48 | /** |
| 49 | * should turn on Loader |
| 50 | */ |
| 51 | loader?: boolean; |
| 52 | |
| 53 | /** |
| 54 | * Array of command options where each element is a tuple. |
| 55 | * ['flag alias', 'flag name', 'flag description'] |
| 56 | * for example: |
| 57 | * ['j', 'json', 'output json format'] |
| 58 | */ |
| 59 | options: CommandOptions; |
| 60 |
no outgoing calls
no test coverage detected