@teambit/merging 1.0.677 → 1.0.678

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/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { MergingAspect } from './merging.aspect';
2
- export { mergeReport, applyVersionReport, conflictSummaryReport, installationErrorOutput, compilationErrorOutput, getRemovedOutput, getAddedOutput, getWorkspaceConfigUpdateOutput, } from './merge-cmd';
2
+ export { mergeReport } from './merge-cmd';
3
3
  export { compIsAlreadyMergedMsg } from './merge-status-provider';
4
- export { threeWayMerge, getMergeStrategyInteractive, MergeStrategy, FileStatus, MergeOptions, MergeResultsThreeWay, } from './merge-version';
5
- export { MergeFileResult, MergeFileParams, mergeFiles } from './merge-files';
6
- export type { MergingMain, ComponentMergeStatus, ApplyVersionResults, ApplyVersionResult, FilesStatus, FailedComponents, } from './merging.main.runtime';
4
+ export type { MergingMain, ComponentMergeStatus } from './merging.main.runtime';
5
+ export type { ApplyVersionResult, ApplyVersionResults, FailedComponents, FilesStatus, } from '@teambit/component.modules.merge-helper';
6
+ export { FileStatus, getMergeStrategyInteractive, getMergeStrategy, MergeOptions, MergeStrategy, threeWayMerge, MergeResultsThreeWay, } from '@teambit/component.modules.merge-helper';
7
7
  export default MergingAspect;
8
8
  export { MergingAspect };
package/dist/index.js CHANGED
@@ -6,37 +6,25 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "FileStatus", {
7
7
  enumerable: true,
8
8
  get: function () {
9
- return _mergeVersion().FileStatus;
10
- }
11
- });
12
- Object.defineProperty(exports, "MergeFileParams", {
13
- enumerable: true,
14
- get: function () {
15
- return _mergeFiles().MergeFileParams;
16
- }
17
- });
18
- Object.defineProperty(exports, "MergeFileResult", {
19
- enumerable: true,
20
- get: function () {
21
- return _mergeFiles().MergeFileResult;
9
+ return _componentModules().FileStatus;
22
10
  }
23
11
  });
24
12
  Object.defineProperty(exports, "MergeOptions", {
25
13
  enumerable: true,
26
14
  get: function () {
27
- return _mergeVersion().MergeOptions;
15
+ return _componentModules().MergeOptions;
28
16
  }
29
17
  });
30
18
  Object.defineProperty(exports, "MergeResultsThreeWay", {
31
19
  enumerable: true,
32
20
  get: function () {
33
- return _mergeVersion().MergeResultsThreeWay;
21
+ return _componentModules().MergeResultsThreeWay;
34
22
  }
35
23
  });
36
24
  Object.defineProperty(exports, "MergeStrategy", {
37
25
  enumerable: true,
38
26
  get: function () {
39
- return _mergeVersion().MergeStrategy;
27
+ return _componentModules().MergeStrategy;
40
28
  }
41
29
  });
