MCPcopy
hub / github.com/teambit/bit / Command

Interface Command

src/cli/command.ts:3–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import { CommandOptions } from './legacy-command';
2
3export 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

Callers 11

renderStringFunction · 0.65
runRenderHandlerMethod · 0.65
ui.runtime.tsFile · 0.65
renderMethod · 0.65
getErrMsgFunction · 0.65
runReportHandlerMethod · 0.65
reportMethod · 0.65
actionMethod · 0.65
handleErrorFunction · 0.65
logger.tsFile · 0.65
runJsonHandlerMethod · 0.65

Implementers 13

InsightsCmdsrc/extensions/insights/insights.cmd.t
InstallCmdsrc/extensions/workspace/install.cmd.t
ListCmdsrc/extensions/workspace/list.cmd.tsx
CompileCmdsrc/extensions/compiler/compiler.cmd.t
PackCmdsrc/extensions/pkg/pack.cmd.tsx
LegacyCommandAdaptersrc/extensions/cli/legacy-command-adap
TestCmdsrc/extensions/tester/test.cmd.tsx
CapsuleCreateCmdsrc/extensions/isolator/capsule-create
CapsuleListCmdsrc/extensions/isolator/capsule-list.c
WatchCommandsrc/extensions/watch/watch.cmd.tsx
StartCmdsrc/extensions/ui/start.cmd.tsx
CreateCmdsrc/extensions/create/create.cmd.tsx

Calls

no outgoing calls

Tested by

no test coverage detected