@teambit/merging 0.0.195 → 0.0.197
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.js +0 -8
- package/dist/index.js.map +1 -1
- package/dist/merge-cmd.js +4 -50
- package/dist/merge-cmd.js.map +1 -1
- package/dist/merging.aspect.js +0 -5
- package/dist/merging.aspect.js.map +1 -1
- package/dist/merging.main.runtime.js +28 -199
- package/dist/merging.main.runtime.js.map +1 -1
- package/package-tar/teambit-merging-0.0.197.tgz +0 -0
- package/package.json +10 -10
- /package/{preview-1666312873430.js → preview-1666496165706.js} +0 -0
- package/package-tar/teambit-merging-0.0.195.tgz +0 -0
package/dist/index.js
CHANGED
|
@@ -16,29 +16,21 @@ Object.defineProperty(exports, "mergeReport", {
|
|
|
16
16
|
return _mergeCmd().mergeReport;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
|
|
20
19
|
function _merging() {
|
|
21
20
|
const data = require("./merging.aspect");
|
|
22
|
-
|
|
23
21
|
_merging = function () {
|
|
24
22
|
return data;
|
|
25
23
|
};
|
|
26
|
-
|
|
27
24
|
return data;
|
|
28
25
|
}
|
|
29
|
-
|
|
30
26
|
function _mergeCmd() {
|
|
31
27
|
const data = require("./merge-cmd");
|
|
32
|
-
|
|
33
28
|
_mergeCmd = function () {
|
|
34
29
|
return data;
|
|
35
30
|
};
|
|
36
|
-
|
|
37
31
|
return data;
|
|
38
32
|
}
|
|
39
|
-
|
|
40
33
|
var _default = _merging().MergingAspect;
|
|
41
|
-
|
|
42
34
|
exports.default = _default;
|
|
43
35
|
|
|
44
36
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MergingAspect"],"sources":["index.ts"],"sourcesContent":["import { MergingAspect } from './merging.aspect';\n\nexport { mergeReport } from './merge-cmd';\nexport type { MergingMain, ComponentMergeStatus } from './merging.main.runtime';\nexport default MergingAspect;\nexport { MergingAspect };\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["MergingAspect"],"sources":["index.ts"],"sourcesContent":["import { MergingAspect } from './merging.aspect';\n\nexport { mergeReport } from './merge-cmd';\nexport type { MergingMain, ComponentMergeStatus } from './merging.main.runtime';\nexport default MergingAspect;\nexport { MergingAspect };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA0C,eAE3BA,wBAAa;AAAA"}
|
package/dist/merge-cmd.js
CHANGED
|
@@ -1,87 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.array.iterator.js");
|
|
6
|
-
|
|
7
5
|
require("core-js/modules/es.promise.js");
|
|
8
|
-
|
|
9
6
|
Object.defineProperty(exports, "__esModule", {
|
|
10
7
|
value: true
|
|
11
8
|
});
|
|
12
9
|
exports.MergeCmd = void 0;
|
|
13
10
|
exports.mergeReport = mergeReport;
|
|
14
|
-
|
|
15
11
|
function _defineProperty2() {
|
|
16
12
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
|
-
|
|
18
13
|
_defineProperty2 = function () {
|
|
19
14
|
return data;
|
|
20
15
|
};
|
|
21
|
-
|
|
22
16
|
return data;
|
|
23
17
|
}
|
|
24
|
-
|
|
25
18
|
function _chalk() {
|
|
26
19
|
const data = _interopRequireDefault(require("chalk"));
|
|
27
|
-
|
|
28
20
|
_chalk = function () {
|
|
29
21
|
return data;
|
|
30
22
|
};
|
|
31
|
-
|
|
32
23
|
return data;
|
|
33
24
|
}
|
|
34
|
-
|
|
35
25
|
function _lodash() {
|
|
36
26
|
const data = require("lodash");
|
|
37
|
-
|
|
38
27
|
_lodash = function () {
|
|
39
28
|
return data;
|
|
40
29
|
};
|
|
41
|
-
|
|
42
30
|
return data;
|
|
43
31
|
}
|
|
44
|
-
|
|
45
32
|
function _constants() {
|
|
46
33
|
const data = require("@teambit/legacy/dist/constants");
|
|
47
|
-
|
|
48
34
|
_constants = function () {
|
|
49
35
|
return data;
|
|
50
36
|
};
|
|
51
|
-
|
|
52
37
|
return data;
|
|
53
38
|
}
|
|
54
|
-
|
|
55
39
|
function _mergeVersion() {
|
|
56
40
|
const data = require("@teambit/legacy/dist/consumer/versions-ops/merge-version");
|
|
57
|
-
|
|
58
41
|
_mergeVersion = function () {
|
|
59
42
|
return data;
|
|
60
43
|
};
|
|
61
|
-
|
|
62
44
|
return data;
|
|
63
45
|
}
|
|
64
|
-
|
|
65
46
|
function _featureToggle() {
|
|
66
47
|
const data = require("@teambit/legacy/dist/api/consumer/lib/feature-toggle");
|
|
67
|
-
|
|
68
48
|
_featureToggle = function () {
|
|
69
49
|
return data;
|
|
70
50
|
};
|
|
71
|
-
|
|
72
51
|
return data;
|
|
73
52
|
}
|
|
74
|
-
|
|
75
53
|
function _bitError() {
|
|
76
54
|
const data = require("@teambit/bit-error");
|
|
77
|
-
|
|
78
55
|
_bitError = function () {
|
|
79
56
|
return data;
|
|
80
57
|
};
|
|
81
|
-
|
|
82
58
|
return data;
|
|
83
59
|
}
|
|
84
|
-
|
|
85
60
|
class MergeCmd {
|
|
86
61
|
constructor(merging) {
|
|
87
62
|
this.merging = merging;
|
|
@@ -96,7 +71,6 @@ class MergeCmd {
|
|
|
96
71
|
(0, _defineProperty2().default)(this, "options", [['', 'ours', 'in case of a conflict, override the used version with the current modification'], ['', 'theirs', 'in case of a conflict, override the current modification with the specified version'], ['', 'manual', 'in case of a conflict, leave the files with a conflict state to resolve them manually later'], ['', 'abort', 'EXPERIMENTAL. in case of an unresolved merge, revert to the state before the merge began'], ['', 'resolve', 'EXPERIMENTAL. mark an unresolved merge as resolved and create a new snap with the changes'], ['', 'no-snap', 'EXPERIMENTAL. do not auto snap in case the merge completed without conflicts'], ['', 'build', 'in case of snap during the merge, run the build-pipeline (similar to bit snap --build)'], ['', 'verbose', 'show details of components that were not merged legitimately'], ['', 'skip-dependency-installation', 'do not install packages of the imported components'], ['m', 'message <message>', 'EXPERIMENTAL. override the default message for the auto snap']]);
|
|
97
72
|
(0, _defineProperty2().default)(this, "loader", true);
|
|
98
73
|
}
|
|
99
|
-
|
|
100
74
|
async report([values = []], {
|
|
101
75
|
ours = false,
|
|
102
76
|
theirs = false,
|
|
@@ -122,19 +96,16 @@ class MergeCmd {
|
|
|
122
96
|
mergeSnapResults,
|
|
123
97
|
mergeSnapError
|
|
124
98
|
} = await this.merging.merge(values, mergeStrategy, abort, resolve, noSnap, message, build, skipDependencyInstallation);
|
|
125
|
-
|
|
126
99
|
if (resolvedComponents) {
|
|
127
100
|
const title = 'successfully resolved component(s)\n';
|
|
128
101
|
const componentsStr = resolvedComponents.map(c => c.id.toStringWithoutVersion()).join('\n');
|
|
129
102
|
return _chalk().default.underline(title) + _chalk().default.green(componentsStr);
|
|
130
103
|
}
|
|
131
|
-
|
|
132
104
|
if (abortedComponents) {
|
|
133
105
|
const title = 'successfully aborted the merge of the following component(s)\n';
|
|
134
106
|
const componentsStr = abortedComponents.map(c => c.id.toStringWithoutVersion()).join('\n');
|
|
135
107
|
return _chalk().default.underline(title) + _chalk().default.green(componentsStr);
|
|
136
108
|
}
|
|
137
|
-
|
|
138
109
|
return mergeReport({
|
|
139
110
|
components,
|
|
140
111
|
failedComponents,
|
|
@@ -144,11 +115,8 @@ class MergeCmd {
|
|
|
144
115
|
verbose
|
|
145
116
|
});
|
|
146
117
|
}
|
|
147
|
-
|
|
148
118
|
}
|
|
149
|
-
|
|
150
119
|
exports.MergeCmd = MergeCmd;
|
|
151
|
-
|
|
152
120
|
function mergeReport({
|
|
153
121
|
components,
|
|
154
122
|
failedComponents,
|
|
@@ -159,13 +127,12 @@ function mergeReport({
|
|
|
159
127
|
verbose
|
|
160
128
|
}) {
|
|
161
129
|
const getSuccessOutput = () => {
|
|
162
|
-
if (!components || !components.length) return '';
|
|
163
|
-
|
|
164
|
-
const title = `successfully merged components${version ? `from version ${_chalk().default.bold(version)}` : ''}\n`;
|
|
165
|
-
|
|
130
|
+
if (!components || !components.length) return '';
|
|
131
|
+
// @ts-ignore version is set in case of merge command
|
|
132
|
+
const title = `successfully merged components${version ? `from version ${_chalk().default.bold(version)}` : ''}\n`;
|
|
133
|
+
// @ts-ignore components is set in case of merge command
|
|
166
134
|
return _chalk().default.underline(title) + _chalk().default.green((0, _mergeVersion().applyVersionReport)(components));
|
|
167
135
|
};
|
|
168
|
-
|
|
169
136
|
const getConflictSummary = () => {
|
|
170
137
|
if (!components || !components.length || !leftUnresolvedConflicts) return '';
|
|
171
138
|
const title = `\nfiles with conflicts summary\n`;
|
|
@@ -173,7 +140,6 @@ function mergeReport({
|
|
|
173
140
|
once ready, snap/tag the components to complete the merge.`;
|
|
174
141
|
return _chalk().default.underline(title) + (0, _mergeVersion().conflictSummaryReport)(components) + _chalk().default.yellow(suggestion);
|
|
175
142
|
};
|
|
176
|
-
|
|
177
143
|
const getSnapsOutput = () => {
|
|
178
144
|
if (mergeSnapError) {
|
|
179
145
|
return `
|
|
@@ -181,30 +147,24 @@ ${_chalk().default.bold('snapping the merged components had failed with the foll
|
|
|
181
147
|
${mergeSnapError.message}
|
|
182
148
|
`;
|
|
183
149
|
}
|
|
184
|
-
|
|
185
150
|
if (!mergeSnapResults || !mergeSnapResults.snappedComponents) return '';
|
|
186
151
|
const {
|
|
187
152
|
snappedComponents,
|
|
188
153
|
autoSnappedResults
|
|
189
154
|
} = mergeSnapResults;
|
|
190
|
-
|
|
191
155
|
const outputComponents = comps => {
|
|
192
156
|
return comps.map(component => {
|
|
193
157
|
let componentOutput = ` > ${component.id.toString()}`;
|
|
194
158
|
const autoTag = autoSnappedResults.filter(result => result.triggeredBy.searchWithoutScopeAndVersion(component.id));
|
|
195
|
-
|
|
196
159
|
if (autoTag.length) {
|
|
197
160
|
const autoTagComp = autoTag.map(a => a.component.id.toString());
|
|
198
161
|
componentOutput += `\n ${_constants().AUTO_SNAPPED_MSG}: ${autoTagComp.join(', ')}`;
|
|
199
162
|
}
|
|
200
|
-
|
|
201
163
|
return componentOutput;
|
|
202
164
|
}).join('\n');
|
|
203
165
|
};
|
|
204
|
-
|
|
205
166
|
return `\n${_chalk().default.underline('merge-snapped components')}\n(${'components that snapped as a result of the merge'})\n${outputComponents(snappedComponents)}\n`;
|
|
206
167
|
};
|
|
207
|
-
|
|
208
168
|
const getFailureOutput = () => {
|
|
209
169
|
if (!failedComponents || !failedComponents.length) return '';
|
|
210
170
|
const title = '\nthe merge has been skipped on the following component(s)';
|
|
@@ -213,31 +173,25 @@ ${mergeSnapError.message}
|
|
|
213
173
|
const color = failedComponent.unchangedLegitimately ? 'white' : 'red';
|
|
214
174
|
return `${_chalk().default.bold(failedComponent.id.toString())} - ${_chalk().default[color](failedComponent.failureMessage)}`;
|
|
215
175
|
})).join('\n');
|
|
216
|
-
|
|
217
176
|
if (!body) {
|
|
218
177
|
return `${_chalk().default.bold(`\nthe merge has been skipped on ${failedComponents.length} component(s) legitimately`)}
|
|
219
178
|
(use --verbose to list them next time)`;
|
|
220
179
|
}
|
|
221
|
-
|
|
222
180
|
return `\n${_chalk().default.underline(title)}\n${body}\n\n`;
|
|
223
181
|
};
|
|
224
|
-
|
|
225
182
|
const getSummary = () => {
|
|
226
183
|
const merged = (components === null || components === void 0 ? void 0 : components.length) || 0;
|
|
227
184
|
const unchangedLegitimately = (failedComponents === null || failedComponents === void 0 ? void 0 : failedComponents.filter(f => f.unchangedLegitimately).length) || 0;
|
|
228
185
|
const failedToMerge = (failedComponents === null || failedComponents === void 0 ? void 0 : failedComponents.filter(f => !f.unchangedLegitimately).length) || 0;
|
|
229
186
|
const autoSnapped = ((mergeSnapResults === null || mergeSnapResults === void 0 ? void 0 : mergeSnapResults.snappedComponents.length) || 0) + ((mergeSnapResults === null || mergeSnapResults === void 0 ? void 0 : mergeSnapResults.autoSnappedResults.length) || 0);
|
|
230
187
|
const newLines = '\n\n';
|
|
231
|
-
|
|
232
188
|
const title = _chalk().default.bold.underline('Merge Summary');
|
|
233
|
-
|
|
234
189
|
const mergedStr = `\nTotal Merged: ${_chalk().default.bold(merged.toString())}`;
|
|
235
190
|
const unchangedLegitimatelyStr = `\nTotal Unchanged: ${_chalk().default.bold(unchangedLegitimately.toString())}`;
|
|
236
191
|
const failedToMergeStr = `\nTotal Failed: ${_chalk().default.bold(failedToMerge.toString())}`;
|
|
237
192
|
const autoSnappedStr = `\nTotal Snapped: ${_chalk().default.bold(autoSnapped.toString())}`;
|
|
238
193
|
return newLines + title + mergedStr + unchangedLegitimatelyStr + failedToMergeStr + autoSnappedStr;
|
|
239
194
|
};
|
|
240
|
-
|
|
241
195
|
return getSuccessOutput() + getFailureOutput() + getSnapsOutput() + getConflictSummary() + getSummary();
|
|
242
196
|
}
|
|
243
197
|
|
package/dist/merge-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MergeCmd","constructor","merging","WILDCARD_HELP","report","values","ours","theirs","manual","abort","resolve","build","noSnap","verbose","message","skipDependencyInstallation","isFeatureEnabled","BUILD_ON_CI","Boolean","mergeStrategy","getMergeStrategy","BitError","components","failedComponents","version","resolvedComponents","abortedComponents","mergeSnapResults","mergeSnapError","merge","title","componentsStr","map","c","id","toStringWithoutVersion","join","chalk","underline","green","mergeReport","leftUnresolvedConflicts","getSuccessOutput","length","bold","applyVersionReport","getConflictSummary","suggestion","conflictSummaryReport","yellow","getSnapsOutput","snappedComponents","autoSnappedResults","outputComponents","comps","component","componentOutput","toString","autoTag","filter","result","triggeredBy","searchWithoutScopeAndVersion","autoTagComp","a","AUTO_SNAPPED_MSG","getFailureOutput","body","compact","failedComponent","unchangedLegitimately","color","failureMessage","getSummary","merged","f","failedToMerge","autoSnapped","newLines","mergedStr","unchangedLegitimatelyStr","failedToMergeStr","autoSnappedStr"],"sources":["merge-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { compact } from 'lodash';\nimport { WILDCARD_HELP, AUTO_SNAPPED_MSG } from '@teambit/legacy/dist/constants';\nimport {\n ApplyVersionResults,\n conflictSummaryReport,\n getMergeStrategy,\n applyVersionReport,\n} from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { isFeatureEnabled, BUILD_ON_CI } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { BitError } from '@teambit/bit-error';\nimport { MergingMain } from './merging.main.runtime';\n\nexport class MergeCmd implements Command {\n name = 'merge [values...]';\n description = 'merge changes of different component versions';\n group = 'development';\n extendedDescription = `merge changes of different component versions\n \\`bit merge <version> [ids...]\\` => merge changes of the given version into the checked out version\n \\`bit merge [ids...]\\` => EXPERIMENTAL. merge changes of the remote head into local, optionally use '--abort' or '--resolve'\n ${WILDCARD_HELP('merge 0.0.1')}`;\n alias = '';\n options = [\n ['', 'ours', 'in case of a conflict, override the used version with the current modification'],\n ['', 'theirs', 'in case of a conflict, override the current modification with the specified version'],\n ['', 'manual', 'in case of a conflict, leave the files with a conflict state to resolve them manually later'],\n ['', 'abort', 'EXPERIMENTAL. in case of an unresolved merge, revert to the state before the merge began'],\n ['', 'resolve', 'EXPERIMENTAL. mark an unresolved merge as resolved and create a new snap with the changes'],\n ['', 'no-snap', 'EXPERIMENTAL. do not auto snap in case 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 legitimately'],\n ['', 'skip-dependency-installation', 'do not install packages of the imported components'],\n ['m', 'message <message>', 'EXPERIMENTAL. override the default message for the auto snap'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private merging: MergingMain) {}\n\n async report(\n [values = []]: [string[]],\n {\n ours = false,\n theirs = false,\n manual = false,\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 abort?: boolean;\n resolve?: boolean;\n build?: boolean;\n noSnap?: boolean;\n verbose?: boolean;\n message: string;\n skipDependencyInstallation?: boolean;\n }\n ) {\n build = isFeatureEnabled(BUILD_ON_CI) ? Boolean(build) : true;\n const mergeStrategy = getMergeStrategy(ours, theirs, 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 values,\n mergeStrategy 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 version,\n mergeSnapResults,\n mergeSnapError,\n leftUnresolvedConflicts,\n verbose,\n}: ApplyVersionResults): string {\n const getSuccessOutput = () => {\n if (!components || !components.length) return '';\n // @ts-ignore version is set in case of merge command\n const title = `successfully merged components${version ? `from version ${chalk.bold(version)}` : ''}\\n`;\n // @ts-ignore components is set in case of merge command\n return chalk.underline(title) + chalk.green(applyVersionReport(components));\n };\n\n const getConflictSummary = () => {\n if (!components || !components.length || !leftUnresolvedConflicts) return '';\n const title = `\\nfiles with conflicts summary\\n`;\n const suggestion = `\\n\\nthe merge process wasn't completed due to the conflicts above. fix them manually and then run \"bit install\".\nonce ready, snap/tag the components to complete the merge.`;\n return chalk.underline(title) + conflictSummaryReport(components) + chalk.yellow(suggestion);\n };\n\n const getSnapsOutput = () => {\n if (mergeSnapError) {\n return `\n${chalk.bold(\n 'snapping the merged components had 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) =>\n result.triggeredBy.searchWithoutScopeAndVersion(component.id)\n );\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 `\\n${chalk.underline(\n 'merge-snapped components'\n )}\\n(${'components that snapped as a result of the merge'})\\n${outputComponents(snappedComponents)}\\n`;\n };\n\n const getFailureOutput = () => {\n if (!failedComponents || !failedComponents.length) return '';\n const title = '\\nthe merge has been skipped on the following component(s)';\n const body = compact(\n failedComponents.map((failedComponent) => {\n if (!verbose && failedComponent.unchangedLegitimately) return null;\n const color = failedComponent.unchangedLegitimately ? 'white' : 'red';\n return `${chalk.bold(failedComponent.id.toString())} - ${chalk[color](failedComponent.failureMessage)}`;\n })\n ).join('\\n');\n if (!body) {\n return `${chalk.bold(`\\nthe merge has been skipped on ${failedComponents.length} component(s) legitimately`)}\n(use --verbose to list them next time)`;\n }\n return `\\n${chalk.underline(title)}\\n${body}\\n\\n`;\n };\n\n const getSummary = () => {\n const merged = components?.length || 0;\n const unchangedLegitimately = failedComponents?.filter((f) => f.unchangedLegitimately).length || 0;\n const failedToMerge = failedComponents?.filter((f) => !f.unchangedLegitimately).length || 0;\n const autoSnapped =\n (mergeSnapResults?.snappedComponents.length || 0) + (mergeSnapResults?.autoSnappedResults.length || 0);\n\n const newLines = '\\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 failedToMergeStr = `\\nTotal Failed: ${chalk.bold(failedToMerge.toString())}`;\n const autoSnappedStr = `\\nTotal Snapped: ${chalk.bold(autoSnapped.toString())}`;\n\n return newLines + title + mergedStr + unchangedLegitimatelyStr + failedToMergeStr + autoSnappedStr;\n };\n\n return getSuccessOutput() + getFailureOutput() + getSnapsOutput() + getConflictSummary() + getSummary();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAMA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGO,MAAMA,QAAN,CAAkC;EAuBvCC,WAAW,CAASC,OAAT,EAA+B;IAAA,KAAtBA,OAAsB,GAAtBA,OAAsB;IAAA,8CAtBnC,mBAsBmC;IAAA,qDArB5B,+CAqB4B;IAAA,+CApBlC,aAoBkC;IAAA,6DAnBnB;AACzB;AACA;AACA,IAAI,IAAAC,0BAAA,EAAc,aAAd,CAA6B,EAgBW;IAAA,+CAflC,EAekC;IAAA,iDAdhC,CACR,CAAC,EAAD,EAAK,MAAL,EAAa,gFAAb,CADQ,EAER,CAAC,EAAD,EAAK,QAAL,EAAe,qFAAf,CAFQ,EAGR,CAAC,EAAD,EAAK,QAAL,EAAe,6FAAf,CAHQ,EAIR,CAAC,EAAD,EAAK,OAAL,EAAc,0FAAd,CAJQ,EAKR,CAAC,EAAD,EAAK,SAAL,EAAgB,2FAAhB,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AAW,CAACpB,QAAZ,EAAX,CAAmC,EAA9E;IAEA,OAAOqB,QAAQ,GAAGhD,KAAX,GAAmBiD,SAAnB,GAA+BC,wBAA/B,GAA0DC,gBAA1D,GAA6EC,cAApF;EACD,CAfD;;EAiBA,OAAOxC,gBAAgB,KAAKwB,gBAAgB,EAArC,GAA0ChB,cAAc,EAAxD,GAA6DJ,kBAAkB,EAA/E,GAAoF2B,UAAU,EAArG;AACD"}
|
|
1
|
+
{"version":3,"names":["MergeCmd","constructor","merging","WILDCARD_HELP","report","values","ours","theirs","manual","abort","resolve","build","noSnap","verbose","message","skipDependencyInstallation","isFeatureEnabled","BUILD_ON_CI","Boolean","mergeStrategy","getMergeStrategy","BitError","components","failedComponents","version","resolvedComponents","abortedComponents","mergeSnapResults","mergeSnapError","merge","title","componentsStr","map","c","id","toStringWithoutVersion","join","chalk","underline","green","mergeReport","leftUnresolvedConflicts","getSuccessOutput","length","bold","applyVersionReport","getConflictSummary","suggestion","conflictSummaryReport","yellow","getSnapsOutput","snappedComponents","autoSnappedResults","outputComponents","comps","component","componentOutput","toString","autoTag","filter","result","triggeredBy","searchWithoutScopeAndVersion","autoTagComp","a","AUTO_SNAPPED_MSG","getFailureOutput","body","compact","failedComponent","unchangedLegitimately","color","failureMessage","getSummary","merged","f","failedToMerge","autoSnapped","newLines","mergedStr","unchangedLegitimatelyStr","failedToMergeStr","autoSnappedStr"],"sources":["merge-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { compact } from 'lodash';\nimport { WILDCARD_HELP, AUTO_SNAPPED_MSG } from '@teambit/legacy/dist/constants';\nimport {\n ApplyVersionResults,\n conflictSummaryReport,\n getMergeStrategy,\n applyVersionReport,\n} from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { isFeatureEnabled, BUILD_ON_CI } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { BitError } from '@teambit/bit-error';\nimport { MergingMain } from './merging.main.runtime';\n\nexport class MergeCmd implements Command {\n name = 'merge [values...]';\n description = 'merge changes of different component versions';\n group = 'development';\n extendedDescription = `merge changes of different component versions\n \\`bit merge <version> [ids...]\\` => merge changes of the given version into the checked out version\n \\`bit merge [ids...]\\` => EXPERIMENTAL. merge changes of the remote head into local, optionally use '--abort' or '--resolve'\n ${WILDCARD_HELP('merge 0.0.1')}`;\n alias = '';\n options = [\n ['', 'ours', 'in case of a conflict, override the used version with the current modification'],\n ['', 'theirs', 'in case of a conflict, override the current modification with the specified version'],\n ['', 'manual', 'in case of a conflict, leave the files with a conflict state to resolve them manually later'],\n ['', 'abort', 'EXPERIMENTAL. in case of an unresolved merge, revert to the state before the merge began'],\n ['', 'resolve', 'EXPERIMENTAL. mark an unresolved merge as resolved and create a new snap with the changes'],\n ['', 'no-snap', 'EXPERIMENTAL. do not auto snap in case 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 legitimately'],\n ['', 'skip-dependency-installation', 'do not install packages of the imported components'],\n ['m', 'message <message>', 'EXPERIMENTAL. override the default message for the auto snap'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private merging: MergingMain) {}\n\n async report(\n [values = []]: [string[]],\n {\n ours = false,\n theirs = false,\n manual = false,\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 abort?: boolean;\n resolve?: boolean;\n build?: boolean;\n noSnap?: boolean;\n verbose?: boolean;\n message: string;\n skipDependencyInstallation?: boolean;\n }\n ) {\n build = isFeatureEnabled(BUILD_ON_CI) ? Boolean(build) : true;\n const mergeStrategy = getMergeStrategy(ours, theirs, 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 values,\n mergeStrategy 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 version,\n mergeSnapResults,\n mergeSnapError,\n leftUnresolvedConflicts,\n verbose,\n}: ApplyVersionResults): string {\n const getSuccessOutput = () => {\n if (!components || !components.length) return '';\n // @ts-ignore version is set in case of merge command\n const title = `successfully merged components${version ? `from version ${chalk.bold(version)}` : ''}\\n`;\n // @ts-ignore components is set in case of merge command\n return chalk.underline(title) + chalk.green(applyVersionReport(components));\n };\n\n const getConflictSummary = () => {\n if (!components || !components.length || !leftUnresolvedConflicts) return '';\n const title = `\\nfiles with conflicts summary\\n`;\n const suggestion = `\\n\\nthe merge process wasn't completed due to the conflicts above. fix them manually and then run \"bit install\".\nonce ready, snap/tag the components to complete the merge.`;\n return chalk.underline(title) + conflictSummaryReport(components) + chalk.yellow(suggestion);\n };\n\n const getSnapsOutput = () => {\n if (mergeSnapError) {\n return `\n${chalk.bold(\n 'snapping the merged components had 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) =>\n result.triggeredBy.searchWithoutScopeAndVersion(component.id)\n );\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 `\\n${chalk.underline(\n 'merge-snapped components'\n )}\\n(${'components that snapped as a result of the merge'})\\n${outputComponents(snappedComponents)}\\n`;\n };\n\n const getFailureOutput = () => {\n if (!failedComponents || !failedComponents.length) return '';\n const title = '\\nthe merge has been skipped on the following component(s)';\n const body = compact(\n failedComponents.map((failedComponent) => {\n if (!verbose && failedComponent.unchangedLegitimately) return null;\n const color = failedComponent.unchangedLegitimately ? 'white' : 'red';\n return `${chalk.bold(failedComponent.id.toString())} - ${chalk[color](failedComponent.failureMessage)}`;\n })\n ).join('\\n');\n if (!body) {\n return `${chalk.bold(`\\nthe merge has been skipped on ${failedComponents.length} component(s) legitimately`)}\n(use --verbose to list them next time)`;\n }\n return `\\n${chalk.underline(title)}\\n${body}\\n\\n`;\n };\n\n const getSummary = () => {\n const merged = components?.length || 0;\n const unchangedLegitimately = failedComponents?.filter((f) => f.unchangedLegitimately).length || 0;\n const failedToMerge = failedComponents?.filter((f) => !f.unchangedLegitimately).length || 0;\n const autoSnapped =\n (mergeSnapResults?.snappedComponents.length || 0) + (mergeSnapResults?.autoSnappedResults.length || 0);\n\n const newLines = '\\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 failedToMergeStr = `\\nTotal Failed: ${chalk.bold(failedToMerge.toString())}`;\n const autoSnappedStr = `\\nTotal Snapped: ${chalk.bold(autoSnapped.toString())}`;\n\n return newLines + title + mergedStr + unchangedLegitimatelyStr + failedToMergeStr + autoSnappedStr;\n };\n\n return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AhBA,gBAAgB,CAAEwB,iBAAiB,CAACR,MAAM,KAAI,CAAC,KAAK,CAAAhB,gBAAgB,aAAhBA,gBAAgB,uBAAhBA,gBAAgB,CAAEyB,kBAAkB,CAACT,MAAM,KAAI,CAAC,CAAC;IAExG,MAAMmC,QAAQ,GAAG,MAAM;IACvB,MAAMhD,KAAK,GAAGO,gBAAK,CAACO,IAAI,CAACN,SAAS,CAAC,eAAe,CAAC;IACnD,MAAMyC,SAAS,GAAI,mBAAkB1C,gBAAK,CAACO,IAAI,CAAC8B,MAAM,CAACjB,QAAQ,EAAE,CAAE,EAAC;IACpE,MAAMuB,wBAAwB,GAAI,sBAAqB3C,gBAAK,CAACO,IAAI,CAAC0B,qBAAqB,CAACb,QAAQ,EAAE,CAAE,EAAC;IACrG,MAAMwB,gBAAgB,GAAI,mBAAkB5C,gBAAK,CAACO,IAAI,CAACgC,aAAa,CAACnB,QAAQ,EAAE,CAAE,EAAC;IAClF,MAAMyB,cAAc,GAAI,oBAAmB7C,gBAAK,CAACO,IAAI,CAACiC,WAAW,CAACpB,QAAQ,EAAE,CAAE,EAAC;IAE/E,OAAOqB,QAAQ,GAAGhD,KAAK,GAAGiD,SAAS,GAAGC,wBAAwB,GAAGC,gBAAgB,GAAGC,cAAc;EACpG,CAAC;EAED,OAAOxC,gBAAgB,EAAE,GAAGwB,gBAAgB,EAAE,GAAGhB,cAAc,EAAE,GAAGJ,kBAAkB,EAAE,GAAG2B,UAAU,EAAE;AACzG"}
|
package/dist/merging.aspect.js
CHANGED
|
@@ -4,21 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.MergingAspect = void 0;
|
|
7
|
-
|
|
8
7
|
function _harmony() {
|
|
9
8
|
const data = require("@teambit/harmony");
|
|
10
|
-
|
|
11
9
|
_harmony = function () {
|
|
12
10
|
return data;
|
|
13
11
|
};
|
|
14
|
-
|
|
15
12
|
return data;
|
|
16
13
|
}
|
|
17
|
-
|
|
18
14
|
const MergingAspect = _harmony().Aspect.create({
|
|
19
15
|
id: 'teambit.component/merging'
|
|
20
16
|
});
|
|
21
|
-
|
|
22
17
|
exports.MergingAspect = MergingAspect;
|
|
23
18
|
|
|
24
19
|
//# sourceMappingURL=merging.aspect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MergingAspect","Aspect","create","id"],"sources":["merging.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const MergingAspect = Aspect.create({\n id: 'teambit.component/merging',\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["MergingAspect","Aspect","create","id"],"sources":["merging.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const MergingAspect = Aspect.create({\n id: 'teambit.component/merging',\n});\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,aAAa,GAAGC,iBAAM,CAACC,MAAM,CAAC;EACzCC,EAAE,EAAE;AACN,CAAC,CAAC;AAAC"}
|