@teambit/cli 0.0.1026 → 0.0.1028

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.
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="0" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.harmony/cli@0.0.1026" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.harmony/cli@0.0.1028" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.harmony/cli-preview"]=t():e["teambit.harmony/cli-preview"]=t()}(self,(()=>(()=>{"use strict";var e={8921:(e,t,o)=>{var n={id:"teambit.harmony/cli@0.0.1026",homepage:"https://bit.cloud/teambit/harmony/cli",exported:!0};function r(){const e=a(o(1594));return r=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,a.__bit_component=n;const i=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/cli.svg"}));i.__bit_component=n,t.Logo=i},1594:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.r(n),o.d(n,{compositions:()=>u,compositions_metadata:()=>y,overview:()=>f});var r={};o.r(r),o.d(r,{default:()=>p});var a=o(8921);o(1594);const i=MdxJsReact,s=TeambitMdxUiMdxScopeContext;var c=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},l.apply(null,arguments)}var d={},m="wrapper";function p(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;o[n]=e[n]}return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)o=a[n],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,c);return(0,i.mdx)(m,l({},d,o,{components:t,mdxType:"MDXLayout"}),(0,i.mdx)(s.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,i.mdx)("p",null,"CLI Aspect manages the commands in the CLI. New commands are registered to this aspect with the necessary data such as, command-name, description and flags. Parsing the args from the CLI is done by Commander package."),(0,i.mdx)("h2",null,"Features"),(0,i.mdx)("ul",null,(0,i.mdx)("li",{parentName:"ul"},"Allow to register new commands"),(0,i.mdx)("li",{parentName:"ul"},"Use commander commands."),(0,i.mdx)("li",{parentName:"ul"},"Render to stdout as string or as a React component by Ink."))))}p.isMDXComponent=!0;const u=[a],f=[r],y={compositions:[{displayName:"Logo",identifier:"Logo"}]};return n})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.harmony/cli-preview"]=t():e["teambit.harmony/cli-preview"]=t()}(self,(()=>(()=>{"use strict";var e={1067:(e,t,o)=>{var n={id:"teambit.harmony/cli@0.0.1028",homepage:"https://bit.cloud/teambit/harmony/cli",exported:!0};function r(){const e=a(o(1594));return r=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,a.__bit_component=n;const i=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/cli.svg"}));i.__bit_component=n,t.Logo=i},1594:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.r(n),o.d(n,{compositions:()=>u,compositions_metadata:()=>y,overview:()=>f});var r={};o.r(r),o.d(r,{default:()=>p});var a=o(1067);o(1594);const i=MdxJsReact,s=TeambitMdxUiMdxScopeContext;var c=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},l.apply(null,arguments)}var d={},m="wrapper";function p(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;o[n]=e[n]}return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)o=a[n],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,c);return(0,i.mdx)(m,l({},d,o,{components:t,mdxType:"MDXLayout"}),(0,i.mdx)(s.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,i.mdx)("p",null,"CLI Aspect manages the commands in the CLI. New commands are registered to this aspect with the necessary data such as, command-name, description and flags. Parsing the args from the CLI is done by Commander package."),(0,i.mdx)("h2",null,"Features"),(0,i.mdx)("ul",null,(0,i.mdx)("li",{parentName:"ul"},"Allow to register new commands"),(0,i.mdx)("li",{parentName:"ul"},"Use commander commands."),(0,i.mdx)("li",{parentName:"ul"},"Render to stdout as string or as a React component by Ink."))))}p.isMDXComponent=!0;const u=[a],f=[r],y={compositions:[{displayName:"Logo",identifier:"Logo"}]};return n})()));
@@ -1648,7 +1648,7 @@
1648
1648
  "_legacy": {
1649
1649
  "scope": "teambit.harmony",
1650
1650
  "name": "cli",
1651
- "version": "0.0.1026"
1651
+ "version": "0.0.1028"
1652
1652
  },
1653
1653
  "_scope": "teambit.harmony"
1654
1654
  }
@@ -1762,7 +1762,7 @@
1762
1762
  "_legacy": {
1763
1763
  "scope": "teambit.harmony",
1764
1764
  "name": "cli",
1765
- "version": "0.0.1026"
1765
+ "version": "0.0.1028"
1766
1766
  },
1767
1767
  "_scope": "teambit.harmony"
1768
1768
  }
@@ -2078,7 +2078,7 @@
2078
2078
  "__schema": "FunctionLikeSchema",
2079
2079
  "location": {
2080
2080
  "filePath": "cli-parser.ts",
2081
- "line": 307,
2081
+ "line": 320,
2082
2082
  "character": 1
2083
2083
  },
2084
2084
  "signature": "function findCommandByArgv(commands: Command[]): Command | undefined",
@@ -2088,7 +2088,7 @@
2088
2088
  "__schema": "ParameterSchema",
2089
2089
  "location": {
2090
2090
  "filePath": "cli-parser.ts",
2091
- "line": 307,
2091
+ "line": 320,
2092
2092
  "character": 35
2093
2093
  },
2094
2094
  "name": "commands",
@@ -2096,14 +2096,14 @@
2096
2096
  "__schema": "TypeArraySchema",
2097
2097
  "location": {
2098
2098
  "filePath": "cli-parser.ts",
2099
- "line": 307,
2099
+ "line": 320,
2100
2100
  "character": 45
2101
2101
  },