42
30
  Object.defineProperty(exports, "MergingAspect", {
@@ -45,65 +33,23 @@ Object.defineProperty(exports, "MergingAspect", {
45
33
  return _merging().MergingAspect;
46
34
  }
47
35
  });
48
- Object.defineProperty(exports, "applyVersionReport", {
49
- enumerable: true,
50
- get: function () {
51
- return _mergeCmd().applyVersionReport;
52
- }
53
- });
54
36
  Object.defineProperty(exports, "compIsAlreadyMergedMsg", {
55
37
  enumerable: true,
56
38
  get: function () {
57
39
  return _mergeStatusProvider().compIsAlreadyMergedMsg;
58
40
  }
59
41
  });
60
- Object.defineProperty(exports, "compilationErrorOutput", {
61
- enumerable: true,
62
- get: function () {
63
- return _mergeCmd().compilationErrorOutput;
64
- }
65
- });
66
- Object.defineProperty(exports, "conflictSummaryReport", {
67
- enumerable: true,
68
- get: function () {
69
- return _mergeCmd().conflictSummaryReport;
70
- }
71
- });
72
42
  exports.default = void 0;
73
- Object.defineProperty(exports, "getAddedOutput", {
43
+ Object.defineProperty(exports, "getMergeStrategy", {
74
44
  enumerable: true,
75
45
  get: function () {
76
- return _mergeCmd().getAddedOutput;
46
+ return _componentModules().getMergeStrategy;
77
47
  }
78
48
  });
79
49
  Object.defineProperty(exports, "getMergeStrategyInteractive", {
80
50
  enumerable: true,
81
51
  get: function () {
82
- return _mergeVersion().getMergeStrategyInteractive;
83
- }
84
- });
85
- Object.defineProperty(exports, "getRemovedOutput", {
86
- enumerable: true,
87
- get: function () {
88
- return _mergeCmd().getRemovedOutput;
89
- }
90
- });
91
- Object.defineProperty(exports, "getWorkspaceConfigUpdateOutput", {
92
- enumerable: true,
93
- get: function () {
94
- return _mergeCmd().getWorkspaceConfigUpdateOutput;
95
- }
96
- });
97
- Object.defineProperty(exports, "installationErrorOutput", {
98
- enumerable: true,
99
- get: function () {
100
- return _mergeCmd().installationErrorOutput;
101
- }
102
- });
103
- Object.defineProperty(exports, "mergeFiles", {
104
- enumerable: true,
105
- get: function () {
106
- return _mergeFiles().mergeFiles;
52
+ return _componentModules().getMergeStrategyInteractive;
107
53
  }
108
54
  });
109
55
  Object.defineProperty(exports, "mergeReport", {
@@ -115,7 +61,7 @@ Object.defineProperty(exports, "mergeReport", {
115
61
  Object.defineProperty(exports, "threeWayMerge", {
116
62
  enumerable: true,
117
63
  get: function () {
118
- return _mergeVersion().threeWayMerge;
64
+ return _componentModules().threeWayMerge;
119
65
  }
120
66
  });
121
67
  function _merging() {
@@ -139,20 +85,14 @@ function _mergeStatusProvider() {
139
85
  };
140
86
  return data;
141
87
  }
142
- function _mergeVersion() {
143
- const data = require("./merge-version");
144
- _mergeVersion = function () {
145
- return data;
146
- };
147
- return data;
148
- }
149
- function _mergeFiles() {
150
- const data = require("./merge-files");
151
- _mergeFiles = function () {
88
+ function _componentModules() {
89
+ const data = require("@teambit/component.modules.merge-helper");
90
+ _componentModules = function () {
152
91
  return data;
153
92
  };
154
93
  return data;
155
94
  }
95
+ // Re-export types and functions from merge-helper for backward compatibility
156
96
  var _default = exports.default = _merging().MergingAspect;
157
97
 
158
98
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_merging","data","require","_mergeCmd","_mergeStatusProvider","_mergeVersion","_mergeFiles","_default","exports","default","MergingAspect"],"sources":["index.ts"],"sourcesContent":["import { MergingAspect } from './merging.aspect';\n\nexport {\n mergeReport,\n applyVersionReport,\n conflictSummaryReport,\n installationErrorOutput,\n compilationErrorOutput,\n getRemovedOutput,\n getAddedOutput,\n getWorkspaceConfigUpdateOutput,\n} from './merge-cmd';\nexport { compIsAlreadyMergedMsg } from './merge-status-provider';\nexport {\n threeWayMerge,\n getMergeStrategyInteractive,\n MergeStrategy,\n FileStatus,\n MergeOptions,\n MergeResultsThreeWay,\n} from './merge-version';\nexport { MergeFileResult, MergeFileParams, mergeFiles } from './merge-files';\nexport type {\n MergingMain,\n ComponentMergeStatus,\n ApplyVersionResults,\n ApplyVersionResult,\n FilesStatus,\n FailedComponents,\n} from './merging.main.runtime';\nexport default MergingAspect;\nexport { MergingAspect };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAUA,SAAAG,qBAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,oBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,cAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,aAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAQA,SAAAK,YAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,WAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA6E,IAAAM,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAS9DC,wBAAa","ignoreList":[]}
1
+ {"version":3,"names":["_merging","data","require","_mergeCmd","_mergeStatusProvider","_componentModules","_default","exports","default","MergingAspect"],"sources":["index.ts"],"sourcesContent":["import { MergingAspect } from './merging.aspect';\n\nexport { mergeReport } from './merge-cmd';\nexport { compIsAlreadyMergedMsg } from './merge-status-provider';\nexport type { MergingMain, ComponentMergeStatus } from './merging.main.runtime';\n\n// Re-export types and functions from merge-helper for backward compatibility\nexport type {\n ApplyVersionResult,\n ApplyVersionResults,\n FailedComponents,\n FilesStatus,\n} from '@teambit/component.modules.merge-helper';\nexport {\n FileStatus,\n getMergeStrategyInteractive,\n getMergeStrategy,\n MergeOptions,\n MergeStrategy,\n threeWayMerge,\n MergeResultsThreeWay,\n} from '@teambit/component.modules.merge-helper';\n\nexport default MergingAspect;\nexport { MergingAspect };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,qBAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,oBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAUA,SAAAI,kBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,iBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAPA;AAAA,IAAAK,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAiBeC,wBAAa","ignoreList":[]}
@@ -1,8 +1,7 @@
1
1
  import type { Command, CommandOptions } from '@teambit/cli';
2
- import type { ComponentID } from '@teambit/component-id';
3
- import type { ConfigMergeResult, WorkspaceConfigUpdateResult } from '@teambit/config-merger';
4
- import type { MergeStrategy } from './merge-version';
5
- import type { ApplyVersionResults, MergingMain, ApplyVersionResult } from './merging.main.runtime';
2
+ import type { ConfigMergeResult } from '@teambit/config-merger';
3
+ import { type MergeStrategy, type ApplyVersionResults } from '@teambit/component.modules.merge-helper';
4
+ import type { MergingMain } from './merging.main.runtime';
6
5
  import type { ConfigStoreMain } from '@teambit/config-store';
7
6
  export declare class MergeCmd implements Command {
8
7
  private merging;
@@ -37,18 +36,3 @@ export declare class MergeCmd implements Command {
37
36
  export declare function mergeReport({ components, failedComponents, removedComponents, version, mergeSnapResults, mergeSnapError, leftUnresolvedConflicts, verbose, configMergeResults, workspaceConfigUpdateResult, }: ApplyVersionResults & {
38
37
  configMergeResults?: ConfigMergeResult[];
39
38
  }): string;
40
- export declare function getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult?: WorkspaceConfigUpdateResult): string;
41
- /**
42
- * shows only the file-changes section.
43
- * if all files are "unchanged", it returns an empty string
44
- */
45
- export declare function applyVersionReport(components: ApplyVersionResult[], addName?: boolean, showVersion?: boolean): string;
46
- export declare function conflictSummaryReport(components: ApplyVersionResult[]): {
47
- conflictedComponents: number;
48
- conflictedFiles: number;
49
- conflictStr: string;
50
- };
51
- export declare function installationErrorOutput(installationError?: Error): string;
52
- export declare function compilationErrorOutput(compilationError?: Error): string;
53
- export declare function getRemovedOutput(removedComponents?: ComponentID[]): string;
54
- export declare function getAddedOutput(addedComponents?: ComponentID[]): string;
package/dist/merge-cmd.js CHANGED
@@ -4,13 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.MergeCmd = void 0;
7
- exports.applyVersionReport = applyVersionReport;
8
- exports.compilationErrorOutput = compilationErrorOutput;
9
- exports.conflictSummaryReport = conflictSummaryReport;
10
- exports.getAddedOutput = getAddedOutput;
11
- exports.getRemovedOutput = getRemovedOutput;
12
- exports.getWorkspaceConfigUpdateOutput = getWorkspaceConfigUpdateOutput;
13
- exports.installationErrorOutput = installationErrorOutput;
14
7
  exports.mergeReport = mergeReport;
15
8
  function _chalk() {
16
9
  const data = _interopRequireDefault(require("chalk"));
@@ -40,9 +33,9 @@ function _bitError() {
40
33
  };
41
34
  return data;
42
35
  }
43
- function _mergeVersion() {
44
- const data = require("./merge-version");
45
- _mergeVersion = function () {
36
+ function _componentModules() {
37
+ const data = require("@teambit/component.modules.merge-helper");
38
+ _componentModules = function () {
46
39
  return data;
47
40
  };
48
41
  return data;
@@ -139,7 +132,7 @@ function mergeReport({
139
132
  const getSuccessOutput = () => {
140
133
  if (!components || !components.length) return '';
141
134
  const title = `successfully merged ${components.length} components${version ? `from version ${_chalk().default.bold(version)}` : ''}\n`;
142
- const fileChangesReport = applyVersionReport(components);
135
+ const fileChangesReport = (0, _componentModules().applyVersionReport)(components);
143
136
  return _chalk().default.bold(title) + fileChangesReport;
144
137
  };
145
138
  let componentsWithConflicts = 0;
@@ -148,7 +141,7 @@ function mergeReport({
148
141
  const title = `files with conflicts summary\n`;
149
142
  const suggestion = `\n\nmerge process not completed due to the conflicts above. fix conflicts manually and then run "bit install".
150
143
  once ready, snap/tag the components to complete the merge.`;
151
- const conflictSummary = conflictSummaryReport(components);
144
+ const conflictSummary = (0, _componentModules().conflictSummaryReport)(components);
152
145
  componentsWithConflicts = conflictSummary.conflictedComponents;
153
146
  return _chalk().default.underline(title) + conflictSummary.conflictStr + _chalk().default.yellow(suggestion);
154
147
  };
@@ -217,115 +210,7 @@ ${mergeSnapError.message}
217
210
  const conflictStr = `\nConflicts: ${_chalk().default.bold(getConflictStr() || 'none')}`;
218
211
  return title + mergedStr + unchangedLegitimatelyStr + autoSnappedStr + removedStr + conflictStr;
219
212
  };
220
- return (0, _lodash().compact)([getSuccessOutput(), getFailureOutput(), getRemovedOutput(removedComponents), getSnapsOutput(), getConfigMergeConflictSummary(), getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult), getConflictSummary(), getSummary()]).join('\n\n');
221
- }
222
- function getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult) {
223
- if (!workspaceConfigUpdateResult) return '';
224
- const {
225
- workspaceConfigConflictWriteError,
226
- workspaceDepsConflicts,
227
- workspaceDepsUpdates,
228
- workspaceDepsUnchanged
229
- } = workspaceConfigUpdateResult;
230
- const getWorkspaceConflictsOutput = () => {
231
- if (!workspaceDepsConflicts && !workspaceConfigConflictWriteError) return '';
232
- if (workspaceConfigConflictWriteError) {
233
- return `${_chalk().default.red(workspaceConfigConflictWriteError.message)}`;
234
- }
235
- return _chalk().default.yellow('workspace.jsonc has conflicts, please edit the file and fix them');
236
- };
237
- const getWorkspaceUnchangedDepsOutput = () => {
238
- if (!workspaceDepsUnchanged) return '';
239
- const title = '\nworkspace.jsonc was unable to update the following dependencies';
240
- const body = Object.keys(workspaceDepsUnchanged).map(pkgName => {
241
- return ` ${pkgName}: ${workspaceDepsUnchanged[pkgName]}`;
242
- }).join('\n');
243
- return `${_chalk().default.underline(title)}\n${body}`;
244
- };
245
- return (0, _lodash().compact)([getWorkspaceUnchangedDepsOutput(), getWorkspaceDepsOutput(workspaceDepsUpdates), getWorkspaceConflictsOutput()]).join('\n\n');
246
- }
247
- function getWorkspaceDepsOutput(workspaceDepsUpdates) {
248
- if (!workspaceDepsUpdates) return '';
249
- const title = '\nworkspace.jsonc has been updated with the following dependencies';
250
- const body = Object.keys(workspaceDepsUpdates).map(pkgName => {
251
- const [from, to] = workspaceDepsUpdates[pkgName];
252
- return ` ${pkgName}: ${from} => ${to}`;
253
- }).join('\n');
254
- return `${_chalk().default.underline(title)}\n${body}`;
255
- }
256
-
257
- /**
258
- * shows only the file-changes section.
259
- * if all files are "unchanged", it returns an empty string
260
- */
261
- function applyVersionReport(components, addName = true, showVersion = false) {
262
- const tab = addName ? '\t' : '';
263
- const fileChanges = (0, _lodash().compact)(components.map(component => {
264
- const name = showVersion ? component.id.toString() : component.id.toStringWithoutVersion();
265
- const files = (0, _lodash().compact)(Object.keys(component.filesStatus).map(file => {
266
- if (component.filesStatus[file] === _mergeVersion().FileStatus.unchanged) return null;
267
- const note = component.filesStatus[file] === _mergeVersion().FileStatus.manual ? _chalk().default.white('automatic merge failed. please fix conflicts manually and then run "bit install"') : '';
268
- return `${tab}${String(component.filesStatus[file])} ${_chalk().default.bold(file)} ${note}`;
269
- })).join('\n');
270
- if (!files) return null;
271
- return `${addName ? name : ''}\n${_chalk().default.cyan(files)}`;
272
- })).join('\n\n');
273
- if (!fileChanges) {
274
- return '';
275
- }
276
- const title = `\n${_legacy().FILE_CHANGES_CHECKOUT_MSG}\n`;
277
- return _chalk().default.underline(title) + fileChanges;
278
- }
279
- function conflictSummaryReport(components) {
280
- const tab = '\t';
281
- let conflictedComponents = 0;
282
- let conflictedFiles = 0;
283
- const conflictStr = (0, _lodash().compact)(components.map(component => {
284
- const name = component.id.toStringWithoutVersion();
285
- const files = (0, _lodash().compact)(Object.keys(component.filesStatus).map(file => {
286
- if (component.filesStatus[file] === _mergeVersion().FileStatus.manual) {
287
- conflictedFiles += 1;
288
- return `${tab}${String(component.filesStatus[file])} ${_chalk().default.bold(file)}`;
289
- }
290
- return null;
291
- }));
292
- if (!files.length) return null;
293
- conflictedComponents += 1;
294
- return `${name}\n${_chalk().default.cyan(files.join('\n'))}`;
295
- })).join('\n');
296
- return {
297
- conflictedComponents,
298
- conflictedFiles,
299
- conflictStr
300
- };
301
- }
302
- function installationErrorOutput(installationError) {
303
- if (!installationError) return '';
304
- const title = _chalk().default.underline('Installation Error');
305
- const subTitle = 'The following error was thrown by the package manager:';
306
- const body = _chalk().default.red(installationError.message);
307
- const suggestion = 'Use "bit install" to complete the installation, remove the imported components using "bit remove <comp id>" or remove the missing dependencies from their source code';
308
- return `${title}\n${subTitle}\n${body}\n${suggestion}`;
309
- }
310
- function compilationErrorOutput(compilationError) {
311
- if (!compilationError) return '';
312
- const title = _chalk().default.underline('Compilation Error');
313
- const subTitle = 'The following error was thrown by the compiler';
314
- const body = _chalk().default.red(compilationError.message);
315
- const suggestion = 'Please fix the issue and run "bit compile"';
316
- return `${title}\n${subTitle}\n${body}\n${suggestion}`;
317
- }
318
- function getRemovedOutput(removedComponents) {
319
- if (!removedComponents?.length) return '';
320
- const title = `the following ${removedComponents.length} component(s) have been removed`;
321
- const body = removedComponents.join('\n');
322
- return `${_chalk().default.underline(title)}\n${body}`;
323
- }
324
- function getAddedOutput(addedComponents) {
325
- if (!addedComponents?.length) return '';
326
- const title = `the following ${addedComponents.length} component(s) have been added`;
327
- const body = addedComponents.join('\n');
328
- return `${_chalk().default.underline(title)}\n${body}`;
213
+ return (0, _lodash().compact)([getSuccessOutput(), getFailureOutput(), (0, _componentModules().getRemovedOutput)(removedComponents), getSnapsOutput(), getConfigMergeConflictSummary(), (0, _componentModules().getWorkspaceConfigUpdateOutput)(workspaceConfigUpdateResult), getConflictSummary(), getSummary()]).join('\n\n');
329
214
  }
330
215
 
331
216
  //# sourceMappingURL=merge-cmd.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_lodash","_legacy","_bitError","_mergeVersion","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MergeCmd","constructor","merging","configStore","name","description","COMPONENT_PATTERN_HELP","report","pattern","ours","theirs","manual","autoMergeResolve","abort","resolve","build","noSnap","verbose","message","skipDependencyInstallation","getConfigBoolean","CFG_FORCE_LOCAL_BUILD","Boolean","BitError","components","failedComponents","version","resolvedComponents","abortedComponents","mergeSnapResults","mergeSnapError","merge","title","componentsStr","map","c","id","toStringWithoutVersion","join","chalk","underline","green","mergeReport","exports","removedComponents","leftUnresolvedConflicts","configMergeResults","workspaceConfigUpdateResult","getSuccessOutput","length","bold","fileChangesReport","applyVersionReport","componentsWithConflicts","getConflictSummary","suggestion","conflictSummary","conflictSummaryReport","conflictedComponents","conflictStr","yellow","configMergeWithConflicts","filter","hasConflicts","getConfigMergeConflictSummary","comps","compIdStr","MergeConfigFilename","getSnapsOutput","snappedComponents","autoSnappedResults","outputComponents","component","componentOutput","toString","autoTag","result","triggeredBy","searchWithoutVersion","autoTagComp","a","AUTO_SNAPPED_MSG","getFailureOutput","body","compact","failedComponent","white","unchangedMessage","getSummary","merged","unchangedLegitimately","f","autoSnapped","getConflictStr","ws","workspaceDepsConflicts","mergeConfig","mergedStr","unchangedLegitimatelyStr","autoSnappedStr","removedStr","getRemovedOutput","getWorkspaceConfigUpdateOutput","workspaceConfigConflictWriteError","workspaceDepsUpdates","workspaceDepsUnchanged","getWorkspaceConflictsOutput","red","getWorkspaceUnchangedDepsOutput","keys","pkgName","getWorkspaceDepsOutput","from","to","addName","showVersion","tab","fileChanges","files","filesStatus","file","FileStatus","unchanged","note","cyan","FILE_CHANGES_CHECKOUT_MSG","conflictedFiles","installationErrorOutput","installationError","subTitle","compilationErrorOutput","compilationError","getAddedOutput","addedComponents"],"sources":["merge-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { Command, CommandOptions } from '@teambit/cli';\nimport type { ComponentID } from '@teambit/component-id';\nimport { compact } from 'lodash';\nimport {\n COMPONENT_PATTERN_HELP,\n AUTO_SNAPPED_MSG,\n MergeConfigFilename,\n FILE_CHANGES_CHECKOUT_MSG,\n CFG_FORCE_LOCAL_BUILD,\n} from '@teambit/legacy.constants';\nimport type { ConfigMergeResult, WorkspaceConfigUpdateResult, WorkspaceDepsUpdates } from '@teambit/config-merger';\nimport { BitError } from '@teambit/bit-error';\nimport type { MergeStrategy } from './merge-version';\nimport { FileStatus } from './merge-version';\nimport type { ApplyVersionResults, MergingMain, ApplyVersionResult } from './merging.main.runtime';\nimport type { ConfigStoreMain } from '@teambit/config-store';\n\nexport class MergeCmd implements Command {\n name = 'merge [component-pattern]';\n description = 'merge changes of the remote head into local - auto-snaps all merged components';\n helpUrl = 'reference/components/merging-changes';\n group = 'version-control';\n arguments = [{ name: 'component-pattern', description: COMPONENT_PATTERN_HELP }];\n extendedDescription = `merge changes of the remote head into local when they are diverged. when on a lane, merge the remote head of the lane into the local\nand creates snaps for merged components that have diverged, on the lane.\nif no ids are specified, all pending-merge components will be merged. (run \"bit status\" to list them).\noptionally use '--abort' to revert the last merge. to revert a lane merge, use \"bit lane merge-abort\" command.`;\n alias = '';\n options = [\n ['', 'ours', 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, keep the local modification'],\n [\n '',\n 'theirs',\n 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, override the local modification with the specified version',\n ],\n [\n '',\n 'manual',\n 'same as \"--auto-merge-resolve manual\". in case of merge conflict, write the files with the conflict markers',\n ],\n [\n 'r',\n 'auto-merge-resolve <merge-strategy>',\n 'in case of a conflict, resolve according to the strategy: [ours, theirs, manual]',\n ],\n ['', 'abort', 'in case of an unresolved merge, revert to pre-merge state'],\n ['', 'resolve', 'mark an unresolved merge as resolved and create a new snap with the changes'],\n ['', 'no-snap', 'do not auto snap even if the merge completed without conflicts'],\n ['', 'build', 'in case of snap during the merge, run the build-pipeline (similar to bit snap --build)'],\n ['', 'verbose', 'show details of components that were not merged successfully'],\n ['x', 'skip-dependency-installation', 'do not install new dependencies resulting from the merge'],\n ['m', 'message <message>', 'override the default message for the auto snap'],\n ] as CommandOptions;\n loader = true;\n\n constructor(\n private merging: MergingMain,\n private configStore: ConfigStoreMain\n ) {}\n\n async report(\n [pattern]: [string],\n {\n ours = false,\n theirs = false,\n manual = false,\n autoMergeResolve,\n abort = false,\n resolve = false,\n build = false,\n noSnap = false,\n verbose = false,\n message,\n skipDependencyInstallation = false,\n }: {\n ours?: boolean;\n theirs?: boolean;\n manual?: boolean;\n autoMergeResolve?: MergeStrategy;\n abort?: boolean;\n resolve?: boolean;\n build?: boolean;\n noSnap?: boolean;\n verbose?: boolean;\n message: string;\n skipDependencyInstallation?: boolean;\n }\n ) {\n build = this.configStore.getConfigBoolean(CFG_FORCE_LOCAL_BUILD) || Boolean(build);\n if (ours || theirs) {\n throw new BitError('the \"--ours\" and \"--theirs\" flags are deprecated. use \"--auto-merge-resolve\" instead');\n }\n if (\n autoMergeResolve &&\n autoMergeResolve !== 'ours' &&\n autoMergeResolve !== 'theirs' &&\n autoMergeResolve !== 'manual'\n ) {\n throw new BitError('--auto-merge-resolve must be one of the following: [ours, theirs, manual]');\n }\n if (manual) autoMergeResolve = 'manual';\n if (abort && resolve) throw new BitError('unable to use \"abort\" and \"resolve\" flags together');\n if (noSnap && message) throw new BitError('unable to use \"noSnap\" and \"message\" flags together');\n const {\n components,\n failedComponents,\n version,\n resolvedComponents,\n abortedComponents,\n mergeSnapResults,\n mergeSnapError,\n }: ApplyVersionResults = await this.merging.merge(\n pattern,\n autoMergeResolve as any,\n abort,\n resolve,\n noSnap,\n message,\n build,\n skipDependencyInstallation\n );\n if (resolvedComponents) {\n const title = 'successfully resolved component(s)\\n';\n const componentsStr = resolvedComponents.map((c) => c.id.toStringWithoutVersion()).join('\\n');\n return chalk.underline(title) + chalk.green(componentsStr);\n }\n if (abortedComponents) {\n const title = 'successfully aborted the merge of the following component(s)\\n';\n const componentsStr = abortedComponents.map((c) => c.id.toStringWithoutVersion()).join('\\n');\n return chalk.underline(title) + chalk.green(componentsStr);\n }\n\n return mergeReport({\n components,\n failedComponents,\n version,\n mergeSnapResults,\n mergeSnapError,\n verbose,\n });\n }\n}\n\nexport function mergeReport({\n components,\n failedComponents,\n removedComponents,\n version,\n mergeSnapResults,\n mergeSnapError,\n leftUnresolvedConflicts,\n verbose,\n configMergeResults,\n workspaceConfigUpdateResult,\n}: ApplyVersionResults & { configMergeResults?: ConfigMergeResult[] }): string {\n const getSuccessOutput = () => {\n if (!components || !components.length) return '';\n const title = `successfully merged ${components.length} components${\n version ? `from version ${chalk.bold(version)}` : ''\n }\\n`;\n const fileChangesReport = applyVersionReport(components);\n\n return chalk.bold(title) + fileChangesReport;\n };\n\n let componentsWithConflicts = 0;\n const getConflictSummary = () => {\n if (!components || !components.length || !leftUnresolvedConflicts) return '';\n const title = `files with conflicts summary\\n`;\n const suggestion = `\\n\\nmerge process not completed due to the conflicts above. fix conflicts manually and then run \"bit install\".\nonce ready, snap/tag the components to complete the merge.`;\n const conflictSummary = conflictSummaryReport(components);\n componentsWithConflicts = conflictSummary.conflictedComponents;\n return chalk.underline(title) + conflictSummary.conflictStr + chalk.yellow(suggestion);\n };\n\n const configMergeWithConflicts = configMergeResults?.filter((c) => c.hasConflicts()) || [];\n const getConfigMergeConflictSummary = () => {\n if (!configMergeWithConflicts.length) return '';\n const comps = configMergeWithConflicts.map((c) => c.compIdStr).join('\\n');\n const title = `components with config-merge conflicts\\n`;\n const suggestion = `\\nconflicts were found while trying to merge the config. fix them manually by editing the ${MergeConfigFilename} file in the workspace root.\nonce ready, snap/tag the components to complete the merge.`;\n return chalk.underline(title) + comps + chalk.yellow(suggestion);\n };\n\n const getSnapsOutput = () => {\n if (mergeSnapError) {\n return `${chalk.bold(\n 'snapping merged components failed with the following error, please fix the issues and snap manually'\n )}\n${mergeSnapError.message}\n`;\n }\n if (!mergeSnapResults || !mergeSnapResults.snappedComponents) return '';\n const { snappedComponents, autoSnappedResults } = mergeSnapResults;\n const outputComponents = (comps) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${component.id.toString()}`;\n const autoTag = autoSnappedResults.filter((result) => result.triggeredBy.searchWithoutVersion(component.id));\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => a.component.id.toString());\n componentOutput += `\\n ${AUTO_SNAPPED_MSG}: ${autoTagComp.join(', ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n return `${chalk.underline(\n 'merge-snapped components'\n )}\\n(${'components snapped as a result of the merge'})\\n${outputComponents(snappedComponents)}`;\n };\n\n const getFailureOutput = () => {\n if (!failedComponents || !failedComponents.length) return '';\n const title = '\\nmerge skipped for the following component(s)';\n const body = compact(\n failedComponents.map((failedComponent) => {\n // all failures here are \"unchangedLegitimately\". otherwise, it would have been thrown as an error\n if (!verbose) return null;\n return `${chalk.bold(failedComponent.id.toString())} - ${chalk.white(failedComponent.unchangedMessage)}`;\n })\n ).join('\\n');\n if (!body) {\n return `${chalk.bold(`\\nmerge skipped legitimately for ${failedComponents.length} component(s)`)}\n(use --verbose to list them next time)`;\n }\n return `${chalk.underline(title)}\\n${body}`;\n };\n\n const getSummary = () => {\n const merged = components?.length || 0;\n const unchangedLegitimately = failedComponents?.filter((f) => f.unchangedLegitimately).length || 0;\n const autoSnapped =\n (mergeSnapResults?.snappedComponents.length || 0) + (mergeSnapResults?.autoSnappedResults.length || 0);\n const getConflictStr = () => {\n const comps = componentsWithConflicts ? `${componentsWithConflicts} components` : '';\n const ws = workspaceConfigUpdateResult?.workspaceDepsConflicts ? 'workspace.jsonc file' : '';\n const mergeConfig = configMergeWithConflicts.length ? `${MergeConfigFilename} file` : '';\n return compact([comps, ws, mergeConfig]).join(', ');\n };\n\n const title = chalk.bold.underline('Merge Summary');\n const mergedStr = `\\nTotal Merged: ${chalk.bold(merged.toString())}`;\n const unchangedLegitimatelyStr = `\\nTotal Unchanged: ${chalk.bold(unchangedLegitimately.toString())}`;\n const autoSnappedStr = `\\nTotal Snapped: ${chalk.bold(autoSnapped.toString())}`;\n const removedStr = `\\nTotal Removed: ${chalk.bold(removedComponents?.length.toString() || '0')}`;\n const conflictStr = `\\nConflicts: ${chalk.bold(getConflictStr() || 'none')}`;\n\n return title + mergedStr + unchangedLegitimatelyStr + autoSnappedStr + removedStr + conflictStr;\n };\n\n return compact([\n getSuccessOutput(),\n getFailureOutput(),\n getRemovedOutput(removedComponents),\n getSnapsOutput(),\n getConfigMergeConflictSummary(),\n getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult),\n getConflictSummary(),\n getSummary(),\n ]).join('\\n\\n');\n}\n\nexport function getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult?: WorkspaceConfigUpdateResult): string {\n if (!workspaceConfigUpdateResult) return '';\n const { workspaceConfigConflictWriteError, workspaceDepsConflicts, workspaceDepsUpdates, workspaceDepsUnchanged } =\n workspaceConfigUpdateResult;\n\n const getWorkspaceConflictsOutput = () => {\n if (!workspaceDepsConflicts && !workspaceConfigConflictWriteError) return '';\n if (workspaceConfigConflictWriteError) {\n return `${chalk.red(workspaceConfigConflictWriteError.message)}`;\n }\n return chalk.yellow('workspace.jsonc has conflicts, please edit the file and fix them');\n };\n\n const getWorkspaceUnchangedDepsOutput = () => {\n if (!workspaceDepsUnchanged) return '';\n const title = '\\nworkspace.jsonc was unable to update the following dependencies';\n const body = Object.keys(workspaceDepsUnchanged)\n .map((pkgName) => {\n return ` ${pkgName}: ${workspaceDepsUnchanged[pkgName]}`;\n })\n .join('\\n');\n\n return `${chalk.underline(title)}\\n${body}`;\n };\n\n return compact([\n getWorkspaceUnchangedDepsOutput(),\n getWorkspaceDepsOutput(workspaceDepsUpdates),\n getWorkspaceConflictsOutput(),\n ]).join('\\n\\n');\n}\n\nfunction getWorkspaceDepsOutput(workspaceDepsUpdates?: WorkspaceDepsUpdates): string {\n if (!workspaceDepsUpdates) return '';\n\n const title = '\\nworkspace.jsonc has been updated with the following dependencies';\n const body = Object.keys(workspaceDepsUpdates)\n .map((pkgName) => {\n const [from, to] = workspaceDepsUpdates[pkgName];\n return ` ${pkgName}: ${from} => ${to}`;\n })\n .join('\\n');\n\n return `${chalk.underline(title)}\\n${body}`;\n}\n\n/**\n * shows only the file-changes section.\n * if all files are \"unchanged\", it returns an empty string\n */\nexport function applyVersionReport(components: ApplyVersionResult[], addName = true, showVersion = false): string {\n const tab = addName ? '\\t' : '';\n const fileChanges = compact(\n components.map((component: ApplyVersionResult) => {\n const name = showVersion ? component.id.toString() : component.id.toStringWithoutVersion();\n const files = compact(\n Object.keys(component.filesStatus).map((file) => {\n if (component.filesStatus[file] === FileStatus.unchanged) return null;\n const note =\n component.filesStatus[file] === FileStatus.manual\n ? chalk.white('automatic merge failed. please fix conflicts manually and then run \"bit install\"')\n : '';\n return `${tab}${String(component.filesStatus[file])} ${chalk.bold(file)} ${note}`;\n })\n ).join('\\n');\n if (!files) return null;\n return `${addName ? name : ''}\\n${chalk.cyan(files)}`;\n })\n ).join('\\n\\n');\n if (!fileChanges) {\n return '';\n }\n const title = `\\n${FILE_CHANGES_CHECKOUT_MSG}\\n`;\n return chalk.underline(title) + fileChanges;\n}\n\nexport function conflictSummaryReport(components: ApplyVersionResult[]): {\n conflictedComponents: number;\n conflictedFiles: number;\n conflictStr: string;\n} {\n const tab = '\\t';\n let conflictedComponents = 0;\n let conflictedFiles = 0;\n const conflictStr = compact(\n components.map((component: ApplyVersionResult) => {\n const name = component.id.toStringWithoutVersion();\n const files = compact(\n Object.keys(component.filesStatus).map((file) => {\n if (component.filesStatus[file] === FileStatus.manual) {\n conflictedFiles += 1;\n return `${tab}${String(component.filesStatus[file])} ${chalk.bold(file)}`;\n }\n return null;\n })\n );\n if (!files.length) return null;\n conflictedComponents += 1;\n return `${name}\\n${chalk.cyan(files.join('\\n'))}`;\n })\n ).join('\\n');\n\n return { conflictedComponents, conflictedFiles, conflictStr };\n}\n\nexport function installationErrorOutput(installationError?: Error) {\n if (!installationError) return '';\n const title = chalk.underline('Installation Error');\n const subTitle = 'The following error was thrown by the package manager:';\n const body = chalk.red(installationError.message);\n const suggestion =\n 'Use \"bit install\" to complete the installation, remove the imported components using \"bit remove <comp id>\" or remove the missing dependencies from their source code';\n return `${title}\\n${subTitle}\\n${body}\\n${suggestion}`;\n}\n\nexport function compilationErrorOutput(compilationError?: Error) {\n if (!compilationError) return '';\n const title = chalk.underline('Compilation Error');\n const subTitle = 'The following error was thrown by the compiler';\n const body = chalk.red(compilationError.message);\n const suggestion = 'Please fix the issue and run \"bit compile\"';\n return `${title}\\n${subTitle}\\n${body}\\n${suggestion}`;\n}\n\nexport function getRemovedOutput(removedComponents?: ComponentID[]) {\n if (!removedComponents?.length) return '';\n const title = `the following ${removedComponents.length} component(s) have been removed`;\n const body = removedComponents.join('\\n');\n return `${chalk.underline(title)}\\n${body}`;\n}\n\nexport function getAddedOutput(addedComponents?: ComponentID[]) {\n if (!addedComponents?.length) return '';\n const title = `the following ${addedComponents.length} component(s) have been added`;\n const body = addedComponents.join('\\n');\n return `${chalk.underline(title)}\\n${body}`;\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;AAGA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAQA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,cAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,aAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA6C,SAAAC,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAZ,CAAA,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B,CAACjH,OAAO,CAAC;EAChD,MAAMqC,UAAU,GAAG,4CAA4C;EAC/D,OAAO,GAAGvB,KAAK,KAAKiG,QAAQ,KAAK9C,IAAI,KAAK5B,UAAU,EAAE;AACxD;AAEO,SAAS8C,gBAAgBA,CAACzD,iBAAiC,EAAE;EAClE,IAAI,CAACA,iBAAiB,EAAEK,MAAM,EAAE,OAAO,EAAE;EACzC,MAAMjB,KAAK,GAAG,iBAAiBY,iBAAiB,CAACK,MAAM,iCAAiC;EACxF,MAAMkC,IAAI,GAAGvC,iBAAiB,CAACN,IAAI,CAAC,IAAI,CAAC;EACzC,OAAO,GAAGC,gBAAK,CAACC,SAAS,CAACR,KAAK,CAAC,KAAKmD,IAAI,EAAE;AAC7C;AAEO,SAASiD,cAAcA,CAACC,eAA+B,EAAE;EAC9D,IAAI,CAACA,eAAe,EAAEpF,MAAM,EAAE,OAAO,EAAE;EACvC,MAAMjB,KAAK,GAAG,iBAAiBqG,eAAe,CAACpF,MAAM,+BAA+B;EACpF,MAAMkC,IAAI,GAAGkD,eAAe,CAAC/F,IAAI,CAAC,IAAI,CAAC;EACvC,OAAO,GAAGC,gBAAK,CAACC,SAAS,CAACR,KAAK,CAAC,KAAKmD,IAAI,EAAE;AAC7C","ignoreList":[]}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_lodash","_legacy","_bitError","_componentModules","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MergeCmd","constructor","merging","configStore","name","description","COMPONENT_PATTERN_HELP","report","pattern","ours","theirs","manual","autoMergeResolve","abort","resolve","build","noSnap","verbose","message","skipDependencyInstallation","getConfigBoolean","CFG_FORCE_LOCAL_BUILD","Boolean","BitError","components","failedComponents","version","resolvedComponents","abortedComponents","mergeSnapResults","mergeSnapError","merge","title","componentsStr","map","c","id","toStringWithoutVersion","join","chalk","underline","green","mergeReport","exports","removedComponents","leftUnresolvedConflicts","configMergeResults","workspaceConfigUpdateResult","getSuccessOutput","length","bold","fileChangesReport","applyVersionReport","componentsWithConflicts","getConflictSummary","suggestion","conflictSummary","conflictSummaryReport","conflictedComponents","conflictStr","yellow","configMergeWithConflicts","filter","hasConflicts","getConfigMergeConflictSummary","comps","compIdStr","MergeConfigFilename","getSnapsOutput","snappedComponents","autoSnappedResults","outputComponents","component","componentOutput","toString","autoTag","result","triggeredBy","searchWithoutVersion","autoTagComp","a","AUTO_SNAPPED_MSG","getFailureOutput","body","compact","failedComponent","white","unchangedMessage","getSummary","merged","unchangedLegitimately","f","autoSnapped","getConflictStr","ws","workspaceDepsConflicts","mergeConfig","mergedStr","unchangedLegitimatelyStr","autoSnappedStr","removedStr","getRemovedOutput","getWorkspaceConfigUpdateOutput"],"sources":["merge-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { Command, CommandOptions } from '@teambit/cli';\nimport { compact } from 'lodash';\nimport {\n COMPONENT_PATTERN_HELP,\n AUTO_SNAPPED_MSG,\n MergeConfigFilename,\n CFG_FORCE_LOCAL_BUILD,\n} from '@teambit/legacy.constants';\nimport type { ConfigMergeResult } from '@teambit/config-merger';\nimport { BitError } from '@teambit/bit-error';\nimport {\n type MergeStrategy,\n type ApplyVersionResults,\n applyVersionReport,\n conflictSummaryReport,\n getRemovedOutput,\n getWorkspaceConfigUpdateOutput,\n} from '@teambit/component.modules.merge-helper';\nimport type { MergingMain } from './merging.main.runtime';\nimport type { ConfigStoreMain } from '@teambit/config-store';\n\nexport class MergeCmd implements Command {\n name = 'merge [component-pattern]';\n description = 'merge changes of the remote head into local - auto-snaps all merged components';\n helpUrl = 'reference/components/merging-changes';\n group = 'version-control';\n arguments = [{ name: 'component-pattern', description: COMPONENT_PATTERN_HELP }];\n extendedDescription = `merge changes of the remote head into local when they are diverged. when on a lane, merge the remote head of the lane into the local\nand creates snaps for merged components that have diverged, on the lane.\nif no ids are specified, all pending-merge components will be merged. (run \"bit status\" to list them).\noptionally use '--abort' to revert the last merge. to revert a lane merge, use \"bit lane merge-abort\" command.`;\n alias = '';\n options = [\n ['', 'ours', 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, keep the local modification'],\n [\n '',\n 'theirs',\n 'DEPRECATED. use --auto-merge-resolve. in case of a conflict, override the local modification with the specified version',\n ],\n [\n '',\n 'manual',\n 'same as \"--auto-merge-resolve manual\". in case of merge conflict, write the files with the conflict markers',\n ],\n [\n 'r',\n 'auto-merge-resolve <merge-strategy>',\n 'in case of a conflict, resolve according to the strategy: [ours, theirs, manual]',\n ],\n ['', 'abort', 'in case of an unresolved merge, revert to pre-merge state'],\n ['', 'resolve', 'mark an unresolved merge as resolved and create a new snap with the changes'],\n ['', 'no-snap', 'do not auto snap even if the merge completed without conflicts'],\n ['', 'build', 'in case of snap during the merge, run the build-pipeline (similar to bit snap --build)'],\n ['', 'verbose', 'show details of components that were not merged successfully'],\n ['x', 'skip-dependency-installation', 'do not install new dependencies resulting from the merge'],\n ['m', 'message <message>', 'override the default message for the auto snap'],\n ] as CommandOptions;\n loader = true;\n\n constructor(\n private merging: MergingMain,\n private configStore: ConfigStoreMain\n ) {}\n\n async report(\n [pattern]: [string],\n {\n ours = false,\n theirs = false,\n manual = false,\n autoMergeResolve,\n abort = false,\n resolve = false,\n build = false,\n noSnap = false,\n verbose = false,\n message,\n skipDependencyInstallation = false,\n }: {\n ours?: boolean;\n theirs?: boolean;\n manual?: boolean;\n autoMergeResolve?: MergeStrategy;\n abort?: boolean;\n resolve?: boolean;\n build?: boolean;\n noSnap?: boolean;\n verbose?: boolean;\n message: string;\n skipDependencyInstallation?: boolean;\n }\n ) {\n build = this.configStore.getConfigBoolean(CFG_FORCE_LOCAL_BUILD) || Boolean(build);\n if (ours || theirs) {\n throw new BitError('the \"--ours\" and \"--theirs\" flags are deprecated. use \"--auto-merge-resolve\" instead');\n }\n if (\n autoMergeResolve &&\n autoMergeResolve !== 'ours' &&\n autoMergeResolve !== 'theirs' &&\n autoMergeResolve !== 'manual'\n ) {\n throw new BitError('--auto-merge-resolve must be one of the following: [ours, theirs, manual]');\n }\n if (manual) autoMergeResolve = 'manual';\n if (abort && resolve) throw new BitError('unable to use \"abort\" and \"resolve\" flags together');\n if (noSnap && message) throw new BitError('unable to use \"noSnap\" and \"message\" flags together');\n const {\n components,\n failedComponents,\n version,\n resolvedComponents,\n abortedComponents,\n mergeSnapResults,\n mergeSnapError,\n }: ApplyVersionResults = await this.merging.merge(\n pattern,\n autoMergeResolve as any,\n abort,\n resolve,\n noSnap,\n message,\n build,\n skipDependencyInstallation\n );\n if (resolvedComponents) {\n const title = 'successfully resolved component(s)\\n';\n const componentsStr = resolvedComponents.map((c) => c.id.toStringWithoutVersion()).join('\\n');\n return chalk.underline(title) + chalk.green(componentsStr);\n }\n if (abortedComponents) {\n const title = 'successfully aborted the merge of the following component(s)\\n';\n const componentsStr = abortedComponents.map((c) => c.id.toStringWithoutVersion()).join('\\n');\n return chalk.underline(title) + chalk.green(componentsStr);\n }\n\n return mergeReport({\n components,\n failedComponents,\n version,\n mergeSnapResults,\n mergeSnapError,\n verbose,\n });\n }\n}\n\nexport function mergeReport({\n components,\n failedComponents,\n removedComponents,\n version,\n mergeSnapResults,\n mergeSnapError,\n leftUnresolvedConflicts,\n verbose,\n configMergeResults,\n workspaceConfigUpdateResult,\n}: ApplyVersionResults & { configMergeResults?: ConfigMergeResult[] }): string {\n const getSuccessOutput = () => {\n if (!components || !components.length) return '';\n const title = `successfully merged ${components.length} components${\n version ? `from version ${chalk.bold(version)}` : ''\n }\\n`;\n const fileChangesReport = applyVersionReport(components);\n\n return chalk.bold(title) + fileChangesReport;\n };\n\n let componentsWithConflicts = 0;\n const getConflictSummary = () => {\n if (!components || !components.length || !leftUnresolvedConflicts) return '';\n const title = `files with conflicts summary\\n`;\n const suggestion = `\\n\\nmerge process not completed due to the conflicts above. fix conflicts manually and then run \"bit install\".\nonce ready, snap/tag the components to complete the merge.`;\n const conflictSummary = conflictSummaryReport(components);\n componentsWithConflicts = conflictSummary.conflictedComponents;\n return chalk.underline(title) + conflictSummary.conflictStr + chalk.yellow(suggestion);\n };\n\n const configMergeWithConflicts = configMergeResults?.filter((c) => c.hasConflicts()) || [];\n const getConfigMergeConflictSummary = () => {\n if (!configMergeWithConflicts.length) return '';\n const comps = configMergeWithConflicts.map((c) => c.compIdStr).join('\\n');\n const title = `components with config-merge conflicts\\n`;\n const suggestion = `\\nconflicts were found while trying to merge the config. fix them manually by editing the ${MergeConfigFilename} file in the workspace root.\nonce ready, snap/tag the components to complete the merge.`;\n return chalk.underline(title) + comps + chalk.yellow(suggestion);\n };\n\n const getSnapsOutput = () => {\n if (mergeSnapError) {\n return `${chalk.bold(\n 'snapping merged components failed with the following error, please fix the issues and snap manually'\n )}\n${mergeSnapError.message}\n`;\n }\n if (!mergeSnapResults || !mergeSnapResults.snappedComponents) return '';\n const { snappedComponents, autoSnappedResults } = mergeSnapResults;\n const outputComponents = (comps) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${component.id.toString()}`;\n const autoTag = autoSnappedResults.filter((result) => result.triggeredBy.searchWithoutVersion(component.id));\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => a.component.id.toString());\n componentOutput += `\\n ${AUTO_SNAPPED_MSG}: ${autoTagComp.join(', ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n return `${chalk.underline(\n 'merge-snapped components'\n )}\\n(${'components snapped as a result of the merge'})\\n${outputComponents(snappedComponents)}`;\n };\n\n const getFailureOutput = () => {\n if (!failedComponents || !failedComponents.length) return '';\n const title = '\\nmerge skipped for the following component(s)';\n const body = compact(\n failedComponents.map((failedComponent) => {\n // all failures here are \"unchangedLegitimately\". otherwise, it would have been thrown as an error\n if (!verbose) return null;\n return `${chalk.bold(failedComponent.id.toString())} - ${chalk.white(failedComponent.unchangedMessage)}`;\n })\n ).join('\\n');\n if (!body) {\n return `${chalk.bold(`\\nmerge skipped legitimately for ${failedComponents.length} component(s)`)}\n(use --verbose to list them next time)`;\n }\n return `${chalk.underline(title)}\\n${body}`;\n };\n\n const getSummary = () => {\n const merged = components?.length || 0;\n const unchangedLegitimately = failedComponents?.filter((f) => f.unchangedLegitimately).length || 0;\n const autoSnapped =\n (mergeSnapResults?.snappedComponents.length || 0) + (mergeSnapResults?.autoSnappedResults.length || 0);\n const getConflictStr = () => {\n const comps = componentsWithConflicts ? `${componentsWithConflicts} components` : '';\n const ws = workspaceConfigUpdateResult?.workspaceDepsConflicts ? 'workspace.jsonc file' : '';\n const mergeConfig = configMergeWithConflicts.length ? `${MergeConfigFilename} file` : '';\n return compact([comps, ws, mergeConfig]).join(', ');\n };\n\n const title = chalk.bold.underline('Merge Summary');\n const mergedStr = `\\nTotal Merged: ${chalk.bold(merged.toString())}`;\n const unchangedLegitimatelyStr = `\\nTotal Unchanged: ${chalk.bold(unchangedLegitimately.toString())}`;\n const autoSnappedStr = `\\nTotal Snapped: ${chalk.bold(autoSnapped.toString())}`;\n const removedStr = `\\nTotal Removed: ${chalk.bold(removedComponents?.length.toString() || '0')}`;\n const conflictStr = `\\nConflicts: ${chalk.bold(getConflictStr() || 'none')}`;\n\n return title + mergedStr + unchangedLegitimatelyStr + autoSnappedStr + removedStr + conflictStr;\n };\n\n return compact([\n getSuccessOutput(),\n getFailureOutput(),\n getRemovedOutput(removedComponents),\n getSnapsOutput(),\n getConfigMergeConflictSummary(),\n getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult),\n getConflictSummary(),\n getSummary(),\n ]).join('\\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;AAEA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA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,mBAAmB1D,gBAAK,CAACW,IAAI,CAACuC,MAAM,CAACf,QAAQ,CAAC,CAAC,CAAC,EAAE;IACpE,MAAMwB,wBAAwB,GAAG,sBAAsB3D,gBAAK,CAACW,IAAI,CAACwC,qBAAqB,CAAChB,QAAQ,CAAC,CAAC,CAAC,EAAE;IACrG,MAAMyB,cAAc,GAAG,oBAAoB5D,gBAAK,CAACW,IAAI,CAAC0C,WAAW,CAAClB,QAAQ,CAAC,CAAC,CAAC,EAAE;IAC/E,MAAM0B,UAAU,GAAG,oBAAoB7D,gBAAK,CAACW,IAAI,CAACN,iBAAiB,EAAEK,MAAM,CAACyB,QAAQ,CAAC,CAAC,IAAI,GAAG,CAAC,EAAE;IAChG,MAAMf,WAAW,GAAG,gBAAgBpB,gBAAK,CAACW,IAAI,CAAC2C,cAAc,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE;IAE5E,OAAO7D,KAAK,GAAGiE,SAAS,GAAGC,wBAAwB,GAAGC,cAAc,GAAGC,UAAU,GAAGzC,WAAW;EACjG,CAAC;EAED,OAAO,IAAAyB,iBAAO,EAAC,CACbpC,gBAAgB,CAAC,CAAC,EAClBkC,gBAAgB,CAAC,CAAC,EAClB,IAAAmB,oCAAgB,EAACzD,iBAAiB,CAAC,EACnCwB,cAAc,CAAC,CAAC,EAChBJ,6BAA6B,CAAC,CAAC,EAC/B,IAAAsC,kDAA8B,EAACvD,2BAA2B,CAAC,EAC3DO,kBAAkB,CAAC,CAAC,EACpBkC,UAAU,CAAC,CAAC,CACb,CAAC,CAAClD,IAAI,CAAC,MAAM,CAAC;AACjB","ignoreList":[]}
@@ -4,7 +4,7 @@ import type { Lane } from '@teambit/objects';
4
4
  import type { ImporterMain } from '@teambit/importer';
5
5
  import type { Logger } from '@teambit/logger';
6
6
  import type { ScopeMain } from '@teambit/scope';
7
- import type { MergeStrategy } from './merge-version';
7
+ import type { MergeStrategy } from '@teambit/component.modules.merge-helper';
8
8
  import type { ComponentMergeStatus } from './merging.main.runtime';
9
9
  export type MergeStatusProviderOptions = {
10
10
  resolveUnrelated?: MergeStrategy;
@@ -53,9 +53,9 @@ function _configMerger() {
53
53
  };
54
54
  return data;
55
55
  }
56
- function _mergeVersion() {
57
- const data = require("./merge-version");
58
- _mergeVersion = function () {
56
+ function _componentModules() {
57
+ const data = require("@teambit/component.modules.merge-helper");
58
+ _componentModules = function () {
59
59
  return data;
60
60
  };
61
61
  return data;
@@ -172,7 +172,7 @@ other: ${otherLaneHead.toString()}`);
172
172
  const configMerger = new (_configMerger().ComponentConfigMerger)(id.toStringWithoutVersion(), workspaceIds, this.otherLane, currentComponent.extensions, baseComponent.extensions, otherComponent.extensions, currentLabel, otherLabel, this.logger, this.options.mergeStrategy);
173
173
  const configMergeResult = configMerger.merge();
174
174
  const dataMergeResult = this.mergeExtensionsData(currentComponent.extensions, baseComponent.extensions, otherComponent.extensions);
175
- const mergeResults = await (0, _mergeVersion().threeWayMerge)({
175
+ const mergeResults = await (0, _componentModules().threeWayMerge)({
176
176
  scope: this.scope.legacyScope,
177
177
  otherComponent,
178
178
  otherLabel,