@teambit/cli 0.0.761 → 0.0.762
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.
- package/dist/cli.main.runtime.d.ts +21 -2
- package/dist/cli.main.runtime.js +36 -7
- package/dist/cli.main.runtime.js.map +1 -1
- package/dist/{preview-1692345627885.js → preview-1692674301863.js} +2 -2
- package/package-tar/teambit-cli-0.0.762.tgz +0 -0
- package/package.json +5 -5
- package/package-tar/teambit-cli-0.0.761.tgz +0 -0
|
@@ -5,15 +5,18 @@ import { GroupsType } from '@teambit/legacy/dist/cli/command-groups';
|
|
|
5
5
|
import { Logger, LoggerMain } from '@teambit/logger';
|
|
6
6
|
export declare type CommandList = Array<Command>;
|
|
7
7
|
export declare type OnStart = (hasWorkspace: boolean, currentCommand: string) => Promise<void>;
|
|
8
|
+
export declare type OnBeforeExitFn = () => Promise<void>;
|
|
8
9
|
export declare type OnStartSlot = SlotRegistry<OnStart>;
|
|
9
10
|
export declare type CommandsSlot = SlotRegistry<CommandList>;
|
|
11
|
+
export declare type OnBeforeExitSlot = SlotRegistry<OnBeforeExitFn>;
|
|
10
12
|
export declare class CLIMain {
|
|
11
13
|
private commandsSlot;
|
|
12
14
|
private onStartSlot;
|
|
15
|
+
private onBeforeExitSlot;
|
|
13
16
|
private community;
|
|
14
17
|
private logger;
|
|
15
18
|
groups: GroupsType;
|
|
16
|
-
constructor(commandsSlot: CommandsSlot, onStartSlot: OnStartSlot, community: CommunityMain, logger: Logger);
|
|
19
|
+
constructor(commandsSlot: CommandsSlot, onStartSlot: OnStartSlot, onBeforeExitSlot: OnBeforeExitSlot, community: CommunityMain, logger: Logger);
|
|
17
20
|
/**
|
|
18
21
|
* registers a new command in to the CLI.
|
|
19
22
|
*/
|
|
@@ -39,6 +42,22 @@ export declare class CLIMain {
|
|
|
39
42
|
*/
|
|
40
43
|
registerGroup(name: string, description: string): void;
|
|
41
44
|
registerOnStart(onStartFn: OnStart): this;
|
|
45
|
+
/**
|
|
46
|
+
* This will register a function to be called before the process exits.
|
|
47
|
+
* This will run only for "regular" exits
|
|
48
|
+
* e.g.
|
|
49
|
+
* yes - command run and finished successfully
|
|
50
|
+
* yes - command run and failed gracefully (code 1)
|
|
51
|
+
* not SIGKILL (kill -9)
|
|
52
|
+
* not SIGINT (Ctrl+C)
|
|
53
|
+
* not SIGTERM (kill)
|
|
54
|
+
* not uncaughtException
|
|
55
|
+
* not unhandledRejection
|
|
56
|
+
*
|
|
57
|
+
* @param onBeforeExitFn
|
|
58
|
+
* @returns
|
|
59
|
+
*/
|
|
60
|
+
registerOnBeforeExit(onBeforeExitFn: OnBeforeExitFn): this;
|
|
42
61
|
/**
|
|
43
62
|
* execute commands registered to this aspect.
|
|
44
63
|
*/
|
|
@@ -48,5 +67,5 @@ export declare class CLIMain {
|
|
|
48
67
|
static dependencies: import("@teambit/harmony").Aspect[];
|
|
49
68
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
50
69
|
static slots: (((registerFn: () => string) => SlotRegistry<CommandList>) | ((registerFn: () => string) => SlotRegistry<OnStart>))[];
|
|
51
|
-
static provider([community, loggerMain]: [CommunityMain, LoggerMain], config: any, [commandsSlot, onStartSlot]: [CommandsSlot, OnStartSlot]): Promise<CLIMain>;
|
|
70
|
+
static provider([community, loggerMain]: [CommunityMain, LoggerMain], config: any, [commandsSlot, onStartSlot, onBeforeExitSlot]: [CommandsSlot, OnStartSlot, OnBeforeExitSlot]): Promise<CLIMain>;
|
|
52
71
|
}
|
package/dist/cli.main.runtime.js
CHANGED
|
@@ -32,6 +32,13 @@ function _cli() {
|
|
|
32
32
|
};
|
|
33
33
|
return data;
|
|
34
34
|
}
|
|
35
|
+
function _logger() {
|
|
36
|
+
const data = _interopRequireDefault(require("@teambit/legacy/dist/logger/logger"));
|
|
37
|
+
_logger = function () {
|
|
38
|
+
return data;
|
|
39
|
+
};
|
|
40
|
+
return data;
|
|
41
|
+
}
|
|
35
42
|
function _community() {
|
|
36
43
|
const data = require("@teambit/community");
|
|
37
44
|
_community = function () {
|
|
@@ -60,9 +67,9 @@ function _consumer() {
|
|
|
60
67
|
};
|
|
61
68
|
return data;
|
|
62
69
|
}
|
|
63
|
-
function
|
|
70
|
+
function _logger2() {
|
|
64
71
|
const data = require("@teambit/logger");
|
|
65
|
-
|
|
72
|
+
_logger2 = function () {
|
|
66
73
|
return data;
|
|
67
74
|
};
|
|
68
75
|
return data;
|
|
@@ -125,9 +132,10 @@ function _help() {
|
|
|
125
132
|
}
|
|
126
133
|
class CLIMain {
|
|
127
134
|
// if it's not cloned, it is cached across loadBit() instances
|
|
128
|
-
constructor(commandsSlot, onStartSlot, community, logger) {
|
|
135
|
+
constructor(commandsSlot, onStartSlot, onBeforeExitSlot, community, logger) {
|
|
129
136
|
this.commandsSlot = commandsSlot;
|
|
130
137
|
this.onStartSlot = onStartSlot;
|
|
138
|
+
this.onBeforeExitSlot = onBeforeExitSlot;
|
|
131
139
|
this.community = community;
|
|
132
140
|
this.logger = logger;
|
|
133
141
|
(0, _defineProperty2().default)(this, "groups", (0, _lodash().clone)(_commandGroups().groups));
|
|
@@ -190,6 +198,27 @@ class CLIMain {
|
|
|
190
198
|
return this;
|
|
191
199
|
}
|
|
192
200
|
|
|
201
|
+
/**
|
|
202
|
+
* This will register a function to be called before the process exits.
|
|
203
|
+
* This will run only for "regular" exits
|
|
204
|
+
* e.g.
|
|
205
|
+
* yes - command run and finished successfully
|
|
206
|
+
* yes - command run and failed gracefully (code 1)
|
|
207
|
+
* not SIGKILL (kill -9)
|
|
208
|
+
* not SIGINT (Ctrl+C)
|
|
209
|
+
* not SIGTERM (kill)
|
|
210
|
+
* not uncaughtException
|
|
211
|
+
* not unhandledRejection
|
|
212
|
+
*
|
|
213
|
+
* @param onBeforeExitFn
|
|
214
|
+
* @returns
|
|
215
|
+
*/
|
|
216
|
+
registerOnBeforeExit(onBeforeExitFn) {
|
|
217
|
+
this.onBeforeExitSlot.register(onBeforeExitFn);
|
|
218
|
+
_logger().default.registerOnBeforeExitFn(onBeforeExitFn);
|
|
219
|
+
return this;
|
|
220
|
+
}
|
|
221
|
+
|
|
193
222
|
/**
|
|
194
223
|
* execute commands registered to this aspect.
|
|
195
224
|
*/
|
|
@@ -223,9 +252,9 @@ class CLIMain {
|
|
|
223
252
|
command.helpUrl = `https://${this.community.getBaseDomain()}/${command.helpUrl}`;
|
|
224
253
|
}
|
|
225
254
|
}
|
|
226
|
-
static async provider([community, loggerMain], config, [commandsSlot, onStartSlot]) {
|
|
255
|
+
static async provider([community, loggerMain], config, [commandsSlot, onStartSlot, onBeforeExitSlot]) {
|
|
227
256
|
const logger = loggerMain.createLogger(_cli2().CLIAspect.id);
|
|
228
|
-
const cliMain = new CLIMain(commandsSlot, onStartSlot, community, logger);
|
|
257
|
+
const cliMain = new CLIMain(commandsSlot, onStartSlot, onBeforeExitSlot, community, logger);
|
|
229
258
|
const legacyRegistry = (0, _cli().buildRegistry)();
|
|
230
259
|
await ensureWorkspaceAndScope();
|
|
231
260
|
const legacyCommands = legacyRegistry.commands;
|
|
@@ -243,9 +272,9 @@ class CLIMain {
|
|
|
243
272
|
}
|
|
244
273
|
}
|
|
245
274
|
exports.CLIMain = CLIMain;
|
|
246
|
-
(0, _defineProperty2().default)(CLIMain, "dependencies", [_community().CommunityAspect,
|
|
275
|
+
(0, _defineProperty2().default)(CLIMain, "dependencies", [_community().CommunityAspect, _logger2().LoggerAspect]);
|
|
247
276
|
(0, _defineProperty2().default)(CLIMain, "runtime", _cli2().MainRuntime);
|
|
248
|
-
(0, _defineProperty2().default)(CLIMain, "slots", [_harmony().Slot.withType(), _harmony().Slot.withType()]);
|
|
277
|
+
(0, _defineProperty2().default)(CLIMain, "slots", [_harmony().Slot.withType(), _harmony().Slot.withType(), _harmony().Slot.withType()]);
|
|
249
278
|
_cli2().CLIAspect.addRuntime(CLIMain);
|
|
250
279
|
|
|
251
280
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_harmony","data","require","_cli","_community","_pMapSeries","_interopRequireDefault","_commandGroups","_consumer","_logger","_lodash","_cli2","_getCommandId","_legacyCommandAdapter","_cliParser","_completion","_cli3","_help","CLIMain","constructor","commandsSlot","onStartSlot","community","logger","_defineProperty2","default","clone","groups","register","commands","forEach","command","setDefaults","cmd","unregister","commandName","toArray","aspectId","filteredCommands","filter","getCommandId","name","map","set","values","flat","getCommand","find","registerGroup","description","consoleWarning","registerOnStart","onStartFn","run","hasWorkspace","invokeOnStart","CliParser","CLIParser","getBaseDomain","parse","onStartFns","currentCommand","process","argv","pMapSeries","onStart","alias","extendedDescription","group","options","private","trim","loader","undefined","internal","helpUrl","isFullUrl","provider","loggerMain","config","createLogger","CLIAspect","id","cliMain","legacyRegistry","buildRegistry","ensureWorkspaceAndScope","legacyCommands","legacyCommandsAdapters","LegacyCommandAdapter","cliGenerateCmd","CliGenerateCmd","CompletionCmd","cliCmd","CliCmd","getDocsDomain","helpCmd","HelpCmd","push","exports","CommunityAspect","LoggerAspect","MainRuntime","Slot","withType","addRuntime","loadConsumerIfExist","err","url","startsWith"],"sources":["cli.main.runtime.ts"],"sourcesContent":["import { Slot, SlotRegistry } from '@teambit/harmony';\nimport { buildRegistry } from '@teambit/legacy/dist/cli';\nimport { Command } from '@teambit/legacy/dist/cli/command';\nimport { CommunityAspect } from '@teambit/community';\nimport type { CommunityMain } from '@teambit/community';\nimport pMapSeries from 'p-map-series';\nimport { groups, GroupsType } from '@teambit/legacy/dist/cli/command-groups';\nimport { loadConsumerIfExist } from '@teambit/legacy/dist/consumer';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { clone } from 'lodash';\nimport { CLIAspect, MainRuntime } from './cli.aspect';\nimport { getCommandId } from './get-command-id';\nimport { LegacyCommandAdapter } from './legacy-command-adapter';\nimport { CLIParser } from './cli-parser';\nimport { CompletionCmd } from './completion.cmd';\nimport { CliCmd, CliGenerateCmd } from './cli.cmd';\nimport { HelpCmd } from './help.cmd';\n\nexport type CommandList = Array<Command>;\nexport type OnStart = (hasWorkspace: boolean, currentCommand: string) => Promise<void>;\n\nexport type OnStartSlot = SlotRegistry<OnStart>;\nexport type CommandsSlot = SlotRegistry<CommandList>;\n\nexport class CLIMain {\n public groups: GroupsType = clone(groups); // if it's not cloned, it is cached across loadBit() instances\n constructor(\n private commandsSlot: CommandsSlot,\n private onStartSlot: OnStartSlot,\n private community: CommunityMain,\n private logger: Logger\n ) {}\n\n /**\n * registers a new command in to the CLI.\n */\n register(...commands: CommandList) {\n commands.forEach((command) => {\n this.setDefaults(command);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n command.commands!.forEach((cmd) => this.setDefaults(cmd));\n });\n this.commandsSlot.register(commands);\n }\n\n /**\n * helpful for having the same command name in different environments (e.g. legacy and non-legacy).\n * for example `cli.unregister('tag');` removes the \"bit tag\" command.\n */\n unregister(commandName: string) {\n this.commandsSlot.toArray().forEach(([aspectId, commands]) => {\n const filteredCommands = commands.filter((command) => {\n return getCommandId(command.name) !== commandName;\n });\n this.commandsSlot.map.set(aspectId, filteredCommands);\n });\n }\n\n /**\n * list of all registered commands. (legacy and new).\n */\n get commands(): CommandList {\n return this.commandsSlot.values().flat();\n }\n\n /**\n * get an instance of a registered command. (useful for aspects to modify and extend existing commands)\n */\n getCommand(name: string): Command | undefined {\n return this.commands.find((command) => getCommandId(command.name) === name);\n }\n\n /**\n * when running `bit help`, commands are grouped by categories.\n * this method helps registering a new group by providing its name and a description.\n * the name is what needs to be assigned to the `group` property of the Command interface.\n * the description is what shown in the `bit help` output.\n */\n registerGroup(name: string, description: string) {\n if (this.groups[name]) {\n this.logger.consoleWarning(`CLI group \"${name}\" is already registered`);\n } else {\n this.groups[name] = description;\n }\n }\n\n registerOnStart(onStartFn: OnStart) {\n this.onStartSlot.register(onStartFn);\n return this;\n }\n\n /**\n * execute commands registered to this aspect.\n */\n async run(hasWorkspace: boolean) {\n await this.invokeOnStart(hasWorkspace);\n const CliParser = new CLIParser(this.commands, this.groups, this.community.getBaseDomain());\n await CliParser.parse();\n }\n\n private async invokeOnStart(hasWorkspace: boolean) {\n const onStartFns = this.onStartSlot.values();\n const currentCommand = process.argv[2];\n await pMapSeries(onStartFns, (onStart) => onStart(hasWorkspace, currentCommand));\n }\n\n private setDefaults(command: Command) {\n command.alias = command.alias || '';\n command.description = command.description || '';\n command.extendedDescription = command.extendedDescription || '';\n command.group = command.group || 'ungrouped';\n command.options = command.options || [];\n command.private = command.private || false;\n command.commands = command.commands || [];\n command.name = command.name.trim();\n if (command.loader === undefined) {\n if (command.internal) {\n command.loader = false;\n } else {\n command.loader = true;\n }\n }\n if (command.helpUrl && !isFullUrl(command.helpUrl) && this.community) {\n command.helpUrl = `https://${this.community.getBaseDomain()}/${command.helpUrl}`;\n }\n }\n\n static dependencies = [CommunityAspect, LoggerAspect];\n static runtime = MainRuntime;\n static slots = [Slot.withType<CommandList>(), Slot.withType<OnStart>()];\n\n static async provider(\n [community, loggerMain]: [CommunityMain, LoggerMain],\n config,\n [commandsSlot, onStartSlot]: [CommandsSlot, OnStartSlot]\n ) {\n const logger = loggerMain.createLogger(CLIAspect.id);\n const cliMain = new CLIMain(commandsSlot, onStartSlot, community, logger);\n const legacyRegistry = buildRegistry();\n await ensureWorkspaceAndScope();\n const legacyCommands = legacyRegistry.commands;\n const legacyCommandsAdapters = legacyCommands.map((command) => new LegacyCommandAdapter(command, cliMain));\n const cliGenerateCmd = new CliGenerateCmd(cliMain);\n if (!community) {\n cliMain.register(...legacyCommandsAdapters, new CompletionCmd());\n return cliMain;\n }\n const cliCmd = new CliCmd(cliMain, community.getDocsDomain());\n const helpCmd = new HelpCmd(cliMain, community.getDocsDomain());\n cliCmd.commands.push(cliGenerateCmd);\n cliMain.register(...legacyCommandsAdapters, new CompletionCmd(), cliCmd, helpCmd);\n return cliMain;\n }\n}\n\nCLIAspect.addRuntime(CLIMain);\n\n/**\n * kind of a hack.\n * in the legacy, this is running at the beginning and it take care of issues when Bit files are missing,\n * such as \".bit\".\n * (to make this process better, you can easily remove it and run the e2e-tests. you'll see some failing)\n */\nasync function ensureWorkspaceAndScope() {\n try {\n await loadConsumerIfExist();\n } catch (err) {\n // do nothing. it could fail for example with ScopeNotFound error, which is taken care of in \"bit init\".\n }\n}\n\nfunction isFullUrl(url: string) {\n return url.startsWith('http://') || url.startsWith('https://');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,KAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,YAAA;EAAA,MAAAJ,IAAA,GAAAK,sBAAA,CAAAJ,OAAA;EAAAG,WAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,eAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,cAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,UAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,SAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,QAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,OAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,QAAA;EAAA,MAAAT,IAAA,GAAAC,OAAA;EAAAQ,OAAA,YA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A,CAACgC,GAAW,EAAE;EAC9B,OAAOA,GAAG,CAACC,UAAU,CAAC,SAAS,CAAC,IAAID,GAAG,CAACC,UAAU,CAAC,UAAU,CAAC;AAChE"}
|
|
1
|
+
{"version":3,"names":["_harmony","data","require","_cli","_logger","_interopRequireDefault","_community","_pMapSeries","_commandGroups","_consumer","_logger2","_lodash","_cli2","_getCommandId","_legacyCommandAdapter","_cliParser","_completion","_cli3","_help","CLIMain","constructor","commandsSlot","onStartSlot","onBeforeExitSlot","community","logger","_defineProperty2","default","clone","groups","register","commands","forEach","command","setDefaults","cmd","unregister","commandName","toArray","aspectId","filteredCommands","filter","getCommandId","name","map","set","values","flat","getCommand","find","registerGroup","description","consoleWarning","registerOnStart","onStartFn","registerOnBeforeExit","onBeforeExitFn","legacyLogger","registerOnBeforeExitFn","run","hasWorkspace","invokeOnStart","CliParser","CLIParser","getBaseDomain","parse","onStartFns","currentCommand","process","argv","pMapSeries","onStart","alias","extendedDescription","group","options","private","trim","loader","undefined","internal","helpUrl","isFullUrl","provider","loggerMain","config","createLogger","CLIAspect","id","cliMain","legacyRegistry","buildRegistry","ensureWorkspaceAndScope","legacyCommands","legacyCommandsAdapters","LegacyCommandAdapter","cliGenerateCmd","CliGenerateCmd","CompletionCmd","cliCmd","CliCmd","getDocsDomain","helpCmd","HelpCmd","push","exports","CommunityAspect","LoggerAspect","MainRuntime","Slot","withType","addRuntime","loadConsumerIfExist","err","url","startsWith"],"sources":["cli.main.runtime.ts"],"sourcesContent":["import { Slot, SlotRegistry } from '@teambit/harmony';\nimport { buildRegistry } from '@teambit/legacy/dist/cli';\nimport legacyLogger from '@teambit/legacy/dist/logger/logger';\nimport { Command } from '@teambit/legacy/dist/cli/command';\nimport { CommunityAspect } from '@teambit/community';\nimport type { CommunityMain } from '@teambit/community';\nimport pMapSeries from 'p-map-series';\nimport { groups, GroupsType } from '@teambit/legacy/dist/cli/command-groups';\nimport { loadConsumerIfExist } from '@teambit/legacy/dist/consumer';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { clone } from 'lodash';\nimport { CLIAspect, MainRuntime } from './cli.aspect';\nimport { getCommandId } from './get-command-id';\nimport { LegacyCommandAdapter } from './legacy-command-adapter';\nimport { CLIParser } from './cli-parser';\nimport { CompletionCmd } from './completion.cmd';\nimport { CliCmd, CliGenerateCmd } from './cli.cmd';\nimport { HelpCmd } from './help.cmd';\n\nexport type CommandList = Array<Command>;\nexport type OnStart = (hasWorkspace: boolean, currentCommand: string) => Promise<void>;\nexport type OnBeforeExitFn = () => Promise<void>;\n\nexport type OnStartSlot = SlotRegistry<OnStart>;\nexport type CommandsSlot = SlotRegistry<CommandList>;\nexport type OnBeforeExitSlot = SlotRegistry<OnBeforeExitFn>;\n\nexport class CLIMain {\n public groups: GroupsType = clone(groups); // if it's not cloned, it is cached across loadBit() instances\n constructor(\n private commandsSlot: CommandsSlot,\n private onStartSlot: OnStartSlot,\n private onBeforeExitSlot: OnBeforeExitSlot,\n private community: CommunityMain,\n private logger: Logger\n ) {}\n\n /**\n * registers a new command in to the CLI.\n */\n register(...commands: CommandList) {\n commands.forEach((command) => {\n this.setDefaults(command);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n command.commands!.forEach((cmd) => this.setDefaults(cmd));\n });\n this.commandsSlot.register(commands);\n }\n\n /**\n * helpful for having the same command name in different environments (e.g. legacy and non-legacy).\n * for example `cli.unregister('tag');` removes the \"bit tag\" command.\n */\n unregister(commandName: string) {\n this.commandsSlot.toArray().forEach(([aspectId, commands]) => {\n const filteredCommands = commands.filter((command) => {\n return getCommandId(command.name) !== commandName;\n });\n this.commandsSlot.map.set(aspectId, filteredCommands);\n });\n }\n\n /**\n * list of all registered commands. (legacy and new).\n */\n get commands(): CommandList {\n return this.commandsSlot.values().flat();\n }\n\n /**\n * get an instance of a registered command. (useful for aspects to modify and extend existing commands)\n */\n getCommand(name: string): Command | undefined {\n return this.commands.find((command) => getCommandId(command.name) === name);\n }\n\n /**\n * when running `bit help`, commands are grouped by categories.\n * this method helps registering a new group by providing its name and a description.\n * the name is what needs to be assigned to the `group` property of the Command interface.\n * the description is what shown in the `bit help` output.\n */\n registerGroup(name: string, description: string) {\n if (this.groups[name]) {\n this.logger.consoleWarning(`CLI group \"${name}\" is already registered`);\n } else {\n this.groups[name] = description;\n }\n }\n\n registerOnStart(onStartFn: OnStart) {\n this.onStartSlot.register(onStartFn);\n return this;\n }\n\n /**\n * This will register a function to be called before the process exits.\n * This will run only for \"regular\" exits\n * e.g.\n * yes - command run and finished successfully\n * yes - command run and failed gracefully (code 1)\n * not SIGKILL (kill -9)\n * not SIGINT (Ctrl+C)\n * not SIGTERM (kill)\n * not uncaughtException\n * not unhandledRejection\n *\n * @param onBeforeExitFn\n * @returns\n */\n registerOnBeforeExit(onBeforeExitFn: OnBeforeExitFn) {\n this.onBeforeExitSlot.register(onBeforeExitFn);\n legacyLogger.registerOnBeforeExitFn(onBeforeExitFn);\n return this;\n }\n\n /**\n * execute commands registered to this aspect.\n */\n async run(hasWorkspace: boolean) {\n await this.invokeOnStart(hasWorkspace);\n const CliParser = new CLIParser(this.commands, this.groups, this.community.getBaseDomain());\n await CliParser.parse();\n }\n\n private async invokeOnStart(hasWorkspace: boolean) {\n const onStartFns = this.onStartSlot.values();\n const currentCommand = process.argv[2];\n await pMapSeries(onStartFns, (onStart) => onStart(hasWorkspace, currentCommand));\n }\n\n private setDefaults(command: Command) {\n command.alias = command.alias || '';\n command.description = command.description || '';\n command.extendedDescription = command.extendedDescription || '';\n command.group = command.group || 'ungrouped';\n command.options = command.options || [];\n command.private = command.private || false;\n command.commands = command.commands || [];\n command.name = command.name.trim();\n if (command.loader === undefined) {\n if (command.internal) {\n command.loader = false;\n } else {\n command.loader = true;\n }\n }\n if (command.helpUrl && !isFullUrl(command.helpUrl) && this.community) {\n command.helpUrl = `https://${this.community.getBaseDomain()}/${command.helpUrl}`;\n }\n }\n\n static dependencies = [CommunityAspect, LoggerAspect];\n static runtime = MainRuntime;\n static slots = [Slot.withType<CommandList>(), Slot.withType<OnStart>(), Slot.withType<OnBeforeExitFn>()];\n\n static async provider(\n [community, loggerMain]: [CommunityMain, LoggerMain],\n config,\n [commandsSlot, onStartSlot, onBeforeExitSlot]: [CommandsSlot, OnStartSlot, OnBeforeExitSlot]\n ) {\n const logger = loggerMain.createLogger(CLIAspect.id);\n const cliMain = new CLIMain(commandsSlot, onStartSlot, onBeforeExitSlot, community, logger);\n const legacyRegistry = buildRegistry();\n await ensureWorkspaceAndScope();\n const legacyCommands = legacyRegistry.commands;\n const legacyCommandsAdapters = legacyCommands.map((command) => new LegacyCommandAdapter(command, cliMain));\n const cliGenerateCmd = new CliGenerateCmd(cliMain);\n if (!community) {\n cliMain.register(...legacyCommandsAdapters, new CompletionCmd());\n return cliMain;\n }\n const cliCmd = new CliCmd(cliMain, community.getDocsDomain());\n const helpCmd = new HelpCmd(cliMain, community.getDocsDomain());\n cliCmd.commands.push(cliGenerateCmd);\n cliMain.register(...legacyCommandsAdapters, new CompletionCmd(), cliCmd, helpCmd);\n return cliMain;\n }\n}\n\nCLIAspect.addRuntime(CLIMain);\n\n/**\n * kind of a hack.\n * in the legacy, this is running at the beginning and it take care of issues when Bit files are missing,\n * such as \".bit\".\n * (to make this process better, you can easily remove it and run the e2e-tests. you'll see some failing)\n */\nasync function ensureWorkspaceAndScope() {\n try {\n await loadConsumerIfExist();\n } catch (err) {\n // do nothing. it could fail for example with ScopeNotFound error, which is taken care of in \"bit init\".\n }\n}\n\nfunction isFullUrl(url: string) {\n return url.startsWith('http://') || url.startsWith('https://');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,KAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAF,IA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AG,EAAE;IACZ;EAAA;AAEJ;AAEA,SAAS/B,SAASA,CAACgC,GAAW,EAAE;EAC9B,OAAOA,GAAG,CAACC,UAAU,CAAC,SAAS,CAAC,IAAID,GAAG,CAACC,UAAU,CAAC,UAAU,CAAC;AAChE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.762/dist/cli.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.762/dist/cli.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
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.762",
|
|
4
4
|
"homepage": "https://bit.cloud/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.762"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"core-js": "^3.0.0",
|
|
20
20
|
"@babel/runtime": "7.20.0",
|
|
21
21
|
"@teambit/harmony": "0.4.6",
|
|
22
|
-
"@teambit/community": "0.0.
|
|
23
|
-
"@teambit/logger": "0.0.
|
|
22
|
+
"@teambit/community": "0.0.310",
|
|
23
|
+
"@teambit/logger": "0.0.855",
|
|
24
24
|
"@teambit/bit-error": "0.0.402"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@types/testing-library__jest-dom": "5.9.5"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@teambit/legacy": "1.0.
|
|
38
|
+
"@teambit/legacy": "1.0.546",
|
|
39
39
|
"react": "^16.8.0 || ^17.0.0",
|
|
40
40
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
41
41
|
},
|
|
Binary file
|