@teambit/remove 1.0.614 → 1.0.616
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/delete-cmd.d.ts +2 -1
- package/dist/delete-cmd.js +9 -4
- package/dist/delete-cmd.js.map +1 -1
- package/dist/remove.fragment.js +2 -1
- package/dist/remove.fragment.js.map +1 -1
- package/dist/remove.main.runtime.d.ts +5 -0
- package/dist/remove.main.runtime.js +13 -6
- package/dist/remove.main.runtime.js.map +1 -1
- package/package.json +11 -11
- /package/dist/{preview-1746354885172.js → preview-1746674277507.js} +0 -0
package/dist/delete-cmd.d.ts
CHANGED
|
@@ -19,13 +19,14 @@ export declare class DeleteCmd implements Command {
|
|
|
19
19
|
loader: boolean;
|
|
20
20
|
remoteOp: boolean;
|
|
21
21
|
constructor(remove: RemoveMain, workspace?: Workspace | undefined);
|
|
22
|
-
report([componentsPattern]: [string], { force, lane, updateMain, hard, silent, range, }: {
|
|
22
|
+
report([componentsPattern]: [string], { force, lane, updateMain, hard, silent, range, snaps, }: {
|
|
23
23
|
force?: boolean;
|
|
24
24
|
lane?: boolean;
|
|
25
25
|
updateMain?: boolean;
|
|
26
26
|
hard?: boolean;
|
|
27
27
|
silent?: boolean;
|
|
28
28
|
range?: string;
|
|
29
|
+
snaps?: string;
|
|
29
30
|
}): Promise<string>;
|
|
30
31
|
private paintArray;
|
|
31
32
|
private removePrompt;
|
package/dist/delete-cmd.js
CHANGED
|
@@ -61,7 +61,7 @@ unless the '--hard' flag is used (not recommended!), in which case, the componen
|
|
|
61
61
|
_defineProperty(this, "helpUrl", 'reference/components/removing-components');
|
|
62
62
|
_defineProperty(this, "skipWorkspace", true);
|
|
63
63
|
_defineProperty(this, "alias", '');
|
|
64
|
-
_defineProperty(this, "options", [['', 'lane', 'when on a lane, delete the component from this lane only. avoid merging it to main or other lanes'], ['', 'update-main', 'delete component/s on the main lane after merging this lane into main'], ['', 'range <string>', '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'], ['s', 'silent', 'skip confirmation'], ['', 'hard', 'NOT-RECOMMENDED. delete a component completely from a remote scope. careful! this is a permanent change that could corrupt dependents.'], ['f', 'force', 'relevant for --hard. allow the deletion even if used as a dependency. WARNING: components that depend on this component will corrupt']]);
|
|
64
|
+
_defineProperty(this, "options", [['', 'lane', 'when on a lane, delete the component from this lane only. avoid merging it to main or other lanes'], ['', 'update-main', 'delete component/s on the main lane after merging this lane into main'], ['', 'range <string>', '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'], ['s', 'silent', 'skip confirmation'], ['', 'hard', 'NOT-RECOMMENDED. delete a component completely from a remote scope. careful! this is a permanent change that could corrupt dependents.'], ['f', 'force', 'relevant for --hard. allow the deletion even if used as a dependency. WARNING: components that depend on this component will corrupt'], ['', 'snaps <string>', 'comma-separated list of snap hashes to mark as deleted (e.g. --snaps "hash1,hash2,hash3")']]);
|
|
65
65
|
_defineProperty(this, "loader", true);
|
|
66
66
|
_defineProperty(this, "remoteOp", true);
|
|
67
67
|
}
|
|
@@ -71,7 +71,8 @@ unless the '--hard' flag is used (not recommended!), in which case, the componen
|
|
|
71
71
|
updateMain = false,
|
|
72
72
|
hard = false,
|
|
73
73
|
silent = false,
|
|
74
|
-
range
|
|
74
|
+
range,
|
|
75
|
+
snaps
|
|
75
76
|
}) {
|
|
76
77
|
if (this.workspace?.isOnLane() && !hard && !lane && !updateMain) {
|
|
77
78
|
throw new (_bitError().BitError)(`error: to delete components when on a lane, use --lane flag`);
|
|
@@ -97,10 +98,14 @@ unless the '--hard' flag is used (not recommended!), in which case, the componen
|
|
|
97
98
|
if (localMessage !== '') localMessage += '\n';
|
|
98
99
|
return `${localMessage}${this.paintArray(remoteResult)}`;
|
|
99
100
|
}
|
|
100
|
-
const
|
|
101
|
+
const deleteOpts = {
|
|
101
102
|
updateMain,
|
|
102
103
|
range
|
|
103
|
-
}
|
|
104
|
+
};
|
|
105
|
+
if (snaps) {
|
|
106
|
+
deleteOpts.snaps = snaps.split(',').map(s => s.trim()).filter(Boolean);
|
|
107
|
+
}
|
|
108
|
+
const removedComps = await this.remove.deleteComps(componentsPattern, deleteOpts);
|
|
104
109
|
const removedCompIds = removedComps.map(comp => comp.id.toString());
|
|
105
110
|
return `${_chalk().default.green('successfully deleted the following components:')}
|
|
106
111
|
${removedCompIds.join('\n')}
|
package/dist/delete-cmd.js.map
CHANGED
|
@@ -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","isOnLane","BitError","isOnMain","removePrompt","localResult","remoteResult","remote","localMessage","removeTemplate","paintArray","removedComps","deleteComps","removedCompIds","map","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 { Command, CommandOptions } from '@teambit/cli';\nimport { Workspace } from '@teambit/workspace';\nimport { BitError } from '@teambit/bit-error';\nimport { RemovedObjects } from '@teambit/legacy.scope';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy.constants';\nimport { RemoveMain } from './remove.main.runtime';\nimport { removeTemplate } from './remove-template';\n\nexport class DeleteCmd implements Command {\n name = 'delete <component-pattern>';\n description = 'mark components as deleted on the remote';\n extendedDescription = `to remove components from your local workspace only, use \"bit remove\" command.\nthis command marks the components as deleted, and after snap/tag and export they will be marked as deleted from the remote scope as well.\nunless the '--hard' flag is used (not recommended!), in which case, the component will be deleted from the remote scope immediately.\n`;\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 ['', 'lane', 'when on a lane, delete the component from this lane only. avoid merging it to main or other lanes'],\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 ] 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 }: {\n force?: boolean;\n lane?: boolean;\n updateMain?: boolean;\n hard?: boolean;\n silent?: boolean;\n range?: string;\n }\n ) {\n if (this.workspace?.isOnLane() && !hard && !lane && !updateMain) {\n throw new BitError(`error: to delete components when on a lane, use --lane flag`);\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);\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 removedComps = await this.remove.deleteComps(componentsPattern, { updateMain, range });\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) {\n this.remove.logger.clearStatusLine();\n const laneOrMainWarning = lane\n ? `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 : `this command will mark the component as deleted, and it won’t be visible on the remote scope (after tag/snap and export).`;\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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AExG,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,KAAI1B,oBAAQ,EAAC,iCAAiC,CAAC;IACvD;EACF;AACF;AAAC6B,OAAA,CAAA7C,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
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 { Command, CommandOptions } from '@teambit/cli';\nimport { Workspace } from '@teambit/workspace';\nimport { BitError } from '@teambit/bit-error';\nimport { RemovedObjects } from '@teambit/legacy.scope';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy.constants';\nimport { RemoveMain } from './remove.main.runtime';\nimport { removeTemplate } from './remove-template';\n\nexport class DeleteCmd implements Command {\n name = 'delete <component-pattern>';\n description = 'mark components as deleted on the remote';\n extendedDescription = `to remove components from your local workspace only, use \"bit remove\" command.\nthis command marks the components as deleted, and after snap/tag and export they will be marked as deleted from the remote scope as well.\nunless the '--hard' flag is used (not recommended!), in which case, the component will be deleted from the remote scope immediately.\n`;\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 ['', 'lane', 'when on a lane, delete the component from this lane only. avoid merging it to main or other lanes'],\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 --lane flag`);\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);\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) {\n this.remove.logger.clearStatusLine();\n const laneOrMainWarning = lane\n ? `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 : `this command will mark the component as deleted, and it won’t be visible on the remote scope (after tag/snap and export).`;\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;I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,gBAAK,CAACG,IAAI,CAAC,4FAA4F,CAAC,EAAE;EAC1G;EAEQjB,UAAUA,CAACkB,mBAAqC,EAAE;IACxD,OAAOA,mBAAmB,CAACf,GAAG,CAAEgB,IAAI,IAAK,IAAApB,gCAAc,EAACoB,IAAI,EAAE,IAAI,CAAC,CAAC;EACtE;EAEA,MAAczB,YAAYA,CAACP,IAAc,EAAEF,IAAc,EAAE;IACzD,IAAI,CAACR,MAAM,CAAC2C,MAAM,CAACC,eAAe,CAAC,CAAC;IACpC,MAAMC,iBAAiB,GAAGrC,IAAI,GAC1B,uJAAuJ,GACvJ,2HAA2H;IAC/H,MAAMsC,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":[]}
|
package/dist/remove.fragment.js
CHANGED
|
@@ -18,10 +18,11 @@ class RemoveFragment {
|
|
|
18
18
|
const isRemoved = removedInfo.removed;
|
|
19
19
|
const isRemovedStr = isRemoved.toString();
|
|
20
20
|
const range = removedInfo.range ? ` (range: ${removedInfo.range})` : '';
|
|
21
|
+
const snaps = removedInfo.snaps && removedInfo.snaps.length ? ` (snaps: ${removedInfo.snaps.join(', ')})` : '';
|
|
21
22
|
return {
|
|
22
23
|
title: this.title,
|
|
23
24
|
// when it's not removed, set as an empty string so then it won't be shown in bit-show
|
|
24
|
-
content: isRemoved || range ? isRemovedStr + range : ''
|
|
25
|
+
content: isRemoved || range || snaps ? isRemovedStr + range + snaps : ''
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
28
|
async json(component) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RemoveFragment","constructor","remove","_defineProperty","renderRow","component","removedInfo","getRemoveInfo","isRemoved","removed","isRemovedStr","toString","range","title","content","json","exports"],"sources":["remove.fragment.ts"],"sourcesContent":["import { Component, ShowFragment } from '@teambit/component';\nimport { RemoveMain } from './remove.main.runtime';\n\nexport class RemoveFragment implements ShowFragment {\n constructor(private remove: RemoveMain) {}\n\n title = 'removed';\n\n async renderRow(component: Component) {\n const removedInfo = await this.remove.getRemoveInfo(component);\n const isRemoved = removedInfo.removed;\n const isRemovedStr = isRemoved.toString();\n const range = removedInfo.range ? ` (range: ${removedInfo.range})` : '';\n\n return {\n title: this.title,\n // when it's not removed, set as an empty string so then it won't be shown in bit-show\n content: isRemoved || range ? isRemovedStr + range : '',\n };\n }\n\n async json(component: Component) {\n return {\n title: this.title,\n json: await this.remove.getRemoveInfo(component),\n };\n }\n\n weight = 3;\n}\n"],"mappings":";;;;;;;;;AAGO,MAAMA,cAAc,CAAyB;EAClDC,WAAWA,CAASC,MAAkB,EAAE;IAAA,KAApBA,MAAkB,GAAlBA,MAAkB;IAAAC,eAAA,gBAE9B,SAAS;IAAAA,eAAA,
|
|
1
|
+
{"version":3,"names":["RemoveFragment","constructor","remove","_defineProperty","renderRow","component","removedInfo","getRemoveInfo","isRemoved","removed","isRemovedStr","toString","range","snaps","length","join","title","content","json","exports"],"sources":["remove.fragment.ts"],"sourcesContent":["import { Component, ShowFragment } from '@teambit/component';\nimport { RemoveMain } from './remove.main.runtime';\n\nexport class RemoveFragment implements ShowFragment {\n constructor(private remove: RemoveMain) {}\n\n title = 'removed';\n\n async renderRow(component: Component) {\n const removedInfo = await this.remove.getRemoveInfo(component);\n const isRemoved = removedInfo.removed;\n const isRemovedStr = isRemoved.toString();\n const range = removedInfo.range ? ` (range: ${removedInfo.range})` : '';\n const snaps = removedInfo.snaps && removedInfo.snaps.length ? ` (snaps: ${removedInfo.snaps.join(', ')})` : '';\n\n return {\n title: this.title,\n // when it's not removed, set as an empty string so then it won't be shown in bit-show\n content: isRemoved || range || snaps ? isRemovedStr + range + snaps : '',\n };\n }\n\n async json(component: Component) {\n return {\n title: this.title,\n json: await this.remove.getRemoveInfo(component),\n };\n }\n\n weight = 3;\n}\n"],"mappings":";;;;;;;;;AAGO,MAAMA,cAAc,CAAyB;EAClDC,WAAWA,CAASC,MAAkB,EAAE;IAAA,KAApBA,MAAkB,GAAlBA,MAAkB;IAAAC,eAAA,gBAE9B,SAAS;IAAAA,eAAA,iBAuBR,CAAC;EAzB+B;EAIzC,MAAMC,SAASA,CAACC,SAAoB,EAAE;IACpC,MAAMC,WAAW,GAAG,MAAM,IAAI,CAACJ,MAAM,CAACK,aAAa,CAACF,SAAS,CAAC;IAC9D,MAAMG,SAAS,GAAGF,WAAW,CAACG,OAAO;IACrC,MAAMC,YAAY,GAAGF,SAAS,CAACG,QAAQ,CAAC,CAAC;IACzC,MAAMC,KAAK,GAAGN,WAAW,CAACM,KAAK,GAAG,YAAYN,WAAW,CAACM,KAAK,GAAG,GAAG,EAAE;IACvE,MAAMC,KAAK,GAAGP,WAAW,CAACO,KAAK,IAAIP,WAAW,CAACO,KAAK,CAACC,MAAM,GAAG,YAAYR,WAAW,CAACO,KAAK,CAACE,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE;IAE9G,OAAO;MACLC,KAAK,EAAE,IAAI,CAACA,KAAK;MACjB;MACAC,OAAO,EAAET,SAAS,IAAII,KAAK,IAAIC,KAAK,GAAGH,YAAY,GAAGE,KAAK,GAAGC,KAAK,GAAG;IACxE,CAAC;EACH;EAEA,MAAMK,IAAIA,CAACb,SAAoB,EAAE;IAC/B,OAAO;MACLW,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBE,IAAI,EAAE,MAAM,IAAI,CAAChB,MAAM,CAACK,aAAa,CAACF,SAAS;IACjD,CAAC;EACH;AAGF;AAACc,OAAA,CAAAnB,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -20,10 +20,15 @@ export type RemoveInfo = {
|
|
|
20
20
|
* Semver range to mark specific versions as deleted
|
|
21
21
|
*/
|
|
22
22
|
range?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Array of snap hashes to mark as deleted
|
|
25
|
+
*/
|
|
26
|
+
snaps?: string[];
|
|
23
27
|
};
|
|
24
28
|
export type DeleteOpts = {
|
|
25
29
|
updateMain?: boolean;
|
|
26
30
|
range?: string;
|
|
31
|
+
snaps?: string[];
|
|
27
32
|
};
|
|
28
33
|
export declare class RemoveMain {
|
|
29
34
|
private workspace;
|
|
@@ -244,10 +244,11 @@ class RemoveMain {
|
|
|
244
244
|
}
|
|
245
245
|
async markRemoveComps(componentIds, {
|
|
246
246
|
updateMain,
|
|
247
|
-
range
|
|
247
|
+
range,
|
|
248
|
+
snaps
|
|
248
249
|
}) {
|
|
249
250
|
const allComponentsToMarkDeleted = await this.workspace.getMany(componentIds);
|
|
250
|
-
const componentsToDeleteFromFs = range ? [] : allComponentsToMarkDeleted;
|
|
251
|
+
const componentsToDeleteFromFs = range || snaps ? [] : allComponentsToMarkDeleted;
|
|
251
252
|
const componentsIdsToDeleteFromFs = _componentId().ComponentIdList.fromArray(componentsToDeleteFromFs.map(c => c.id));
|
|
252
253
|
await (0, _removeComponents().removeComponentsFromNodeModules)(this.workspace.consumer, componentsToDeleteFromFs.map(c => c.state._consumer));
|
|
253
254
|
// don't use `this.workspace.addSpecificComponentConfig`, if the component has component.json it will be deleted
|
|
@@ -257,10 +258,11 @@ class RemoveMain {
|
|
|
257
258
|
// remember that this config is always passed to the next version and if we set removed: true, it'll be copied
|
|
258
259
|
// to the next version even when that version is not in the range.
|
|
259
260
|
const config = {
|
|
260
|
-
removed: !range
|
|
261
|
+
removed: !(range || snaps)
|
|
261
262
|
};
|
|
262
263
|
if (updateMain) config.removeOnMain = true;
|
|
263
264
|
if (range) config.range = range;
|
|
265
|
+
if (snaps && snaps.length) config.snaps = snaps;
|
|
264
266
|
componentIds.forEach(compId => this.workspace.bitMap.addComponentConfig(compId, _remove().RemoveAspect.id, config));
|
|
265
267
|
await this.workspace.bitMap.write('delete');
|
|
266
268
|
await (0, _deleteComponentFiles().deleteComponentsFiles)(this.workspace.consumer, componentsIdsToDeleteFromFs);
|
|
@@ -347,7 +349,7 @@ to delete them eventually from main, use "--update-main" flag and make sure to r
|
|
|
347
349
|
const compId = bitMapEntry.id;
|
|
348
350
|
const comp = await this.workspace.get(compId);
|
|
349
351
|
const removeInfo = await this.getRemoveInfo(comp);
|
|
350
|
-
if (!removeInfo.removed && !removeInfo.range) {
|
|
352
|
+
if (!removeInfo.removed && !removeInfo.range && !removeInfo.snaps) {
|
|
351
353
|
return false;
|
|
352
354
|
}
|
|
353
355
|
await setAsRemovedFalse(compId);
|
|
@@ -399,9 +401,14 @@ ${mainComps.map(c => c.id.toString()).join('\n')}`);
|
|
|
399
401
|
const currentTag = component.getTag();
|
|
400
402
|
return Boolean(currentTag && _semver().default.satisfies(currentTag.version, data.range));
|
|
401
403
|
};
|
|
404
|
+
const isDeletedBySnaps = () => {
|
|
405
|
+
if (!data?.snaps || !component.id.version) return false;
|
|
406
|
+
return data.snaps.includes(component.id.version);
|
|
407
|
+
};
|
|
402
408
|
return {
|
|
403
|
-
removed: data?.removed || isDeletedByRange() || false,
|
|
404
|
-
range: data?.range
|
|
409
|
+
removed: data?.removed || isDeletedByRange() || isDeletedBySnaps() || false,
|
|
410
|
+
range: data?.range,
|
|
411
|
+
snaps: data?.snaps
|
|
405
412
|
};
|
|
406
413
|
}
|
|
407
414
|
async getHeadComponent(component) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_semver","_interopRequireDefault","_logger","_workspace","_componentId","_legacy","_importer","_lodash","_legacy2","_bitError","_dependencyResolver","_componentIssues","_issues","_pMapSeries","_legacy3","_component","_deleteComponentFiles","_removeCmd","_removeComponents","_remove","_remove2","_recoverCmd","_deleteCmd","_scope","_lister","_chalk","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","BEFORE_REMOVE","RemoveMain","constructor","workspace","scope","logger","importer","depResolver","lister","remove","componentsPattern","force","remote","track","deleteFiles","setStatusLine","bitIds","getRemoteBitIdsToRemove","getLocalBitIdsToRemove","consumer","removeResults","removeComponents","ids","ComponentIdList","fromArray","onDestroy","removeLocallyByIds","reasonForRemoval","OutsideWorkspaceError","results","bitMap","write","markRemoveComps","componentIds","updateMain","range","allComponentsToMarkDeleted","getMany","componentsToDeleteFromFs","componentsIdsToDeleteFromFs","map","c","id","removeComponentsFromNodeModules","state","_consumer","config","removed","removeOnMain","forEach","compId","addComponentConfig","RemoveAspect","deleteComponentsFiles","deleteComps","opts","ConsumerNotFound","idsByPattern","newComps","filter","hasVersion","length","BitError","toString","join","currentLane","getCurrentLaneObject","isNew","Error","laneComp","toComponentIds","compIdsNotOnLane","hasWithoutVersion","chalk","bold","recover","compIdStr","options","bitMapEntry","components","find","compMap","fullName","toStringWithoutVersion","importComp","idStr","import","installNpmPackages","skipDependencyInstallation","writeConfigFiles","skipWriteConfigFiles","override","setAsRemovedFalse","addSpecificComponentConfig","compFromScope","get","rootDir","removeComponentConfig","comp","removeInfo","getRemoveInfo","resolveComponentId","idOnLane","getComponent","compIdWithPossibleVer","changeVersion","head","isDeleted","getRemoteComponent","err","NoHeadNoVersion","throwForMainComponentWhenOnLane","laneComps","toBitIds","mainComps","component","headComponent","getHeadComponent","extensions","findExtension","isDeletedByRange","currentTag","getTag","Boolean","semver","satisfies","version","hash","headTag","headComp","undefined","isRemoved","isRemovedByIdWithoutLoadingComponent","componentId","bitmapEntry","getBitmapEntryIfExist","isRecovered","modelComp","getBitObjectModelComponent","legacyScope","objects","isEnvByIdWithoutLoadingComponent","versionObj","getBitObjectVersionById","envData","findCoreExtension","type","getRemovedStaged","isOnMain","getRemovedStagedFromMain","getRemovedStagedFromLane","addRemovedDependenciesIssues","pMapSeries","addRemovedDepIssue","dependencies","getComponentDependencies","removedDependencies","removedEnv","Promise","all","dep","isEnv","push","issues","getOrCreate","IssuesClasses","RemovedDependencies","RemovedEnv","stagedConfig","getStagedConfig","getAll","compConfig","laneIds","workspaceIds","listIds","laneCompIdsNotInWorkspace","wId","isEqualWithoutVersion","comps","staged","snapDistance","getSnapDistance","warn","name","isSourceAhead","compact","hasWildcard","getRemoteCompIdsByWildcards","ComponentID","fromString","provider","cli","loggerMain","componentAspect","importerMain","createLogger","removeMain","registerAddComponentsIssues","bind","registerShowFragments","RemoveFragment","register","RemoveCmd","DeleteCmd","RecoverCmd","exports","WorkspaceAspect","ScopeAspect","CLIAspect","LoggerAspect","ComponentAspect","ImporterAspect","DependencyResolverAspect","IssuesAspect","ListerAspect","MainRuntime","addRuntime","_default"],"sources":["remove.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport semver from 'semver';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { ConsumerNotFound } from '@teambit/legacy.consumer';\nimport { ImporterAspect, ImporterMain } from '@teambit/importer';\nimport { compact } from 'lodash';\nimport { hasWildcard } from '@teambit/legacy.utils';\nimport { BitError } from '@teambit/bit-error';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { IssuesAspect, IssuesMain } from '@teambit/issues';\nimport pMapSeries from 'p-map-series';\nimport { NoHeadNoVersion } from '@teambit/legacy.scope';\nimport { ComponentAspect, Component, ComponentMain } from '@teambit/component';\nimport { deleteComponentsFiles } from './delete-component-files';\nimport { RemoveCmd } from './remove-cmd';\nimport { RemoveComponentsResult, removeComponents, removeComponentsFromNodeModules } from './remove-components';\nimport { RemoveAspect } from './remove.aspect';\nimport { RemoveFragment } from './remove.fragment';\nimport { RecoverCmd, RecoverOptions } from './recover-cmd';\nimport { DeleteCmd } from './delete-cmd';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\nimport { ListerAspect, ListerMain } from '@teambit/lister';\nimport chalk from 'chalk';\n\nconst BEFORE_REMOVE = 'removing components';\n\nexport type RemoveInfo = {\n removed: boolean;\n /**\n * whether to remove the component from default lane once merged\n */\n removeOnMain?: boolean;\n /**\n * Semver range to mark specific versions as deleted\n */\n range?: string;\n};\n\nexport type DeleteOpts = { updateMain?: boolean; range?: string };\n\nexport class RemoveMain {\n constructor(\n private workspace: Workspace,\n private scope: ScopeMain,\n public logger: Logger,\n private importer: ImporterMain,\n private depResolver: DependencyResolverMain,\n private lister: ListerMain\n ) {}\n\n async remove({\n componentsPattern,\n force = false,\n remote = false,\n track = false,\n deleteFiles = true,\n }: {\n componentsPattern: string;\n force?: boolean;\n remote?: boolean;\n track?: boolean;\n deleteFiles?: boolean;\n }): Promise<RemoveComponentsResult> {\n this.logger.setStatusLine(BEFORE_REMOVE);\n const bitIds = remote\n ? await this.getRemoteBitIdsToRemove(componentsPattern)\n : await this.getLocalBitIdsToRemove(componentsPattern);\n this.logger.setStatusLine(BEFORE_REMOVE); // again because the loader might changed when talking to the remote\n const consumer = this.workspace?.consumer;\n const removeResults = await removeComponents({\n workspace: this.workspace,\n ids: ComponentIdList.fromArray(bitIds),\n force,\n remote,\n track,\n deleteFiles,\n });\n if (consumer) await consumer.onDestroy('remove');\n return removeResults;\n }\n\n /**\n * remove components from the workspace.\n */\n async removeLocallyByIds(\n ids: ComponentID[],\n { force = false, reasonForRemoval }: { force?: boolean; reasonForRemoval?: string } = {}\n ) {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const results = await removeComponents({\n workspace: this.workspace,\n ids: ComponentIdList.fromArray(ids),\n force,\n remote: false,\n track: false,\n deleteFiles: true,\n });\n await this.workspace.bitMap.write(`remove (by ${reasonForRemoval || 'N/A'})`);\n\n return results;\n }\n\n private async markRemoveComps(componentIds: ComponentID[], { updateMain, range }: DeleteOpts): Promise<Component[]> {\n const allComponentsToMarkDeleted = await this.workspace.getMany(componentIds);\n\n const componentsToDeleteFromFs = range ? [] : allComponentsToMarkDeleted;\n const componentsIdsToDeleteFromFs = ComponentIdList.fromArray(componentsToDeleteFromFs.map((c) => c.id));\n await removeComponentsFromNodeModules(\n this.workspace.consumer,\n componentsToDeleteFromFs.map((c) => c.state._consumer)\n );\n // don't use `this.workspace.addSpecificComponentConfig`, if the component has component.json it will be deleted\n // during this removal along with the entire component dir.\n // in case this is range, the \"removed\" property is set to false. even when the range overlap the current version.\n // the reason is that if we set it to true, then, the component is considered as \"deleted\" for *all* versions.\n // remember that this config is always passed to the next version and if we set removed: true, it'll be copied\n // to the next version even when that version is not in the range.\n const config: RemoveInfo = { removed: !range };\n if (updateMain) config.removeOnMain = true;\n if (range) config.range = range;\n componentIds.forEach((compId) => this.workspace.bitMap.addComponentConfig(compId, RemoveAspect.id, config));\n await this.workspace.bitMap.write('delete');\n await deleteComponentsFiles(this.workspace.consumer, componentsIdsToDeleteFromFs);\n\n return componentsToDeleteFromFs;\n }\n\n async deleteComps(componentsPattern: string, opts: DeleteOpts = {}): Promise<Component[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n const newComps = componentIds.filter((id) => !id.hasVersion());\n if (newComps.length) {\n throw new BitError(\n `no need to delete the following new component(s), please remove them by \"bit remove\"\\n${newComps\n .map((id) => id.toString())\n .join('\\n')}`\n );\n }\n const currentLane = await this.workspace.getCurrentLaneObject();\n const { updateMain } = opts;\n if (!updateMain && currentLane?.isNew) {\n throw new Error(\n 'no need to delete components from an un-exported lane, you can remove them by running \"bit remove\"'\n );\n }\n if (currentLane && !updateMain && opts.range) {\n throw new BitError(`--range is not needed when deleting components from a lane, unless --update-main is used`);\n }\n if (currentLane && !updateMain) {\n const laneComp = currentLane.toComponentIds();\n const compIdsNotOnLane = componentIds.filter((id) => !laneComp.hasWithoutVersion(id));\n if (compIdsNotOnLane.length) {\n throw new BitError(\n `unable to delete the following component(s) because they are not part of the current lane.\n${chalk.bold(compIdsNotOnLane.map((id) => id.toString()).join('\\n'))}\nto simply remove them from the workspace, use \"bit remove\".\nto delete them eventually from main, use \"--update-main\" flag and make sure to remove all occurrences from the code.`\n );\n }\n }\n return this.markRemoveComps(componentIds, opts);\n }\n\n /**\n * recover a soft-removed component.\n * there are 4 different scenarios.\n * 1. a component was just soft-removed, it wasn't snapped yet. so it's now in .bitmap with the \"removed\" aspect entry.\n * 1.a. the component still exists in the local scope. no need to import. write it from there.\n * 1.b. the component doesn't exist in the local scope. import it.\n * 2. soft-removed and then snapped. It's not in .bitmap now.\n * 3. soft-removed, snapped, exported. it's not in .bitmap now.\n * 4. a soft-removed components was imported, so it's now in .bitmap without the \"removed\" aspect entry.\n * 5. workspace is empty. the soft-removed component is on the remote.\n * returns `true` if it was recovered. `false` if the component wasn't soft-removed, so nothing to recover from.\n */\n async recover(compIdStr: string, options: RecoverOptions): Promise<boolean> {\n if (!this.workspace) throw new ConsumerNotFound();\n const bitMapEntry = this.workspace.consumer.bitMap.components.find((compMap) => {\n return compMap.id.fullName === compIdStr || compMap.id.toStringWithoutVersion() === compIdStr;\n });\n const importComp = async (idStr: string) => {\n await this.importer.import({\n ids: [idStr],\n installNpmPackages: !options.skipDependencyInstallation,\n writeConfigFiles: !options.skipWriteConfigFiles,\n override: true,\n });\n };\n const setAsRemovedFalse = async (compId: ComponentID) => {\n await this.workspace.addSpecificComponentConfig(compId, RemoveAspect.id, { removed: false });\n await this.workspace.bitMap.write('recover');\n };\n if (bitMapEntry) {\n if (bitMapEntry.config?.[RemoveAspect.id]) {\n // case #1\n const compFromScope = await this.workspace.scope.get(bitMapEntry.id);\n if (compFromScope) {\n // in the case the component is in the scope, we prefer to write it from the scope rather than import it.\n // because in some cases the \"import\" throws an error, e.g. when the component is diverged.\n await this.workspace.write(compFromScope, bitMapEntry.rootDir);\n this.workspace.bitMap.removeComponentConfig(bitMapEntry.id, RemoveAspect.id, false);\n await this.workspace.bitMap.write('recover');\n } else {\n delete bitMapEntry.config?.[RemoveAspect.id];\n await importComp(bitMapEntry.id.toString());\n }\n return true;\n }\n // case #4\n const compId = bitMapEntry.id;\n const comp = await this.workspace.get(compId);\n const removeInfo = await this.getRemoveInfo(comp);\n if (!removeInfo.removed && !removeInfo.range) {\n return false;\n }\n await setAsRemovedFalse(compId);\n return true;\n }\n const compId = await this.workspace.scope.resolveComponentId(compIdStr);\n const currentLane = await this.workspace.getCurrentLaneObject();\n const idOnLane = currentLane?.getComponent(compId);\n const compIdWithPossibleVer = idOnLane ? compId.changeVersion(idOnLane.head.toString()) : compId;\n const compFromScope = await this.workspace.scope.get(compIdWithPossibleVer);\n if (compFromScope && (await this.isDeleted(compFromScope))) {\n // case #2 and #3\n await importComp(compIdWithPossibleVer._legacy.toString());\n await setAsRemovedFalse(compIdWithPossibleVer);\n return true;\n }\n // case #5\n let comp: Component | undefined;\n try {\n comp = await this.workspace.scope.getRemoteComponent(compId);\n } catch (err: any) {\n if (err instanceof NoHeadNoVersion) {\n throw new BitError(\n `unable to find the component ${compIdWithPossibleVer.toString()} in the current lane or main`\n );\n }\n throw err;\n }\n if (!(await this.isDeleted(comp))) {\n return false;\n }\n await importComp(compId._legacy.toString());\n await setAsRemovedFalse(compId);\n\n return true;\n }\n\n private async throwForMainComponentWhenOnLane(components: Component[]) {\n const currentLane = await this.workspace.getCurrentLaneObject();\n if (!currentLane) return; // user on main\n const laneComps = currentLane.toBitIds();\n const mainComps = components.filter((comp) => !laneComps.hasWithoutVersion(comp.id));\n if (mainComps.length) {\n throw new BitError(`the following components belong to main, they cannot be soft-removed when on a lane. consider removing them without --soft.\n${mainComps.map((c) => c.id.toString()).join('\\n')}`);\n }\n }\n\n async getRemoveInfo(component: Component): Promise<RemoveInfo> {\n const headComponent = await this.getHeadComponent(component);\n const data = headComponent.config.extensions.findExtension(RemoveAspect.id)?.config as RemoveInfo | undefined;\n\n const isDeletedByRange = () => {\n if (!data?.range) return false;\n const currentTag = component.getTag();\n return Boolean(currentTag && semver.satisfies(currentTag.version, data.range));\n };\n\n return {\n removed: data?.removed || isDeletedByRange() || false,\n range: data?.range,\n };\n }\n\n private async getHeadComponent(component: Component): Promise<Component> {\n if (\n component.id.version &&\n component.head &&\n component.id.version !== component.head?.hash &&\n component.id.version !== component.headTag?.version.version\n ) {\n const headComp = this.workspace // if workspace exits, prefer using the workspace as it may be modified\n ? await this.workspace.get(component.id.changeVersion(undefined))\n : await this.scope.get(component.id.changeVersion(component.head.hash));\n if (!headComp) throw new Error(`unable to get the head of ${component.id.toString()}`);\n return headComp;\n }\n return component;\n }\n\n /**\n * @deprecated use `isDeleted` instead.\n */\n async isRemoved(component: Component): Promise<boolean> {\n return this.isDeleted(component);\n }\n\n /**\n * whether a component is marked as deleted.\n */\n async isDeleted(component: Component): Promise<boolean> {\n const removeInfo = await this.getRemoveInfo(component);\n return removeInfo.removed;\n }\n\n /**\n * performant version of isRemoved() in case the component object is not available and loading it is expensive.\n */\n async isRemovedByIdWithoutLoadingComponent(componentId: ComponentID): Promise<boolean> {\n if (!componentId.hasVersion()) return false;\n const bitmapEntry = this.workspace.bitMap.getBitmapEntryIfExist(componentId);\n if (bitmapEntry && bitmapEntry.isRemoved()) return true;\n if (bitmapEntry && bitmapEntry.isRecovered()) return false;\n const modelComp = await this.workspace.scope.getBitObjectModelComponent(componentId.changeVersion(undefined));\n if (!modelComp) return false;\n const isRemoved = await modelComp.isRemoved(\n this.workspace.scope.legacyScope.objects,\n componentId.version as string\n );\n return Boolean(isRemoved);\n }\n\n async isEnvByIdWithoutLoadingComponent(componentId: ComponentID): Promise<boolean> {\n const versionObj = await this.workspace.scope.getBitObjectVersionById(componentId);\n const envData = versionObj?.extensions.findCoreExtension('teambit.envs/envs');\n return envData?.data.type === 'env';\n }\n\n /**\n * get components that were soft-removed and tagged/snapped/merged but not exported yet.\n */\n async getRemovedStaged(): Promise<ComponentID[]> {\n return this.workspace.isOnMain() ? this.getRemovedStagedFromMain() : this.getRemovedStagedFromLane();\n }\n\n async addRemovedDependenciesIssues(components: Component[]) {\n await pMapSeries(components, async (component) => {\n await this.addRemovedDepIssue(component);\n });\n }\n\n private async addRemovedDepIssue(component: Component) {\n const dependencies = this.depResolver.getComponentDependencies(component);\n const removedDependencies: ComponentID[] = [];\n let removedEnv: ComponentID | undefined;\n await Promise.all(\n dependencies.map(async (dep) => {\n const isRemoved = await this.isRemovedByIdWithoutLoadingComponent(dep.componentId);\n if (!isRemoved) return;\n const isEnv = await this.isEnvByIdWithoutLoadingComponent(dep.componentId);\n if (isEnv) {\n removedEnv = dep.componentId;\n } else {\n removedDependencies.push(dep.componentId);\n }\n })\n );\n if (removedDependencies.length) {\n component.state.issues.getOrCreate(IssuesClasses.RemovedDependencies).data = removedDependencies.map((r) =>\n r.toString()\n );\n }\n if (removedEnv) {\n component.state.issues.getOrCreate(IssuesClasses.RemovedEnv).data = removedEnv.toString();\n }\n }\n\n private async getRemovedStagedFromMain(): Promise<ComponentID[]> {\n const stagedConfig = await this.workspace.scope.getStagedConfig();\n return stagedConfig\n .getAll()\n .filter((compConfig) => compConfig.config?.[RemoveAspect.id]?.removed)\n .map((compConfig) => compConfig.id);\n }\n\n private async getRemovedStagedFromLane(): Promise<ComponentID[]> {\n const currentLane = await this.workspace.getCurrentLaneObject();\n if (!currentLane) return [];\n const laneIds = currentLane.toComponentIds();\n const workspaceIds = this.workspace.listIds();\n const laneCompIdsNotInWorkspace = laneIds.filter(\n (id) => !workspaceIds.find((wId) => wId.isEqualWithoutVersion(id))\n );\n if (!laneCompIdsNotInWorkspace.length) return [];\n const comps = await this.workspace.scope.getMany(laneCompIdsNotInWorkspace);\n const removed = comps.filter((c) => this.isDeleted(c));\n const staged = await Promise.all(\n removed.map(async (c) => {\n const snapDistance = await this.workspace.scope.getSnapDistance(c.id, false);\n if (snapDistance.err) {\n this.logger.warn(\n `getRemovedStagedFromLane unable to get snapDistance for ${c.id.toString()} due to ${snapDistance.err.name}`\n );\n // todo: not clear what should be done here. should we consider it as removed-staged or not.\n }\n if (snapDistance.isSourceAhead()) return c.id;\n return undefined;\n })\n );\n return compact(staged);\n }\n\n private async getLocalBitIdsToRemove(componentsPattern: string): Promise<ComponentID[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n return componentIds.map((id) => id);\n }\n\n private async getRemoteBitIdsToRemove(componentsPattern: string): Promise<ComponentID[]> {\n if (hasWildcard(componentsPattern)) {\n return this.lister.getRemoteCompIdsByWildcards(componentsPattern);\n }\n return [ComponentID.fromString(componentsPattern)];\n }\n\n static slots = [];\n static dependencies = [\n WorkspaceAspect,\n ScopeAspect,\n CLIAspect,\n LoggerAspect,\n ComponentAspect,\n ImporterAspect,\n DependencyResolverAspect,\n IssuesAspect,\n ListerAspect,\n ];\n static runtime = MainRuntime;\n\n static async provider([\n workspace,\n scope,\n cli,\n loggerMain,\n componentAspect,\n importerMain,\n depResolver,\n issues,\n lister,\n ]: [\n Workspace,\n ScopeMain,\n CLIMain,\n LoggerMain,\n ComponentMain,\n ImporterMain,\n DependencyResolverMain,\n IssuesMain,\n ListerMain,\n ]) {\n const logger = loggerMain.createLogger(RemoveAspect.id);\n const removeMain = new RemoveMain(workspace, scope, logger, importerMain, depResolver, lister);\n issues.registerAddComponentsIssues(removeMain.addRemovedDependenciesIssues.bind(removeMain));\n componentAspect.registerShowFragments([new RemoveFragment(removeMain)]);\n cli.register(\n new RemoveCmd(removeMain, workspace),\n new DeleteCmd(removeMain, workspace),\n new RecoverCmd(removeMain)\n );\n return removeMain;\n }\n}\n\nRemoveAspect.addRuntime(RemoveMain);\n\nexport default RemoveMain;\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IA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S,OAAA,CAAA5M,UAAA,GAAAA,UAAA;AAAAnB,eAAA,CAxaYmB,UAAU,WA0XN,EAAE;AAAAnB,eAAA,CA1XNmB,UAAU,kBA2XC,CACpB6M,4BAAe,EACfC,oBAAW,EACXC,gBAAS,EACTC,sBAAY,EACZC,4BAAe,EACfC,0BAAc,EACdC,8CAAwB,EACxBC,sBAAY,EACZC,sBAAY,CACb;AAAAxO,eAAA,CArYUmB,UAAU,aAsYJsN,kBAAW;AAoC9BnK,sBAAY,CAACoK,UAAU,CAACvN,UAAU,CAAC;AAAC,IAAAwN,QAAA,GAAAZ,OAAA,CAAAhO,OAAA,GAErBoB,UAAU","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_semver","_interopRequireDefault","_logger","_workspace","_componentId","_legacy","_importer","_lodash","_legacy2","_bitError","_dependencyResolver","_componentIssues","_issues","_pMapSeries","_legacy3","_component","_deleteComponentFiles","_removeCmd","_removeComponents","_remove","_remove2","_recoverCmd","_deleteCmd","_scope","_lister","_chalk","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","BEFORE_REMOVE","RemoveMain","constructor","workspace","scope","logger","importer","depResolver","lister","remove","componentsPattern","force","remote","track","deleteFiles","setStatusLine","bitIds","getRemoteBitIdsToRemove","getLocalBitIdsToRemove","consumer","removeResults","removeComponents","ids","ComponentIdList","fromArray","onDestroy","removeLocallyByIds","reasonForRemoval","OutsideWorkspaceError","results","bitMap","write","markRemoveComps","componentIds","updateMain","range","snaps","allComponentsToMarkDeleted","getMany","componentsToDeleteFromFs","componentsIdsToDeleteFromFs","map","c","id","removeComponentsFromNodeModules","state","_consumer","config","removed","removeOnMain","length","forEach","compId","addComponentConfig","RemoveAspect","deleteComponentsFiles","deleteComps","opts","ConsumerNotFound","idsByPattern","newComps","filter","hasVersion","BitError","toString","join","currentLane","getCurrentLaneObject","isNew","Error","laneComp","toComponentIds","compIdsNotOnLane","hasWithoutVersion","chalk","bold","recover","compIdStr","options","bitMapEntry","components","find","compMap","fullName","toStringWithoutVersion","importComp","idStr","import","installNpmPackages","skipDependencyInstallation","writeConfigFiles","skipWriteConfigFiles","override","setAsRemovedFalse","addSpecificComponentConfig","compFromScope","get","rootDir","removeComponentConfig","comp","removeInfo","getRemoveInfo","resolveComponentId","idOnLane","getComponent","compIdWithPossibleVer","changeVersion","head","isDeleted","getRemoteComponent","err","NoHeadNoVersion","throwForMainComponentWhenOnLane","laneComps","toBitIds","mainComps","component","headComponent","getHeadComponent","extensions","findExtension","isDeletedByRange","currentTag","getTag","Boolean","semver","satisfies","version","isDeletedBySnaps","includes","hash","headTag","headComp","undefined","isRemoved","isRemovedByIdWithoutLoadingComponent","componentId","bitmapEntry","getBitmapEntryIfExist","isRecovered","modelComp","getBitObjectModelComponent","legacyScope","objects","isEnvByIdWithoutLoadingComponent","versionObj","getBitObjectVersionById","envData","findCoreExtension","type","getRemovedStaged","isOnMain","getRemovedStagedFromMain","getRemovedStagedFromLane","addRemovedDependenciesIssues","pMapSeries","addRemovedDepIssue","dependencies","getComponentDependencies","removedDependencies","removedEnv","Promise","all","dep","isEnv","push","issues","getOrCreate","IssuesClasses","RemovedDependencies","RemovedEnv","stagedConfig","getStagedConfig","getAll","compConfig","laneIds","workspaceIds","listIds","laneCompIdsNotInWorkspace","wId","isEqualWithoutVersion","comps","staged","snapDistance","getSnapDistance","warn","name","isSourceAhead","compact","hasWildcard","getRemoteCompIdsByWildcards","ComponentID","fromString","provider","cli","loggerMain","componentAspect","importerMain","createLogger","removeMain","registerAddComponentsIssues","bind","registerShowFragments","RemoveFragment","register","RemoveCmd","DeleteCmd","RecoverCmd","exports","WorkspaceAspect","ScopeAspect","CLIAspect","LoggerAspect","ComponentAspect","ImporterAspect","DependencyResolverAspect","IssuesAspect","ListerAspect","MainRuntime","addRuntime","_default"],"sources":["remove.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport semver from 'semver';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { ConsumerNotFound } from '@teambit/legacy.consumer';\nimport { ImporterAspect, ImporterMain } from '@teambit/importer';\nimport { compact } from 'lodash';\nimport { hasWildcard } from '@teambit/legacy.utils';\nimport { BitError } from '@teambit/bit-error';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { IssuesAspect, IssuesMain } from '@teambit/issues';\nimport pMapSeries from 'p-map-series';\nimport { NoHeadNoVersion } from '@teambit/legacy.scope';\nimport { ComponentAspect, Component, ComponentMain } from '@teambit/component';\nimport { deleteComponentsFiles } from './delete-component-files';\nimport { RemoveCmd } from './remove-cmd';\nimport { RemoveComponentsResult, removeComponents, removeComponentsFromNodeModules } from './remove-components';\nimport { RemoveAspect } from './remove.aspect';\nimport { RemoveFragment } from './remove.fragment';\nimport { RecoverCmd, RecoverOptions } from './recover-cmd';\nimport { DeleteCmd } from './delete-cmd';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\nimport { ListerAspect, ListerMain } from '@teambit/lister';\nimport chalk from 'chalk';\n\nconst BEFORE_REMOVE = 'removing components';\n\nexport type RemoveInfo = {\n removed: boolean;\n /**\n * whether to remove the component from default lane once merged\n */\n removeOnMain?: boolean;\n /**\n * Semver range to mark specific versions as deleted\n */\n range?: string;\n /**\n * Array of snap hashes to mark as deleted\n */\n snaps?: string[];\n};\n\nexport type DeleteOpts = { updateMain?: boolean; range?: string; snaps?: string[] };\n\nexport class RemoveMain {\n constructor(\n private workspace: Workspace,\n private scope: ScopeMain,\n public logger: Logger,\n private importer: ImporterMain,\n private depResolver: DependencyResolverMain,\n private lister: ListerMain\n ) {}\n\n async remove({\n componentsPattern,\n force = false,\n remote = false,\n track = false,\n deleteFiles = true,\n }: {\n componentsPattern: string;\n force?: boolean;\n remote?: boolean;\n track?: boolean;\n deleteFiles?: boolean;\n }): Promise<RemoveComponentsResult> {\n this.logger.setStatusLine(BEFORE_REMOVE);\n const bitIds = remote\n ? await this.getRemoteBitIdsToRemove(componentsPattern)\n : await this.getLocalBitIdsToRemove(componentsPattern);\n this.logger.setStatusLine(BEFORE_REMOVE); // again because the loader might changed when talking to the remote\n const consumer = this.workspace?.consumer;\n const removeResults = await removeComponents({\n workspace: this.workspace,\n ids: ComponentIdList.fromArray(bitIds),\n force,\n remote,\n track,\n deleteFiles,\n });\n if (consumer) await consumer.onDestroy('remove');\n return removeResults;\n }\n\n /**\n * remove components from the workspace.\n */\n async removeLocallyByIds(\n ids: ComponentID[],\n { force = false, reasonForRemoval }: { force?: boolean; reasonForRemoval?: string } = {}\n ) {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const results = await removeComponents({\n workspace: this.workspace,\n ids: ComponentIdList.fromArray(ids),\n force,\n remote: false,\n track: false,\n deleteFiles: true,\n });\n await this.workspace.bitMap.write(`remove (by ${reasonForRemoval || 'N/A'})`);\n\n return results;\n }\n\n private async markRemoveComps(\n componentIds: ComponentID[],\n { updateMain, range, snaps }: DeleteOpts\n ): Promise<Component[]> {\n const allComponentsToMarkDeleted = await this.workspace.getMany(componentIds);\n\n const componentsToDeleteFromFs = range || snaps ? [] : allComponentsToMarkDeleted;\n const componentsIdsToDeleteFromFs = ComponentIdList.fromArray(componentsToDeleteFromFs.map((c) => c.id));\n await removeComponentsFromNodeModules(\n this.workspace.consumer,\n componentsToDeleteFromFs.map((c) => c.state._consumer)\n );\n // don't use `this.workspace.addSpecificComponentConfig`, if the component has component.json it will be deleted\n // during this removal along with the entire component dir.\n // in case this is range, the \"removed\" property is set to false. even when the range overlap the current version.\n // the reason is that if we set it to true, then, the component is considered as \"deleted\" for *all* versions.\n // remember that this config is always passed to the next version and if we set removed: true, it'll be copied\n // to the next version even when that version is not in the range.\n const config: RemoveInfo = { removed: !(range || snaps) };\n if (updateMain) config.removeOnMain = true;\n if (range) config.range = range;\n if (snaps && snaps.length) config.snaps = snaps;\n componentIds.forEach((compId) => this.workspace.bitMap.addComponentConfig(compId, RemoveAspect.id, config));\n await this.workspace.bitMap.write('delete');\n await deleteComponentsFiles(this.workspace.consumer, componentsIdsToDeleteFromFs);\n\n return componentsToDeleteFromFs;\n }\n\n async deleteComps(componentsPattern: string, opts: DeleteOpts = {}): Promise<Component[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n const newComps = componentIds.filter((id) => !id.hasVersion());\n if (newComps.length) {\n throw new BitError(\n `no need to delete the following new component(s), please remove them by \"bit remove\"\\n${newComps\n .map((id) => id.toString())\n .join('\\n')}`\n );\n }\n const currentLane = await this.workspace.getCurrentLaneObject();\n const { updateMain } = opts;\n if (!updateMain && currentLane?.isNew) {\n throw new Error(\n 'no need to delete components from an un-exported lane, you can remove them by running \"bit remove\"'\n );\n }\n if (currentLane && !updateMain && opts.range) {\n throw new BitError(`--range is not needed when deleting components from a lane, unless --update-main is used`);\n }\n if (currentLane && !updateMain) {\n const laneComp = currentLane.toComponentIds();\n const compIdsNotOnLane = componentIds.filter((id) => !laneComp.hasWithoutVersion(id));\n if (compIdsNotOnLane.length) {\n throw new BitError(\n `unable to delete the following component(s) because they are not part of the current lane.\n${chalk.bold(compIdsNotOnLane.map((id) => id.toString()).join('\\n'))}\nto simply remove them from the workspace, use \"bit remove\".\nto delete them eventually from main, use \"--update-main\" flag and make sure to remove all occurrences from the code.`\n );\n }\n }\n return this.markRemoveComps(componentIds, opts);\n }\n\n /**\n * recover a soft-removed component.\n * there are 4 different scenarios.\n * 1. a component was just soft-removed, it wasn't snapped yet. so it's now in .bitmap with the \"removed\" aspect entry.\n * 1.a. the component still exists in the local scope. no need to import. write it from there.\n * 1.b. the component doesn't exist in the local scope. import it.\n * 2. soft-removed and then snapped. It's not in .bitmap now.\n * 3. soft-removed, snapped, exported. it's not in .bitmap now.\n * 4. a soft-removed components was imported, so it's now in .bitmap without the \"removed\" aspect entry.\n * 5. workspace is empty. the soft-removed component is on the remote.\n * returns `true` if it was recovered. `false` if the component wasn't soft-removed, so nothing to recover from.\n */\n async recover(compIdStr: string, options: RecoverOptions): Promise<boolean> {\n if (!this.workspace) throw new ConsumerNotFound();\n const bitMapEntry = this.workspace.consumer.bitMap.components.find((compMap) => {\n return compMap.id.fullName === compIdStr || compMap.id.toStringWithoutVersion() === compIdStr;\n });\n const importComp = async (idStr: string) => {\n await this.importer.import({\n ids: [idStr],\n installNpmPackages: !options.skipDependencyInstallation,\n writeConfigFiles: !options.skipWriteConfigFiles,\n override: true,\n });\n };\n const setAsRemovedFalse = async (compId: ComponentID) => {\n await this.workspace.addSpecificComponentConfig(compId, RemoveAspect.id, { removed: false });\n await this.workspace.bitMap.write('recover');\n };\n if (bitMapEntry) {\n if (bitMapEntry.config?.[RemoveAspect.id]) {\n // case #1\n const compFromScope = await this.workspace.scope.get(bitMapEntry.id);\n if (compFromScope) {\n // in the case the component is in the scope, we prefer to write it from the scope rather than import it.\n // because in some cases the \"import\" throws an error, e.g. when the component is diverged.\n await this.workspace.write(compFromScope, bitMapEntry.rootDir);\n this.workspace.bitMap.removeComponentConfig(bitMapEntry.id, RemoveAspect.id, false);\n await this.workspace.bitMap.write('recover');\n } else {\n delete bitMapEntry.config?.[RemoveAspect.id];\n await importComp(bitMapEntry.id.toString());\n }\n return true;\n }\n // case #4\n const compId = bitMapEntry.id;\n const comp = await this.workspace.get(compId);\n const removeInfo = await this.getRemoveInfo(comp);\n if (!removeInfo.removed && !removeInfo.range && !removeInfo.snaps) {\n return false;\n }\n await setAsRemovedFalse(compId);\n return true;\n }\n const compId = await this.workspace.scope.resolveComponentId(compIdStr);\n const currentLane = await this.workspace.getCurrentLaneObject();\n const idOnLane = currentLane?.getComponent(compId);\n const compIdWithPossibleVer = idOnLane ? compId.changeVersion(idOnLane.head.toString()) : compId;\n const compFromScope = await this.workspace.scope.get(compIdWithPossibleVer);\n if (compFromScope && (await this.isDeleted(compFromScope))) {\n // case #2 and #3\n await importComp(compIdWithPossibleVer._legacy.toString());\n await setAsRemovedFalse(compIdWithPossibleVer);\n return true;\n }\n // case #5\n let comp: Component | undefined;\n try {\n comp = await this.workspace.scope.getRemoteComponent(compId);\n } catch (err: any) {\n if (err instanceof NoHeadNoVersion) {\n throw new BitError(\n `unable to find the component ${compIdWithPossibleVer.toString()} in the current lane or main`\n );\n }\n throw err;\n }\n if (!(await this.isDeleted(comp))) {\n return false;\n }\n await importComp(compId._legacy.toString());\n await setAsRemovedFalse(compId);\n\n return true;\n }\n\n private async throwForMainComponentWhenOnLane(components: Component[]) {\n const currentLane = await this.workspace.getCurrentLaneObject();\n if (!currentLane) return; // user on main\n const laneComps = currentLane.toBitIds();\n const mainComps = components.filter((comp) => !laneComps.hasWithoutVersion(comp.id));\n if (mainComps.length) {\n throw new BitError(`the following components belong to main, they cannot be soft-removed when on a lane. consider removing them without --soft.\n${mainComps.map((c) => c.id.toString()).join('\\n')}`);\n }\n }\n\n async getRemoveInfo(component: Component): Promise<RemoveInfo> {\n const headComponent = await this.getHeadComponent(component);\n const data = headComponent.config.extensions.findExtension(RemoveAspect.id)?.config as RemoveInfo | undefined;\n\n const isDeletedByRange = () => {\n if (!data?.range) return false;\n const currentTag = component.getTag();\n return Boolean(currentTag && semver.satisfies(currentTag.version, data.range));\n };\n const isDeletedBySnaps = () => {\n if (!data?.snaps || !component.id.version) return false;\n return data.snaps.includes(component.id.version);\n };\n\n return {\n removed: data?.removed || isDeletedByRange() || isDeletedBySnaps() || false,\n range: data?.range,\n snaps: data?.snaps,\n };\n }\n\n private async getHeadComponent(component: Component): Promise<Component> {\n if (\n component.id.version &&\n component.head &&\n component.id.version !== component.head?.hash &&\n component.id.version !== component.headTag?.version.version\n ) {\n const headComp = this.workspace // if workspace exits, prefer using the workspace as it may be modified\n ? await this.workspace.get(component.id.changeVersion(undefined))\n : await this.scope.get(component.id.changeVersion(component.head.hash));\n if (!headComp) throw new Error(`unable to get the head of ${component.id.toString()}`);\n return headComp;\n }\n return component;\n }\n\n /**\n * @deprecated use `isDeleted` instead.\n */\n async isRemoved(component: Component): Promise<boolean> {\n return this.isDeleted(component);\n }\n\n /**\n * whether a component is marked as deleted.\n */\n async isDeleted(component: Component): Promise<boolean> {\n const removeInfo = await this.getRemoveInfo(component);\n return removeInfo.removed;\n }\n\n /**\n * performant version of isRemoved() in case the component object is not available and loading it is expensive.\n */\n async isRemovedByIdWithoutLoadingComponent(componentId: ComponentID): Promise<boolean> {\n if (!componentId.hasVersion()) return false;\n const bitmapEntry = this.workspace.bitMap.getBitmapEntryIfExist(componentId);\n if (bitmapEntry && bitmapEntry.isRemoved()) return true;\n if (bitmapEntry && bitmapEntry.isRecovered()) return false;\n const modelComp = await this.workspace.scope.getBitObjectModelComponent(componentId.changeVersion(undefined));\n if (!modelComp) return false;\n const isRemoved = await modelComp.isRemoved(\n this.workspace.scope.legacyScope.objects,\n componentId.version as string\n );\n return Boolean(isRemoved);\n }\n\n async isEnvByIdWithoutLoadingComponent(componentId: ComponentID): Promise<boolean> {\n const versionObj = await this.workspace.scope.getBitObjectVersionById(componentId);\n const envData = versionObj?.extensions.findCoreExtension('teambit.envs/envs');\n return envData?.data.type === 'env';\n }\n\n /**\n * get components that were soft-removed and tagged/snapped/merged but not exported yet.\n */\n async getRemovedStaged(): Promise<ComponentID[]> {\n return this.workspace.isOnMain() ? this.getRemovedStagedFromMain() : this.getRemovedStagedFromLane();\n }\n\n async addRemovedDependenciesIssues(components: Component[]) {\n await pMapSeries(components, async (component) => {\n await this.addRemovedDepIssue(component);\n });\n }\n\n private async addRemovedDepIssue(component: Component) {\n const dependencies = this.depResolver.getComponentDependencies(component);\n const removedDependencies: ComponentID[] = [];\n let removedEnv: ComponentID | undefined;\n await Promise.all(\n dependencies.map(async (dep) => {\n const isRemoved = await this.isRemovedByIdWithoutLoadingComponent(dep.componentId);\n if (!isRemoved) return;\n const isEnv = await this.isEnvByIdWithoutLoadingComponent(dep.componentId);\n if (isEnv) {\n removedEnv = dep.componentId;\n } else {\n removedDependencies.push(dep.componentId);\n }\n })\n );\n if (removedDependencies.length) {\n component.state.issues.getOrCreate(IssuesClasses.RemovedDependencies).data = removedDependencies.map((r) =>\n r.toString()\n );\n }\n if (removedEnv) {\n component.state.issues.getOrCreate(IssuesClasses.RemovedEnv).data = removedEnv.toString();\n }\n }\n\n private async getRemovedStagedFromMain(): Promise<ComponentID[]> {\n const stagedConfig = await this.workspace.scope.getStagedConfig();\n return stagedConfig\n .getAll()\n .filter((compConfig) => compConfig.config?.[RemoveAspect.id]?.removed)\n .map((compConfig) => compConfig.id);\n }\n\n private async getRemovedStagedFromLane(): Promise<ComponentID[]> {\n const currentLane = await this.workspace.getCurrentLaneObject();\n if (!currentLane) return [];\n const laneIds = currentLane.toComponentIds();\n const workspaceIds = this.workspace.listIds();\n const laneCompIdsNotInWorkspace = laneIds.filter(\n (id) => !workspaceIds.find((wId) => wId.isEqualWithoutVersion(id))\n );\n if (!laneCompIdsNotInWorkspace.length) return [];\n const comps = await this.workspace.scope.getMany(laneCompIdsNotInWorkspace);\n const removed = comps.filter((c) => this.isDeleted(c));\n const staged = await Promise.all(\n removed.map(async (c) => {\n const snapDistance = await this.workspace.scope.getSnapDistance(c.id, false);\n if (snapDistance.err) {\n this.logger.warn(\n `getRemovedStagedFromLane unable to get snapDistance for ${c.id.toString()} due to ${snapDistance.err.name}`\n );\n // todo: not clear what should be done here. should we consider it as removed-staged or not.\n }\n if (snapDistance.isSourceAhead()) return c.id;\n return undefined;\n })\n );\n return compact(staged);\n }\n\n private async getLocalBitIdsToRemove(componentsPattern: string): Promise<ComponentID[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n return componentIds.map((id) => id);\n }\n\n private async getRemoteBitIdsToRemove(componentsPattern: string): Promise<ComponentID[]> {\n if (hasWildcard(componentsPattern)) {\n return this.lister.getRemoteCompIdsByWildcards(componentsPattern);\n }\n return [ComponentID.fromString(componentsPattern)];\n }\n\n static slots = [];\n static dependencies = [\n WorkspaceAspect,\n ScopeAspect,\n CLIAspect,\n LoggerAspect,\n ComponentAspect,\n ImporterAspect,\n DependencyResolverAspect,\n IssuesAspect,\n ListerAspect,\n ];\n static runtime = MainRuntime;\n\n static async provider([\n workspace,\n scope,\n cli,\n loggerMain,\n componentAspect,\n importerMain,\n depResolver,\n issues,\n lister,\n ]: [\n Workspace,\n ScopeMain,\n CLIMain,\n LoggerMain,\n ComponentMain,\n ImporterMain,\n DependencyResolverMain,\n IssuesMain,\n ListerMain,\n ]) {\n const logger = loggerMain.createLogger(RemoveAspect.id);\n const removeMain = new RemoveMain(workspace, scope, logger, importerMain, depResolver, lister);\n issues.registerAddComponentsIssues(removeMain.addRemovedDependenciesIssues.bind(removeMain));\n componentAspect.registerShowFragments([new RemoveFragment(removeMain)]);\n cli.register(\n new RemoveCmd(removeMain, workspace),\n new DeleteCmd(removeMain, workspace),\n new RecoverCmd(removeMain)\n );\n return removeMain;\n }\n}\n\nRemoveAspect.addRuntime(RemoveMain);\n\nexport default RemoveMain;\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,UAAA,Y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P,UAAU,EAAEpM,SAAS,CAAC,EACpC,KAAI4M,wBAAU,EAACR,UAAU,CAC3B,CAAC;IACD,OAAOA,UAAU;EACnB;AACF;AAACS,OAAA,CAAA/M,UAAA,GAAAA,UAAA;AAAAnB,eAAA,CAjbYmB,UAAU,WAmYN,EAAE;AAAAnB,eAAA,CAnYNmB,UAAU,kBAoYC,CACpBgN,4BAAe,EACfC,oBAAW,EACXC,gBAAS,EACTC,sBAAY,EACZC,4BAAe,EACfC,0BAAc,EACdC,8CAAwB,EACxBC,sBAAY,EACZC,sBAAY,CACb;AAAA3O,eAAA,CA9YUmB,UAAU,aA+YJyN,kBAAW;AAoC9BpK,sBAAY,CAACqK,UAAU,CAAC1N,UAAU,CAAC;AAAC,IAAA2N,QAAA,GAAAZ,OAAA,CAAAnO,OAAA,GAErBoB,UAAU","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/remove",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.616",
|
|
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.
|
|
9
|
+
"version": "1.0.616"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "4.1.2",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"@teambit/bit-error": "0.0.404",
|
|
21
21
|
"@teambit/component-id": "1.2.4",
|
|
22
22
|
"@teambit/harmony": "0.4.7",
|
|
23
|
-
"@teambit/cli": "0.0.
|
|
23
|
+
"@teambit/cli": "0.0.1193",
|
|
24
24
|
"@teambit/legacy.constants": "0.0.11",
|
|
25
25
|
"@teambit/legacy.scope": "0.0.49",
|
|
26
|
-
"@teambit/workspace": "1.0.
|
|
26
|
+
"@teambit/workspace": "1.0.616",
|
|
27
27
|
"@teambit/component.sources": "0.0.101",
|
|
28
28
|
"@teambit/legacy.consumer": "0.0.49",
|
|
29
29
|
"@teambit/legacy.logger": "0.0.19",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"@teambit/pkg.modules.component-package-name": "0.0.56",
|
|
33
33
|
"@teambit/scope.network": "0.0.49",
|
|
34
34
|
"@teambit/scope.remotes": "0.0.49",
|
|
35
|
-
"@teambit/component": "1.0.
|
|
35
|
+
"@teambit/component": "1.0.616",
|
|
36
36
|
"@teambit/component-issues": "0.0.159",
|
|
37
|
-
"@teambit/dependency-resolver": "1.0.
|
|
38
|
-
"@teambit/importer": "1.0.
|
|
39
|
-
"@teambit/issues": "1.0.
|
|
37
|
+
"@teambit/dependency-resolver": "1.0.616",
|
|
38
|
+
"@teambit/importer": "1.0.616",
|
|
39
|
+
"@teambit/issues": "1.0.616",
|
|
40
40
|
"@teambit/legacy.utils": "0.0.21",
|
|
41
|
-
"@teambit/lister": "1.0.
|
|
42
|
-
"@teambit/logger": "0.0.
|
|
43
|
-
"@teambit/scope": "1.0.
|
|
41
|
+
"@teambit/lister": "1.0.616",
|
|
42
|
+
"@teambit/logger": "0.0.1286",
|
|
43
|
+
"@teambit/scope": "1.0.616"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/fs-extra": "9.0.7",
|
|
File without changes
|