@teambit/remove 1.0.939 → 1.0.940

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.
@@ -18,6 +18,13 @@ function _yesno() {
18
18
  };
19
19
  return data;
20
20
  }
21
+ function _cli() {
22
+ const data = require("@teambit/cli");
23
+ _cli = function () {
24
+ return data;
25
+ };
26
+ return data;
27
+ }
21
28
  function _bitError() {
22
29
  const data = require("@teambit/bit-error");
23
30
  _bitError = function () {
@@ -107,11 +114,8 @@ to remove components from your local workspace only, use "bit remove" instead.`)
107
114
  deleteOpts.snaps = snaps.split(',').map(s => s.trim()).filter(Boolean);
108
115
  }
109
116
  const removedComps = await this.remove.deleteComps(componentsPattern, deleteOpts);
110
- const removedCompIds = removedComps.map(comp => comp.id.toString());
111
- return `${_chalk().default.green('successfully deleted the following components:')}
112
- ${removedCompIds.join('\n')}
113
-
114
- ${_chalk().default.bold('to update the remote, please tag/snap and then export. to revert, please use "bit recover"')}`;
117
+ const items = removedComps.map(comp => (0, _cli().formatItem)(comp.id.toString()));
118
+ return (0, _cli().joinSections)([(0, _cli().formatSuccessSummary)('successfully deleted the following components'), items.join('\n'), (0, _cli().formatHint)('to update the remote, please tag/snap and then export. to revert, please use "bit recover"')]);
115
119
  }
116
120
  paintArray(removedObjectsArray) {
117
121
  return removedObjectsArray.map(item => (0, _removeTemplate().removeTemplate)(item, true));
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_yesno","_bitError","_legacy","_removeTemplate","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","DeleteCmd","constructor","remove","workspace","name","description","COMPONENT_PATTERN_HELP","report","componentsPattern","force","lane","updateMain","hard","silent","range","snaps","isOnLane","BitError","isOnMain","removePrompt","localResult","remoteResult","remote","localMessage","removeTemplate","paintArray","deleteOpts","split","map","s","trim","filter","Boolean","removedComps","deleteComps","removedCompIds","comp","id","toString","chalk","green","join","bold","removedObjectsArray","item","logger","clearStatusLine","laneOrMainWarning","remoteOrLocalOutput","ok","yesno","question","exports"],"sources":["delete-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport yesno from 'yesno';\nimport type { Command, CommandOptions } from '@teambit/cli';\nimport type { Workspace } from '@teambit/workspace';\nimport { BitError } from '@teambit/bit-error';\nimport type { RemovedObjects } from '@teambit/legacy.scope';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy.constants';\nimport type { RemoveMain } from './remove.main.runtime';\nimport { removeTemplate } from './remove-template';\n\nexport class DeleteCmd implements Command {\n name = 'delete <component-pattern>';\n description = 'soft-delete components from remote scopes';\n extendedDescription = `marks components as deleted so they won't be visible on remote scopes after export.\ncomponents remain recoverable using \"bit recover\" unless --hard is used (permanent deletion, not recommended).\nto remove components from your local workspace only, use \"bit remove\" instead.`;\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n group = 'collaborate';\n helpUrl = 'reference/components/removing-components';\n skipWorkspace = true;\n alias = '';\n options = [\n [\n '',\n 'lane',\n 'when on a lane, delete the component from this lane only. this removal will not affect main when the lane is merged',\n ],\n ['', 'update-main', 'delete component/s on the main lane after merging this lane into main'],\n [\n '',\n 'range <string>',\n 'EXPERIMENTAL. enter a Semver range to delete specific tags (cannot be used for snaps). see https://www.npmjs.com/package/semver#ranges for the range syntax',\n ],\n ['s', 'silent', 'skip confirmation'],\n [\n '',\n 'hard',\n 'NOT-RECOMMENDED. delete a component completely from a remote scope. careful! this is a permanent change that could corrupt dependents.',\n ],\n [\n 'f',\n 'force',\n 'relevant for --hard. allow the deletion even if used as a dependency. WARNING: components that depend on this component will corrupt',\n ],\n ['', 'snaps <string>', 'comma-separated list of snap hashes to mark as deleted (e.g. --snaps \"hash1,hash2,hash3\")'],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n\n constructor(\n private remove: RemoveMain,\n private workspace?: Workspace\n ) {}\n\n async report(\n [componentsPattern]: [string],\n {\n force = false,\n lane = false,\n updateMain = false,\n hard = false,\n silent = false,\n range,\n snaps,\n }: {\n force?: boolean;\n lane?: boolean;\n updateMain?: boolean;\n hard?: boolean;\n silent?: boolean;\n range?: string;\n snaps?: string;\n }\n ) {\n if (this.workspace?.isOnLane() && !hard && !lane && !updateMain) {\n throw new BitError(`error: to delete components when on a lane, use either --lane or --update-main flag.\n--lane: delete the component from this lane only\n--update-main: delete the component from main after this lane is merged`);\n }\n if (this.workspace?.isOnMain() && updateMain) {\n throw new BitError(`--update-main is relevant only when on a lane`);\n }\n\n if (!silent) {\n await this.removePrompt(hard, lane, updateMain);\n }\n\n if (hard) {\n if (range) throw new BitError(`--range is not supported with --hard flag`);\n const { localResult, remoteResult = [] } = await this.remove.remove({ componentsPattern, remote: true, force });\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n let localMessage = removeTemplate(localResult, false);\n if (localMessage !== '') localMessage += '\\n';\n return `${localMessage}${this.paintArray(remoteResult)}`;\n }\n\n const deleteOpts: any = { updateMain, range };\n if (snaps) {\n deleteOpts.snaps = snaps\n .split(',')\n .map((s) => s.trim())\n .filter(Boolean);\n }\n const removedComps = await this.remove.deleteComps(componentsPattern, deleteOpts);\n const removedCompIds = removedComps.map((comp) => comp.id.toString());\n return `${chalk.green('successfully deleted the following components:')}\n${removedCompIds.join('\\n')}\n\n${chalk.bold('to update the remote, please tag/snap and then export. to revert, please use \"bit recover\"')}`;\n }\n\n private paintArray(removedObjectsArray: RemovedObjects[]) {\n return removedObjectsArray.map((item) => removeTemplate(item, true));\n }\n\n private async removePrompt(hard?: boolean, lane?: boolean, updateMain?: boolean) {\n this.remove.logger.clearStatusLine();\n\n let laneOrMainWarning: string;\n if (updateMain) {\n laneOrMainWarning = `once this lane is merged, the component will be deleted from main (it won't be visible on the remote scope after tag/snap and export).\nif your intent was to undo all changes to this component done as part of the lane so the component in main will be intact, use --lane instead.`;\n } else if (lane) {\n laneOrMainWarning = `this command will mark the component as removed from this lane, resetting the component to its pre-lane state and content (after tag/snap and export)`;\n } else {\n laneOrMainWarning = `this command will mark the component as deleted, and it won't be visible on the remote scope (after tag/snap and export).`;\n }\n\n const remoteOrLocalOutput = hard\n ? `WARNING: the component(s) will be permanently deleted from the remote with no option to recover. prefer omitting --hard to only mark the component as soft deleted`\n : `${laneOrMainWarning}\nif your intent is to remove the component only from your local workspace, refer to bit remove or bit eject.`;\n\n const ok = await yesno({\n question: `${remoteOrLocalOutput}\n${chalk.bold('Would you like to proceed? [yes(y)/no(n)]')}`,\n });\n if (!ok) {\n throw new BitError('the operation has been canceled');\n }\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,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,UAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,gBAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,eAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAmD,SAAAC,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;A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AAG;AAC1B,+IAA+I;IAC3I,CAAC,MAAM,IAAIrC,IAAI,EAAE;MACfqC,iBAAiB,GAAG,uJAAuJ;IAC7K,CAAC,MAAM;MACLA,iBAAiB,GAAG,2HAA2H;IACjJ;IAEA,MAAMC,mBAAmB,GAAGpC,IAAI,GAC5B,oKAAoK,GACpK,GAAGmC,iBAAiB;AAC5B,4GAA4G;IAExG,MAAME,EAAE,GAAG,MAAM,IAAAC,gBAAK,EAAC;MACrBC,QAAQ,EAAE,GAAGH,mBAAmB;AACtC,EAAET,gBAAK,CAACG,IAAI,CAAC,2CAA2C,CAAC;IACrD,CAAC,CAAC;IACF,IAAI,CAACO,EAAE,EAAE;MACP,MAAM,KAAIhC,oBAAQ,EAAC,iCAAiC,CAAC;IACvD;EACF;AACF;AAACmC,OAAA,CAAApD,SAAA,GAAAA,SAAA","ignoreList":[]}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_yesno","_cli","_bitError","_legacy","_removeTemplate","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","DeleteCmd","constructor","remove","workspace","name","description","COMPONENT_PATTERN_HELP","report","componentsPattern","force","lane","updateMain","hard","silent","range","snaps","isOnLane","BitError","isOnMain","removePrompt","localResult","remoteResult","remote","localMessage","removeTemplate","paintArray","deleteOpts","split","map","s","trim","filter","Boolean","removedComps","deleteComps","items","comp","formatItem","id","toString","joinSections","formatSuccessSummary","join","formatHint","removedObjectsArray","item","logger","clearStatusLine","laneOrMainWarning","remoteOrLocalOutput","ok","yesno","question","chalk","bold","exports"],"sources":["delete-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport yesno from 'yesno';\nimport type { Command, CommandOptions } from '@teambit/cli';\nimport { formatItem, formatSuccessSummary, formatHint, joinSections } from '@teambit/cli';\nimport type { Workspace } from '@teambit/workspace';\nimport { BitError } from '@teambit/bit-error';\nimport type { RemovedObjects } from '@teambit/legacy.scope';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy.constants';\nimport type { RemoveMain } from './remove.main.runtime';\nimport { removeTemplate } from './remove-template';\n\nexport class DeleteCmd implements Command {\n name = 'delete <component-pattern>';\n description = 'soft-delete components from remote scopes';\n extendedDescription = `marks components as deleted so they won't be visible on remote scopes after export.\ncomponents remain recoverable using \"bit recover\" unless --hard is used (permanent deletion, not recommended).\nto remove components from your local workspace only, use \"bit remove\" instead.`;\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n group = 'collaborate';\n helpUrl = 'reference/components/removing-components';\n skipWorkspace = true;\n alias = '';\n options = [\n [\n '',\n 'lane',\n 'when on a lane, delete the component from this lane only. this removal will not affect main when the lane is merged',\n ],\n ['', 'update-main', 'delete component/s on the main lane after merging this lane into main'],\n [\n '',\n 'range <string>',\n 'EXPERIMENTAL. enter a Semver range to delete specific tags (cannot be used for snaps). see https://www.npmjs.com/package/semver#ranges for the range syntax',\n ],\n ['s', 'silent', 'skip confirmation'],\n [\n '',\n 'hard',\n 'NOT-RECOMMENDED. delete a component completely from a remote scope. careful! this is a permanent change that could corrupt dependents.',\n ],\n [\n 'f',\n 'force',\n 'relevant for --hard. allow the deletion even if used as a dependency. WARNING: components that depend on this component will corrupt',\n ],\n ['', 'snaps <string>', 'comma-separated list of snap hashes to mark as deleted (e.g. --snaps \"hash1,hash2,hash3\")'],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n\n constructor(\n private remove: RemoveMain,\n private workspace?: Workspace\n ) {}\n\n async report(\n [componentsPattern]: [string],\n {\n force = false,\n lane = false,\n updateMain = false,\n hard = false,\n silent = false,\n range,\n snaps,\n }: {\n force?: boolean;\n lane?: boolean;\n updateMain?: boolean;\n hard?: boolean;\n silent?: boolean;\n range?: string;\n snaps?: string;\n }\n ) {\n if (this.workspace?.isOnLane() && !hard && !lane && !updateMain) {\n throw new BitError(`error: to delete components when on a lane, use either --lane or --update-main flag.\n--lane: delete the component from this lane only\n--update-main: delete the component from main after this lane is merged`);\n }\n if (this.workspace?.isOnMain() && updateMain) {\n throw new BitError(`--update-main is relevant only when on a lane`);\n }\n\n if (!silent) {\n await this.removePrompt(hard, lane, updateMain);\n }\n\n if (hard) {\n if (range) throw new BitError(`--range is not supported with --hard flag`);\n const { localResult, remoteResult = [] } = await this.remove.remove({ componentsPattern, remote: true, force });\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n let localMessage = removeTemplate(localResult, false);\n if (localMessage !== '') localMessage += '\\n';\n return `${localMessage}${this.paintArray(remoteResult)}`;\n }\n\n const deleteOpts: any = { updateMain, range };\n if (snaps) {\n deleteOpts.snaps = snaps\n .split(',')\n .map((s) => s.trim())\n .filter(Boolean);\n }\n const removedComps = await this.remove.deleteComps(componentsPattern, deleteOpts);\n const items = removedComps.map((comp) => formatItem(comp.id.toString()));\n return joinSections([\n formatSuccessSummary('successfully deleted the following components'),\n items.join('\\n'),\n formatHint('to update the remote, please tag/snap and then export. to revert, please use \"bit recover\"'),\n ]);\n }\n\n private paintArray(removedObjectsArray: RemovedObjects[]) {\n return removedObjectsArray.map((item) => removeTemplate(item, true));\n }\n\n private async removePrompt(hard?: boolean, lane?: boolean, updateMain?: boolean) {\n this.remove.logger.clearStatusLine();\n\n let laneOrMainWarning: string;\n if (updateMain) {\n laneOrMainWarning = `once this lane is merged, the component will be deleted from main (it won't be visible on the remote scope after tag/snap and export).\nif your intent was to undo all changes to this component done as part of the lane so the component in main will be intact, use --lane instead.`;\n } else if (lane) {\n laneOrMainWarning = `this command will mark the component as removed from this lane, resetting the component to its pre-lane state and content (after tag/snap and export)`;\n } else {\n laneOrMainWarning = `this command will mark the component as deleted, and it won't be visible on the remote scope (after tag/snap and export).`;\n }\n\n const remoteOrLocalOutput = hard\n ? `WARNING: the component(s) will be permanently deleted from the remote with no option to recover. prefer omitting --hard to only mark the component as soft deleted`\n : `${laneOrMainWarning}\nif your intent is to remove the component only from your local workspace, refer to bit remove or bit eject.`;\n\n const ok = await yesno({\n question: `${remoteOrLocalOutput}\n${chalk.bold('Would you like to proceed? [yes(y)/no(n)]')}`,\n });\n if (!ok) {\n throw new BitError('the operation has been canceled');\n }\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,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;AAEA,SAAAI,KAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,IAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,QAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,gBAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,eAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAmD,SAAAC,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,C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AiB,GAAG,2HAA2H;IACjJ;IAEA,MAAMC,mBAAmB,GAAGrC,IAAI,GAC5B,oKAAoK,GACpK,GAAGoC,iBAAiB;AAC5B,4GAA4G;IAExG,MAAME,EAAE,GAAG,MAAM,IAAAC,gBAAK,EAAC;MACrBC,QAAQ,EAAE,GAAGH,mBAAmB;AACtC,EAAEI,gBAAK,CAACC,IAAI,CAAC,2CAA2C,CAAC;IACrD,CAAC,CAAC;IACF,IAAI,CAACJ,EAAE,EAAE;MACP,MAAM,KAAIjC,oBAAQ,EAAC,iCAAiC,CAAC;IACvD;EACF;AACF;AAACsC,OAAA,CAAAvD,SAAA,GAAAA,SAAA","ignoreList":[]}
@@ -4,16 +4,16 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.RecoverCmd = void 0;
7
- function _chalk() {
8
- const data = _interopRequireDefault(require("chalk"));
9
- _chalk = function () {
7
+ function _bitError() {
8
+ const data = require("@teambit/bit-error");
9
+ _bitError = function () {
10
10
  return data;
11
11
  };
12
12
  return data;
13
13
  }
14
- function _bitError() {
15
- const data = require("@teambit/bit-error");
16
- _bitError = function () {
14
+ function _cli() {
15
+ const data = require("@teambit/cli");
16
+ _cli = function () {
17
17
  return data;
18
18
  };
19
19
  return data;
@@ -25,7 +25,6 @@ function _legacy() {
25
25
  };
26
26
  return data;
27
27
  }
28
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
29
28
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
30
29
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
31
30
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
@@ -48,8 +47,8 @@ class RecoverCmd {
48
47
  if (recovered.length === 0) {
49
48
  throw new (_bitError().BitError)(`no soft-deleted components found matching pattern "${componentPattern}"`);
50
49
  }
51
- const recoveredStr = recovered.map(id => id.toString()).join('\n');
52
- return `${_chalk().default.green('successfully recovered the following component(s):')}\n${recoveredStr}`;
50
+ const items = recovered.map(id => (0, _cli().formatItem)(id.toString()));
51
+ return `${(0, _cli().formatSuccessSummary)('successfully recovered the following component(s)')}\n${items.join('\n')}`;
53
52
  }
54
53
  }
55
54
  exports.RecoverCmd = RecoverCmd;
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_bitError","_legacy","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","RecoverCmd","constructor","remove","name","description","COMPONENT_PATTERN_HELP","report","componentPattern","options","recovered","recover","length","BitError","recoveredStr","map","id","toString","join","chalk","green","exports"],"sources":["recover-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { BitError } from '@teambit/bit-error';\nimport type { Command, CommandOptions } from '@teambit/cli';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy.constants';\nimport type { RemoveMain } from './remove.main.runtime';\n\nexport type RecoverOptions = {\n skipDependencyInstallation?: boolean;\n skipWriteConfigFiles?: boolean;\n};\n\nexport class RecoverCmd implements Command {\n name = 'recover <component-pattern>';\n description = 'restore soft-deleted components';\n extendedDescription =\n 'reverses the soft-deletion of components marked with \"bit delete\", restoring them to their previous state. works for both local and remote soft-deleted components. supports patterns like \"comp1\", \"org.scope/*\", etc.';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n group = 'collaborate';\n options = [\n ['x', 'skip-dependency-installation', 'do not install packages in case of importing components'],\n ['', 'skip-write-config-files', 'do not write config files (such as eslint, tsconfig, prettier, etc...)'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private remove: RemoveMain) {}\n\n async report([componentPattern]: [string], options: RecoverOptions) {\n const recovered = await this.remove.recover(componentPattern, options);\n if (recovered.length === 0) {\n throw new BitError(`no soft-deleted components found matching pattern \"${componentPattern}\"`);\n }\n const recoveredStr = recovered.map((id) => id.toString()).join('\\n');\n return `${chalk.green('successfully recovered the following component(s):')}\\n${recoveredStr}`;\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAmE,SAAAC,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAZ,CAAA,CAAAI,CAAA,IAAAC,CAAA,EAAAL,CAAA;AAAA,SAAAM,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,C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AAACO,OAAA,CAAApB,UAAA,GAAAA,UAAA","ignoreList":[]}
1
+ {"version":3,"names":["_bitError","data","require","_cli","_legacy","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","RecoverCmd","constructor","remove","name","description","COMPONENT_PATTERN_HELP","report","componentPattern","options","recovered","recover","length","BitError","items","map","id","formatItem","toString","formatSuccessSummary","join","exports"],"sources":["recover-cmd.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport type { Command, CommandOptions } from '@teambit/cli';\nimport { formatItem, formatSuccessSummary } from '@teambit/cli';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy.constants';\nimport type { RemoveMain } from './remove.main.runtime';\n\nexport type RecoverOptions = {\n skipDependencyInstallation?: boolean;\n skipWriteConfigFiles?: boolean;\n};\n\nexport class RecoverCmd implements Command {\n name = 'recover <component-pattern>';\n description = 'restore soft-deleted components';\n extendedDescription =\n 'reverses the soft-deletion of components marked with \"bit delete\", restoring them to their previous state. works for both local and remote soft-deleted components. supports patterns like \"comp1\", \"org.scope/*\", etc.';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n group = 'collaborate';\n options = [\n ['x', 'skip-dependency-installation', 'do not install packages in case of importing components'],\n ['', 'skip-write-config-files', 'do not write config files (such as eslint, tsconfig, prettier, etc...)'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private remove: RemoveMain) {}\n\n async report([componentPattern]: [string], options: RecoverOptions) {\n const recovered = await this.remove.recover(componentPattern, options);\n if (recovered.length === 0) {\n throw new BitError(`no soft-deleted components found matching pattern \"${componentPattern}\"`);\n }\n const items = recovered.map((id) => formatItem(id.toString()));\n return `${formatSuccessSummary('successfully recovered the following component(s)')}\\n${items.join('\\n')}`;\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAA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A,oBAC/M,CACV;MACEsB,IAAI,EAAE,mBAAmB;MACzBC,WAAW,EAAEC;IACf,CAAC,CACF;IAAAxB,eAAA,gBACO,aAAa;IAAAA,eAAA,kBACX,CACR,CAAC,GAAG,EAAE,8BAA8B,EAAE,yDAAyD,CAAC,EAChG,CAAC,EAAE,EAAE,yBAAyB,EAAE,wEAAwE,CAAC,CAC1G;IAAAA,eAAA,iBACQ,IAAI;EAE4B;EAEzC,MAAMyB,MAAMA,CAAC,CAACC,gBAAgB,CAAW,EAAEC,OAAuB,EAAE;IAClE,MAAMC,SAAS,GAAG,MAAM,IAAI,CAACP,MAAM,CAACQ,OAAO,CAACH,gBAAgB,EAAEC,OAAO,CAAC;IACtE,IAAIC,SAAS,CAACE,MAAM,KAAK,CAAC,EAAE;MAC1B,MAAM,KAAIC,oBAAQ,EAAC,sDAAsDL,gBAAgB,GAAG,CAAC;IAC/F;IACA,MAAMM,KAAK,GAAGJ,SAAS,CAACK,GAAG,CAAEC,EAAE,IAAK,IAAAC,iBAAU,EAACD,EAAE,CAACE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9D,OAAO,GAAG,IAAAC,2BAAoB,EAAC,mDAAmD,CAAC,KAAKL,KAAK,CAACM,IAAI,CAAC,IAAI,CAAC,EAAE;EAC5G;AACF;AAACC,OAAA,CAAApB,UAAA,GAAAA,UAAA","ignoreList":[]}
@@ -11,21 +11,20 @@ function _componentId() {
11
11
  };
12
12
  return data;
13
13
  }
14
- function _chalk() {
15
- const data = _interopRequireDefault(require("chalk"));
16
- _chalk = function () {
14
+ function _lodash() {
15
+ const data = require("lodash");
16
+ _lodash = function () {
17
17
  return data;
18
18
  };
19
19
  return data;
20
20
  }
21
- function _lodash() {
22
- const data = require("lodash");
23
- _lodash = function () {
21
+ function _cli() {
22
+ const data = require("@teambit/cli");
23
+ _cli = function () {
24
24
  return data;
25
25
  };
26
26
  return data;
27
27
  }
28
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
29
28
  function removeTemplate({
30
29
  dependentBits,
31
30
  modifiedComponents = [],
@@ -35,47 +34,37 @@ function removeTemplate({
35
34
  }, isRemote) {
36
35
  const paintMissingComponents = () => {
37
36
  if ((0, _lodash().isEmpty)(missingComponents)) return '';
38
- return _chalk().default.red('missing components:') + (0, _chalk().default)(` ${missingComponents.map(id => {
39
- if (!(id instanceof _componentId().ComponentID)) id = _componentId().ComponentID.fromObject(id); // when the id was received from a remote it's not an instance of ComponentID
40
- return id.version === 'latest' ? id.toStringWithoutVersion() : id.toString();
41
- })}\n`);
37
+ const items = missingComponents.map(id => {
38
+ if (!(id instanceof _componentId().ComponentID)) id = _componentId().ComponentID.fromObject(id);
39
+ return (0, _cli().formatItem)(id.version === 'latest' ? id.toStringWithoutVersion() : id.toString(), _cli().errorSymbol);
40
+ });
41
+ return `${_cli().errorSymbol} ${(0, _cli().formatTitle)('missing components')}\n${items.join('\n')}`;
42
42
  };
43
43
  const paintRemoved = () => {
44
44
  if ((0, _lodash().isEmpty)(removedComponentIds) && (0, _lodash().isEmpty)(removedFromLane)) return '';
45
- const compToStr = comps => (0, _chalk().default)(` ${comps.map(id => id.version === 'latest' ? id.toStringWithoutVersion() : id.toString())}\n`);
45
+ const compToItems = comps => comps.map(id => (0, _cli().formatItem)(id.version === 'latest' ? id.toStringWithoutVersion() : id.toString()));
46
46
  const getMsg = (isLane = false) => {
47
47
  const removedFrom = isLane ? 'lane' : 'scope';
48
- const msg = isRemote ? `successfully removed components from the remote ${removedFrom}:` : `successfully removed components from the local ${removedFrom}:`;
49
- return _chalk().default.green(msg);
48
+ return isRemote ? `successfully removed components from the remote ${removedFrom}` : `successfully removed components from the local ${removedFrom}`;
50
49
  };
51
- const newLine = '\n';
52
- const compOutput = (0, _lodash().isEmpty)(removedComponentIds) ? '' : getMsg(false) + compToStr(removedComponentIds) + newLine;
53
- const laneOutput = (0, _lodash().isEmpty)(removedFromLane) ? '' : getMsg(true) + compToStr(removedFromLane);
54
- return `${compOutput}${laneOutput}`;
50
+ const compOutput = (0, _lodash().isEmpty)(removedComponentIds) ? '' : `${(0, _cli().formatSuccessSummary)(getMsg(false))}\n${compToItems(removedComponentIds).join('\n')}`;
51
+ const laneOutput = (0, _lodash().isEmpty)(removedFromLane) ? '' : `${(0, _cli().formatSuccessSummary)(getMsg(true))}\n${compToItems(removedFromLane).join('\n')}`;
52
+ return (0, _cli().joinSections)([compOutput, laneOutput]);
55
53
  };
56
54
  const paintUnRemovedComponents = () => {
57
55
  if ((0, _lodash().isEmpty)(dependentBits)) return '';
58
56
  return Object.keys(dependentBits).map(key => {
59
- const header = _chalk().default.underline.red(`error: unable to delete ${key}, because the following components depend on it:`);
60
- const body = dependentBits[key].join('\n');
57
+ const header = `${_cli().errorSymbol} ${(0, _cli().formatTitle)(`unable to delete ${key}, because the following components depend on it`)}`;
58
+ const body = dependentBits[key].map(dep => (0, _cli().formatItem)(dep, _cli().errorSymbol)).join('\n');
61
59
  return `${header}\n${body}`;
62
60
  }).join('\n\n');
63
61
  };
64
62
  const paintModifiedComponents = () => {
65
63
  if ((0, _lodash().isEmpty)(modifiedComponents)) return '';
66
- const modifiedStr = modifiedComponents.map(id => id.version === 'latest' ? id.toStringWithoutVersion() : id.toString());
67
- return `${_chalk().default.red('error: unable to remove modified components (please use --force to remove modified components)\n') + (0, _chalk().default)(`- ${modifiedStr}`)}`;
64
+ const items = modifiedComponents.map(id => (0, _cli().formatItem)(id.version === 'latest' ? id.toStringWithoutVersion() : id.toString(), _cli().errorSymbol));
65
+ return `${_cli().errorSymbol} ${(0, _cli().formatTitle)('unable to remove modified components (use --force to remove)')}\n${items.join('\n')}`;
68
66
  };
69
- return (
70
- // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
71
- paintUnRemovedComponents(dependentBits) +
72
- // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
73
- paintRemoved(removedComponentIds) +
74
- // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
75
- paintMissingComponents(missingComponents) +
76
- // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
77
- paintModifiedComponents(modifiedComponents)
78
- );
67
+ return (0, _cli().joinSections)([paintUnRemovedComponents(), paintRemoved(), paintMissingComponents(), paintModifiedComponents()]);
79
68
  }
80
69
 
81
70
  //# sourceMappingURL=remove-template.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_componentId","data","require","_chalk","_interopRequireDefault","_lodash","e","__esModule","default","removeTemplate","dependentBits","modifiedComponents","removedComponentIds","missingComponents","removedFromLane","isRemote","paintMissingComponents","isEmpty","chalk","red","map","id","ComponentID","fromObject","version","toStringWithoutVersion","toString","paintRemoved","compToStr","comps","getMsg","isLane","removedFrom","msg","green","newLine","compOutput","laneOutput","paintUnRemovedComponents","Object","keys","key","header","underline","body","join","paintModifiedComponents","modifiedStr"],"sources":["remove-template.ts"],"sourcesContent":["import type { ComponentIdList } from '@teambit/component-id';\nimport { ComponentID } from '@teambit/component-id';\nimport chalk from 'chalk';\nimport { isEmpty } from 'lodash';\n\nexport function removeTemplate(\n { dependentBits, modifiedComponents = [], removedComponentIds, missingComponents, removedFromLane },\n isRemote\n) {\n const paintMissingComponents = () => {\n if (isEmpty(missingComponents)) return '';\n return (\n chalk.red('missing components:') +\n chalk(\n ` ${missingComponents.map((id) => {\n if (!(id instanceof ComponentID)) id = ComponentID.fromObject(id); // when the id was received from a remote it's not an instance of ComponentID\n return id.version === 'latest' ? id.toStringWithoutVersion() : id.toString();\n })}\\n`\n )\n );\n };\n const paintRemoved = () => {\n if (isEmpty(removedComponentIds) && isEmpty(removedFromLane)) return '';\n const compToStr = (comps: ComponentIdList) =>\n chalk(` ${comps.map((id) => (id.version === 'latest' ? id.toStringWithoutVersion() : id.toString()))}\\n`);\n const getMsg = (isLane = false) => {\n const removedFrom = isLane ? 'lane' : 'scope';\n const msg = isRemote\n ? `successfully removed components from the remote ${removedFrom}:`\n : `successfully removed components from the local ${removedFrom}:`;\n return chalk.green(msg);\n };\n const newLine = '\\n';\n const compOutput = isEmpty(removedComponentIds) ? '' : getMsg(false) + compToStr(removedComponentIds) + newLine;\n const laneOutput = isEmpty(removedFromLane) ? '' : getMsg(true) + compToStr(removedFromLane);\n\n return `${compOutput}${laneOutput}`;\n };\n\n const paintUnRemovedComponents = () => {\n if (isEmpty(dependentBits)) return '';\n return Object.keys(dependentBits)\n .map((key) => {\n const header = chalk.underline.red(\n `error: unable to delete ${key}, because the following components depend on it:`\n );\n const body = dependentBits[key].join('\\n');\n return `${header}\\n${body}`;\n })\n .join('\\n\\n');\n };\n\n const paintModifiedComponents = () => {\n if (isEmpty(modifiedComponents)) return '';\n const modifiedStr = modifiedComponents.map((id: ComponentID) =>\n id.version === 'latest' ? id.toStringWithoutVersion() : id.toString()\n );\n return `${\n chalk.red('error: unable to remove modified components (please use --force to remove modified components)\\n') +\n chalk(`- ${modifiedStr}`)\n }`;\n };\n\n return (\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n paintUnRemovedComponents(dependentBits) +\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n paintRemoved(removedComponentIds) +\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n paintMissingComponents(missingComponents) +\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n paintModifiedComponents(modifiedComponents)\n );\n}\n"],"mappings":";;;;;;AACA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAA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GpC,kBAAkB,CAACS,GAAG,CAAEC,EAAe,IACzDA,EAAE,CAACG,OAAO,KAAK,QAAQ,GAAGH,EAAE,CAACI,sBAAsB,CAAC,CAAC,GAAGJ,EAAE,CAACK,QAAQ,CAAC,CACtE,CAAC;IACD,OAAO,GACLR,gBAAK,CAACC,GAAG,CAAC,kGAAkG,CAAC,GAC7G,IAAAD,gBAAK,EAAC,KAAK6B,WAAW,EAAE,CAAC,EACzB;EACJ,CAAC;EAED;IACE;IACAT,wBAAwB,CAAC5B,aAAa,CAAC;IACvC;IACAiB,YAAY,CAACf,mBAAmB,CAAC;IACjC;IACAI,sBAAsB,CAACH,iBAAiB,CAAC;IACzC;IACAiC,uBAAuB,CAACnC,kBAAkB;EAAC;AAE/C","ignoreList":[]}
1
+ {"version":3,"names":["_componentId","data","require","_lodash","_cli","removeTemplate","dependentBits","modifiedComponents","removedComponentIds","missingComponents","removedFromLane","isRemote","paintMissingComponents","isEmpty","items","map","id","ComponentID","fromObject","formatItem","version","toStringWithoutVersion","toString","errorSymbol","formatTitle","join","paintRemoved","compToItems","comps","getMsg","isLane","removedFrom","compOutput","formatSuccessSummary","laneOutput","joinSections","paintUnRemovedComponents","Object","keys","key","header","body","dep","paintModifiedComponents"],"sources":["remove-template.ts"],"sourcesContent":["import type { ComponentIdList } from '@teambit/component-id';\nimport { ComponentID } from '@teambit/component-id';\nimport { isEmpty } from 'lodash';\nimport { formatTitle, formatItem, formatSuccessSummary, errorSymbol, joinSections } from '@teambit/cli';\n\nexport function removeTemplate(\n { dependentBits, modifiedComponents = [], removedComponentIds, missingComponents, removedFromLane },\n isRemote\n) {\n const paintMissingComponents = () => {\n if (isEmpty(missingComponents)) return '';\n const items = missingComponents.map((id) => {\n if (!(id instanceof ComponentID)) id = ComponentID.fromObject(id);\n return formatItem(id.version === 'latest' ? id.toStringWithoutVersion() : id.toString(), errorSymbol);\n });\n return `${errorSymbol} ${formatTitle('missing components')}\\n${items.join('\\n')}`;\n };\n const paintRemoved = () => {\n if (isEmpty(removedComponentIds) && isEmpty(removedFromLane)) return '';\n const compToItems = (comps: ComponentIdList) =>\n comps.map((id) => formatItem(id.version === 'latest' ? id.toStringWithoutVersion() : id.toString()));\n const getMsg = (isLane = false) => {\n const removedFrom = isLane ? 'lane' : 'scope';\n return isRemote\n ? `successfully removed components from the remote ${removedFrom}`\n : `successfully removed components from the local ${removedFrom}`;\n };\n const compOutput = isEmpty(removedComponentIds)\n ? ''\n : `${formatSuccessSummary(getMsg(false))}\\n${compToItems(removedComponentIds).join('\\n')}`;\n const laneOutput = isEmpty(removedFromLane)\n ? ''\n : `${formatSuccessSummary(getMsg(true))}\\n${compToItems(removedFromLane).join('\\n')}`;\n\n return joinSections([compOutput, laneOutput]);\n };\n\n const paintUnRemovedComponents = () => {\n if (isEmpty(dependentBits)) return '';\n return Object.keys(dependentBits)\n .map((key) => {\n const header = `${errorSymbol} ${formatTitle(`unable to delete ${key}, because the following components depend on it`)}`;\n const body = dependentBits[key].map((dep) => formatItem(dep, errorSymbol)).join('\\n');\n return `${header}\\n${body}`;\n })\n .join('\\n\\n');\n };\n\n const paintModifiedComponents = () => {\n if (isEmpty(modifiedComponents)) return '';\n const items = modifiedComponents.map((id: ComponentID) =>\n formatItem(id.version === 'latest' ? id.toStringWithoutVersion() : id.toString(), errorSymbol)\n );\n return `${errorSymbol} ${formatTitle('unable to remove modified components (use --force to remove)')}\\n${items.join('\\n')}`;\n };\n\n return joinSections([\n paintUnRemovedComponents(),\n paintRemoved(),\n paintMissingComponents(),\n paintModifiedComponents(),\n ]);\n}\n"],"mappings":";;;;;;AACA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAA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I,CAAC,MAAM,CAAC;EACjB,CAAC;EAED,MAAMkB,uBAAuB,GAAGA,CAAA,KAAM;IACpC,IAAI,IAAA9B,iBAAO,EAACN,kBAAkB,CAAC,EAAE,OAAO,EAAE;IAC1C,MAAMO,KAAK,GAAGP,kBAAkB,CAACQ,GAAG,CAAEC,EAAe,IACnD,IAAAG,iBAAU,EAACH,EAAE,CAACI,OAAO,KAAK,QAAQ,GAAGJ,EAAE,CAACK,sBAAsB,CAAC,CAAC,GAAGL,EAAE,CAACM,QAAQ,CAAC,CAAC,EAAEC,kBAAW,CAC/F,CAAC;IACD,OAAO,GAAGA,kBAAW,IAAI,IAAAC,kBAAW,EAAC,8DAA8D,CAAC,KAAKV,KAAK,CAACW,IAAI,CAAC,IAAI,CAAC,EAAE;EAC7H,CAAC;EAED,OAAO,IAAAU,mBAAY,EAAC,CAClBC,wBAAwB,CAAC,CAAC,EAC1BV,YAAY,CAAC,CAAC,EACdd,sBAAsB,CAAC,CAAC,EACxB+B,uBAAuB,CAAC,CAAC,CAC1B,CAAC;AACJ","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/remove",
3
- "version": "1.0.939",
3
+ "version": "1.0.940",
4
4
  "homepage": "https://bit.cloud/teambit/component/remove",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "remove",
9
- "version": "1.0.939"
9
+ "version": "1.0.940"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "4.1.2",
@@ -18,7 +18,6 @@
18
18
  "p-map-series": "2.1.0",
19
19
  "semver": "7.7.1",
20
20
  "@teambit/bit-error": "0.0.404",
21
- "@teambit/cli": "0.0.1314",
22
21
  "@teambit/legacy.constants": "0.0.26",
23
22
  "@teambit/legacy.scope": "0.0.107",
24
23
  "@teambit/component-id": "1.2.4",
@@ -33,14 +32,15 @@
33
32
  "@teambit/harmony": "0.4.7",
34
33
  "@teambit/component-issues": "0.0.171",
35
34
  "@teambit/legacy.utils": "0.0.34",
36
- "@teambit/logger": "0.0.1407",
37
- "@teambit/workspace": "1.0.939",
38
- "@teambit/component": "1.0.939",
39
- "@teambit/dependency-resolver": "1.0.939",
40
- "@teambit/importer": "1.0.939",
41
- "@teambit/issues": "1.0.939",
42
- "@teambit/lister": "1.0.939",
43
- "@teambit/scope": "1.0.939"
35
+ "@teambit/cli": "0.0.1315",
36
+ "@teambit/workspace": "1.0.940",
37
+ "@teambit/component": "1.0.940",
38
+ "@teambit/dependency-resolver": "1.0.940",
39
+ "@teambit/importer": "1.0.940",
40
+ "@teambit/issues": "1.0.940",
41
+ "@teambit/lister": "1.0.940",
42
+ "@teambit/logger": "0.0.1408",
43
+ "@teambit/scope": "1.0.940"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/fs-extra": "9.0.7",