@teambit/cli 0.0.380 → 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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.CLIAspect = exports.MainRuntime = void 0;
6
+ exports.MainRuntime = exports.CLIAspect = void 0;
7
7
 
8
8
  function _harmony() {
9
9
  const data = require("@teambit/harmony");
package/dist/cli.cmd.js CHANGED
@@ -11,7 +11,7 @@ require("core-js/modules/es.string.trim.js");
11
11
  Object.defineProperty(exports, "__esModule", {
12
12
  value: true
13
13
  });
14
- exports.CliCmd = exports.CliGenerateCmd = void 0;
14
+ exports.CliGenerateCmd = exports.CliCmd = void 0;
15
15
 
16
16
  function _defineProperty2() {
17
17
  const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
@@ -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;
@@ -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;
package/dist/index.js CHANGED
@@ -12,28 +12,22 @@ var _exportNames = {
12
12
  CLIAspect: true,
13
13
  MainRuntime: true
14
14
  };
15
- Object.defineProperty(exports, "Command", {
16
- enumerable: true,
17
- get: function () {
18
- return _command().Command;
19
- }
20
- });
21
15
  Object.defineProperty(exports, "CLIArgs", {
22
16
  enumerable: true,
23
17
  get: function () {
24
18
  return _command().CLIArgs;
25
19
  }
26
20
  });
27
- Object.defineProperty(exports, "Flags", {
21
+ Object.defineProperty(exports, "CLIAspect", {
28
22
  enumerable: true,
29
23
  get: function () {
30
- return _command().Flags;
24
+ return _cli().CLIAspect;
31
25
  }
32
26
  });
33
- Object.defineProperty(exports, "GenericObject", {
27
+ Object.defineProperty(exports, "Command", {
34
28
  enumerable: true,
35
29
  get: function () {
36
- return _command().GenericObject;
30
+ return _command().Command;
37
31
  }
38
32
  });
39
33
  Object.defineProperty(exports, "CommandOptions", {
@@ -42,10 +36,16 @@ Object.defineProperty(exports, "CommandOptions", {
42
36
  return _legacyCommand().CommandOptions;
43
37
  }
44
38
  });
45
- Object.defineProperty(exports, "CLIAspect", {
39
+ Object.defineProperty(exports, "Flags", {
46
40
  enumerable: true,
47
41
  get: function () {
48
- return _cli().CLIAspect;
42
+ return _command().Flags;
43
+ }
44
+ });
45
+ Object.defineProperty(exports, "GenericObject", {
46
+ enumerable: true,
47
+ get: function () {
48
+ return _command().GenericObject;
49
49
  }
50
50
  });
51
51
  Object.defineProperty(exports, "MainRuntime", {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/cli",
3
- "version": "0.0.380",
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.380"
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.366"
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.76",
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.76",
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
@@ -25,7 +25,6 @@
25
25
  "strict": true,
26
26
  "noImplicitAny": false,
27
27
  "rootDir": ".",
28
- "removeComments": true,
29
28
  "preserveConstEnums": true,
30
29
  "resolveJsonModule": true
31
30
  },
Binary file