@teambit/remove 0.0.304 → 0.0.306

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.
@@ -4,16 +4,23 @@ import { Workspace } from '@teambit/workspace';
4
4
  import { BitId } from '@teambit/legacy-bit-id';
5
5
  import { ImporterMain } from '@teambit/importer';
6
6
  import { ComponentID } from '@teambit/component-id';
7
+ import { DependencyResolverMain } from '@teambit/dependency-resolver';
8
+ import { IssuesMain } from '@teambit/issues';
7
9
  import { Component, ComponentMain } from '@teambit/component';
8
10
  import { RecoverOptions } from './recover-cmd';
9
11
  export declare type RemoveInfo = {
10
12
  removed: boolean;
13
+ /**
14
+ * whether to remove the component from default lane once merged
15
+ */
16
+ removeOnMain?: boolean;
11
17
  };
12
18
  export declare class RemoveMain {
13
19
  private workspace;
14
20
  logger: Logger;
15
21
  private importer;
16
- constructor(workspace: Workspace, logger: Logger, importer: ImporterMain);
22
+ private depResolver;
23
+ constructor(workspace: Workspace, logger: Logger, importer: ImporterMain, depResolver: DependencyResolverMain);
17
24
  remove({ componentsPattern, force, remote, track, deleteFiles, fromLane, }: {
18
25
  componentsPattern: string;
19
26
  force?: boolean;
@@ -31,7 +38,7 @@ export declare class RemoveMain {
31
38
  localResult: import("@teambit/legacy/dist/scope/removed-local-objects").default;
32
39
  remoteResult: Record<string, any>[];
33
40
  }>;
34
- markRemoveComps(componentIds: ComponentID[]): Promise<ComponentID[]>;
41
+ markRemoveComps(componentIds: ComponentID[], shouldUpdateMain?: boolean): Promise<ComponentID[]>;
35
42
  markRemoveOnMain(componentsPattern: string): Promise<ComponentID[]>;
36
43
  /**
37
44
  * recover a soft-removed component.
@@ -47,10 +54,16 @@ export declare class RemoveMain {
47
54
  private throwForMainComponentWhenOnLane;
48
55
  getRemoveInfo(component: Component): RemoveInfo;
49
56
  isRemoved(component: Component): boolean;
57
+ /**
58
+ * performant version of isRemoved() in case the component object is not available and loading it is expensive.
59
+ */
60
+ isRemovedByIdWithoutLoadingComponent(componentId: ComponentID): Promise<boolean>;
50
61
  /**
51
62
  * get components that were soft-removed and tagged/snapped/merged but not exported yet.
52
63
  */
53
64
  getRemovedStaged(): Promise<ComponentID[]>;
65
+ addRemovedDependenciesIssues(components: Component[]): Promise<void>;
66
+ private addRemovedDepIssue;
54
67
  private getRemovedStagedFromMain;
55
68
  private getRemovedStagedFromLane;
56
69
  private getLocalBitIdsToRemove;
@@ -58,12 +71,14 @@ export declare class RemoveMain {
58
71
  static slots: never[];
59
72
  static dependencies: import("@teambit/harmony").Aspect[];
60
73
  static runtime: import("@teambit/harmony").RuntimeDefinition;
61
- static provider([workspace, cli, loggerMain, componentAspect, importerMain]: [
74
+ static provider([workspace, cli, loggerMain, componentAspect, importerMain, depResolver, issues]: [
62
75
  Workspace,
63
76
  CLIMain,
64
77
  LoggerMain,
65
78
  ComponentMain,
66
- ImporterMain
79
+ ImporterMain,
80
+ DependencyResolverMain,
81
+ IssuesMain
67
82
  ]): Promise<RemoveMain>;
68
83
  }
69
84
  export default RemoveMain;
@@ -98,6 +98,34 @@ function _deleteComponentFiles() {
98
98
  };
99
99
  return data;
100
100
  }
101
+ function _dependencyResolver() {
102
+ const data = require("@teambit/dependency-resolver");
103
+ _dependencyResolver = function () {
104
+ return data;
105
+ };
106
+ return data;
107
+ }
108
+ function _componentIssues() {
109
+ const data = require("@teambit/component-issues");
110
+ _componentIssues = function () {
111
+ return data;
112
+ };
113
+ return data;
114
+ }
115
+ function _issues() {
116
+ const data = _interopRequireDefault(require("@teambit/issues"));
117
+ _issues = function () {
118
+ return data;
119
+ };
120
+ return data;
121
+ }
122
+ function _pMapSeries() {
123
+ const data = _interopRequireDefault(require("p-map-series"));
124
+ _pMapSeries = function () {
125
+ return data;
126
+ };
127
+ return data;
128
+ }
101
129
  function _component() {
102
130
  const data = _interopRequireDefault(require("@teambit/component"));
103
131
  _component = function () {
@@ -105,6 +133,13 @@ function _component() {
105
133
  };
106
134
  return data;
107
135
  }
136
+ function _exceptions2() {
137
+ const data = require("@teambit/legacy/dist/scope/exceptions");
138
+ _exceptions2 = function () {
139
+ return data;
140
+ };
141
+ return data;
142
+ }
108
143
  function _packageJsonUtils() {
109
144
  const data = require("@teambit/legacy/dist/consumer/component/package-json-utils");
110
145
  _packageJsonUtils = function () {
@@ -151,10 +186,11 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
151
186
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
152
187
  const BEFORE_REMOVE = 'removing components';
153
188
  class RemoveMain {
154
- constructor(workspace, logger, importer) {
189
+ constructor(workspace, logger, importer, depResolver) {
155
190
  this.workspace = workspace;
156
191
  this.logger = logger;
157
192
  this.importer = importer;
193
+ this.depResolver = depResolver;
158
194
  }
159
195
  async remove({
160
196
  componentsPattern,
@@ -201,14 +237,16 @@ class RemoveMain {
201
237
  await this.workspace.bitMap.write();
202
238
  return results;
203
239
  }
204
- async markRemoveComps(componentIds) {
240
+ async markRemoveComps(componentIds, shouldUpdateMain = false) {
205
241
  const components = await this.workspace.getMany(componentIds);
206
242
  await (0, _packageJsonUtils().removeComponentsFromNodeModules)(this.workspace.consumer, components.map(c => c.state._consumer));
207
243
  // don't use `this.workspace.addSpecificComponentConfig`, if the component has component.json it will be deleted
208
244
  // during this removal along with the entire component dir.
209
- componentIds.map(compId => this.workspace.bitMap.addComponentConfig(compId, _remove().RemoveAspect.id, {
245
+ const config = {
210
246
  removed: true
211
- }));
247
+ };
248
+ if (shouldUpdateMain) config.removeOnMain = true;
249
+ componentIds.map(compId => this.workspace.bitMap.addComponentConfig(compId, _remove().RemoveAspect.id, config));
212
250
  await this.workspace.bitMap.write();
213
251
  const bitIds = _bitId().BitIds.fromArray(componentIds.map(id => id._legacy));
214
252
  await (0, _deleteComponentFiles().default)(this.workspace.consumer, bitIds);
@@ -274,11 +312,22 @@ class RemoveMain {
274
312
  return true;
275
313
  }
276
314
  const compId = await this.workspace.scope.resolveComponentId(compIdStr);
277
- const compFromScope = await this.workspace.scope.get(compId);
315
+ const currentLane = await this.workspace.getCurrentLaneObject();
316
+ const idOnLane = currentLane === null || currentLane === void 0 ? void 0 : currentLane.getComponent(compId._legacy);
317
+ const compIdWithPossibleVer = idOnLane ? compId.changeVersion(idOnLane.head.toString()) : compId;
318
+ let compFromScope;
319
+ try {
320
+ compFromScope = await this.workspace.scope.get(compIdWithPossibleVer);
321
+ } catch (err) {
322
+ if (err instanceof _exceptions2().VersionNotFound && err.version === '0.0.0') {
323
+ throw new (_bitError().BitError)(`unable to find the component ${compIdWithPossibleVer.toString()} in the current lane or main`);
324
+ }
325
+ throw err;
326
+ }
278
327
  if (compFromScope && this.isRemoved(compFromScope)) {
279
328
  // case #2 and #3
280
- await importComp(compId._legacy.toString());
281
- await setAsRemovedFalse(compId);
329
+ await importComp(compIdWithPossibleVer._legacy.toString());
330
+ await setAsRemovedFalse(compIdWithPossibleVer);
282
331
  return true;
283
332
  }
284
333
  // case #5
@@ -311,12 +360,43 @@ ${mainComps.map(c => c.id.toString()).join('\n')}`);
311
360
  return this.getRemoveInfo(component).removed;
312
361
  }
313
362
 
363
+ /**
364
+ * performant version of isRemoved() in case the component object is not available and loading it is expensive.
365
+ */
366
+ async isRemovedByIdWithoutLoadingComponent(componentId) {
367
+ if (!componentId.hasVersion()) return false;
368
+ const bitmapEntry = this.workspace.bitMap.getBitmapEntryIfExist(componentId);
369
+ if (bitmapEntry && bitmapEntry.isRemoved()) return true;
370
+ const modelComp = await this.workspace.scope.getBitObjectModelComponent(componentId);
371
+ if (!modelComp) return false;
372
+ const versionObj = await this.workspace.scope.getBitObjectVersion(modelComp, componentId.version);
373
+ if (!versionObj) return false;
374
+ return versionObj.isRemoved();
375
+ }
376
+
314
377
  /**
315
378
  * get components that were soft-removed and tagged/snapped/merged but not exported yet.
316
379
  */
317
380
  async getRemovedStaged() {
318
381
  return this.workspace.isOnMain() ? this.getRemovedStagedFromMain() : this.getRemovedStagedFromLane();
319
382
  }
383
+ async addRemovedDependenciesIssues(components) {
384
+ await (0, _pMapSeries().default)(components, async component => {
385
+ await this.addRemovedDepIssue(component);
386
+ });
387
+ }
388
+ async addRemovedDepIssue(component) {
389
+ const dependencies = await this.depResolver.getComponentDependencies(component);
390
+ const removedWithUndefined = await Promise.all(dependencies.map(async dep => {
391
+ const isRemoved = await this.isRemovedByIdWithoutLoadingComponent(dep.componentId);
392
+ if (isRemoved) return dep.componentId;
393
+ return undefined;
394
+ }));
395
+ const removed = (0, _lodash().compact)(removedWithUndefined).map(id => id.toString());
396
+ if (removed.length) {
397
+ component.state.issues.getOrCreate(_componentIssues().IssuesClasses.RemovedDependencies).data = removed;
398
+ }
399
+ }
320
400
  async getRemovedStagedFromMain() {
321
401
  const stagedConfig = await this.workspace.scope.getStagedConfig();
322
402
  return stagedConfig.getAll().filter(compConfig => {
@@ -357,9 +437,10 @@ ${mainComps.map(c => c.id.toString()).join('\n')}`);
357
437
  }
358
438
  return [_legacyBitId().BitId.parse(componentsPattern, true)];
359
439
  }
360
- static async provider([workspace, cli, loggerMain, componentAspect, importerMain]) {
440
+ static async provider([workspace, cli, loggerMain, componentAspect, importerMain, depResolver, issues]) {
361
441
  const logger = loggerMain.createLogger(_remove().RemoveAspect.id);
362
- const removeMain = new RemoveMain(workspace, logger, importerMain);
442
+ const removeMain = new RemoveMain(workspace, logger, importerMain, depResolver);
443
+ issues.registerAddComponentsIssues(removeMain.addRemovedDependenciesIssues.bind(removeMain));
363
444
  componentAspect.registerShowFragments([new (_remove2().RemoveFragment)(removeMain)]);
364
445
  cli.register(new (_removeCmd().RemoveCmd)(removeMain, workspace), new (_recoverCmd().RecoverCmd)(removeMain));
365
446
  return removeMain;
@@ -367,7 +448,7 @@ ${mainComps.map(c => c.id.toString()).join('\n')}`);
367
448
  }
368
449
  exports.RemoveMain = RemoveMain;
369
450
  (0, _defineProperty2().default)(RemoveMain, "slots", []);
370
- (0, _defineProperty2().default)(RemoveMain, "dependencies", [_workspace().default, _cli().CLIAspect, _logger().LoggerAspect, _component().default, _importer().default]);
451
+ (0, _defineProperty2().default)(RemoveMain, "dependencies", [_workspace().default, _cli().CLIAspect, _logger().LoggerAspect, _component().default, _importer().default, _dependencyResolver().DependencyResolverAspect, _issues().default]);
371
452
  (0, _defineProperty2().default)(RemoveMain, "runtime", _cli().MainRuntime);
372
453
  _remove().RemoveAspect.addRuntime(RemoveMain);
373
454
  var _default = RemoveMain;
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_logger","_workspace","_interopRequireWildcard","_legacyBitId","_bitId","_exceptions","_importer","_interopRequireDefault","_lodash","_hasWildcard","_listScope","_bitError","_deleteComponentFiles","_component","_packageJsonUtils","_removeCmd","_removeComponents","_remove","_remove2","_recoverCmd","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","BEFORE_REMOVE","RemoveMain","constructor","workspace","logger","importer","remove","componentsPattern","force","remote","track","deleteFiles","fromLane","_this$workspace","setStatusLine","bitIds","getRemoteBitIdsToRemove","getLocalBitIdsToRemove","consumer","removeResults","removeComponents","ids","BitIds","fromArray","onDestroy","removeLocallyByIds","OutsideWorkspaceError","results","bitMap","write","markRemoveComps","componentIds","components","getMany","removeComponentsFromNodeModules","map","c","state","_consumer","compId","addComponentConfig","RemoveAspect","id","removed","_legacy","deleteComponentsFiles","markRemoveOnMain","ConsumerNotFound","isOnMain","Error","idsByPattern","newComps","filter","hasVersion","length","BitError","toString","join","recover","compIdStr","options","bitMapEntry","find","compMap","name","toStringWithoutVersion","importComp","idStr","import","installNpmPackages","skipDependencyInstallation","override","setAsRemovedFalse","addSpecificComponentConfig","_bitMapEntry$config","config","_bitMapEntry$config2","resolveComponentId","comp","isRemoved","scope","compFromScope","getRemoteComponent","throwForMainComponentWhenOnLane","currentLane","getCurrentLaneObject","laneComps","toBitIds","mainComps","hasWithoutVersion","getRemoveInfo","component","_component$config$ext","extensions","findExtension","getRemovedStaged","getRemovedStagedFromMain","getRemovedStagedFromLane","stagedConfig","getStagedConfig","getAll","compConfig","_compConfig$config","_compConfig$config$Re","laneIds","workspaceIds","listIds","laneIdsNotInWorkspace","wId","isEqualWithoutVersion","laneCompIdsNotInWorkspace","resolveMultipleComponentIds","comps","staged","Promise","all","snapDistance","getSnapDistance","err","warn","isSourceAhead","undefined","compact","hasWildcard","getRemoteBitIdsByWildcards","BitId","parse","provider","cli","loggerMain","componentAspect","importerMain","createLogger","removeMain","registerShowFragments","RemoveFragment","register","RemoveCmd","RecoverCmd","exports","_defineProperty2","WorkspaceAspect","CLIAspect","LoggerAspect","ComponentAspect","ImporterAspect","MainRuntime","addRuntime","_default"],"sources":["remove.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport WorkspaceAspect, { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport ImporterAspect, { ImporterMain } from '@teambit/importer';\nimport { compact } from 'lodash';\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 { removeComponents } from './remove-components';\nimport { RemoveAspect } from './remove.aspect';\nimport { RemoveFragment } from './remove.fragment';\nimport { RecoverCmd, RecoverOptions } from './recover-cmd';\n\nconst BEFORE_REMOVE = 'removing components';\n\nexport type RemoveInfo = {\n removed: boolean;\n};\n\nexport class RemoveMain {\n constructor(private workspace: Workspace, public logger: Logger, private importer: ImporterMain) {}\n\n async remove({\n componentsPattern,\n force = false,\n remote = false,\n track = false,\n deleteFiles = true,\n fromLane = false,\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 /**\n * remove components from the workspace.\n */\n async removeLocallyByIds(ids: BitId[], { force = false }: { force?: boolean } = {}) {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const results = await removeComponents({\n consumer: this.workspace.consumer,\n ids: BitIds.fromArray(ids),\n force,\n remote: false,\n track: false,\n deleteFiles: true,\n fromLane: false,\n });\n await this.workspace.bitMap.write();\n\n return results;\n }\n\n async markRemoveComps(componentIds: ComponentID[]) {\n const components = await this.workspace.getMany(componentIds);\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 async markRemoveOnMain(componentsPattern: string): Promise<ComponentID[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n if (!this.workspace.isOnMain()) {\n throw new Error(`markRemoveOnMain expects to get called when on main`);\n }\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n\n const newComps = componentIds.filter((id) => !id.hasVersion());\n if (newComps.length) {\n throw new BitError(\n `unable to mark-remove the following new component(s), please remove them without --delete\\n${newComps\n .map((id) => id.toString())\n .join('\\n')}`\n );\n }\n\n return this.markRemoveComps(componentIds);\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 * 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.name === 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 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();\n };\n if (bitMapEntry) {\n if (bitMapEntry.config?.[RemoveAspect.id]) {\n // case #1\n delete bitMapEntry.config?.[RemoveAspect.id];\n await importComp(bitMapEntry.id.toString());\n return true;\n }\n // case #4\n const compId = await this.workspace.resolveComponentId(bitMapEntry.id);\n const comp = await this.workspace.get(compId);\n if (!this.isRemoved(comp)) {\n return false;\n }\n await setAsRemovedFalse(compId);\n return true;\n }\n const compId = await this.workspace.scope.resolveComponentId(compIdStr);\n const compFromScope = await this.workspace.scope.get(compId);\n if (compFromScope && this.isRemoved(compFromScope)) {\n // case #2 and #3\n await importComp(compId._legacy.toString());\n await setAsRemovedFalse(compId);\n return true;\n }\n // case #5\n const comp = await this.workspace.scope.getRemoteComponent(compId);\n if (!this.isRemoved(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._legacy));\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 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/merged but not exported yet.\n */\n async getRemovedStaged(): Promise<ComponentID[]> {\n return this.workspace.isOnMain() ? this.getRemovedStagedFromMain() : this.getRemovedStagedFromLane();\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.toBitIds();\n const workspaceIds = await this.workspace.listIds();\n const laneIdsNotInWorkspace = laneIds.filter(\n (id) => !workspaceIds.find((wId) => wId._legacy.isEqualWithoutVersion(id))\n );\n if (!laneIdsNotInWorkspace.length) return [];\n const laneCompIdsNotInWorkspace = await this.workspace.scope.resolveMultipleComponentIds(laneIdsNotInWorkspace);\n const comps = await this.workspace.scope.getMany(laneCompIdsNotInWorkspace);\n const removed = comps.filter((c) => this.isRemoved(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<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, ImporterAspect];\n static runtime = MainRuntime;\n\n static async provider([workspace, cli, loggerMain, componentAspect, importerMain]: [\n Workspace,\n CLIMain,\n LoggerMain,\n ComponentMain,\n ImporterMain\n ]) {\n const logger = loggerMain.createLogger(RemoveAspect.id);\n const removeMain = new RemoveMain(workspace, logger, importerMain);\n componentAspect.registerShowFragments([new RemoveFragment(removeMain)]);\n cli.register(new RemoveCmd(removeMain, workspace), new RecoverCmd(removeMain));\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,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAI,uBAAA,CAAAH,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,aAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,YAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,OAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,MAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,YAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,WAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,UAAA;EAAA,MAAAR,IAAA,GAAAS,sBAAA,CAAAR,OAAA;EAAAO,SAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAU,QAAA;EAAA,M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c,EAACF,UAAU,CAAC,CAAC,CAAC;IACvEL,GAAG,CAACQ,QAAQ,CAAC,KAAIC,sBAAS,EAACJ,UAAU,EAAElI,SAAS,CAAC,EAAE,KAAIuI,wBAAU,EAACL,UAAU,CAAC,CAAC;IAC9E,OAAOA,UAAU;EACnB;AACF;AAACM,OAAA,CAAA1I,UAAA,GAAAA,UAAA;AAAA,IAAA2I,gBAAA,GAAA3J,OAAA,EA3PYgB,UAAU,WA0ON,EAAE;AAAA,IAAA2I,gBAAA,GAAA3J,OAAA,EA1ONgB,UAAU,kBA2OC,CAAC4I,oBAAe,EAAEC,gBAAS,EAAEC,sBAAY,EAAEC,oBAAe,EAAEC,mBAAc,CAAC;AAAA,IAAAL,gBAAA,GAAA3J,OAAA,EA3OtFgB,UAAU,aA4OJiJ,kBAAW;AAiB9BzG,sBAAY,CAAC0G,UAAU,CAAClJ,UAAU,CAAC;AAAC,IAAAmJ,QAAA,GAErBnJ,UAAU;AAAA0I,OAAA,CAAA1J,OAAA,GAAAmK,QAAA"}
1
+ {"version":3,"names":["_cli","data","require","_logger","_workspace","_interopRequireWildcard","_legacyBitId","_bitId","_exceptions","_importer","_interopRequireDefault","_lodash","_hasWildcard","_listScope","_bitError","_deleteComponentFiles","_dependencyResolver","_componentIssues","_issues","_pMapSeries","_component","_exceptions2","_packageJsonUtils","_removeCmd","_removeComponents","_remove","_remove2","_recoverCmd","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","BEFORE_REMOVE","RemoveMain","constructor","workspace","logger","importer","depResolver","remove","componentsPattern","force","remote","track","deleteFiles","fromLane","_this$workspace","setStatusLine","bitIds","getRemoteBitIdsToRemove","getLocalBitIdsToRemove","consumer","removeResults","removeComponents","ids","BitIds","fromArray","onDestroy","removeLocallyByIds","OutsideWorkspaceError","results","bitMap","write","markRemoveComps","componentIds","shouldUpdateMain","components","getMany","removeComponentsFromNodeModules","map","c","state","_consumer","config","removed","removeOnMain","compId","addComponentConfig","RemoveAspect","id","_legacy","deleteComponentsFiles","markRemoveOnMain","ConsumerNotFound","isOnMain","Error","idsByPattern","newComps","filter","hasVersion","length","BitError","toString","join","recover","compIdStr","options","bitMapEntry","find","compMap","name","toStringWithoutVersion","importComp","idStr","import","installNpmPackages","skipDependencyInstallation","override","setAsRemovedFalse","addSpecificComponentConfig","_bitMapEntry$config","_bitMapEntry$config2","resolveComponentId","comp","isRemoved","scope","currentLane","getCurrentLaneObject","idOnLane","getComponent","compIdWithPossibleVer","changeVersion","head","compFromScope","err","VersionNotFound","version","getRemoteComponent","throwForMainComponentWhenOnLane","laneComps","toBitIds","mainComps","hasWithoutVersion","getRemoveInfo","component","_component$config$ext","extensions","findExtension","isRemovedByIdWithoutLoadingComponent","componentId","bitmapEntry","getBitmapEntryIfExist","modelComp","getBitObjectModelComponent","versionObj","getBitObjectVersion","getRemovedStaged","getRemovedStagedFromMain","getRemovedStagedFromLane","addRemovedDependenciesIssues","pMapSeries","addRemovedDepIssue","dependencies","getComponentDependencies","removedWithUndefined","Promise","all","dep","undefined","compact","issues","getOrCreate","IssuesClasses","RemovedDependencies","stagedConfig","getStagedConfig","getAll","compConfig","_compConfig$config","_compConfig$config$Re","laneIds","workspaceIds","listIds","laneIdsNotInWorkspace","wId","isEqualWithoutVersion","laneCompIdsNotInWorkspace","resolveMultipleComponentIds","comps","staged","snapDistance","getSnapDistance","warn","isSourceAhead","hasWildcard","getRemoteBitIdsByWildcards","BitId","parse","provider","cli","loggerMain","componentAspect","importerMain","createLogger","removeMain","registerAddComponentsIssues","bind","registerShowFragments","RemoveFragment","register","RemoveCmd","RecoverCmd","exports","_defineProperty2","WorkspaceAspect","CLIAspect","LoggerAspect","ComponentAspect","ImporterAspect","DependencyResolverAspect","IssuesAspect","MainRuntime","addRuntime","_default"],"sources":["remove.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport WorkspaceAspect, { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport ImporterAspect, { ImporterMain } from '@teambit/importer';\nimport { compact } from 'lodash';\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 { 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 ComponentAspect, { Component, ComponentMain } from '@teambit/component';\nimport { VersionNotFound } from '@teambit/legacy/dist/scope/exceptions';\nimport { removeComponentsFromNodeModules } from '@teambit/legacy/dist/consumer/component/package-json-utils';\nimport { RemoveCmd } from './remove-cmd';\nimport { removeComponents } from './remove-components';\nimport { RemoveAspect } from './remove.aspect';\nimport { RemoveFragment } from './remove.fragment';\nimport { RecoverCmd, RecoverOptions } from './recover-cmd';\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\nexport class RemoveMain {\n constructor(\n private workspace: Workspace,\n public logger: Logger,\n private importer: ImporterMain,\n private depResolver: DependencyResolverMain\n ) {}\n\n async remove({\n componentsPattern,\n force = false,\n remote = false,\n track = false,\n deleteFiles = true,\n fromLane = false,\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 /**\n * remove components from the workspace.\n */\n async removeLocallyByIds(ids: BitId[], { force = false }: { force?: boolean } = {}) {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const results = await removeComponents({\n consumer: this.workspace.consumer,\n ids: BitIds.fromArray(ids),\n force,\n remote: false,\n track: false,\n deleteFiles: true,\n fromLane: false,\n });\n await this.workspace.bitMap.write();\n\n return results;\n }\n\n async markRemoveComps(componentIds: ComponentID[], shouldUpdateMain = false) {\n const components = await this.workspace.getMany(componentIds);\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 const config: RemoveInfo = { removed: true };\n if (shouldUpdateMain) config.removeOnMain = true;\n componentIds.map((compId) => this.workspace.bitMap.addComponentConfig(compId, RemoveAspect.id, config));\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 async markRemoveOnMain(componentsPattern: string): Promise<ComponentID[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n if (!this.workspace.isOnMain()) {\n throw new Error(`markRemoveOnMain expects to get called when on main`);\n }\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n\n const newComps = componentIds.filter((id) => !id.hasVersion());\n if (newComps.length) {\n throw new BitError(\n `unable to mark-remove the following new component(s), please remove them without --delete\\n${newComps\n .map((id) => id.toString())\n .join('\\n')}`\n );\n }\n\n return this.markRemoveComps(componentIds);\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 * 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.name === 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 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();\n };\n if (bitMapEntry) {\n if (bitMapEntry.config?.[RemoveAspect.id]) {\n // case #1\n delete bitMapEntry.config?.[RemoveAspect.id];\n await importComp(bitMapEntry.id.toString());\n return true;\n }\n // case #4\n const compId = await this.workspace.resolveComponentId(bitMapEntry.id);\n const comp = await this.workspace.get(compId);\n if (!this.isRemoved(comp)) {\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._legacy);\n const compIdWithPossibleVer = idOnLane ? compId.changeVersion(idOnLane.head.toString()) : compId;\n let compFromScope: Component | undefined;\n try {\n compFromScope = await this.workspace.scope.get(compIdWithPossibleVer);\n } catch (err: any) {\n if (err instanceof VersionNotFound && err.version === '0.0.0') {\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 (compFromScope && this.isRemoved(compFromScope)) {\n // case #2 and #3\n await importComp(compIdWithPossibleVer._legacy.toString());\n await setAsRemovedFalse(compIdWithPossibleVer);\n return true;\n }\n // case #5\n const comp = await this.workspace.scope.getRemoteComponent(compId);\n if (!this.isRemoved(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._legacy));\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 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 * 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 const modelComp = await this.workspace.scope.getBitObjectModelComponent(componentId);\n if (!modelComp) return false;\n const versionObj = await this.workspace.scope.getBitObjectVersion(modelComp, componentId.version);\n if (!versionObj) return false;\n return versionObj.isRemoved();\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 = await this.depResolver.getComponentDependencies(component);\n const removedWithUndefined = await Promise.all(\n dependencies.map(async (dep) => {\n const isRemoved = await this.isRemovedByIdWithoutLoadingComponent(dep.componentId);\n if (isRemoved) return dep.componentId;\n return undefined;\n })\n );\n const removed = compact(removedWithUndefined).map((id) => id.toString());\n if (removed.length) {\n component.state.issues.getOrCreate(IssuesClasses.RemovedDependencies).data = removed;\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.toBitIds();\n const workspaceIds = await this.workspace.listIds();\n const laneIdsNotInWorkspace = laneIds.filter(\n (id) => !workspaceIds.find((wId) => wId._legacy.isEqualWithoutVersion(id))\n );\n if (!laneIdsNotInWorkspace.length) return [];\n const laneCompIdsNotInWorkspace = await this.workspace.scope.resolveMultipleComponentIds(laneIdsNotInWorkspace);\n const comps = await this.workspace.scope.getMany(laneCompIdsNotInWorkspace);\n const removed = comps.filter((c) => this.isRemoved(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<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 = [\n WorkspaceAspect,\n CLIAspect,\n LoggerAspect,\n ComponentAspect,\n ImporterAspect,\n DependencyResolverAspect,\n IssuesAspect,\n ];\n static runtime = MainRuntime;\n\n static async provider([workspace, cli, loggerMain, componentAspect, importerMain, depResolver, issues]: [\n Workspace,\n CLIMain,\n LoggerMain,\n ComponentMain,\n ImporterMain,\n DependencyResolverMain,\n IssuesMain\n ]) {\n const logger = loggerMain.createLogger(RemoveAspect.id);\n const removeMain = new RemoveMain(workspace, logger, importerMain, depResolver);\n issues.registerAddComponentsIssues(removeMain.addRemovedDependenciesIssues.bind(removeMain));\n componentAspect.registerShowFragments([new RemoveFragment(removeMain)]);\n cli.register(new RemoveCmd(removeMain, workspace), new RecoverCmd(removeMain));\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,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAI,uBAAA,CAAAH,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAA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AAI,CAACF,UAAU,CAAC,CAAC;IAC5FH,eAAe,CAACM,qBAAqB,CAAC,CAAC,KAAIC,yBAAc,EAACJ,UAAU,CAAC,CAAC,CAAC;IACvEL,GAAG,CAACU,QAAQ,CAAC,KAAIC,sBAAS,EAACN,UAAU,EAAE/J,SAAS,CAAC,EAAE,KAAIsK,wBAAU,EAACP,UAAU,CAAC,CAAC;IAC9E,OAAOA,UAAU;EACnB;AACF;AAACQ,OAAA,CAAAzK,UAAA,GAAAA,UAAA;AAAA,IAAA0K,gBAAA,GAAA1L,OAAA,EAzTYgB,UAAU,WA6RN,EAAE;AAAA,IAAA0K,gBAAA,GAAA1L,OAAA,EA7RNgB,UAAU,kBA8RC,CACpB2K,oBAAe,EACfC,gBAAS,EACTC,sBAAY,EACZC,oBAAe,EACfC,mBAAc,EACdC,8CAAwB,EACxBC,iBAAY,CACb;AAAA,IAAAP,gBAAA,GAAA1L,OAAA,EAtSUgB,UAAU,aAuSJkL,kBAAW;AAoB9BrI,sBAAY,CAACsI,UAAU,CAACnL,UAAU,CAAC;AAAC,IAAAoL,QAAA,GAErBpL,UAAU;AAAAyK,OAAA,CAAAzL,OAAA,GAAAoM,QAAA"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/remove",
3
- "version": "0.0.304",
3
+ "version": "0.0.306",
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": "0.0.304"
9
+ "version": "0.0.306"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -22,11 +22,14 @@
22
22
  "@teambit/component-id": "0.0.427",
23
23
  "@teambit/legacy-bit-id": "0.0.423",
24
24
  "@teambit/bit-error": "0.0.402",
25
- "@teambit/cli": "0.0.753",
26
- "@teambit/workspace": "0.0.1127",
27
- "@teambit/component": "0.0.1127",
28
- "@teambit/importer": "0.0.556",
29
- "@teambit/logger": "0.0.846"
25
+ "@teambit/cli": "0.0.755",
26
+ "@teambit/workspace": "0.0.1129",
27
+ "@teambit/component": "0.0.1129",
28
+ "@teambit/component-issues": "0.0.94",
29
+ "@teambit/dependency-resolver": "0.0.1129",
30
+ "@teambit/importer": "0.0.558",
31
+ "@teambit/issues": "0.0.437",
32
+ "@teambit/logger": "0.0.848"
30
33
  },
31
34
  "devDependencies": {
32
35
  "@types/lodash": "4.14.165",
@@ -38,7 +41,7 @@
38
41
  "@types/testing-library__jest-dom": "5.9.5"
39
42
  },
40
43
  "peerDependencies": {
41
- "@teambit/legacy": "1.0.535",
44
+ "@teambit/legacy": "1.0.537",
42
45
  "react": "^16.8.0 || ^17.0.0",
43
46
  "react-dom": "^16.8.0 || ^17.0.0"
44
47
  },