2102
2102
  "type": {
2103
2103
  "__schema": "TypeRefSchema",
2104
2104
  "location": {
2105
2105
  "filePath": "cli-parser.ts",
2106
- "line": 307,
2106
+ "line": 320,
2107
2107
  "character": 45
2108
2108
  },
2109
2109
  "name": "Command"
@@ -2117,7 +2117,7 @@
2117
2117
  "__schema": "TypeUnionSchema",
2118
2118
  "location": {
2119
2119
  "filePath": "cli-parser.ts",
2120
- "line": 307,
2120
+ "line": 320,
2121
2121
  "character": 57
2122
2122
  },
2123
2123
  "types": [
@@ -2125,7 +2125,7 @@
2125
2125
  "__schema": "TypeRefSchema",
2126
2126
  "location": {
2127
2127
  "filePath": "cli-parser.ts",
2128
- "line": 307,
2128
+ "line": 320,
2129
2129
  "character": 57
2130
2130
  },
2131
2131
  "name": "Command"
@@ -2134,7 +2134,7 @@
2134
2134
  "__schema": "KeywordTypeSchema",
2135
2135
  "location": {
2136
2136
  "filePath": "cli-parser.ts",
2137
- "line": 307,
2137
+ "line": 320,
2138
2138
  "character": 67
2139
2139
  },
2140
2140
  "name": "undefined"
@@ -3640,7 +3640,7 @@
3640
3640
  "componentId": {
3641
3641
  "scope": "teambit.harmony",
3642
3642
  "name": "cli",
3643
- "version": "0.0.1026"
3643
+ "version": "0.0.1028"
3644
3644
  },
3645
3645
  "taggedModuleExports": []
3646
3646
  }
@@ -272,7 +272,6 @@ class CLIParser {
272
272
  */
273
273
  logCommandHelp(help) {
274
274
  const command = findCommandByArgv(this.commands);
275
- const replacer = (_, p1, p2) => `${p1}${_chalk().default.green(p2)}`;
276
275
  const lines = help.split('\n');
277
276
  const linesWithoutEmpty = (0, _lodash().compact)(lines);
278
277
  const cmdLine = linesWithoutEmpty[0];
@@ -315,7 +314,18 @@ class CLIParser {
315
314
  }
316
315
 
317
316
  // show the flags in green
318
- const optionsColored = options.map(opt => opt.replace(/(--)([\w-]+)/, replacer).replace(/(-)([\w-]+)/, replacer));
317
+ const optionsColored = options.map(optLine => {
318
+ const match = optLine.match(/^(\s*)(.+?)(\s{2,}.*)/);
319
+ if (match) {
320
+ const leadingSpaces = match[1];
321
+ const optionPart = match[2];
322
+ const rest = match[3];
323
+ const coloredOptionPart = optionPart.replace(/(^|[^a-zA-Z0-9])(--?[a-zA-Z][a-zA-Z-]*)/g, (m, p1, p2) => p1 + _chalk().default.green(p2));
324
+ return leadingSpaces + coloredOptionPart + rest;
325
+ } else {
326
+ return optLine;
327
+ }
328
+ });
319
329
  const argsColored = args.map(arg => arg.replace(/^ {2}\S+/, argName => _chalk().default.green(argName))); // regex: two spaces then the first word until a white space
320
330
  const optionsStr = options.length ? `\n${_yargsAdapter().STANDARD_GROUP}\n${optionsColored.join('\n')}\n` : '';
321
331
  const argumentsStr = args.length ? `\nArguments:\n${argsColored.join('\n')}\n` : '';
@@ -1 +1 @@
1
- {"version":3,"names":["_didyoumean","data","_interopRequireDefault","require","_yargs","_lodash","_consumer","_logger","_loader","_chalk","_getCommandId","_help","_yargsAdapter","_commandNotFound","_yargsExitWorkaround","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","CLIParser","constructor","commands","groups","onCommandStartSlot","yargs","parse","args","process","argv","slice","throwForNonExistsCommand","logger","debug","join","writeCommandHistoryStart","help","configureParser","forEach","command","length","parseCommandWithSubCommands","yargsCommand","getYargsCommand","addYargsCommand","configureGlobalFlags","setHelpMiddleware","handleCommandFailure","configureCompletion","strict","wrap","currentYargsCommand","yargsCommands","find","y","commandRunner","Error","push","middleware","_","shouldShowInternalCommands","Boolean","internal","printHelp","exit","loader","off","showHelp","logCommandHelp","bind","fail","msg","err","stop","isHelpFlagEntered","includes","msgForDaemon","error","YargsExitWorkaround","helpMsg","isMsgAboutMissingArgs","startsWith","console","log","chalk","yellow","isDaemon","commandsToShowComponentIdsForCompletion","completion","current","completionFilter","done","consumer","loadConsumerIfExist","bitmapIdsFromCurrentLane","map","id","toStringWithoutVersion","formatHelp","parserConfiguration","yarnCommand","builderFunc","cmd","subCommand","options","YargsAdapter","getGlobalOptions","builder","handler","option","alias","describe","group","GLOBAL_GROUP","global","commandName","commandsNames","c","getCommandId","name","aliases","filter","a","existingGlobalFlags","validCommands","commandExist","didYouMean","returnFirstMatch","suggestions","private","suggestion","Array","isArray","CommandNotFound","findCommandByArgv","replacer","p1","p2","green","lines","split","linesWithoutEmpty","compact","cmdLine","description","globalOptions","subCommands","examples","optionsStarted","globalStarted","subCommandsStarted","positionalsStarted","examplesStarted","currentLine","STANDARD_GROUP","optionsColored","opt","replace","argsColored","arg","argName","optionsStr","argumentsStr","examplesStr","subCommandsStr","descriptionColored","desc","bold","extendedDescription","helpUrl","underline","descriptionStr","globalOptionsStr","finalOutput","exports","enteredCommand","enteredSubCommand","undefined","isCommandMatch","str"],"sources":["cli-parser.ts"],"sourcesContent":["import didYouMean from 'didyoumean';\nimport yargs from 'yargs';\nimport { Command } from '@teambit/legacy/dist/cli/command';\nimport { GroupsType } from '@teambit/legacy/dist/cli/command-groups';\nimport { compact } from 'lodash';\nimport { loadConsumerIfExist } from '@teambit/legacy/dist/consumer';\nimport logger from '@teambit/legacy/dist/logger/logger';\nimport loader from '@teambit/legacy/dist/cli/loader';\nimport chalk from 'chalk';\nimport { getCommandId } from './get-command-id';\nimport { formatHelp } from './help';\nimport { GLOBAL_GROUP, STANDARD_GROUP, YargsAdapter } from './yargs-adapter';\nimport { CommandNotFound } from './exceptions/command-not-found';\nimport { OnCommandStartSlot } from './cli.main.runtime';\nimport { CommandRunner } from './command-runner';\nimport { YargsExitWorkaround } from './exceptions/yargs-exit-workaround';\n\nexport class CLIParser {\n public parser = yargs;\n private yargsCommands: YargsAdapter[] = [];\n constructor(\n private commands: Command[],\n private groups: GroupsType,\n private onCommandStartSlot: OnCommandStartSlot\n ) {}\n\n async parse(args = process.argv.slice(2)): Promise<CommandRunner> {\n this.throwForNonExistsCommand(args[0]);\n logger.debug(`[+] CLI-INPUT: ${args.join(' ')}`);\n logger.writeCommandHistoryStart();\n yargs(args);\n yargs.help(false);\n this.configureParser();\n this.commands.forEach((command: Command) => {\n if (command.commands && command.commands.length) {\n this.parseCommandWithSubCommands(command);\n } else {\n const yargsCommand = this.getYargsCommand(command);\n this.addYargsCommand(yargsCommand);\n }\n });\n this.configureGlobalFlags();\n this.setHelpMiddleware();\n this.handleCommandFailure();\n this.configureCompletion();\n // yargs.showHelpOnFail(false); // doesn't help. it still shows the help on failure.\n yargs.strict(); // don't allow non-exist flags and non-exist commands\n\n yargs\n // .recommendCommands() // don't use it, it brings the global help of yargs, we have a custom one\n .wrap(null);\n\n await yargs.parse();\n\n const currentYargsCommand = this.yargsCommands.find((y) => y.commandRunner);\n if (!currentYargsCommand) {\n // this happens when the args/flags are wrong. in this case, it prints the help of the command and in most cases\n // exits the process before reaching this line. however, in case logger.isDaemon is true, which is for bit-cli-server,\n // it doesn't exits the process, so we need to return undefined here.\n throw new Error(`yargs failed to parse the command \"${args.join(' ')}\" and also failed to catch it properly`);\n }\n return currentYargsCommand.commandRunner as CommandRunner;\n }\n\n private addYargsCommand(yargsCommand: YargsAdapter) {\n this.yargsCommands.push(yargsCommand);\n yargs.command(yargsCommand);\n }\n\n private setHelpMiddleware() {\n yargs.middleware((argv) => {\n if (argv._.length === 0 && argv.help) {\n const shouldShowInternalCommands = Boolean(argv.internal);\n // this is the main help page\n this.printHelp(shouldShowInternalCommands);\n process.exit(0);\n }\n if (argv.help) {\n loader.off(); // stop the \"loading bit...\" before showing help if needed\n // this is a command help page\n yargs.showHelp(this.logCommandHelp.bind(this));\n process.exit(0);\n }\n }, true);\n }\n\n private handleCommandFailure() {\n yargs.fail((msg, err) => {\n loader.stop();\n if (err) {\n throw err;\n }\n const args = process.argv.slice(2);\n const isHelpFlagEntered = args.includes('--help') || args.includes('-h');\n let msgForDaemon = '';\n try {\n yargs.showHelp(this.logCommandHelp.bind(this));\n } catch (error: any) {\n if (error instanceof YargsExitWorkaround) {\n msgForDaemon = error.helpMsg;\n } else {\n throw error;\n }\n }\n const isMsgAboutMissingArgs = msg.startsWith('Not enough non-option arguments');\n // avoid showing the \"Not enough non-option arguments\" message when the user is trying to get the command help\n if (!isMsgAboutMissingArgs || !isHelpFlagEntered) {\n // eslint-disable-next-line no-console\n console.log(`\\n${chalk.yellow(msg)}`);\n msgForDaemon += `\\n${chalk.yellow(msg)}`;\n }\n if (logger.isDaemon) throw new YargsExitWorkaround(1, msgForDaemon);\n process.exit(1);\n });\n }\n\n private configureCompletion() {\n const commandsToShowComponentIdsForCompletion = [\n 'show',\n 'diff',\n 'tag',\n 'export',\n 'env',\n 'envs',\n 'compile',\n 'build',\n 'test',\n 'lint',\n 'log',\n 'dependents',\n 'dependencies',\n ];\n // @ts-ignore\n yargs.completion('completion', async function (current, argv, completionFilter, done) {\n if (!current.startsWith('-') && commandsToShowComponentIdsForCompletion.includes(argv._[1])) {\n const consumer = await loadConsumerIfExist();\n done(consumer?.bitmapIdsFromCurrentLane.map((id) => id.toStringWithoutVersion()));\n } else {\n completionFilter();\n }\n });\n }\n\n private printHelp(shouldShowInternalCommands = false) {\n const help = formatHelp(this.commands, this.groups, shouldShowInternalCommands);\n if (logger.isDaemon) throw new YargsExitWorkaround(0, help);\n else console.log(help); // eslint-disable-line no-console\n }\n\n private configureParser() {\n yargs.parserConfiguration({\n // 'strip-dashed': true, // we can't enable it, otherwise, the completion doesn't work\n 'strip-aliased': true,\n 'boolean-negation': false,\n 'populate--': true,\n });\n }\n\n private parseCommandWithSubCommands(command: Command) {\n const yarnCommand = this.getYargsCommand(command);\n const builderFunc = () => {\n command.commands?.forEach((cmd) => {\n const subCommand = this.getYargsCommand(cmd);\n this.addYargsCommand(subCommand);\n });\n // since the \"builder\" method is overridden, the global flags of the main command are gone, this fixes it.\n yargs.options(YargsAdapter.getGlobalOptions(command));\n return yargs;\n };\n yarnCommand.builder = builderFunc;\n this.addYargsCommand(yarnCommand);\n }\n\n private getYargsCommand(command: Command): YargsAdapter {\n const yargsCommand = new YargsAdapter(command, this.onCommandStartSlot);\n yargsCommand.builder = yargsCommand.builder.bind(yargsCommand);\n yargsCommand.handler = yargsCommand.handler.bind(yargsCommand);\n\n return yargsCommand;\n }\n\n private configureGlobalFlags() {\n yargs\n .option('help', {\n alias: 'h',\n describe: 'show help',\n group: GLOBAL_GROUP,\n })\n .option('version', {\n global: false,\n alias: 'v',\n describe: 'show version',\n group: GLOBAL_GROUP,\n });\n }\n\n private throwForNonExistsCommand(commandName: string) {\n if (!commandName || commandName.startsWith('-')) {\n return;\n }\n const commandsNames = this.commands.map((c) => getCommandId(c.name));\n const aliases = this.commands.map((c) => c.alias).filter((a) => a);\n const existingGlobalFlags = ['-V', '--version'];\n const validCommands = [...commandsNames, ...aliases, ...existingGlobalFlags];\n const commandExist = validCommands.includes(commandName);\n\n if (!commandExist) {\n didYouMean.returnFirstMatch = true;\n const suggestions = didYouMean(\n commandName,\n this.commands.filter((c) => !c.private).map((c) => getCommandId(c.name))\n );\n const suggestion = suggestions && Array.isArray(suggestions) ? suggestions[0] : suggestions;\n\n throw new CommandNotFound(commandName, suggestion as string);\n }\n }\n\n /**\n * manipulate the command help output. there is no API from Yarn to do any of this, so it needs to be done manually.\n * see https://github.com/yargs/yargs/issues/1956\n *\n * the original order of the output:\n * description\n * Options\n * Commands\n * Global\n * Positionals\n * Examples\n */\n private logCommandHelp(help: string) {\n const command = findCommandByArgv(this.commands);\n\n const replacer = (_, p1, p2) => `${p1}${chalk.green(p2)}`;\n const lines = help.split('\\n');\n const linesWithoutEmpty = compact(lines);\n const cmdLine = linesWithoutEmpty[0];\n const description: string[] = [];\n const options: string[] = [];\n const globalOptions: string[] = [];\n const subCommands: string[] = [];\n const args: string[] = [];\n const examples: string[] = [];\n\n let optionsStarted = false;\n let globalStarted = false;\n let subCommandsStarted = false;\n let positionalsStarted = false;\n let examplesStarted = false;\n for (let i = 1; i < linesWithoutEmpty.length; i += 1) {\n const currentLine = linesWithoutEmpty[i];\n if (currentLine === STANDARD_GROUP) {\n optionsStarted = true;\n } else if (currentLine === GLOBAL_GROUP) {\n globalStarted = true;\n } else if (currentLine === 'Commands:') {\n subCommandsStarted = true;\n } else if (currentLine === 'Positionals:') {\n positionalsStarted = true;\n } else if (currentLine === 'Examples:') {\n examplesStarted = true;\n } else if (examplesStarted) {\n examples.push(currentLine);\n } else if (positionalsStarted) {\n args.push(currentLine);\n } else if (globalStarted) {\n globalOptions.push(currentLine);\n } else if (optionsStarted) {\n options.push(currentLine);\n } else if (subCommandsStarted) {\n subCommands.push(currentLine);\n } else {\n description.push(currentLine);\n }\n }\n\n // show the flags in green\n const optionsColored = options.map((opt) => opt.replace(/(--)([\\w-]+)/, replacer).replace(/(-)([\\w-]+)/, replacer));\n const argsColored = args.map((arg) => arg.replace(/^ {2}\\S+/, (argName) => chalk.green(argName))); // regex: two spaces then the first word until a white space\n const optionsStr = options.length ? `\\n${STANDARD_GROUP}\\n${optionsColored.join('\\n')}\\n` : '';\n const argumentsStr = args.length ? `\\nArguments:\\n${argsColored.join('\\n')}\\n` : '';\n const examplesStr = examples.length ? `\\nExamples:\\n${examples.join('\\n')}\\n` : '';\n const subCommandsStr = subCommands.length ? `\\n${'Commands:'}\\n${subCommands.join('\\n')}\\n` : '';\n // show the description in bold\n const descriptionColored = description.map((desc) => chalk.bold(desc));\n if (command?.extendedDescription) {\n descriptionColored.push(command?.extendedDescription);\n }\n if (command?.helpUrl) {\n descriptionColored.push(`for more info, visit: ${chalk.underline(command.helpUrl)}`);\n }\n const descriptionStr = descriptionColored.join('\\n');\n const globalOptionsStr = globalOptions.join('\\n');\n\n const finalOutput = `${cmdLine}\n\n${descriptionStr}\n${argumentsStr}${subCommandsStr}${optionsStr}${examplesStr}\n${GLOBAL_GROUP}\n${globalOptionsStr}`;\n\n if (logger.isDaemon) throw new YargsExitWorkaround(0, finalOutput);\n else console.log(finalOutput); // eslint-disable-line no-console\n }\n}\n\nexport function findCommandByArgv(commands: Command[]): Command | undefined {\n const args = process.argv.slice(2);\n const enteredCommand = args[0];\n const enteredSubCommand = args[1];\n if (!enteredCommand) {\n return undefined;\n }\n const isCommandMatch = (cmd: Command, str: string) => {\n return (\n cmd.name.startsWith(`${str} `) || // e.g. \"tag <id>\".startsWith(\"tag \")\n cmd.name === str || // e.g. \"globals\" === \"globals\"\n cmd.alias === str\n ); // e.g. \"t\" === \"t\"\n };\n const command = commands.find((cmd) => isCommandMatch(cmd, enteredCommand));\n if (!command) {\n return undefined;\n }\n if (!command.commands || !enteredSubCommand) {\n return command; // no sub-commands.\n }\n const subCommand = command.commands.find((cmd) => isCommandMatch(cmd, enteredSubCommand));\n return subCommand || command;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,QAAA;EAAA,MAAAN,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAI,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,QAAA;EAAA,MAAAP,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAK,OAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,OAAA;EAAA,MAAAR,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAM,MAAA,YAAAA,CAAA;IAAA,OAAAR,I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IAAI,CAACC,KAAK,CAAC,CAAC,CAAC;EAClC,MAAMiJ,cAAc,GAAGpJ,IAAI,CAAC,CAAC,CAAC;EAC9B,MAAMqJ,iBAAiB,GAAGrJ,IAAI,CAAC,CAAC,CAAC;EACjC,IAAI,CAACoJ,cAAc,EAAE;IACnB,OAAOE,SAAS;EAClB;EACA,MAAMC,cAAc,GAAGA,CAAC5E,GAAY,EAAE6E,GAAW,KAAK;IACpD,OACE7E,GAAG,CAACiB,IAAI,CAACtC,UAAU,CAAC,GAAGkG,GAAG,GAAG,CAAC;IAAI;IAClC7E,GAAG,CAACiB,IAAI,KAAK4D,GAAG;IAAI;IACpB7E,GAAG,CAACQ,KAAK,KAAKqE,GAAG,CACjB,CAAC;EACL,CAAC;EACD,MAAM5I,OAAO,GAAGjB,QAAQ,CAAC+B,IAAI,CAAEiD,GAAG,IAAK4E,cAAc,CAAC5E,GAAG,EAAEyE,cAAc,CAAC,CAAC;EAC3E,IAAI,CAACxI,OAAO,EAAE;IACZ,OAAO0I,SAAS;EAClB;EACA,IAAI,CAAC1I,OAAO,CAACjB,QAAQ,IAAI,CAAC0J,iBAAiB,EAAE;IAC3C,OAAOzI,OAAO,CAAC,CAAC;EAClB;EACA,MAAMgE,UAAU,GAAGhE,OAAO,CAACjB,QAAQ,CAAC+B,IAAI,CAAEiD,GAAG,IAAK4E,cAAc,CAAC5E,GAAG,EAAE0E,iBAAiB,CAAC,CAAC;EACzF,OAAOzE,UAAU,IAAIhE,OAAO;AAC9B","ignoreList":[]}
1
+ {"version":3,"names":["_didyoumean","data","_interopRequireDefault","require","_yargs","_lodash","_consumer","_logger","_loader","_chalk","_getCommandId","_help","_yargsAdapter","_commandNotFound","_yargsExitWorkaround","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","CLIParser","constructor","commands","groups","onCommandStartSlot","yargs","parse","args","process","argv","slice","throwForNonExistsCommand","logger","debug","join","writeCommandHistoryStart","help","configureParser","forEach","command","length","parseCommandWithSubCommands","yargsCommand","getYargsCommand","addYargsCommand","configureGlobalFlags","setHelpMiddleware","handleCommandFailure","configureCompletion","strict","wrap","currentYargsCommand","yargsCommands","find","y","commandRunner","Error","push","middleware","_","shouldShowInternalCommands","Boolean","internal","printHelp","exit","loader","off","showHelp","logCommandHelp","bind","fail","msg","err","stop","isHelpFlagEntered","includes","msgForDaemon","error","YargsExitWorkaround","helpMsg","isMsgAboutMissingArgs","startsWith","console","log","chalk","yellow","isDaemon","commandsToShowComponentIdsForCompletion","completion","current","completionFilter","done","consumer","loadConsumerIfExist","bitmapIdsFromCurrentLane","map","id","toStringWithoutVersion","formatHelp","parserConfiguration","yarnCommand","builderFunc","cmd","subCommand","options","YargsAdapter","getGlobalOptions","builder","handler","option","alias","describe","group","GLOBAL_GROUP","global","commandName","commandsNames","c","getCommandId","name","aliases","filter","a","existingGlobalFlags","validCommands","commandExist","didYouMean","returnFirstMatch","suggestions","private","suggestion","Array","isArray","CommandNotFound","findCommandByArgv","lines","split","linesWithoutEmpty","compact","cmdLine","description","globalOptions","subCommands","examples","optionsStarted","globalStarted","subCommandsStarted","positionalsStarted","examplesStarted","currentLine","STANDARD_GROUP","optionsColored","optLine","match","leadingSpaces","optionPart","rest","coloredOptionPart","replace","m","p1","p2","green","argsColored","arg","argName","optionsStr","argumentsStr","examplesStr","subCommandsStr","descriptionColored","desc","bold","extendedDescription","helpUrl","underline","descriptionStr","globalOptionsStr","finalOutput","exports","enteredCommand","enteredSubCommand","undefined","isCommandMatch","str"],"sources":["cli-parser.ts"],"sourcesContent":["import didYouMean from 'didyoumean';\nimport yargs from 'yargs';\nimport { Command } from '@teambit/legacy/dist/cli/command';\nimport { GroupsType } from '@teambit/legacy/dist/cli/command-groups';\nimport { compact } from 'lodash';\nimport { loadConsumerIfExist } from '@teambit/legacy/dist/consumer';\nimport logger from '@teambit/legacy/dist/logger/logger';\nimport loader from '@teambit/legacy/dist/cli/loader';\nimport chalk from 'chalk';\nimport { getCommandId } from './get-command-id';\nimport { formatHelp } from './help';\nimport { GLOBAL_GROUP, STANDARD_GROUP, YargsAdapter } from './yargs-adapter';\nimport { CommandNotFound } from './exceptions/command-not-found';\nimport { OnCommandStartSlot } from './cli.main.runtime';\nimport { CommandRunner } from './command-runner';\nimport { YargsExitWorkaround } from './exceptions/yargs-exit-workaround';\n\nexport class CLIParser {\n public parser = yargs;\n private yargsCommands: YargsAdapter[] = [];\n constructor(\n private commands: Command[],\n private groups: GroupsType,\n private onCommandStartSlot: OnCommandStartSlot\n ) {}\n\n async parse(args = process.argv.slice(2)): Promise<CommandRunner> {\n this.throwForNonExistsCommand(args[0]);\n logger.debug(`[+] CLI-INPUT: ${args.join(' ')}`);\n logger.writeCommandHistoryStart();\n yargs(args);\n yargs.help(false);\n this.configureParser();\n this.commands.forEach((command: Command) => {\n if (command.commands && command.commands.length) {\n this.parseCommandWithSubCommands(command);\n } else {\n const yargsCommand = this.getYargsCommand(command);\n this.addYargsCommand(yargsCommand);\n }\n });\n this.configureGlobalFlags();\n this.setHelpMiddleware();\n this.handleCommandFailure();\n this.configureCompletion();\n // yargs.showHelpOnFail(false); // doesn't help. it still shows the help on failure.\n yargs.strict(); // don't allow non-exist flags and non-exist commands\n\n yargs\n // .recommendCommands() // don't use it, it brings the global help of yargs, we have a custom one\n .wrap(null);\n\n await yargs.parse();\n\n const currentYargsCommand = this.yargsCommands.find((y) => y.commandRunner);\n if (!currentYargsCommand) {\n // this happens when the args/flags are wrong. in this case, it prints the help of the command and in most cases\n // exits the process before reaching this line. however, in case logger.isDaemon is true, which is for bit-cli-server,\n // it doesn't exits the process, so we need to return undefined here.\n throw new Error(`yargs failed to parse the command \"${args.join(' ')}\" and also failed to catch it properly`);\n }\n return currentYargsCommand.commandRunner as CommandRunner;\n }\n\n private addYargsCommand(yargsCommand: YargsAdapter) {\n this.yargsCommands.push(yargsCommand);\n yargs.command(yargsCommand);\n }\n\n private setHelpMiddleware() {\n yargs.middleware((argv) => {\n if (argv._.length === 0 && argv.help) {\n const shouldShowInternalCommands = Boolean(argv.internal);\n // this is the main help page\n this.printHelp(shouldShowInternalCommands);\n process.exit(0);\n }\n if (argv.help) {\n loader.off(); // stop the \"loading bit...\" before showing help if needed\n // this is a command help page\n yargs.showHelp(this.logCommandHelp.bind(this));\n process.exit(0);\n }\n }, true);\n }\n\n private handleCommandFailure() {\n yargs.fail((msg, err) => {\n loader.stop();\n if (err) {\n throw err;\n }\n const args = process.argv.slice(2);\n const isHelpFlagEntered = args.includes('--help') || args.includes('-h');\n let msgForDaemon = '';\n try {\n yargs.showHelp(this.logCommandHelp.bind(this));\n } catch (error: any) {\n if (error instanceof YargsExitWorkaround) {\n msgForDaemon = error.helpMsg;\n } else {\n throw error;\n }\n }\n const isMsgAboutMissingArgs = msg.startsWith('Not enough non-option arguments');\n // avoid showing the \"Not enough non-option arguments\" message when the user is trying to get the command help\n if (!isMsgAboutMissingArgs || !isHelpFlagEntered) {\n // eslint-disable-next-line no-console\n console.log(`\\n${chalk.yellow(msg)}`);\n msgForDaemon += `\\n${chalk.yellow(msg)}`;\n }\n if (logger.isDaemon) throw new YargsExitWorkaround(1, msgForDaemon);\n process.exit(1);\n });\n }\n\n private configureCompletion() {\n const commandsToShowComponentIdsForCompletion = [\n 'show',\n 'diff',\n 'tag',\n 'export',\n 'env',\n 'envs',\n 'compile',\n 'build',\n 'test',\n 'lint',\n 'log',\n 'dependents',\n 'dependencies',\n ];\n // @ts-ignore\n yargs.completion('completion', async function (current, argv, completionFilter, done) {\n if (!current.startsWith('-') && commandsToShowComponentIdsForCompletion.includes(argv._[1])) {\n const consumer = await loadConsumerIfExist();\n done(consumer?.bitmapIdsFromCurrentLane.map((id) => id.toStringWithoutVersion()));\n } else {\n completionFilter();\n }\n });\n }\n\n private printHelp(shouldShowInternalCommands = false) {\n const help = formatHelp(this.commands, this.groups, shouldShowInternalCommands);\n if (logger.isDaemon) throw new YargsExitWorkaround(0, help);\n else console.log(help); // eslint-disable-line no-console\n }\n\n private configureParser() {\n yargs.parserConfiguration({\n // 'strip-dashed': true, // we can't enable it, otherwise, the completion doesn't work\n 'strip-aliased': true,\n 'boolean-negation': false,\n 'populate--': true,\n });\n }\n\n private parseCommandWithSubCommands(command: Command) {\n const yarnCommand = this.getYargsCommand(command);\n const builderFunc = () => {\n command.commands?.forEach((cmd) => {\n const subCommand = this.getYargsCommand(cmd);\n this.addYargsCommand(subCommand);\n });\n // since the \"builder\" method is overridden, the global flags of the main command are gone, this fixes it.\n yargs.options(YargsAdapter.getGlobalOptions(command));\n return yargs;\n };\n yarnCommand.builder = builderFunc;\n this.addYargsCommand(yarnCommand);\n }\n\n private getYargsCommand(command: Command): YargsAdapter {\n const yargsCommand = new YargsAdapter(command, this.onCommandStartSlot);\n yargsCommand.builder = yargsCommand.builder.bind(yargsCommand);\n yargsCommand.handler = yargsCommand.handler.bind(yargsCommand);\n\n return yargsCommand;\n }\n\n private configureGlobalFlags() {\n yargs\n .option('help', {\n alias: 'h',\n describe: 'show help',\n group: GLOBAL_GROUP,\n })\n .option('version', {\n global: false,\n alias: 'v',\n describe: 'show version',\n group: GLOBAL_GROUP,\n });\n }\n\n private throwForNonExistsCommand(commandName: string) {\n if (!commandName || commandName.startsWith('-')) {\n return;\n }\n const commandsNames = this.commands.map((c) => getCommandId(c.name));\n const aliases = this.commands.map((c) => c.alias).filter((a) => a);\n const existingGlobalFlags = ['-V', '--version'];\n const validCommands = [...commandsNames, ...aliases, ...existingGlobalFlags];\n const commandExist = validCommands.includes(commandName);\n\n if (!commandExist) {\n didYouMean.returnFirstMatch = true;\n const suggestions = didYouMean(\n commandName,\n this.commands.filter((c) => !c.private).map((c) => getCommandId(c.name))\n );\n const suggestion = suggestions && Array.isArray(suggestions) ? suggestions[0] : suggestions;\n\n throw new CommandNotFound(commandName, suggestion as string);\n }\n }\n\n /**\n * manipulate the command help output. there is no API from Yarn to do any of this, so it needs to be done manually.\n * see https://github.com/yargs/yargs/issues/1956\n *\n * the original order of the output:\n * description\n * Options\n * Commands\n * Global\n * Positionals\n * Examples\n */\n private logCommandHelp(help: string) {\n const command = findCommandByArgv(this.commands);\n\n const lines = help.split('\\n');\n const linesWithoutEmpty = compact(lines);\n const cmdLine = linesWithoutEmpty[0];\n const description: string[] = [];\n const options: string[] = [];\n const globalOptions: string[] = [];\n const subCommands: string[] = [];\n const args: string[] = [];\n const examples: string[] = [];\n\n let optionsStarted = false;\n let globalStarted = false;\n let subCommandsStarted = false;\n let positionalsStarted = false;\n let examplesStarted = false;\n for (let i = 1; i < linesWithoutEmpty.length; i += 1) {\n const currentLine = linesWithoutEmpty[i];\n if (currentLine === STANDARD_GROUP) {\n optionsStarted = true;\n } else if (currentLine === GLOBAL_GROUP) {\n globalStarted = true;\n } else if (currentLine === 'Commands:') {\n subCommandsStarted = true;\n } else if (currentLine === 'Positionals:') {\n positionalsStarted = true;\n } else if (currentLine === 'Examples:') {\n examplesStarted = true;\n } else if (examplesStarted) {\n examples.push(currentLine);\n } else if (positionalsStarted) {\n args.push(currentLine);\n } else if (globalStarted) {\n globalOptions.push(currentLine);\n } else if (optionsStarted) {\n options.push(currentLine);\n } else if (subCommandsStarted) {\n subCommands.push(currentLine);\n } else {\n description.push(currentLine);\n }\n }\n\n // show the flags in green\n const optionsColored = options.map((optLine) => {\n const match = optLine.match(/^(\\s*)(.+?)(\\s{2,}.*)/);\n if (match) {\n const leadingSpaces = match[1];\n const optionPart = match[2];\n const rest = match[3];\n const coloredOptionPart = optionPart.replace(\n /(^|[^a-zA-Z0-9])(--?[a-zA-Z][a-zA-Z-]*)/g,\n (m, p1, p2) => p1 + chalk.green(p2)\n );\n return leadingSpaces + coloredOptionPart + rest;\n } else {\n return optLine;\n }\n });\n const argsColored = args.map((arg) => arg.replace(/^ {2}\\S+/, (argName) => chalk.green(argName))); // regex: two spaces then the first word until a white space\n const optionsStr = options.length ? `\\n${STANDARD_GROUP}\\n${optionsColored.join('\\n')}\\n` : '';\n const argumentsStr = args.length ? `\\nArguments:\\n${argsColored.join('\\n')}\\n` : '';\n const examplesStr = examples.length ? `\\nExamples:\\n${examples.join('\\n')}\\n` : '';\n const subCommandsStr = subCommands.length ? `\\n${'Commands:'}\\n${subCommands.join('\\n')}\\n` : '';\n // show the description in bold\n const descriptionColored = description.map((desc) => chalk.bold(desc));\n if (command?.extendedDescription) {\n descriptionColored.push(command?.extendedDescription);\n }\n if (command?.helpUrl) {\n descriptionColored.push(`for more info, visit: ${chalk.underline(command.helpUrl)}`);\n }\n const descriptionStr = descriptionColored.join('\\n');\n const globalOptionsStr = globalOptions.join('\\n');\n\n const finalOutput = `${cmdLine}\n\n${descriptionStr}\n${argumentsStr}${subCommandsStr}${optionsStr}${examplesStr}\n${GLOBAL_GROUP}\n${globalOptionsStr}`;\n\n if (logger.isDaemon) throw new YargsExitWorkaround(0, finalOutput);\n else console.log(finalOutput); // eslint-disable-line no-console\n }\n}\n\nexport function findCommandByArgv(commands: Command[]): Command | undefined {\n const args = process.argv.slice(2);\n const enteredCommand = args[0];\n const enteredSubCommand = args[1];\n if (!enteredCommand) {\n return undefined;\n }\n const isCommandMatch = (cmd: Command, str: string) => {\n return (\n cmd.name.startsWith(`${str} `) || // e.g. \"tag <id>\".startsWith(\"tag \")\n cmd.name === str || // e.g. \"globals\" === \"globals\"\n cmd.alias === str\n ); // e.g. \"t\" === \"t\"\n };\n const command = commands.find((cmd) => isCommandMatch(cmd, enteredCommand));\n if (!command) {\n return undefined;\n }\n if (!command.commands || !enteredSubCommand) {\n return command; // no sub-commands.\n }\n const subCommand = command.commands.find((cmd) => isCommandMatch(cmd, enteredSubCommand));\n return subCommand || command;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAA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OE,SAAS;EAClB;EACA,MAAMC,cAAc,GAAGA,CAACjF,GAAY,EAAEkF,GAAW,KAAK;IACpD,OACElF,GAAG,CAACiB,IAAI,CAACtC,UAAU,CAAC,GAAGuG,GAAG,GAAG,CAAC;IAAI;IAClClF,GAAG,CAACiB,IAAI,KAAKiE,GAAG;IAAI;IACpBlF,GAAG,CAACQ,KAAK,KAAK0E,GAAG,CACjB,CAAC;EACL,CAAC;EACD,MAAMjJ,OAAO,GAAGjB,QAAQ,CAAC+B,IAAI,CAAEiD,GAAG,IAAKiF,cAAc,CAACjF,GAAG,EAAE8E,cAAc,CAAC,CAAC;EAC3E,IAAI,CAAC7I,OAAO,EAAE;IACZ,OAAO+I,SAAS;EAClB;EACA,IAAI,CAAC/I,OAAO,CAACjB,QAAQ,IAAI,CAAC+J,iBAAiB,EAAE;IAC3C,OAAO9I,OAAO,CAAC,CAAC;EAClB;EACA,MAAMgE,UAAU,GAAGhE,OAAO,CAACjB,QAAQ,CAAC+B,IAAI,CAAEiD,GAAG,IAAKiF,cAAc,CAACjF,GAAG,EAAE+E,iBAAiB,CAAC,CAAC;EACzF,OAAO9E,UAAU,IAAIhE,OAAO;AAC9B","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cli@0.0.1026/dist/cli.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cli@0.0.1026/dist/cli.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cli@0.0.1028/dist/cli.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cli@0.0.1028/dist/cli.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/cli",
3
- "version": "0.0.1026",
3
+ "version": "0.0.1028",
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.1026"
9
+ "version": "0.0.1028"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -18,9 +18,9 @@
18
18
  "@teambit/harmony": "0.4.6",
19
19
  "@teambit/bit-error": "0.0.404",
20
20
  "@teambit/bit.get-bit-version": "0.0.1",
21
- "@teambit/host-initializer": "0.0.162",
22
- "@teambit/logger": "0.0.1119",
23
- "@teambit/legacy.analytics": "0.0.46"
21
+ "@teambit/host-initializer": "0.0.164",
22
+ "@teambit/logger": "0.0.1121",
23
+ "@teambit/legacy.analytics": "0.0.47"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/didyoumean": "1.2.0",