@teambit/cli 0.0.385 → 0.0.386
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,11 +10,29 @@ export declare class CLIMain {
|
|
|
10
10
|
private onStartSlot;
|
|
11
11
|
groups: GroupsType;
|
|
12
12
|
constructor(commandsSlot: CommandsSlot, onStartSlot: OnStartSlot);
|
|
13
|
+
/**
|
|
14
|
+
* registers a new command in to the CLI.
|
|
15
|
+
*/
|
|
13
16
|
register(...commands: CommandList): void;
|
|
17
|
+
/**
|
|
18
|
+
* helpful for having the same command name in different environments (legacy and Harmony)
|
|
19
|
+
*/
|
|
14
20
|
unregister(commandName: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* list of all registered commands. (legacy and new).
|
|
23
|
+
*/
|
|
15
24
|
get commands(): CommandList;
|
|
25
|
+
/**
|
|
26
|
+
* when running `bit help`, commands are grouped by categories.
|
|
27
|
+
* this method helps registering a new group by providing its name and a description.
|
|
28
|
+
* the name is what needs to be assigned to the `group` property of the Command interface.
|
|
29
|
+
* the description is what shown in the `bit help` output.
|
|
30
|
+
*/
|
|
16
31
|
registerGroup(name: string, description: string): void;
|
|
17
32
|
registerOnStart(onStartFn: OnStart): this;
|
|
33
|
+
/**
|
|
34
|
+
* execute commands registered to this aspect.
|
|
35
|
+
*/
|
|
18
36
|
run(hasWorkspace: boolean): Promise<void>;
|
|
19
37
|
private invokeOnStart;
|
|
20
38
|
private setDefaults;
|
package/dist/command-runner.d.ts
CHANGED
|
@@ -5,12 +5,27 @@ export declare class CommandRunner {
|
|
|
5
5
|
private flags;
|
|
6
6
|
private commandName;
|
|
7
7
|
constructor(command: Command, args: CLIArgs, flags: Flags);
|
|
8
|
+
/**
|
|
9
|
+
* run command using one of the handler, "json"/"report"/"render". once done, exit the process.
|
|
10
|
+
*/
|
|
8
11
|
runCommand(): Promise<boolean | void | null>;
|
|
9
12
|
private bootstrapCommand;
|
|
13
|
+
/**
|
|
14
|
+
* when both "render" and "report" were implemented, check whether it's a terminal.
|
|
15
|
+
* if it's a terminal, use "render", if not, use "report" because "report" is just a string
|
|
16
|
+
*/
|
|
10
17
|
private shouldRunRender;
|
|
18
|
+
/**
|
|
19
|
+
* this works for both, Harmony commands and Legacy commands (the legacy-command-adapter
|
|
20
|
+
* implements json() method)
|
|
21
|
+
*/
|
|
11
22
|
private runJsonHandler;
|
|
12
23
|
private runRenderHandler;
|
|
13
24
|
private runReportHandler;
|
|
25
|
+
/**
|
|
26
|
+
* the loader and logger.console write output to the console during the command execution.
|
|
27
|
+
* for internals commands, such as, _put, _fetch, the command.loader = false.
|
|
28
|
+
*/
|
|
14
29
|
private determineConsoleWritingDuringCommand;
|
|
15
30
|
private writeAndExit;
|
|
16
31
|
private runMigrateIfNeeded;
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.386",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/harmony/cli",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.harmony",
|
|
8
8
|
"name": "cli",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.386"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"pad-right": "0.2.2",
|
|
19
19
|
"@babel/runtime": "7.12.18",
|
|
20
20
|
"core-js": "^3.0.0",
|
|
21
|
-
"@teambit/bit-error": "0.0.
|
|
21
|
+
"@teambit/bit-error": "0.0.372"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/didyoumean": "1.2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@types/node": "12.20.4"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@teambit/legacy": "1.0.
|
|
35
|
+
"@teambit/legacy": "1.0.172",
|
|
36
36
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
37
37
|
"react": "^16.8.0 || ^17.0.0"
|
|
38
38
|
},
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"react": "-"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@teambit/legacy": "1.0.
|
|
63
|
+
"@teambit/legacy": "1.0.172",
|
|
64
64
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
65
65
|
"react": "^16.8.0 || ^17.0.0"
|
|
66
66
|
}
|
package/tsconfig.json
CHANGED
|
Binary file
|