@teambit/remove 0.0.24 → 0.0.25
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/remove-cmd.d.ts +2 -1
- package/dist/remove-cmd.js +5 -2
- package/dist/remove-cmd.js.map +1 -1
- package/dist/remove.main.runtime.d.ts +2 -1
- package/dist/remove.main.runtime.js +4 -2
- package/dist/remove.main.runtime.js.map +1 -1
- package/package-tar/teambit-remove-0.0.25.tgz +0 -0
- package/package.json +7 -7
- /package/{preview-1662694416892.js → preview-1662780958471.js} +0 -0
- package/package-tar/teambit-remove-0.0.24.tgz +0 -0
package/dist/remove-cmd.d.ts
CHANGED
|
@@ -18,10 +18,11 @@ export declare class RemoveCmd implements Command {
|
|
|
18
18
|
migration: boolean;
|
|
19
19
|
remoteOp: boolean;
|
|
20
20
|
constructor(remove: RemoveMain);
|
|
21
|
-
report([componentsPattern]: [string], { soft, force, remote, track, deleteFiles, silent, keepFiles, }: {
|
|
21
|
+
report([componentsPattern]: [string], { soft, force, remote, fromLane, track, deleteFiles, silent, keepFiles, }: {
|
|
22
22
|
force: boolean;
|
|
23
23
|
remote: boolean;
|
|
24
24
|
track: boolean;
|
|
25
|
+
fromLane: boolean;
|
|
25
26
|
deleteFiles: boolean;
|
|
26
27
|
silent: boolean;
|
|
27
28
|
keepFiles: boolean;
|
package/dist/remove-cmd.js
CHANGED
|
@@ -104,7 +104,7 @@ class RemoveCmd {
|
|
|
104
104
|
(0, _defineProperty2().default)(this, "helpUrl", 'components/removing-components');
|
|
105
105
|
(0, _defineProperty2().default)(this, "skipWorkspace", true);
|
|
106
106
|
(0, _defineProperty2().default)(this, "alias", 'rm');
|
|
107
|
-
(0, _defineProperty2().default)(this, "options", [['', 'soft', 'EXPERIMENTAL. mark the component as deleted. after tag/snap and export the remote will be updated'], ['r', 'remote', 'remove a component completely from a remote scope (Careful! this is a permanent change. prefer --soft and tag+export)'], ['t', 'track', 'keep tracking component in .bitmap (default = false), helps transform a tagged-component to new'], ['d', 'delete-files', 'DEPRECATED (this is now the default). delete local component files'], ['', 'keep-files', 'keep component files (just untrack the component)'], ['f', 'force', 'removes the component from the scope, even if used as a dependency. WARNING: components that depend on this component will corrupt'], ['s', 'silent', 'skip confirmation']]);
|
|
107
|
+
(0, _defineProperty2().default)(this, "options", [['', 'soft', 'EXPERIMENTAL. mark the component as deleted. after tag/snap and export the remote will be updated'], ['r', 'remote', 'remove a component completely from a remote scope (Careful! this is a permanent change. prefer --soft and tag+export)'], ['', 'from-lane', 'revert to main if exists on currently checked out lane, otherwise, remove it'], ['t', 'track', 'keep tracking component in .bitmap (default = false), helps transform a tagged-component to new'], ['d', 'delete-files', 'DEPRECATED (this is now the default). delete local component files'], ['', 'keep-files', 'keep component files (just untrack the component)'], ['f', 'force', 'removes the component from the scope, even if used as a dependency. WARNING: components that depend on this component will corrupt'], ['s', 'silent', 'skip confirmation']]);
|
|
108
108
|
(0, _defineProperty2().default)(this, "loader", true);
|
|
109
109
|
(0, _defineProperty2().default)(this, "migration", true);
|
|
110
110
|
(0, _defineProperty2().default)(this, "remoteOp", true);
|
|
@@ -114,6 +114,7 @@ class RemoveCmd {
|
|
|
114
114
|
soft = false,
|
|
115
115
|
force = false,
|
|
116
116
|
remote = false,
|
|
117
|
+
fromLane = false,
|
|
117
118
|
track = false,
|
|
118
119
|
deleteFiles = false,
|
|
119
120
|
silent = false,
|
|
@@ -123,6 +124,7 @@ class RemoveCmd {
|
|
|
123
124
|
if (remote) throw new (_bitError().BitError)(`error: --remote and --soft cannot be used together. soft delete can only be done locally, after tag/snap and export it updates the remote`);
|
|
124
125
|
if (track) throw new (_bitError().BitError)(`error: please use either --soft or --track, not both`);
|
|
125
126
|
if (keepFiles) throw new (_bitError().BitError)(`error: please use either --soft or --keep-files, not both`);
|
|
127
|
+
if (fromLane) throw new (_bitError().BitError)(`error: please use either --soft or --from-lane, not both`);
|
|
126
128
|
const removedCompIds = await this.remove.softRemove(componentsPattern);
|
|
127
129
|
return `${_chalk().default.green('successfully soft-removed the following components:')}
|
|
128
130
|
${removedCompIds.join('\n')}
|
|
@@ -154,7 +156,8 @@ ${_chalk().default.bold('to update the remote, please tag/snap and then export')
|
|
|
154
156
|
remote,
|
|
155
157
|
force,
|
|
156
158
|
track,
|
|
157
|
-
deleteFiles: !keepFiles
|
|
159
|
+
deleteFiles: !keepFiles,
|
|
160
|
+
fromLane
|
|
158
161
|
}); // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
|
|
159
162
|
|
|
160
163
|
return (0, _removeTemplate().default)(localResult, false) + this.paintArray(remoteResult);
|
package/dist/remove-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RemoveCmd","constructor","remove","name","description","COMPONENT_PATTERN_HELP","report","componentsPattern","soft","force","remote","track","deleteFiles","silent","keepFiles","BitError","removedCompIds","softRemove","chalk","green","join","bold","loader","stop","console","warn","yellow","willDeleteFiles","removePromptResult","removePrompt","yn","shouldRemove","localResult","remoteResult","paintRemoved","paintArray","removedObjectsArray","map","item"],"sources":["remove-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport yn from 'yn';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { BitError } from '@teambit/bit-error';\nimport { removePrompt } from '@teambit/legacy/dist/prompts';\nimport RemovedObjects from '@teambit/legacy/dist/scope/removed-components';\nimport RemovedLocalObjects from '@teambit/legacy/dist/scope/removed-local-objects';\nimport loader from '@teambit/legacy/dist/cli/loader';\nimport paintRemoved from '@teambit/legacy/dist/cli/templates/remove-template';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { RemoveMain } from './remove.main.runtime';\n\nexport class RemoveCmd implements Command {\n name = 'remove <component-pattern>';\n description = 'remove component(s) from the workspace, or a remote scope';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n group = 'collaborate';\n helpUrl = 'components/removing-components';\n skipWorkspace = true;\n alias = 'rm';\n options = [\n ['', 'soft', 'EXPERIMENTAL. mark the component as deleted. after tag/snap and export the remote will be updated'],\n [\n 'r',\n 'remote',\n 'remove a component completely from a remote scope (Careful! this is a permanent change. prefer --soft and tag+export)',\n ],\n ['t', 'track', 'keep tracking component in .bitmap (default = false), helps transform a tagged-component to new'],\n ['d', 'delete-files', 'DEPRECATED (this is now the default). delete local component files'],\n ['', 'keep-files', 'keep component files (just untrack the component)'],\n [\n 'f',\n 'force',\n 'removes the component from the scope, even if used as a dependency. WARNING: components that depend on this component will corrupt',\n ],\n ['s', 'silent', 'skip confirmation'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n\n constructor(private remove: RemoveMain) {}\n\n async report(\n [componentsPattern]: [string],\n {\n soft = false,\n force = false,\n remote = false,\n track = false,\n deleteFiles = false,\n silent = false,\n keepFiles = false,\n }: {\n force: boolean;\n remote: boolean;\n track: boolean;\n deleteFiles: boolean;\n silent: boolean;\n keepFiles: boolean;\n soft: boolean;\n }\n ) {\n if (soft) {\n if (remote)\n throw new BitError(\n `error: --remote and --soft cannot be used together. soft delete can only be done locally, after tag/snap and export it updates the remote`\n );\n if (track) throw new BitError(`error: please use either --soft or --track, not both`);\n if (keepFiles) throw new BitError(`error: please use either --soft or --keep-files, not both`);\n const removedCompIds = await this.remove.softRemove(componentsPattern);\n return `${chalk.green('successfully soft-removed the following components:')}\n${removedCompIds.join('\\n')}\n\n${chalk.bold('to update the remote, please tag/snap and then export')}`;\n }\n\n if (deleteFiles) {\n loader.stop();\n // eslint-disable-next-line no-console\n console.warn(\n chalk.yellow(\n '--delete-files flag is deprecated. by default the files are deleted, unless --keep-files was provided'\n )\n );\n }\n if (!silent) {\n const willDeleteFiles = !remote && !keepFiles;\n const removePromptResult = await removePrompt(willDeleteFiles, remote)();\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n if (!yn(removePromptResult.shouldRemove)) {\n throw new BitError('the operation has been canceled');\n }\n }\n const {\n localResult,\n remoteResult = [],\n }: {\n localResult: RemovedLocalObjects;\n remoteResult: RemovedObjects[];\n } = await this.remove.remove({ componentsPattern, remote, force, track, deleteFiles: !keepFiles });\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n return paintRemoved(localResult, false) + this.paintArray(remoteResult);\n }\n paintArray(removedObjectsArray: RemovedObjects[]) {\n return removedObjectsArray.map((item) => paintRemoved(item, true));\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGO,MAAMA,SAAN,CAAmC;
|
|
1
|
+
{"version":3,"names":["RemoveCmd","constructor","remove","name","description","COMPONENT_PATTERN_HELP","report","componentsPattern","soft","force","remote","fromLane","track","deleteFiles","silent","keepFiles","BitError","removedCompIds","softRemove","chalk","green","join","bold","loader","stop","console","warn","yellow","willDeleteFiles","removePromptResult","removePrompt","yn","shouldRemove","localResult","remoteResult","paintRemoved","paintArray","removedObjectsArray","map","item"],"sources":["remove-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport yn from 'yn';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { BitError } from '@teambit/bit-error';\nimport { removePrompt } from '@teambit/legacy/dist/prompts';\nimport RemovedObjects from '@teambit/legacy/dist/scope/removed-components';\nimport RemovedLocalObjects from '@teambit/legacy/dist/scope/removed-local-objects';\nimport loader from '@teambit/legacy/dist/cli/loader';\nimport paintRemoved from '@teambit/legacy/dist/cli/templates/remove-template';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { RemoveMain } from './remove.main.runtime';\n\nexport class RemoveCmd implements Command {\n name = 'remove <component-pattern>';\n description = 'remove component(s) from the workspace, or a remote scope';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n group = 'collaborate';\n helpUrl = 'components/removing-components';\n skipWorkspace = true;\n alias = 'rm';\n options = [\n ['', 'soft', 'EXPERIMENTAL. mark the component as deleted. after tag/snap and export the remote will be updated'],\n [\n 'r',\n 'remote',\n 'remove a component completely from a remote scope (Careful! this is a permanent change. prefer --soft and tag+export)',\n ],\n ['', 'from-lane', 'revert to main if exists on currently checked out lane, otherwise, remove it'],\n ['t', 'track', 'keep tracking component in .bitmap (default = false), helps transform a tagged-component to new'],\n ['d', 'delete-files', 'DEPRECATED (this is now the default). delete local component files'],\n ['', 'keep-files', 'keep component files (just untrack the component)'],\n [\n 'f',\n 'force',\n 'removes the component from the scope, even if used as a dependency. WARNING: components that depend on this component will corrupt',\n ],\n ['s', 'silent', 'skip confirmation'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n\n constructor(private remove: RemoveMain) {}\n\n async report(\n [componentsPattern]: [string],\n {\n soft = false,\n force = false,\n remote = false,\n fromLane = false,\n track = false,\n deleteFiles = false,\n silent = false,\n keepFiles = false,\n }: {\n force: boolean;\n remote: boolean;\n track: boolean;\n fromLane: boolean;\n deleteFiles: boolean;\n silent: boolean;\n keepFiles: boolean;\n soft: boolean;\n }\n ) {\n if (soft) {\n if (remote)\n throw new BitError(\n `error: --remote and --soft cannot be used together. soft delete can only be done locally, after tag/snap and export it updates the remote`\n );\n if (track) throw new BitError(`error: please use either --soft or --track, not both`);\n if (keepFiles) throw new BitError(`error: please use either --soft or --keep-files, not both`);\n if (fromLane) throw new BitError(`error: please use either --soft or --from-lane, not both`);\n const removedCompIds = await this.remove.softRemove(componentsPattern);\n return `${chalk.green('successfully soft-removed the following components:')}\n${removedCompIds.join('\\n')}\n\n${chalk.bold('to update the remote, please tag/snap and then export')}`;\n }\n\n if (deleteFiles) {\n loader.stop();\n // eslint-disable-next-line no-console\n console.warn(\n chalk.yellow(\n '--delete-files flag is deprecated. by default the files are deleted, unless --keep-files was provided'\n )\n );\n }\n if (!silent) {\n const willDeleteFiles = !remote && !keepFiles;\n const removePromptResult = await removePrompt(willDeleteFiles, remote)();\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n if (!yn(removePromptResult.shouldRemove)) {\n throw new BitError('the operation has been canceled');\n }\n }\n const {\n localResult,\n remoteResult = [],\n }: {\n localResult: RemovedLocalObjects;\n remoteResult: RemovedObjects[];\n } = await this.remove.remove({ componentsPattern, remote, force, track, deleteFiles: !keepFiles, fromLane });\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n return paintRemoved(localResult, false) + this.paintArray(remoteResult);\n }\n paintArray(removedObjectsArray: RemovedObjects[]) {\n return removedObjectsArray.map((item) => paintRemoved(item, true));\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGO,MAAMA,SAAN,CAAmC;EAmCxCC,WAAW,CAASC,MAAT,EAA6B;IAAA,KAApBA,MAAoB,GAApBA,MAAoB;IAAA,8CAlCjC,4BAkCiC;IAAA,qDAjC1B,2DAiC0B;IAAA,mDAhC5B,CACV;MACEC,IAAI,EAAE,mBADR;MAEEC,WAAW,EAAEC;IAFf,C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
|
constructor(workspace: Workspace, logger: Logger);
|
|
13
|
-
remove({ componentsPattern, force, remote, track, deleteFiles, }: {
|
|
13
|
+
remove({ componentsPattern, force, remote, track, deleteFiles, fromLane, }: {
|
|
14
14
|
componentsPattern: string;
|
|
15
15
|
force: boolean;
|
|
16
16
|
remote: boolean;
|
|
17
17
|
track: boolean;
|
|
18
18
|
deleteFiles: boolean;
|
|
19
|
+
fromLane: boolean;
|
|
19
20
|
}): Promise<any>;
|
|
20
21
|
softRemove(componentsPattern: string): Promise<ComponentID[]>;
|
|
21
22
|
getRemoveInfo(component: Component): RemoveInfo;
|
|
@@ -194,7 +194,8 @@ class RemoveMain {
|
|
|
194
194
|
force,
|
|
195
195
|
remote,
|
|
196
196
|
track,
|
|
197
|
-
deleteFiles
|
|
197
|
+
deleteFiles,
|
|
198
|
+
fromLane
|
|
198
199
|
}) {
|
|
199
200
|
var _this$workspace;
|
|
200
201
|
|
|
@@ -209,7 +210,8 @@ class RemoveMain {
|
|
|
209
210
|
force,
|
|
210
211
|
remote,
|
|
211
212
|
track,
|
|
212
|
-
deleteFiles
|
|
213
|
+
deleteFiles,
|
|
214
|
+
fromLane
|
|
213
215
|
});
|
|
214
216
|
if (consumer) await consumer.onDestroy();
|
|
215
217
|
return removeResults;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BEFORE_REMOVE","RemoveMain","constructor","workspace","logger","remove","componentsPattern","force","remote","track","deleteFiles","setStatusLine","bitIds","getRemoteBitIdsToRemove","getLocalBitIdsToRemove","consumer","removeResults","removeComponents","ids","BitIds","fromArray","onDestroy","softRemove","ConsumerNotFound","componentIds","idsByPattern","components","getMany","newComps","filter","c","id","hasVersion","length","BitError","map","toString","join","removeComponentsFromNodeModules","state","_consumer","compId","bitMap","addComponentConfig","RemoveAspect","removed","write","_legacy","deleteComponentsFiles","getRemoveInfo","component","data","config","extensions","findExtension","isRemoved","getRemovedStaged","stagedConfig","scope","getStagedConfig","getAll","compConfig","hasWildcard","getRemoteBitIdsByWildcards","BitId","parse","provider","cli","loggerMain","componentAspect","createLogger","removeMain","registerShowFragments","RemoveFragment","register","RemoveCmd","WorkspaceAspect","CLIAspect","LoggerAspect","ComponentAspect","MainRuntime","addRuntime"],"sources":["remove.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport removeComponents from '@teambit/legacy/dist/consumer/component-ops/remove-components';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport hasWildcard from '@teambit/legacy/dist/utils/string/has-wildcard';\nimport { getRemoteBitIdsByWildcards } from '@teambit/legacy/dist/api/consumer/lib/list-scope';\nimport { ComponentID } from '@teambit/component-id';\nimport { BitError } from '@teambit/bit-error';\nimport deleteComponentsFiles from '@teambit/legacy/dist/consumer/component-ops/delete-component-files';\nimport ComponentAspect, { Component, ComponentMain } from '@teambit/component';\nimport { removeComponentsFromNodeModules } from '@teambit/legacy/dist/consumer/component/package-json-utils';\nimport { RemoveCmd } from './remove-cmd';\nimport { RemoveAspect } from './remove.aspect';\nimport { RemoveFragment } from './remove.fragment';\n\nconst BEFORE_REMOVE = 'removing components';\n\nexport type RemoveInfo = {\n removed: boolean;\n};\n\nexport class RemoveMain {\n constructor(private workspace: Workspace, private logger: Logger) {}\n\n async remove({\n componentsPattern,\n force,\n remote,\n track,\n deleteFiles,\n }: {\n componentsPattern: string;\n force: boolean;\n remote: boolean;\n track: boolean;\n deleteFiles: boolean;\n }): Promise<any> {\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 consumer,\n ids: BitIds.fromArray(bitIds),\n force,\n remote,\n track,\n deleteFiles,\n });\n if (consumer) await consumer.onDestroy();\n return removeResults;\n }\n\n async softRemove(componentsPattern: string): Promise<ComponentID[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n const components = await this.workspace.getMany(componentIds);\n const newComps = components.filter((c) => !c.id.hasVersion());\n if (newComps.length) {\n throw new BitError(\n `unable to soft-remove the following new component(s), please remove them without --soft\\n${newComps\n .map((c) => c.id.toString())\n .join('\\n')}`\n );\n }\n await removeComponentsFromNodeModules(\n this.workspace.consumer,\n components.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 componentIds.map((compId) =>\n this.workspace.bitMap.addComponentConfig(compId, RemoveAspect.id, {\n removed: true,\n })\n );\n await this.workspace.bitMap.write();\n const bitIds = BitIds.fromArray(componentIds.map((id) => id._legacy));\n await deleteComponentsFiles(this.workspace.consumer, bitIds);\n\n return componentIds;\n }\n\n getRemoveInfo(component: Component): RemoveInfo {\n const data = component.config.extensions.findExtension(RemoveAspect.id)?.config as RemoveInfo | undefined;\n return {\n removed: data?.removed || false,\n };\n }\n\n isRemoved(component: Component): boolean {\n return this.getRemoveInfo(component).removed;\n }\n\n /**\n * get components that were soft-removed and tagged/snapped but not exported yet.\n */\n async getRemovedStaged(): 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 getLocalBitIdsToRemove(componentsPattern: string): Promise<BitId[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n return componentIds.map((id) => id._legacy);\n }\n\n private async getRemoteBitIdsToRemove(componentsPattern: string): Promise<BitId[]> {\n if (hasWildcard(componentsPattern)) {\n return getRemoteBitIdsByWildcards(componentsPattern);\n }\n return [BitId.parse(componentsPattern, true)];\n }\n\n static slots = [];\n static dependencies = [WorkspaceAspect, CLIAspect, LoggerAspect, ComponentAspect];\n static runtime = MainRuntime;\n\n static async provider([workspace, cli, loggerMain, componentAspect]: [\n Workspace,\n CLIMain,\n LoggerMain,\n ComponentMain\n ]) {\n const logger = loggerMain.createLogger(RemoveAspect.id);\n const removeMain = new RemoveMain(workspace, logger);\n componentAspect.registerShowFragments([new RemoveFragment(removeMain)]);\n cli.register(new RemoveCmd(removeMain));\n return new RemoveMain(workspace, logger);\n }\n}\n\nRemoveAspect.addRuntime(RemoveMain);\n\nexport default RemoveMain;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA,MAAM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,SAAf,EAA0BC,MAA1B,CAAnB;IACAiE,eAAe,CAACG,qBAAhB,CAAsC,CAAC,KAAIC,yBAAJ,EAAmBF,UAAnB,CAAD,CAAtC;IACAJ,GAAG,CAACO,QAAJ,CAAa,KAAIC,sBAAJ,EAAcJ,UAAd,CAAb;IACA,OAAO,IAAItE,UAAJ,CAAeE,SAAf,EAA0BC,MAA1B,CAAP;EACD;;AAlHqB;;;gCAAXH,U,WAmGI,E;gCAnGJA,U,kBAoGW,CAAC2E,oBAAD,EAAkBC,gBAAlB,EAA6BC,sBAA7B,EAA2CC,oBAA3C,C;gCApGX9E,U,aAqGM+E,kB;;AAgBnBpC,sBAAA,CAAaqC,UAAb,CAAwBhF,UAAxB;;eAEeA,U"}
|
|
1
|
+
{"version":3,"names":["BEFORE_REMOVE","RemoveMain","constructor","workspace","logger","remove","componentsPattern","force","remote","track","deleteFiles","fromLane","setStatusLine","bitIds","getRemoteBitIdsToRemove","getLocalBitIdsToRemove","consumer","removeResults","removeComponents","ids","BitIds","fromArray","onDestroy","softRemove","ConsumerNotFound","componentIds","idsByPattern","components","getMany","newComps","filter","c","id","hasVersion","length","BitError","map","toString","join","removeComponentsFromNodeModules","state","_consumer","compId","bitMap","addComponentConfig","RemoveAspect","removed","write","_legacy","deleteComponentsFiles","getRemoveInfo","component","data","config","extensions","findExtension","isRemoved","getRemovedStaged","stagedConfig","scope","getStagedConfig","getAll","compConfig","hasWildcard","getRemoteBitIdsByWildcards","BitId","parse","provider","cli","loggerMain","componentAspect","createLogger","removeMain","registerShowFragments","RemoveFragment","register","RemoveCmd","WorkspaceAspect","CLIAspect","LoggerAspect","ComponentAspect","MainRuntime","addRuntime"],"sources":["remove.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport removeComponents from '@teambit/legacy/dist/consumer/component-ops/remove-components';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport hasWildcard from '@teambit/legacy/dist/utils/string/has-wildcard';\nimport { getRemoteBitIdsByWildcards } from '@teambit/legacy/dist/api/consumer/lib/list-scope';\nimport { ComponentID } from '@teambit/component-id';\nimport { BitError } from '@teambit/bit-error';\nimport deleteComponentsFiles from '@teambit/legacy/dist/consumer/component-ops/delete-component-files';\nimport ComponentAspect, { Component, ComponentMain } from '@teambit/component';\nimport { removeComponentsFromNodeModules } from '@teambit/legacy/dist/consumer/component/package-json-utils';\nimport { RemoveCmd } from './remove-cmd';\nimport { RemoveAspect } from './remove.aspect';\nimport { RemoveFragment } from './remove.fragment';\n\nconst BEFORE_REMOVE = 'removing components';\n\nexport type RemoveInfo = {\n removed: boolean;\n};\n\nexport class RemoveMain {\n constructor(private workspace: Workspace, private logger: Logger) {}\n\n async remove({\n componentsPattern,\n force,\n remote,\n track,\n deleteFiles,\n fromLane,\n }: {\n componentsPattern: string;\n force: boolean;\n remote: boolean;\n track: boolean;\n deleteFiles: boolean;\n fromLane: boolean;\n }): Promise<any> {\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 consumer,\n ids: BitIds.fromArray(bitIds),\n force,\n remote,\n track,\n deleteFiles,\n fromLane,\n });\n if (consumer) await consumer.onDestroy();\n return removeResults;\n }\n\n async softRemove(componentsPattern: string): Promise<ComponentID[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n const components = await this.workspace.getMany(componentIds);\n const newComps = components.filter((c) => !c.id.hasVersion());\n if (newComps.length) {\n throw new BitError(\n `unable to soft-remove the following new component(s), please remove them without --soft\\n${newComps\n .map((c) => c.id.toString())\n .join('\\n')}`\n );\n }\n await removeComponentsFromNodeModules(\n this.workspace.consumer,\n components.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 componentIds.map((compId) =>\n this.workspace.bitMap.addComponentConfig(compId, RemoveAspect.id, {\n removed: true,\n })\n );\n await this.workspace.bitMap.write();\n const bitIds = BitIds.fromArray(componentIds.map((id) => id._legacy));\n await deleteComponentsFiles(this.workspace.consumer, bitIds);\n\n return componentIds;\n }\n\n getRemoveInfo(component: Component): RemoveInfo {\n const data = component.config.extensions.findExtension(RemoveAspect.id)?.config as RemoveInfo | undefined;\n return {\n removed: data?.removed || false,\n };\n }\n\n isRemoved(component: Component): boolean {\n return this.getRemoveInfo(component).removed;\n }\n\n /**\n * get components that were soft-removed and tagged/snapped but not exported yet.\n */\n async getRemovedStaged(): 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 getLocalBitIdsToRemove(componentsPattern: string): Promise<BitId[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n return componentIds.map((id) => id._legacy);\n }\n\n private async getRemoteBitIdsToRemove(componentsPattern: string): Promise<BitId[]> {\n if (hasWildcard(componentsPattern)) {\n return getRemoteBitIdsByWildcards(componentsPattern);\n }\n return [BitId.parse(componentsPattern, true)];\n }\n\n static slots = [];\n static dependencies = [WorkspaceAspect, CLIAspect, LoggerAspect, ComponentAspect];\n static runtime = MainRuntime;\n\n static async provider([workspace, cli, loggerMain, componentAspect]: [\n Workspace,\n CLIMain,\n LoggerMain,\n ComponentMain\n ]) {\n const logger = loggerMain.createLogger(RemoveAspect.id);\n const removeMain = new RemoveMain(workspace, logger);\n componentAspect.registerShowFragments([new RemoveFragment(removeMain)]);\n cli.register(new RemoveCmd(removeMain));\n return new RemoveMain(workspace, logger);\n }\n}\n\nRemoveAspect.addRuntime(RemoveMain);\n\nexport default RemoveMain;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA,MAAMA,aAAa,GAAG,qBAAtB;;AAMO,MAAMC,UAAN,CAAiB;EACtBC,WAAW,CAASC,SAAT,EAAuCC,MAAvC,EAAuD;IAAA,KAA9CD,SAA8C,GAA9CA,SAA8C;IAAA,KAAhBC,MAAgB,GAAhBA,MAAgB;EAAE;;EAExD,MAANC,MAAM,CAAC;IACXC,iBADW;IAEXC,KAFW;IAGXC,MAHW;IAIXC,KAJW;IAKXC,WALW;IAMXC;EANW,CAAD,EAcK;IAAA;;IACf,KAAKP,M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GJA,U,kBAuGW,CAAC4E,oBAAD,EAAkBC,gBAAlB,EAA6BC,sBAA7B,EAA2CC,oBAA3C,C;gCAvGX/E,U,aAwGMgF,kB;;AAgBnBpC,sBAAA,CAAaqC,UAAb,CAAwBjF,UAAxB;;eAEeA,U"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/remove",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/component/remove",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "remove",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.25"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"@babel/runtime": "7.12.18",
|
|
15
15
|
"core-js": "^3.0.0",
|
|
16
16
|
"@teambit/bit-error": "0.0.400",
|
|
17
|
-
"@teambit/cli": "0.0.
|
|
17
|
+
"@teambit/cli": "0.0.566",
|
|
18
18
|
"@teambit/harmony": "0.3.3",
|
|
19
|
-
"@teambit/component": "0.0.
|
|
19
|
+
"@teambit/component": "0.0.848",
|
|
20
20
|
"@teambit/component-id": "0.0.417",
|
|
21
21
|
"@teambit/legacy-bit-id": "0.0.414",
|
|
22
|
-
"@teambit/logger": "0.0.
|
|
23
|
-
"@teambit/workspace": "0.0.
|
|
22
|
+
"@teambit/logger": "0.0.659",
|
|
23
|
+
"@teambit/workspace": "0.0.848"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/mocha": "9.1.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@types/node": "12.20.4"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@teambit/legacy": "1.0.
|
|
34
|
+
"@teambit/legacy": "1.0.347",
|
|
35
35
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
36
36
|
"react": "^16.8.0 || ^17.0.0"
|
|
37
37
|
},
|
|
File without changes
|
|
Binary file
|