@teambit/status 0.0.189 → 0.0.190
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/status-cmd.d.ts +9 -5
- package/dist/status-cmd.js +26 -73
- package/dist/status-cmd.js.map +1 -1
- package/dist/status.main.runtime.d.ts +34 -20
- package/dist/status.main.runtime.js +59 -18
- package/dist/status.main.runtime.js.map +1 -1
- package/package-tar/teambit-status-0.0.190.tgz +0 -0
- package/package.json +10 -9
- /package/{preview-1665632384919.js → preview-1665718844698.js} +0 -0
- package/package-tar/teambit-status-0.0.189.tgz +0 -0
package/dist/status-cmd.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
-
import
|
|
2
|
+
import { ComponentID } from '@teambit/component-id';
|
|
3
3
|
import { DivergeData } from '@teambit/legacy/dist/scope/component-ops/diverge-data';
|
|
4
|
+
import { IssuesList } from '@teambit/component-issues';
|
|
4
5
|
import { StatusMain } from './status.main.runtime';
|
|
5
6
|
export declare class StatusCmd implements Command {
|
|
6
7
|
private status;
|
|
@@ -14,8 +15,8 @@ export declare class StatusCmd implements Command {
|
|
|
14
15
|
migration: boolean;
|
|
15
16
|
constructor(status: StatusMain);
|
|
16
17
|
json(): Promise<{
|
|
17
|
-
newComponents:
|
|
18
|
-
|
|
18
|
+
newComponents: string[];
|
|
19
|
+
modifiedComponents: string[];
|
|
19
20
|
stagedComponents: {
|
|
20
21
|
id: string;
|
|
21
22
|
versions: string[];
|
|
@@ -30,13 +31,15 @@ export declare class StatusCmd implements Command {
|
|
|
30
31
|
}[];
|
|
31
32
|
importPendingComponents: string[];
|
|
32
33
|
autoTagPendingComponents: string[];
|
|
33
|
-
invalidComponents:
|
|
34
|
+
invalidComponents: {
|
|
35
|
+
id: ComponentID;
|
|
36
|
+
error: Error;
|
|
37
|
+
}[];
|
|
34
38
|
locallySoftRemoved: string[];
|
|
35
39
|
remotelySoftRemoved: string[];
|
|
36
40
|
outdatedComponents: string[];
|
|
37
41
|
mergePendingComponents: string[];
|
|
38
42
|
componentsDuringMergeState: string[];
|
|
39
|
-
componentsWithIndividualFiles: string[];
|
|
40
43
|
softTaggedComponents: string[];
|
|
41
44
|
snappedComponents: string[];
|
|
42
45
|
pendingUpdatesFromMain: {
|
|
@@ -52,3 +55,4 @@ export declare class StatusCmd implements Command {
|
|
|
52
55
|
code: number;
|
|
53
56
|
}>;
|
|
54
57
|
}
|
|
58
|
+
export declare function formatIssues(issues: IssuesList): string;
|
package/dist/status-cmd.js
CHANGED
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
12
12
|
value: true
|
|
13
13
|
});
|
|
14
14
|
exports.StatusCmd = void 0;
|
|
15
|
+
exports.formatIssues = formatIssues;
|
|
15
16
|
|
|
16
17
|
function _defineProperty2() {
|
|
17
18
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
@@ -43,26 +44,6 @@ function _ramda() {
|
|
|
43
44
|
return data;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
function _legacyBitId() {
|
|
47
|
-
const data = require("@teambit/legacy-bit-id");
|
|
48
|
-
|
|
49
|
-
_legacyBitId = function () {
|
|
50
|
-
return data;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
return data;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function _component() {
|
|
57
|
-
const data = _interopRequireDefault(require("@teambit/legacy/dist/consumer/component"));
|
|
58
|
-
|
|
59
|
-
_component = function () {
|
|
60
|
-
return data;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
return data;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
47
|
function _utils() {
|
|
67
48
|
const data = require("@teambit/legacy/dist/utils");
|
|
68
49
|
|
|
@@ -93,16 +74,6 @@ function _componentIssuesTemplate() {
|
|
|
93
74
|
return data;
|
|
94
75
|
}
|
|
95
76
|
|
|
96
|
-
function _models() {
|
|
97
|
-
const data = require("@teambit/legacy/dist/scope/models");
|
|
98
|
-
|
|
99
|
-
_models = function () {
|
|
100
|
-
return data;
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
return data;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
77
|
function _constants() {
|
|
107
78
|
const data = require("@teambit/legacy/dist/constants");
|
|
108
79
|
|
|
@@ -133,8 +104,6 @@ function _componentVersion() {
|
|
|
133
104
|
return data;
|
|
134
105
|
}
|
|
135
106
|
|
|
136
|
-
const individualFilesDesc = `these components were added as individual files and not as directories, which are invalid in Harmony
|
|
137
|
-
please make sure each component has its own directory and re-add it. alternatively, use "bit move --component" to help with the move.`;
|
|
138
107
|
const TROUBLESHOOTING_MESSAGE = `${_chalk().default.yellow(`learn more at https://${_constants().BASE_DOCS_DOMAIN}/components/adding-components`)}`;
|
|
139
108
|
|
|
140
109
|
class StatusCmd {
|
|
@@ -164,17 +133,16 @@ class StatusCmd {
|
|
|
164
133
|
outdatedComponents,
|
|
165
134
|
mergePendingComponents,
|
|
166
135
|
componentsDuringMergeState,
|
|
167
|
-
componentsWithIndividualFiles,
|
|
168
136
|
softTaggedComponents,
|
|
169
137
|
snappedComponents,
|
|
170
138
|
pendingUpdatesFromMain
|
|
171
139
|
} = await this.status.status();
|
|
172
140
|
return {
|
|
173
|
-
newComponents,
|
|
174
|
-
|
|
141
|
+
newComponents: newComponents.map(c => c.toStringWithoutVersion()),
|
|
142
|
+
modifiedComponents: modifiedComponent.map(c => c.toString()),
|
|
175
143
|
stagedComponents: stagedComponents.map(c => ({
|
|
176
|
-
id: c.id(),
|
|
177
|
-
versions: c.
|
|
144
|
+
id: c.id.toStringWithoutVersion(),
|
|
145
|
+
versions: c.versions
|
|
178
146
|
})),
|
|
179
147
|
componentsWithIssues: componentsWithIssues.map(c => {
|
|
180
148
|
var _c$issues;
|
|
@@ -192,7 +160,6 @@ class StatusCmd {
|
|
|
192
160
|
outdatedComponents: outdatedComponents.map(c => c.id.toString()),
|
|
193
161
|
mergePendingComponents: mergePendingComponents.map(c => c.id.toString()),
|
|
194
162
|
componentsDuringMergeState: componentsDuringMergeState.map(id => id.toString()),
|
|
195
|
-
componentsWithIndividualFiles: componentsWithIndividualFiles.map(c => c.id.toString()),
|
|
196
163
|
softTaggedComponents: softTaggedComponents.map(s => s.toString()),
|
|
197
164
|
snappedComponents: snappedComponents.map(s => s.toString()),
|
|
198
165
|
pendingUpdatesFromMain: pendingUpdatesFromMain.map(p => ({
|
|
@@ -219,7 +186,6 @@ class StatusCmd {
|
|
|
219
186
|
outdatedComponents,
|
|
220
187
|
mergePendingComponents,
|
|
221
188
|
componentsDuringMergeState,
|
|
222
|
-
componentsWithIndividualFiles,
|
|
223
189
|
softTaggedComponents,
|
|
224
190
|
snappedComponents,
|
|
225
191
|
pendingUpdatesFromMain,
|
|
@@ -229,36 +195,22 @@ class StatusCmd {
|
|
|
229
195
|
|
|
230
196
|
let showTroubleshootingLink = false;
|
|
231
197
|
|
|
232
|
-
function format(
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
if (component instanceof _component().default) return component.id;
|
|
236
|
-
if (component instanceof _models().ModelComponent) return component.toBitId();
|
|
237
|
-
throw new Error(`type of component ${component} is not supported`);
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
const bitId = getBitId();
|
|
241
|
-
const issues = componentsWithIssues.find(compWithIssue => compWithIssue.id.isEqual(bitId));
|
|
242
|
-
const softTagged = softTaggedComponents.find(softTaggedId => softTaggedId.isEqual(bitId));
|
|
198
|
+
function format(id, showIssues = false, message, localVersions) {
|
|
199
|
+
const idWithIssues = componentsWithIssues.find(c => c.id.isEqual(id));
|
|
200
|
+
const softTagged = softTaggedComponents.find(softTaggedId => softTaggedId.isEqual(id));
|
|
243
201
|
const messageStatusText = message || 'ok';
|
|
244
202
|
const messageStatusTextWithSoftTag = softTagged ? `${messageStatusText} (soft-tagged)` : messageStatusText;
|
|
245
203
|
const color = message ? 'yellow' : 'green';
|
|
246
204
|
|
|
247
205
|
const messageStatus = _chalk().default[color](messageStatusTextWithSoftTag);
|
|
248
206
|
|
|
249
|
-
if (
|
|
250
|
-
return `${(0, _chalkBox().formatBitString)(
|
|
207
|
+
if (!showIssues) {
|
|
208
|
+
return `${(0, _chalkBox().formatBitString)(id.toStringWithoutVersion())} ... ${messageStatus}`;
|
|
251
209
|
}
|
|
252
210
|
|
|
253
|
-
let bitFormatted = `${(0, _chalkBox().
|
|
254
|
-
|
|
255
|
-
if (showVersions) {
|
|
256
|
-
if (!(component instanceof _models().ModelComponent)) {
|
|
257
|
-
throw new Error(`expect "${component}" to be instance of ModelComponent`);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
const localVersions = component.getLocalTagsOrHashes();
|
|
211
|
+
let bitFormatted = `${(0, _chalkBox().formatBitString)(id.toStringWithoutVersion())}`;
|
|
261
212
|
|
|
213
|
+
if (localVersions) {
|
|
262
214
|
if (verbose) {
|
|
263
215
|
bitFormatted += `. versions: ${localVersions.join(', ')}`;
|
|
264
216
|
} else {
|
|
@@ -271,9 +223,9 @@ class StatusCmd {
|
|
|
271
223
|
}
|
|
272
224
|
|
|
273
225
|
bitFormatted += ' ... ';
|
|
274
|
-
if (!
|
|
226
|
+
if (!idWithIssues) return `${bitFormatted}${messageStatus}`;
|
|
275
227
|
showTroubleshootingLink = true;
|
|
276
|
-
return `${bitFormatted} ${_chalk().default.red(_constants().statusFailureMsg)}${(
|
|
228
|
+
return `${bitFormatted} ${_chalk().default.red(_constants().statusFailureMsg)}${formatIssues(idWithIssues.issues)}`;
|
|
277
229
|
}
|
|
278
230
|
|
|
279
231
|
const importPendingWarning = importPendingComponents.length ? _chalk().default.yellow(`${_constants().IMPORT_PENDING_MSG}.\n`) : '';
|
|
@@ -285,7 +237,7 @@ class StatusCmd {
|
|
|
285
237
|
const {
|
|
286
238
|
missing,
|
|
287
239
|
nonMissing
|
|
288
|
-
} = splitByMissing(newComponents.map(c => format(c)));
|
|
240
|
+
} = splitByMissing(newComponents.map(c => format(c, true)));
|
|
289
241
|
|
|
290
242
|
const outdatedTitle = _chalk().default.underline.white('pending updates');
|
|
291
243
|
|
|
@@ -301,7 +253,7 @@ class StatusCmd {
|
|
|
301
253
|
const pendingMergeDesc = `(use "bit reset" to add local changes on top of the remote and discard local tags.
|
|
302
254
|
alternatively, to keep local tags/snaps history, use "bit merge <remote-name>/<lane-name> [component-id]")\n`;
|
|
303
255
|
const pendingMergeComps = mergePendingComponents.map(component => {
|
|
304
|
-
return ` > ${_chalk().default.cyan(component.id.toString())} local and remote have diverged and have ${component.
|
|
256
|
+
return ` > ${_chalk().default.cyan(component.id.toString())} local and remote have diverged and have ${component.divergeData.snapsOnLocalOnly.length} and ${component.divergeData.snapsOnRemoteOnly.length} different snaps each, respectively\n`;
|
|
305
257
|
}).join('');
|
|
306
258
|
const pendingMergeStr = pendingMergeComps.length ? [pendingMergeTitle, pendingMergeDesc, pendingMergeComps].join('\n') : '';
|
|
307
259
|
|
|
@@ -317,21 +269,18 @@ or use "bit merge [component-id] --abort" to cancel the merge operation)\n`;
|
|
|
317
269
|
const newComponentsTitle = newComponents.length ? _chalk().default.underline.white('new components') + newComponentDescription : '';
|
|
318
270
|
const newComponentsOutput = [newComponentsTitle, ...(nonMissing || []), ...(missing || [])].join('\n');
|
|
319
271
|
const modifiedDesc = '(use "bit diff" to compare changes)\n';
|
|
320
|
-
const modifiedComponentOutput = (0, _utils().immutableUnshift)(modifiedComponent.map(c => format(c)), modifiedComponent.length ? _chalk().default.underline.white('modified components') + newComponentDescription + modifiedDesc : '').join('\n');
|
|
272
|
+
const modifiedComponentOutput = (0, _utils().immutableUnshift)(modifiedComponent.map(c => format(c, true)), modifiedComponent.length ? _chalk().default.underline.white('modified components') + newComponentDescription + modifiedDesc : '').join('\n');
|
|
321
273
|
const autoTagPendingOutput = (0, _utils().immutableUnshift)(autoTagPendingComponents.map(c => format(c)), autoTagPendingComponents.length ? _chalk().default.underline.white('components pending to be tagged automatically (when their dependencies are tagged)') : '').join('\n');
|
|
322
274
|
const invalidDesc = '\nthese components were failed to load.\n';
|
|
323
|
-
const invalidComponentOutput = (0, _utils().immutableUnshift)(invalidComponents.map(c => format(c.id,
|
|
275
|
+
const invalidComponentOutput = (0, _utils().immutableUnshift)(invalidComponents.map(c => format(c.id, false, (0, _componentIssuesTemplate().getInvalidComponentLabel)(c.error))).sort(), invalidComponents.length ? _chalk().default.underline.white(_constants().statusInvalidComponentsMsg) + invalidDesc : '').join('\n');
|
|
324
276
|
const locallySoftRemovedDesc = '\n(tag/snap and export them to update the remote)\n';
|
|
325
277
|
const locallySoftRemovedOutput = (0, _utils().immutableUnshift)(locallySoftRemoved.map(c => format(c)).sort(), locallySoftRemoved.length ? _chalk().default.underline.white('soft-removed components locally') + locallySoftRemovedDesc : '').join('\n');
|
|
326
278
|
const remotelySoftRemovedDesc = '\n(use "bit remove" to remove them from the workspace)\n';
|
|
327
279
|
const remotelySoftRemovedOutput = (0, _utils().immutableUnshift)(remotelySoftRemoved.map(c => format(c)).sort(), remotelySoftRemoved.length ? _chalk().default.underline.white('soft-removed components on the remote') + remotelySoftRemovedDesc : '').join('\n');
|
|
328
|
-
const individualFilesOutput = (0, _utils().immutableUnshift)(componentsWithIndividualFiles.map(c => format(c.id, false, 'individual files')).sort(), componentsWithIndividualFiles.length ? `${_chalk().default.underline.white('components with individual files')}\n${individualFilesDesc}\n` : '').join('\n');
|
|
329
280
|
const stagedDesc = '\n(use "bit export" to push these components to a remote scope)\n';
|
|
330
|
-
const stagedComponentsOutput = (0, _utils().immutableUnshift)(
|
|
331
|
-
stagedComponents.map(c => format(c, true)), stagedComponents.length ? _chalk().default.underline.white('staged components') + stagedDesc : '').join('\n');
|
|
281
|
+
const stagedComponentsOutput = (0, _utils().immutableUnshift)(stagedComponents.map(c => format(c.id, true, undefined, c.versions)), stagedComponents.length ? _chalk().default.underline.white('staged components') + stagedDesc : '').join('\n');
|
|
332
282
|
const snappedDesc = '\n(use "bit tag [version]" or "bit tag --snapped [version]" to lock a version)\n';
|
|
333
|
-
const snappedComponentsOutput = (0, _utils().immutableUnshift)(
|
|
334
|
-
snappedComponents.map(c => format(c, true)), snappedComponents.length ? _chalk().default.underline.white('snapped components') + snappedDesc : '').join('\n');
|
|
283
|
+
const snappedComponentsOutput = (0, _utils().immutableUnshift)(snappedComponents.map(c => format(c)), snappedComponents.length ? _chalk().default.underline.white('snapped components') + snappedDesc : '').join('\n');
|
|
335
284
|
|
|
336
285
|
const getUpdateFromMainMsg = divergeData => {
|
|
337
286
|
if (divergeData.err) return divergeData.err.message;
|
|
@@ -347,11 +296,11 @@ or use "bit merge [component-id] --abort" to cancel the merge operation)\n`;
|
|
|
347
296
|
};
|
|
348
297
|
|
|
349
298
|
const updatesFromMainDesc = '\n(EXPERIMENTAL. use "bit lane merge main" to merge the changes)\n';
|
|
350
|
-
const pendingUpdatesFromMainIds = pendingUpdatesFromMain.map(c => format(c.id,
|
|
299
|
+
const pendingUpdatesFromMainIds = pendingUpdatesFromMain.map(c => format(c.id, false, getUpdateFromMainMsg(c.divergeData)));
|
|
351
300
|
const updatesFromMainOutput = (0, _utils().immutableUnshift)(pendingUpdatesFromMainIds, pendingUpdatesFromMain.length ? _chalk().default.underline.white('pending updates from main') + updatesFromMainDesc : '').join('\n');
|
|
352
301
|
const laneStr = laneName ? `\non ${_chalk().default.bold(laneName)} lane` : '';
|
|
353
302
|
const troubleshootingStr = showTroubleshootingLink ? `\n${TROUBLESHOOTING_MESSAGE}` : '';
|
|
354
|
-
const statusMsg = importPendingWarning + [outdatedStr, pendingMergeStr, updatesFromMainOutput, compWithConflictsStr, newComponentsOutput, modifiedComponentOutput, snappedComponentsOutput, stagedComponentsOutput, autoTagPendingOutput, invalidComponentOutput, locallySoftRemovedOutput, remotelySoftRemovedOutput
|
|
303
|
+
const statusMsg = importPendingWarning + [outdatedStr, pendingMergeStr, updatesFromMainOutput, compWithConflictsStr, newComponentsOutput, modifiedComponentOutput, snappedComponentsOutput, stagedComponentsOutput, autoTagPendingOutput, invalidComponentOutput, locallySoftRemovedOutput, remotelySoftRemovedOutput].filter(x => x).join(_chalk().default.underline('\n \n') + _chalk().default.white('\n')) + troubleshootingStr;
|
|
355
304
|
const results = (statusMsg || _chalk().default.yellow(_constants().statusWorkspaceIsCleanMsg)) + laneStr;
|
|
356
305
|
const exitCode = componentsWithIssues.length && strict ? 1 : 0;
|
|
357
306
|
return {
|
|
@@ -364,4 +313,8 @@ or use "bit merge [component-id] --abort" to cancel the merge operation)\n`;
|
|
|
364
313
|
|
|
365
314
|
exports.StatusCmd = StatusCmd;
|
|
366
315
|
|
|
316
|
+
function formatIssues(issues) {
|
|
317
|
+
return ` ${issues === null || issues === void 0 ? void 0 : issues.outputForCLI()}\n`;
|
|
318
|
+
}
|
|
319
|
+
|
|
367
320
|
//# sourceMappingURL=status-cmd.js.map
|
package/dist/status-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["individualFilesDesc","TROUBLESHOOTING_MESSAGE","chalk","yellow","BASE_DOCS_DOMAIN","StatusCmd","constructor","status","json","newComponents","modifiedComponent","stagedComponents","componentsWithIssues","importPendingComponents","autoTagPendingComponents","invalidComponents","locallySoftRemoved","remotelySoftRemoved","outdatedComponents","mergePendingComponents","componentsDuringMergeState","componentsWithIndividualFiles","softTaggedComponents","snappedComponents","pendingUpdatesFromMain","map","c","id","toString","versions","getLocalTagsOrHashes","issues","toObject","s","p","divergeData","report","_args","strict","verbose","laneName","showTroubleshootingLink","format","component","showVersions","message","getBitId","BitId","Component","ModelComponent","toBitId","Error","bitId","find","compWithIssue","isEqual","softTagged","softTaggedId","messageStatusText","messageStatusTextWithSoftTag","color","messageStatus","formatBitString","toStringWithoutVersion","bitFormatted","formatNewBit","localVersions","join","snaps","tags","partition","version","isHash","tagsStr","length","snapsStr","red","statusFailureMsg","formatIssues","importPendingWarning","IMPORT_PENDING_MSG","splitByMissing","R","groupBy","includes","missing","nonMissing","outdatedTitle","underline","white","outdatedDesc","outdatedComps","cyan","latestVersion","outdatedStr","pendingMergeTitle","pendingMergeDesc","pendingMergeComps","diverge","snapsOnLocalOnly","snapsOnRemoteOnly","pendingMergeStr","compWithConflictsTitle","compWithConflictsDesc","compWithConflictsComps","compWithConflictsStr","newComponentDescription","newComponentsTitle","newComponentsOutput","modifiedDesc","modifiedComponentOutput","immutableUnshift","autoTagPendingOutput","invalidDesc","invalidComponentOutput","getInvalidComponentLabel","error","sort","statusInvalidComponentsMsg","locallySoftRemovedDesc","locallySoftRemovedOutput","remotelySoftRemovedDesc","remotelySoftRemovedOutput","individualFilesOutput","stagedDesc","stagedComponentsOutput","snappedDesc","snappedComponentsOutput","getUpdateFromMainMsg","err","msg","commonSnapBeforeDiverge","toShortString","updatesFromMainDesc","pendingUpdatesFromMainIds","updatesFromMainOutput","laneStr","bold","troubleshootingStr","statusMsg","filter","x","results","statusWorkspaceIsCleanMsg","exitCode","data","code"],"sources":["status-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport R from 'ramda';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport Component from '@teambit/legacy/dist/consumer/component';\nimport { DivergeData } from '@teambit/legacy/dist/scope/component-ops/diverge-data';\nimport { immutableUnshift } from '@teambit/legacy/dist/utils';\nimport { formatBitString, formatNewBit } from '@teambit/legacy/dist/cli/chalk-box';\nimport { getInvalidComponentLabel, formatIssues } from '@teambit/legacy/dist/cli/templates/component-issues-template';\nimport { ModelComponent } from '@teambit/legacy/dist/scope/models';\nimport {\n BASE_DOCS_DOMAIN,\n IMPORT_PENDING_MSG,\n statusFailureMsg,\n statusInvalidComponentsMsg,\n statusWorkspaceIsCleanMsg,\n} from '@teambit/legacy/dist/constants';\nimport { partition } from 'lodash';\nimport { isHash } from '@teambit/component-version';\nimport { StatusMain, StatusResult } from './status.main.runtime';\n\nconst individualFilesDesc = `these components were added as individual files and not as directories, which are invalid in Harmony\nplease make sure each component has its own directory and re-add it. alternatively, use \"bit move --component\" to help with the move.`;\nconst TROUBLESHOOTING_MESSAGE = `${chalk.yellow(\n `learn more at https://${BASE_DOCS_DOMAIN}/components/adding-components`\n)}`;\n\nexport class StatusCmd implements Command {\n name = 'status';\n description = 'present the current status of components in the workspace, and notifies when issues are detected';\n group = 'development';\n extendedDescription: string;\n alias = 's';\n options = [\n ['j', 'json', 'return a json version of the component'],\n ['', 'verbose', 'show full snap hashes'],\n ['', 'strict', 'in case issues found, exit with code 1'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private status: StatusMain) {}\n\n async json() {\n const {\n newComponents,\n modifiedComponent,\n stagedComponents,\n componentsWithIssues,\n importPendingComponents,\n autoTagPendingComponents,\n invalidComponents,\n locallySoftRemoved,\n remotelySoftRemoved,\n outdatedComponents,\n mergePendingComponents,\n componentsDuringMergeState,\n componentsWithIndividualFiles,\n softTaggedComponents,\n snappedComponents,\n pendingUpdatesFromMain,\n }: StatusResult = await this.status.status();\n return {\n newComponents,\n modifiedComponent: modifiedComponent.map((c) => c.id.toString()),\n stagedComponents: stagedComponents.map((c) => ({ id: c.id(), versions: c.getLocalTagsOrHashes() })),\n componentsWithIssues: componentsWithIssues.map((c) => ({\n id: c.id.toString(),\n issues: c.issues?.toObject(),\n })),\n importPendingComponents: importPendingComponents.map((id) => id.toString()),\n autoTagPendingComponents: autoTagPendingComponents.map((s) => s.toString()),\n invalidComponents,\n locallySoftRemoved: locallySoftRemoved.map((id) => id.toString()),\n remotelySoftRemoved: remotelySoftRemoved.map((id) => id.toString()),\n outdatedComponents: outdatedComponents.map((c) => c.id.toString()),\n mergePendingComponents: mergePendingComponents.map((c) => c.id.toString()),\n componentsDuringMergeState: componentsDuringMergeState.map((id) => id.toString()),\n componentsWithIndividualFiles: componentsWithIndividualFiles.map((c) => c.id.toString()),\n softTaggedComponents: softTaggedComponents.map((s) => s.toString()),\n snappedComponents: snappedComponents.map((s) => s.toString()),\n pendingUpdatesFromMain: pendingUpdatesFromMain.map((p) => ({ id: p.id.toString(), divergeData: p.divergeData })),\n };\n }\n\n async report(_args, { strict, verbose }: { strict?: boolean; verbose?: boolean }) {\n const {\n newComponents,\n modifiedComponent,\n stagedComponents,\n componentsWithIssues,\n importPendingComponents,\n autoTagPendingComponents,\n invalidComponents,\n locallySoftRemoved,\n remotelySoftRemoved,\n outdatedComponents,\n mergePendingComponents,\n componentsDuringMergeState,\n componentsWithIndividualFiles,\n softTaggedComponents,\n snappedComponents,\n pendingUpdatesFromMain,\n laneName,\n }: StatusResult = await this.status.status();\n // If there is problem with at least one component we want to show a link to the\n // troubleshooting doc\n let showTroubleshootingLink = false;\n\n function format(component: BitId | Component | ModelComponent, showVersions = false, message?: string): string {\n const getBitId = () => {\n if (component instanceof BitId) return component;\n if (component instanceof Component) return component.id;\n if (component instanceof ModelComponent) return component.toBitId();\n throw new Error(`type of component ${component} is not supported`);\n };\n const bitId = getBitId();\n const issues = componentsWithIssues.find((compWithIssue: Component) => compWithIssue.id.isEqual(bitId));\n const softTagged = softTaggedComponents.find((softTaggedId) => softTaggedId.isEqual(bitId));\n\n const messageStatusText = message || 'ok';\n const messageStatusTextWithSoftTag = softTagged ? `${messageStatusText} (soft-tagged)` : messageStatusText;\n const color = message ? 'yellow' : 'green';\n const messageStatus = chalk[color](messageStatusTextWithSoftTag);\n\n if (component instanceof BitId) {\n return `${formatBitString(component.toStringWithoutVersion())} ... ${messageStatus}`;\n }\n let bitFormatted = `${formatNewBit(component)}`;\n if (showVersions) {\n if (!(component instanceof ModelComponent)) {\n throw new Error(`expect \"${component}\" to be instance of ModelComponent`);\n }\n const localVersions = component.getLocalTagsOrHashes();\n if (verbose) {\n bitFormatted += `. versions: ${localVersions.join(', ')}`;\n } else {\n const [snaps, tags] = partition(localVersions, (version) => isHash(version));\n const tagsStr = tags.length ? `versions: ${tags.join(', ')}` : '';\n const snapsStr = snaps.length ? `${snaps.length} snap(s)` : '';\n bitFormatted += `. `;\n bitFormatted += tagsStr && snapsStr ? `${tagsStr}. and ${snapsStr}` : tagsStr || snapsStr;\n }\n }\n bitFormatted += ' ... ';\n if (!issues) return `${bitFormatted}${messageStatus}`;\n showTroubleshootingLink = true;\n return `${bitFormatted} ${chalk.red(statusFailureMsg)}${formatIssues(issues)}`;\n }\n\n const importPendingWarning = importPendingComponents.length ? chalk.yellow(`${IMPORT_PENDING_MSG}.\\n`) : '';\n\n const splitByMissing = R.groupBy((component) => {\n return component.includes(statusFailureMsg) ? 'missing' : 'nonMissing';\n });\n const { missing, nonMissing } = splitByMissing(newComponents.map((c) => format(c)));\n\n const outdatedTitle = chalk.underline.white('pending updates');\n const outdatedDesc =\n '(use \"bit checkout head\" to merge changes)\\n(use \"bit diff [component_id] [new_version]\" to compare changes)\\n(use \"bit log [component_id]\" to list all available versions)\\n';\n const outdatedComps = outdatedComponents\n .map((component) => {\n return ` > ${chalk.cyan(component.id.toStringWithoutVersion())} current: ${component.id.version} latest: ${\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n component.latestVersion\n }\\n`;\n })\n .join('');\n\n const outdatedStr = outdatedComponents.length ? [outdatedTitle, outdatedDesc, outdatedComps].join('\\n') : '';\n\n const pendingMergeTitle = chalk.underline.white('pending merge');\n const pendingMergeDesc = `(use \"bit reset\" to add local changes on top of the remote and discard local tags.\nalternatively, to keep local tags/snaps history, use \"bit merge <remote-name>/<lane-name> [component-id]\")\\n`;\n const pendingMergeComps = mergePendingComponents\n .map((component) => {\n return ` > ${chalk.cyan(component.id.toString())} local and remote have diverged and have ${\n component.diverge.snapsOnLocalOnly.length\n } and ${component.diverge.snapsOnRemoteOnly.length} different snaps each, respectively\\n`;\n })\n .join('');\n\n const pendingMergeStr = pendingMergeComps.length\n ? [pendingMergeTitle, pendingMergeDesc, pendingMergeComps].join('\\n')\n : '';\n\n const compWithConflictsTitle = chalk.underline.white('components during merge state');\n const compWithConflictsDesc = `(use \"bit snap/tag [--unmerged]\" to complete the merge process\nor use \"bit merge [component-id] --abort\" to cancel the merge operation)\\n`;\n const compWithConflictsComps = componentsDuringMergeState\n .map((id) => {\n return ` > ${chalk.cyan(id.toString())}`;\n })\n .join('\\n');\n\n const compWithConflictsStr = compWithConflictsComps.length\n ? [compWithConflictsTitle, compWithConflictsDesc, compWithConflictsComps].join('\\n')\n : '';\n\n const newComponentDescription = '\\n(use \"bit tag [version]\" to lock a version with all your changes)\\n';\n const newComponentsTitle = newComponents.length\n ? chalk.underline.white('new components') + newComponentDescription\n : '';\n\n const newComponentsOutput = [newComponentsTitle, ...(nonMissing || []), ...(missing || [])].join('\\n');\n\n const modifiedDesc = '(use \"bit diff\" to compare changes)\\n';\n const modifiedComponentOutput = immutableUnshift(\n modifiedComponent.map((c) => format(c)),\n modifiedComponent.length\n ? chalk.underline.white('modified components') + newComponentDescription + modifiedDesc\n : ''\n ).join('\\n');\n\n const autoTagPendingOutput = immutableUnshift(\n autoTagPendingComponents.map((c) => format(c)),\n autoTagPendingComponents.length\n ? chalk.underline.white('components pending to be tagged automatically (when their dependencies are tagged)')\n : ''\n ).join('\\n');\n\n const invalidDesc = '\\nthese components were failed to load.\\n';\n const invalidComponentOutput = immutableUnshift(\n invalidComponents.map((c) => format(c.id, true, getInvalidComponentLabel(c.error))).sort(),\n invalidComponents.length ? chalk.underline.white(statusInvalidComponentsMsg) + invalidDesc : ''\n ).join('\\n');\n\n const locallySoftRemovedDesc = '\\n(tag/snap and export them to update the remote)\\n';\n const locallySoftRemovedOutput = immutableUnshift(\n locallySoftRemoved.map((c) => format(c)).sort(),\n locallySoftRemoved.length ? chalk.underline.white('soft-removed components locally') + locallySoftRemovedDesc : ''\n ).join('\\n');\n\n const remotelySoftRemovedDesc = '\\n(use \"bit remove\" to remove them from the workspace)\\n';\n const remotelySoftRemovedOutput = immutableUnshift(\n remotelySoftRemoved.map((c) => format(c)).sort(),\n remotelySoftRemoved.length\n ? chalk.underline.white('soft-removed components on the remote') + remotelySoftRemovedDesc\n : ''\n ).join('\\n');\n\n const individualFilesOutput = immutableUnshift(\n componentsWithIndividualFiles.map((c) => format(c.id, false, 'individual files')).sort(),\n componentsWithIndividualFiles.length\n ? `${chalk.underline.white('components with individual files')}\\n${individualFilesDesc}\\n`\n : ''\n ).join('\\n');\n\n const stagedDesc = '\\n(use \"bit export\" to push these components to a remote scope)\\n';\n const stagedComponentsOutput = immutableUnshift(\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n stagedComponents.map((c) => format(c, true)),\n stagedComponents.length ? chalk.underline.white('staged components') + stagedDesc : ''\n ).join('\\n');\n\n const snappedDesc = '\\n(use \"bit tag [version]\" or \"bit tag --snapped [version]\" to lock a version)\\n';\n const snappedComponentsOutput = immutableUnshift(\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n snappedComponents.map((c) => format(c, true)),\n snappedComponents.length ? chalk.underline.white('snapped components') + snappedDesc : ''\n ).join('\\n');\n\n const getUpdateFromMainMsg = (divergeData: DivergeData): string => {\n if (divergeData.err) return divergeData.err.message;\n let msg = `main is ahead by ${divergeData.snapsOnRemoteOnly.length || 0} snaps`;\n if (divergeData.snapsOnLocalOnly && verbose) {\n msg += ` (diverged since ${divergeData.commonSnapBeforeDiverge?.toShortString()})`;\n }\n return msg;\n };\n const updatesFromMainDesc = '\\n(EXPERIMENTAL. use \"bit lane merge main\" to merge the changes)\\n';\n const pendingUpdatesFromMainIds = pendingUpdatesFromMain.map((c) =>\n format(c.id, true, getUpdateFromMainMsg(c.divergeData))\n );\n const updatesFromMainOutput = immutableUnshift(\n pendingUpdatesFromMainIds,\n pendingUpdatesFromMain.length ? chalk.underline.white('pending updates from main') + updatesFromMainDesc : ''\n ).join('\\n');\n\n const laneStr = laneName ? `\\non ${chalk.bold(laneName)} lane` : '';\n\n const troubleshootingStr = showTroubleshootingLink ? `\\n${TROUBLESHOOTING_MESSAGE}` : '';\n\n const statusMsg =\n importPendingWarning +\n [\n outdatedStr,\n pendingMergeStr,\n updatesFromMainOutput,\n compWithConflictsStr,\n newComponentsOutput,\n modifiedComponentOutput,\n snappedComponentsOutput,\n stagedComponentsOutput,\n autoTagPendingOutput,\n invalidComponentOutput,\n locallySoftRemovedOutput,\n remotelySoftRemovedOutput,\n individualFilesOutput,\n ]\n .filter((x) => x)\n .join(chalk.underline('\\n \\n') + chalk.white('\\n')) +\n troubleshootingStr;\n\n const results = (statusMsg || chalk.yellow(statusWorkspaceIsCleanMsg)) + laneStr;\n\n const exitCode = componentsWithIssues.length && strict ? 1 : 0;\n\n return {\n data: results,\n code: exitCode,\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAOA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA,MAAMA,mBAAmB,GAAI;AAC7B,sIADA;AAEA,MAAMC,uBAAuB,GAAI,GAAEC,gBAAA,CAAMC,MAAN,CAChC,yBAAwBC,6BAAiB,+BADT,CAEjC,EAFF;;AAIO,MAAMC,SAAN,CAAmC;EAcxCC,WAAW,CAASC,MAAT,EAA6B;IAAA,KAApBA,MAAoB,GAApBA,MAAoB;IAAA,8CAbjC,QAaiC;IAAA,qDAZ1B,kGAY0B;IAAA,+CAXhC,aAWgC;IAAA;IAAA,+CAThC,GASgC;IAAA,iDAR9B,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,mBAArF,GAA2G,EAF/E,EAG5BlE,IAH4B,CAGvB,IAHuB,CAA9B;IAKA,MAAMqE,OAAO,GAAGhG,QAAQ,GAAI,QAAOtC,gBAAA,CAAMuI,IAAN,CAAWjG,QAAX,CAAqB,OAAhC,GAAyC,EAAjE;IAEA,MAAMkG,kBAAkB,GAAGjG,uBAAuB,GAAI,KAAIxC,uBAAwB,EAAhC,GAAoC,EAAtF;IAEA,MAAM0I,SAAS,GACb5D,oBAAoB,GACpB,CACEe,WADF,EAEEO,eAFF,EAGEkC,qBAHF,EAIE9B,oBAJF,EAKEG,mBALF,EAMEE,uBANF,EAOEiB,uBAPF,EAQEF,sBARF,EASEb,oBATF,EAUEE,sBAVF,EAWEM,wBAXF,EAYEE,yBAZF,EAaEC,qBAbF,EAeGiB,MAfH,CAeWC,CAAD,IAAOA,CAfjB,EAgBG1E,IAhBH,CAgBQjE,gBAAA,CAAMsF,SAAN,CAAgB,+BAAhB,IAAmDtF,gBAAA,CAAMuF,KAAN,CAAY,IAAZ,CAhB3D,CADA,GAkBAiD,kBAnBF;IAqBA,MAAMI,OAAO,GAAG,CAACH,SAAS,IAAIzI,gBAAA,CAAMC,MAAN,CAAa4I,sCAAb,CAAd,IAAyDP,OAAzE;IAEA,MAAMQ,QAAQ,GAAGpI,oBAAoB,CAAC8D,MAArB,IAA+BpC,MAA/B,GAAwC,CAAxC,GAA4C,CAA7D;IAEA,OAAO;MACL2G,IAAI,EAAEH,OADD;MAELI,IAAI,EAAEF;IAFD,CAAP;EAID;;AA7RuC"}
|
|
1
|
+
{"version":3,"names":["TROUBLESHOOTING_MESSAGE","chalk","yellow","BASE_DOCS_DOMAIN","StatusCmd","constructor","status","json","newComponents","modifiedComponent","stagedComponents","componentsWithIssues","importPendingComponents","autoTagPendingComponents","invalidComponents","locallySoftRemoved","remotelySoftRemoved","outdatedComponents","mergePendingComponents","componentsDuringMergeState","softTaggedComponents","snappedComponents","pendingUpdatesFromMain","map","c","toStringWithoutVersion","modifiedComponents","toString","id","versions","issues","toObject","s","p","divergeData","report","_args","strict","verbose","laneName","showTroubleshootingLink","format","showIssues","message","localVersions","idWithIssues","find","isEqual","softTagged","softTaggedId","messageStatusText","messageStatusTextWithSoftTag","color","messageStatus","formatBitString","bitFormatted","join","snaps","tags","partition","version","isHash","tagsStr","length","snapsStr","red","statusFailureMsg","formatIssues","importPendingWarning","IMPORT_PENDING_MSG","splitByMissing","R","groupBy","component","includes","missing","nonMissing","outdatedTitle","underline","white","outdatedDesc","outdatedComps","cyan","latestVersion","outdatedStr","pendingMergeTitle","pendingMergeDesc","pendingMergeComps","snapsOnLocalOnly","snapsOnRemoteOnly","pendingMergeStr","compWithConflictsTitle","compWithConflictsDesc","compWithConflictsComps","compWithConflictsStr","newComponentDescription","newComponentsTitle","newComponentsOutput","modifiedDesc","modifiedComponentOutput","immutableUnshift","autoTagPendingOutput","invalidDesc","invalidComponentOutput","getInvalidComponentLabel","error","sort","statusInvalidComponentsMsg","locallySoftRemovedDesc","locallySoftRemovedOutput","remotelySoftRemovedDesc","remotelySoftRemovedOutput","stagedDesc","stagedComponentsOutput","undefined","snappedDesc","snappedComponentsOutput","getUpdateFromMainMsg","err","msg","commonSnapBeforeDiverge","toShortString","updatesFromMainDesc","pendingUpdatesFromMainIds","updatesFromMainOutput","laneStr","bold","troubleshootingStr","statusMsg","filter","x","results","statusWorkspaceIsCleanMsg","exitCode","data","code","outputForCLI"],"sources":["status-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport R from 'ramda';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { ComponentID } from '@teambit/component-id';\nimport { DivergeData } from '@teambit/legacy/dist/scope/component-ops/diverge-data';\nimport { immutableUnshift } from '@teambit/legacy/dist/utils';\nimport { IssuesList } from '@teambit/component-issues';\nimport { formatBitString } from '@teambit/legacy/dist/cli/chalk-box';\nimport { getInvalidComponentLabel } from '@teambit/legacy/dist/cli/templates/component-issues-template';\nimport {\n BASE_DOCS_DOMAIN,\n IMPORT_PENDING_MSG,\n statusFailureMsg,\n statusInvalidComponentsMsg,\n statusWorkspaceIsCleanMsg,\n} from '@teambit/legacy/dist/constants';\nimport { partition } from 'lodash';\nimport { isHash } from '@teambit/component-version';\nimport { StatusMain, StatusResult } from './status.main.runtime';\n\nconst TROUBLESHOOTING_MESSAGE = `${chalk.yellow(\n `learn more at https://${BASE_DOCS_DOMAIN}/components/adding-components`\n)}`;\n\nexport class StatusCmd implements Command {\n name = 'status';\n description = 'present the current status of components in the workspace, and notifies when issues are detected';\n group = 'development';\n extendedDescription: string;\n alias = 's';\n options = [\n ['j', 'json', 'return a json version of the component'],\n ['', 'verbose', 'show full snap hashes'],\n ['', 'strict', 'in case issues found, exit with code 1'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private status: StatusMain) {}\n\n async json() {\n const {\n newComponents,\n modifiedComponent,\n stagedComponents,\n componentsWithIssues,\n importPendingComponents,\n autoTagPendingComponents,\n invalidComponents,\n locallySoftRemoved,\n remotelySoftRemoved,\n outdatedComponents,\n mergePendingComponents,\n componentsDuringMergeState,\n softTaggedComponents,\n snappedComponents,\n pendingUpdatesFromMain,\n }: StatusResult = await this.status.status();\n return {\n newComponents: newComponents.map((c) => c.toStringWithoutVersion()),\n modifiedComponents: modifiedComponent.map((c) => c.toString()),\n stagedComponents: stagedComponents.map((c) => ({ id: c.id.toStringWithoutVersion(), versions: c.versions })),\n componentsWithIssues: componentsWithIssues.map((c) => ({\n id: c.id.toString(),\n issues: c.issues?.toObject(),\n })),\n importPendingComponents: importPendingComponents.map((id) => id.toString()),\n autoTagPendingComponents: autoTagPendingComponents.map((s) => s.toString()),\n invalidComponents,\n locallySoftRemoved: locallySoftRemoved.map((id) => id.toString()),\n remotelySoftRemoved: remotelySoftRemoved.map((id) => id.toString()),\n outdatedComponents: outdatedComponents.map((c) => c.id.toString()),\n mergePendingComponents: mergePendingComponents.map((c) => c.id.toString()),\n componentsDuringMergeState: componentsDuringMergeState.map((id) => id.toString()),\n softTaggedComponents: softTaggedComponents.map((s) => s.toString()),\n snappedComponents: snappedComponents.map((s) => s.toString()),\n pendingUpdatesFromMain: pendingUpdatesFromMain.map((p) => ({ id: p.id.toString(), divergeData: p.divergeData })),\n };\n }\n\n async report(_args, { strict, verbose }: { strict?: boolean; verbose?: boolean }) {\n const {\n newComponents,\n modifiedComponent,\n stagedComponents,\n componentsWithIssues,\n importPendingComponents,\n autoTagPendingComponents,\n invalidComponents,\n locallySoftRemoved,\n remotelySoftRemoved,\n outdatedComponents,\n mergePendingComponents,\n componentsDuringMergeState,\n softTaggedComponents,\n snappedComponents,\n pendingUpdatesFromMain,\n laneName,\n }: StatusResult = await this.status.status();\n // If there is problem with at least one component we want to show a link to the\n // troubleshooting doc\n let showTroubleshootingLink = false;\n\n function format(id: ComponentID, showIssues = false, message?: string, localVersions?: string[]): string {\n const idWithIssues = componentsWithIssues.find((c) => c.id.isEqual(id));\n const softTagged = softTaggedComponents.find((softTaggedId) => softTaggedId.isEqual(id));\n\n const messageStatusText = message || 'ok';\n const messageStatusTextWithSoftTag = softTagged ? `${messageStatusText} (soft-tagged)` : messageStatusText;\n const color = message ? 'yellow' : 'green';\n const messageStatus = chalk[color](messageStatusTextWithSoftTag);\n\n if (!showIssues) {\n return `${formatBitString(id.toStringWithoutVersion())} ... ${messageStatus}`;\n }\n let bitFormatted = `${formatBitString(id.toStringWithoutVersion())}`;\n if (localVersions) {\n if (verbose) {\n bitFormatted += `. versions: ${localVersions.join(', ')}`;\n } else {\n const [snaps, tags] = partition(localVersions, (version) => isHash(version));\n const tagsStr = tags.length ? `versions: ${tags.join(', ')}` : '';\n const snapsStr = snaps.length ? `${snaps.length} snap(s)` : '';\n bitFormatted += `. `;\n bitFormatted += tagsStr && snapsStr ? `${tagsStr}. and ${snapsStr}` : tagsStr || snapsStr;\n }\n }\n bitFormatted += ' ... ';\n if (!idWithIssues) return `${bitFormatted}${messageStatus}`;\n showTroubleshootingLink = true;\n return `${bitFormatted} ${chalk.red(statusFailureMsg)}${formatIssues(idWithIssues.issues)}`;\n }\n\n const importPendingWarning = importPendingComponents.length ? chalk.yellow(`${IMPORT_PENDING_MSG}.\\n`) : '';\n\n const splitByMissing = R.groupBy((component) => {\n return component.includes(statusFailureMsg) ? 'missing' : 'nonMissing';\n });\n const { missing, nonMissing } = splitByMissing(newComponents.map((c) => format(c, true)));\n\n const outdatedTitle = chalk.underline.white('pending updates');\n const outdatedDesc =\n '(use \"bit checkout head\" to merge changes)\\n(use \"bit diff [component_id] [new_version]\" to compare changes)\\n(use \"bit log [component_id]\" to list all available versions)\\n';\n const outdatedComps = outdatedComponents\n .map((component) => {\n return ` > ${chalk.cyan(component.id.toStringWithoutVersion())} current: ${component.id.version} latest: ${\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n component.latestVersion\n }\\n`;\n })\n .join('');\n\n const outdatedStr = outdatedComponents.length ? [outdatedTitle, outdatedDesc, outdatedComps].join('\\n') : '';\n\n const pendingMergeTitle = chalk.underline.white('pending merge');\n const pendingMergeDesc = `(use \"bit reset\" to add local changes on top of the remote and discard local tags.\nalternatively, to keep local tags/snaps history, use \"bit merge <remote-name>/<lane-name> [component-id]\")\\n`;\n const pendingMergeComps = mergePendingComponents\n .map((component) => {\n return ` > ${chalk.cyan(component.id.toString())} local and remote have diverged and have ${\n component.divergeData.snapsOnLocalOnly.length\n } and ${component.divergeData.snapsOnRemoteOnly.length} different snaps each, respectively\\n`;\n })\n .join('');\n\n const pendingMergeStr = pendingMergeComps.length\n ? [pendingMergeTitle, pendingMergeDesc, pendingMergeComps].join('\\n')\n : '';\n\n const compWithConflictsTitle = chalk.underline.white('components during merge state');\n const compWithConflictsDesc = `(use \"bit snap/tag [--unmerged]\" to complete the merge process\nor use \"bit merge [component-id] --abort\" to cancel the merge operation)\\n`;\n const compWithConflictsComps = componentsDuringMergeState\n .map((id) => {\n return ` > ${chalk.cyan(id.toString())}`;\n })\n .join('\\n');\n\n const compWithConflictsStr = compWithConflictsComps.length\n ? [compWithConflictsTitle, compWithConflictsDesc, compWithConflictsComps].join('\\n')\n : '';\n\n const newComponentDescription = '\\n(use \"bit tag [version]\" to lock a version with all your changes)\\n';\n const newComponentsTitle = newComponents.length\n ? chalk.underline.white('new components') + newComponentDescription\n : '';\n\n const newComponentsOutput = [newComponentsTitle, ...(nonMissing || []), ...(missing || [])].join('\\n');\n\n const modifiedDesc = '(use \"bit diff\" to compare changes)\\n';\n const modifiedComponentOutput = immutableUnshift(\n modifiedComponent.map((c) => format(c, true)),\n modifiedComponent.length\n ? chalk.underline.white('modified components') + newComponentDescription + modifiedDesc\n : ''\n ).join('\\n');\n\n const autoTagPendingOutput = immutableUnshift(\n autoTagPendingComponents.map((c) => format(c)),\n autoTagPendingComponents.length\n ? chalk.underline.white('components pending to be tagged automatically (when their dependencies are tagged)')\n : ''\n ).join('\\n');\n\n const invalidDesc = '\\nthese components were failed to load.\\n';\n const invalidComponentOutput = immutableUnshift(\n invalidComponents.map((c) => format(c.id, false, getInvalidComponentLabel(c.error))).sort(),\n invalidComponents.length ? chalk.underline.white(statusInvalidComponentsMsg) + invalidDesc : ''\n ).join('\\n');\n\n const locallySoftRemovedDesc = '\\n(tag/snap and export them to update the remote)\\n';\n const locallySoftRemovedOutput = immutableUnshift(\n locallySoftRemoved.map((c) => format(c)).sort(),\n locallySoftRemoved.length ? chalk.underline.white('soft-removed components locally') + locallySoftRemovedDesc : ''\n ).join('\\n');\n\n const remotelySoftRemovedDesc = '\\n(use \"bit remove\" to remove them from the workspace)\\n';\n const remotelySoftRemovedOutput = immutableUnshift(\n remotelySoftRemoved.map((c) => format(c)).sort(),\n remotelySoftRemoved.length\n ? chalk.underline.white('soft-removed components on the remote') + remotelySoftRemovedDesc\n : ''\n ).join('\\n');\n\n const stagedDesc = '\\n(use \"bit export\" to push these components to a remote scope)\\n';\n const stagedComponentsOutput = immutableUnshift(\n stagedComponents.map((c) => format(c.id, true, undefined, c.versions)),\n stagedComponents.length ? chalk.underline.white('staged components') + stagedDesc : ''\n ).join('\\n');\n\n const snappedDesc = '\\n(use \"bit tag [version]\" or \"bit tag --snapped [version]\" to lock a version)\\n';\n const snappedComponentsOutput = immutableUnshift(\n snappedComponents.map((c) => format(c)),\n snappedComponents.length ? chalk.underline.white('snapped components') + snappedDesc : ''\n ).join('\\n');\n\n const getUpdateFromMainMsg = (divergeData: DivergeData): string => {\n if (divergeData.err) return divergeData.err.message;\n let msg = `main is ahead by ${divergeData.snapsOnRemoteOnly.length || 0} snaps`;\n if (divergeData.snapsOnLocalOnly && verbose) {\n msg += ` (diverged since ${divergeData.commonSnapBeforeDiverge?.toShortString()})`;\n }\n return msg;\n };\n const updatesFromMainDesc = '\\n(EXPERIMENTAL. use \"bit lane merge main\" to merge the changes)\\n';\n const pendingUpdatesFromMainIds = pendingUpdatesFromMain.map((c) =>\n format(c.id, false, getUpdateFromMainMsg(c.divergeData))\n );\n const updatesFromMainOutput = immutableUnshift(\n pendingUpdatesFromMainIds,\n pendingUpdatesFromMain.length ? chalk.underline.white('pending updates from main') + updatesFromMainDesc : ''\n ).join('\\n');\n\n const laneStr = laneName ? `\\non ${chalk.bold(laneName)} lane` : '';\n\n const troubleshootingStr = showTroubleshootingLink ? `\\n${TROUBLESHOOTING_MESSAGE}` : '';\n\n const statusMsg =\n importPendingWarning +\n [\n outdatedStr,\n pendingMergeStr,\n updatesFromMainOutput,\n compWithConflictsStr,\n newComponentsOutput,\n modifiedComponentOutput,\n snappedComponentsOutput,\n stagedComponentsOutput,\n autoTagPendingOutput,\n invalidComponentOutput,\n locallySoftRemovedOutput,\n remotelySoftRemovedOutput,\n ]\n .filter((x) => x)\n .join(chalk.underline('\\n \\n') + chalk.white('\\n')) +\n troubleshootingStr;\n\n const results = (statusMsg || chalk.yellow(statusWorkspaceIsCleanMsg)) + laneStr;\n\n const exitCode = componentsWithIssues.length && strict ? 1 : 0;\n\n return {\n data: results,\n code: exitCode,\n };\n }\n}\n\nexport function formatIssues(issues: IssuesList) {\n return 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GAAyC,EAAjE;IAEA,MAAMwF,kBAAkB,GAAGvF,uBAAuB,GAAI,KAAIxC,uBAAwB,EAAhC,GAAoC,EAAtF;IAEA,MAAMgI,SAAS,GACb5D,oBAAoB,GACpB,CACEgB,WADF,EAEEM,eAFF,EAGEkC,qBAHF,EAIE9B,oBAJF,EAKEG,mBALF,EAMEE,uBANF,EAOEiB,uBAPF,EAQEH,sBARF,EASEZ,oBATF,EAUEE,sBAVF,EAWEM,wBAXF,EAYEE,yBAZF,EAcGkB,MAdH,CAcWC,CAAD,IAAOA,CAdjB,EAeG1E,IAfH,CAeQvD,gBAAA,CAAM6E,SAAN,CAAgB,+BAAhB,IAAmD7E,gBAAA,CAAM8E,KAAN,CAAY,IAAZ,CAf3D,CADA,GAiBAgD,kBAlBF;IAoBA,MAAMI,OAAO,GAAG,CAACH,SAAS,IAAI/H,gBAAA,CAAMC,MAAN,CAAakI,sCAAb,CAAd,IAAyDP,OAAzE;IAEA,MAAMQ,QAAQ,GAAG1H,oBAAoB,CAACoD,MAArB,IAA+B1B,MAA/B,GAAwC,CAAxC,GAA4C,CAA7D;IAEA,OAAO;MACLiG,IAAI,EAAEH,OADD;MAELI,IAAI,EAAEF;IAFD,CAAP;EAID;;AArQuC;;;;AAwQnC,SAASlE,YAAT,CAAsBrC,MAAtB,EAA0C;EAC/C,OAAQ,UAASA,MAAV,aAAUA,MAAV,uBAAUA,MAAM,CAAE0G,YAAR,EAAuB,IAAxC;AACD"}
|
|
@@ -1,29 +1,42 @@
|
|
|
1
1
|
import { CLIMain } from '@teambit/cli';
|
|
2
|
+
import { IssuesList } from '@teambit/component-issues';
|
|
2
3
|
import { Workspace } from '@teambit/workspace';
|
|
3
|
-
import {
|
|
4
|
+
import { ComponentID } from '@teambit/component-id';
|
|
4
5
|
import { RemoveMain } from '@teambit/remove';
|
|
5
|
-
import ConsumerComponent from '@teambit/legacy/dist/consumer/component';
|
|
6
|
-
import { DivergeDataPerId, DivergedComponent } from '@teambit/legacy/dist/consumer/component/components-list';
|
|
7
|
-
import { InvalidComponent } from '@teambit/legacy/dist/consumer/component/consumer-component';
|
|
8
|
-
import { ModelComponent } from '@teambit/legacy/dist/scope/models';
|
|
9
6
|
import { InsightsMain } from '@teambit/insights';
|
|
7
|
+
import { DivergeData } from '@teambit/legacy/dist/scope/component-ops/diverge-data';
|
|
10
8
|
import { IssuesMain } from '@teambit/issues';
|
|
9
|
+
declare type DivergeDataPerId = {
|
|
10
|
+
id: ComponentID;
|
|
11
|
+
divergeData: DivergeData;
|
|
12
|
+
};
|
|
11
13
|
export declare type StatusResult = {
|
|
12
|
-
newComponents:
|
|
13
|
-
modifiedComponent:
|
|
14
|
-
stagedComponents:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
newComponents: ComponentID[];
|
|
15
|
+
modifiedComponent: ComponentID[];
|
|
16
|
+
stagedComponents: {
|
|
17
|
+
id: ComponentID;
|
|
18
|
+
versions: string[];
|
|
19
|
+
}[];
|
|
20
|
+
componentsWithIssues: {
|
|
21
|
+
id: ComponentID;
|
|
22
|
+
issues: IssuesList;
|
|
23
|
+
}[];
|
|
24
|
+
importPendingComponents: ComponentID[];
|
|
25
|
+
autoTagPendingComponents: ComponentID[];
|
|
26
|
+
invalidComponents: {
|
|
27
|
+
id: ComponentID;
|
|
28
|
+
error: Error;
|
|
29
|
+
}[];
|
|
30
|
+
locallySoftRemoved: ComponentID[];
|
|
31
|
+
remotelySoftRemoved: ComponentID[];
|
|
32
|
+
outdatedComponents: {
|
|
33
|
+
id: ComponentID;
|
|
34
|
+
latestVersion: string;
|
|
35
|
+
}[];
|
|
36
|
+
mergePendingComponents: DivergeDataPerId[];
|
|
37
|
+
componentsDuringMergeState: ComponentID[];
|
|
38
|
+
softTaggedComponents: ComponentID[];
|
|
39
|
+
snappedComponents: ComponentID[];
|
|
27
40
|
pendingUpdatesFromMain: DivergeDataPerId[];
|
|
28
41
|
laneName: string | null;
|
|
29
42
|
};
|
|
@@ -46,3 +59,4 @@ export declare class StatusMain {
|
|
|
46
59
|
RemoveMain
|
|
47
60
|
]): Promise<StatusMain>;
|
|
48
61
|
}
|
|
62
|
+
export {};
|
|
@@ -4,6 +4,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
|
|
5
5
|
require("core-js/modules/es.array.iterator.js");
|
|
6
6
|
|
|
7
|
+
require("core-js/modules/es.array.sort.js");
|
|
8
|
+
|
|
7
9
|
require("core-js/modules/es.promise.js");
|
|
8
10
|
|
|
9
11
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -51,6 +53,16 @@ function _workspace() {
|
|
|
51
53
|
return data;
|
|
52
54
|
}
|
|
53
55
|
|
|
56
|
+
function _componentId() {
|
|
57
|
+
const data = require("@teambit/component-id");
|
|
58
|
+
|
|
59
|
+
_componentId = function () {
|
|
60
|
+
return data;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return data;
|
|
64
|
+
}
|
|
65
|
+
|
|
54
66
|
function _analytics() {
|
|
55
67
|
const data = require("@teambit/legacy/dist/analytics/analytics");
|
|
56
68
|
|
|
@@ -161,6 +173,10 @@ function _status() {
|
|
|
161
173
|
return data;
|
|
162
174
|
}
|
|
163
175
|
|
|
176
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
177
|
+
|
|
178
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2().default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
179
|
+
|
|
164
180
|
class StatusMain {
|
|
165
181
|
constructor(workspace, issues, insights, remove) {
|
|
166
182
|
this.workspace = workspace;
|
|
@@ -230,28 +246,53 @@ class StatusMain {
|
|
|
230
246
|
|
|
231
247
|
_analytics().Analytics.setExtraData('deleted', invalidComponents.length);
|
|
232
248
|
|
|
249
|
+
const convertBitIdToComponentIdsAndSort = async ids => _componentId().ComponentID.sortIds(await this.workspace.resolveMultipleComponentIds(ids));
|
|
250
|
+
|
|
251
|
+
const convertObjToComponentIdsAndSort = async objectsWithId => {
|
|
252
|
+
const results = await Promise.all(objectsWithId.map(async obj => {
|
|
253
|
+
return _objectSpread(_objectSpread({}, obj), {}, {
|
|
254
|
+
id: await this.workspace.resolveComponentId(obj.id)
|
|
255
|
+
});
|
|
256
|
+
}));
|
|
257
|
+
return results.sort((a, b) => a.id.toString().localeCompare(b.id.toString()));
|
|
258
|
+
};
|
|
259
|
+
|
|
233
260
|
await consumer.onDestroy();
|
|
234
261
|
return {
|
|
235
|
-
newComponents:
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
262
|
+
newComponents: await convertBitIdToComponentIdsAndSort(newComponents.map(c => c.id)),
|
|
263
|
+
modifiedComponent: await convertBitIdToComponentIdsAndSort(modifiedComponent.map(c => c.id)),
|
|
264
|
+
stagedComponents: await convertObjToComponentIdsAndSort(stagedComponents.map(c => ({
|
|
265
|
+
id: c.toBitId(),
|
|
266
|
+
versions: c.getLocalTagsOrHashes()
|
|
267
|
+
}))),
|
|
268
|
+
// @ts-ignore - not clear why, it fails the "bit build" without it
|
|
269
|
+
componentsWithIssues: await convertObjToComponentIdsAndSort(componentsWithIssues.map(c => ({
|
|
270
|
+
id: c.id,
|
|
271
|
+
issues: c.issues
|
|
272
|
+
}))),
|
|
240
273
|
// no need to sort, we don't print it as is
|
|
241
|
-
importPendingComponents,
|
|
274
|
+
importPendingComponents: await convertBitIdToComponentIdsAndSort(importPendingComponents),
|
|
242
275
|
// no need to sort, we use only its length
|
|
243
|
-
autoTagPendingComponents:
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
276
|
+
autoTagPendingComponents: await convertBitIdToComponentIdsAndSort(autoTagPendingComponentsIds),
|
|
277
|
+
invalidComponents: await convertObjToComponentIdsAndSort(invalidComponents.map(c => ({
|
|
278
|
+
id: c.id,
|
|
279
|
+
error: c.error
|
|
280
|
+
}))),
|
|
281
|
+
locallySoftRemoved: await convertBitIdToComponentIdsAndSort(locallySoftRemoved),
|
|
282
|
+
remotelySoftRemoved: await convertBitIdToComponentIdsAndSort(remotelySoftRemoved.map(c => c.id)),
|
|
283
|
+
outdatedComponents: await convertObjToComponentIdsAndSort(outdatedComponents.map(c => ({
|
|
284
|
+
id: c.id,
|
|
285
|
+
// @ts-ignore
|
|
286
|
+
latestVersion: c.latestVersion
|
|
287
|
+
}))),
|
|
288
|
+
mergePendingComponents: await convertObjToComponentIdsAndSort(mergePendingComponents.map(c => ({
|
|
289
|
+
id: c.id,
|
|
290
|
+
divergeData: c.diverge
|
|
291
|
+
}))),
|
|
292
|
+
componentsDuringMergeState: await convertBitIdToComponentIdsAndSort(componentsDuringMergeState),
|
|
293
|
+
softTaggedComponents: await convertBitIdToComponentIdsAndSort(softTaggedComponents),
|
|
294
|
+
snappedComponents: await convertBitIdToComponentIdsAndSort(snappedComponents),
|
|
295
|
+
pendingUpdatesFromMain: await convertObjToComponentIdsAndSort(pendingUpdatesFromMain),
|
|
255
296
|
laneName
|
|
256
297
|
};
|
|
257
298
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StatusMain","constructor","workspace","issues","insights","remove","status","ConsumerNotFound","loader","start","BEFORE_STATUS","consumer","laneObj","getCurrentLaneObject","componentsList","ComponentsList","loadOpts","loadDocs","loadCompositions","newComponents","listNewComponents","modifiedComponent","listModifiedComponents","stagedComponents","listExportPendingComponents","addRemovedStagedIfNeeded","autoTagPendingComponents","listAutoTagPendingComponents","autoTagPendingComponentsIds","map","component","id","allInvalidComponents","listInvalidComponents","locallySoftRemoved","listLocallySoftRemoved","remotelySoftRemoved","listRemotelySoftRemoved","importPendingComponents","filter","c","error","ComponentsPendingImport","i","invalidComponents","outdatedComponents","listOutdatedComponents","mergePendingComponents","listMergePendingComponents","newAndModifiedLegacy","concat","issuesToIgnore","getIssuesToIgnoreGlobally","length","newAndModified","getManyByLegacy","includes","IssuesClasses","CircularDependencies","name","addInsightsAsComponentIssues","removeIgnoredIssuesFromComponents","componentsWithIssues","isEmpty","componentsDuringMergeState","listDuringMergeStateComponents","softTaggedComponents","listSoftTaggedComponents","snappedComponents","listSnappedComponentsOnMain","toBitId","pendingUpdatesFromMain","listUpdatesFromMainPending","currentLane","getCurrentLaneId","laneName","isDefault","Analytics","setExtraData","onDestroy","sortComponentsByName","componentsWithIndividualFiles","listComponentsWithIndividualFiles","removedStagedIds","getRemovedStaged","removedStagedBitIds","_legacy","nonExistsInStaged","find","isEqualWithoutVersion","modelComps","Promise","all","scope","legacyScope","getModelComponent","push","provider","cli","statusMain","register","StatusCmd","CLIAspect","WorkspaceAspect","InsightsAspect","IssuesAspect","RemoveAspect","MainRuntime","StatusAspect","addRuntime"],"sources":["status.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport { Analytics } from '@teambit/legacy/dist/analytics/analytics';\nimport { BitId, BitIds } from '@teambit/legacy/dist/bit-id';\nimport loader from '@teambit/legacy/dist/cli/loader';\nimport { BEFORE_STATUS } from '@teambit/legacy/dist/cli/loader/loader-messages';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport ComponentsPendingImport from '@teambit/legacy/dist/consumer/component-ops/exceptions/components-pending-import';\nimport ComponentsList, {\n DivergeDataPerId,\n DivergedComponent,\n} from '@teambit/legacy/dist/consumer/component/components-list';\nimport { InvalidComponent } from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport { ModelComponent } from '@teambit/legacy/dist/scope/models';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport { InsightsAspect, InsightsMain } from '@teambit/insights';\nimport IssuesAspect, { IssuesMain } from '@teambit/issues';\nimport { StatusCmd } from './status-cmd';\nimport { StatusAspect } from './status.aspect';\n\nexport type StatusResult = {\n newComponents: ConsumerComponent[];\n modifiedComponent: ConsumerComponent[];\n stagedComponents: ModelComponent[];\n componentsWithIssues: ConsumerComponent[];\n importPendingComponents: BitId[];\n autoTagPendingComponents: BitId[];\n invalidComponents: InvalidComponent[];\n locallySoftRemoved: BitId[];\n remotelySoftRemoved: BitId[];\n outdatedComponents: ConsumerComponent[];\n mergePendingComponents: DivergedComponent[];\n componentsDuringMergeState: BitIds;\n componentsWithIndividualFiles: ConsumerComponent[];\n softTaggedComponents: BitId[];\n snappedComponents: BitId[];\n pendingUpdatesFromMain: DivergeDataPerId[];\n laneName: string | null; // null if default\n};\n\nexport class StatusMain {\n constructor(\n private workspace: Workspace,\n private issues: IssuesMain,\n private insights: InsightsMain,\n private remove: RemoveMain\n ) {}\n\n async status(): Promise<StatusResult> {\n if (!this.workspace) throw new ConsumerNotFound();\n loader.start(BEFORE_STATUS);\n const consumer = this.workspace.consumer;\n const laneObj = await consumer.getCurrentLaneObject();\n const componentsList = new ComponentsList(consumer);\n const loadOpts = {\n loadDocs: false,\n loadCompositions: false,\n };\n const newComponents: ConsumerComponent[] = (await componentsList.listNewComponents(\n true,\n loadOpts\n )) as ConsumerComponent[];\n const modifiedComponent = (await componentsList.listModifiedComponents(true, loadOpts)) as ConsumerComponent[];\n const stagedComponents: ModelComponent[] = await componentsList.listExportPendingComponents(laneObj);\n await this.addRemovedStagedIfNeeded(stagedComponents);\n\n const autoTagPendingComponents = await componentsList.listAutoTagPendingComponents();\n const autoTagPendingComponentsIds = autoTagPendingComponents.map((component) => component.id);\n const allInvalidComponents = await componentsList.listInvalidComponents();\n const locallySoftRemoved = await componentsList.listLocallySoftRemoved();\n const remotelySoftRemoved = await componentsList.listRemotelySoftRemoved();\n const importPendingComponents = allInvalidComponents\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n .filter((c) => c.error instanceof ComponentsPendingImport)\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n .map((i) => i.id);\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const invalidComponents = allInvalidComponents.filter((c) => !(c.error instanceof ComponentsPendingImport));\n const outdatedComponents = await componentsList.listOutdatedComponents();\n const mergePendingComponents = await componentsList.listMergePendingComponents();\n const newAndModifiedLegacy: ConsumerComponent[] = newComponents.concat(modifiedComponent);\n const issuesToIgnore = this.issues.getIssuesToIgnoreGlobally();\n if (newAndModifiedLegacy.length) {\n const newAndModified = await this.workspace.getManyByLegacy(newAndModifiedLegacy, loadOpts);\n if (!issuesToIgnore.includes(IssuesClasses.CircularDependencies.name)) {\n await this.insights.addInsightsAsComponentIssues(newAndModified);\n }\n this.issues.removeIgnoredIssuesFromComponents(newAndModified);\n }\n const componentsWithIssues = newAndModifiedLegacy.filter((component: ConsumerComponent) => {\n return component.issues && !component.issues.isEmpty();\n });\n const componentsDuringMergeState = componentsList.listDuringMergeStateComponents();\n const softTaggedComponents = componentsList.listSoftTaggedComponents();\n const snappedComponents = (await componentsList.listSnappedComponentsOnMain()).map((c) => c.toBitId());\n const pendingUpdatesFromMain = await componentsList.listUpdatesFromMainPending();\n const currentLane = consumer.getCurrentLaneId();\n const laneName = currentLane.isDefault() ? null : currentLane.name;\n Analytics.setExtraData('new_components', newComponents.length);\n Analytics.setExtraData('staged_components', stagedComponents.length);\n Analytics.setExtraData('num_components_with_missing_dependencies', componentsWithIssues.length);\n Analytics.setExtraData('autoTagPendingComponents', autoTagPendingComponents.length);\n Analytics.setExtraData('deleted', invalidComponents.length);\n await consumer.onDestroy();\n return {\n newComponents: ComponentsList.sortComponentsByName(newComponents),\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n modifiedComponent: ComponentsList.sortComponentsByName(modifiedComponent),\n stagedComponents: ComponentsList.sortComponentsByName(stagedComponents),\n componentsWithIssues, // no need to sort, we don't print it as is\n importPendingComponents, // no need to sort, we use only its length\n autoTagPendingComponents: ComponentsList.sortComponentsByName(autoTagPendingComponentsIds),\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n invalidComponents,\n locallySoftRemoved,\n remotelySoftRemoved: remotelySoftRemoved.map((c) => c.id),\n outdatedComponents,\n mergePendingComponents,\n componentsDuringMergeState,\n componentsWithIndividualFiles: await componentsList.listComponentsWithIndividualFiles(),\n softTaggedComponents,\n snappedComponents,\n pendingUpdatesFromMain,\n laneName,\n };\n }\n\n private async addRemovedStagedIfNeeded(stagedComponents: ModelComponent[]) {\n const removedStagedIds = await this.remove.getRemovedStaged();\n if (!removedStagedIds.length) return;\n const removedStagedBitIds = removedStagedIds.map((id) => id._legacy);\n const nonExistsInStaged = removedStagedBitIds.filter(\n (id) => !stagedComponents.find((c) => c.toBitId().isEqualWithoutVersion(id))\n );\n if (!nonExistsInStaged.length) return;\n const modelComps = await Promise.all(\n nonExistsInStaged.map((id) => this.workspace.scope.legacyScope.getModelComponent(id))\n );\n stagedComponents.push(...modelComps);\n }\n\n static slots = [];\n static dependencies = [CLIAspect, WorkspaceAspect, InsightsAspect, IssuesAspect, RemoveAspect];\n static runtime = MainRuntime;\n static async provider([cli, workspace, insights, issues, remove]: [\n CLIMain,\n Workspace,\n InsightsMain,\n IssuesMain,\n RemoveMain\n ]) {\n const statusMain = new StatusMain(workspace, issues, insights, remove);\n cli.register(new StatusCmd(statusMain));\n return statusMain;\n }\n}\n\nStatusAspect.addRuntime(StatusMain);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAMA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAsBO,MAAMA,UAAN,CAAiB;EACtBC,WAAW,CACDC,SADC,EAEDC,MAFC,EAGDC,QAHC,EAIDC,MAJC,EAKT;IAAA,KAJQH,SAIR,GAJQA,SAIR;IAAA,KAHQC,MAGR,GAHQA,MAGR;IAAA,KAFQC,QAER,GAFQA,QAER;IAAA,KADQC,MACR,GADQA,MACR;EAAE;;EAEQ,MAANC,MAAM,GAA0B;IACpC,IAAI,CAAC,KAAKJ,SAAV,EAAqB,MAAM,KAAIK,8BAAJ,GAAN;;IACrBC,iBAAA,CAAOC,KAAP,CAAaC,+BAAb;;IACA,MAAMC,QAAQ,GAAG,KAAKT,SAAL,CAAeS,QAAhC;IAC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B;IAC9B,MAAMgC,mBAAmB,GAAGF,gBAAgB,CAACtD,GAAjB,CAAsBE,EAAD,IAAQA,EAAE,CAACuD,OAAhC,CAA5B;IACA,MAAMC,iBAAiB,GAAGF,mBAAmB,CAAC9C,MAApB,CACvBR,EAAD,IAAQ,CAACR,gBAAgB,CAACiE,IAAjB,CAAuBhD,CAAD,IAAOA,CAAC,CAAC8B,OAAF,GAAYmB,qBAAZ,CAAkC1D,EAAlC,CAA7B,CADe,CAA1B;IAGA,IAAI,CAACwD,iBAAiB,CAAClC,MAAvB,EAA+B;IAC/B,MAAMqC,UAAU,GAAG,MAAMC,OAAO,CAACC,GAAR,CACvBL,iBAAiB,CAAC1D,GAAlB,CAAuBE,EAAD,IAAQ,KAAK7B,SAAL,CAAe2F,KAAf,CAAqBC,WAArB,CAAiCC,iBAAjC,CAAmDhE,EAAnD,CAA9B,CADuB,CAAzB;IAGAR,gBAAgB,CAACyE,IAAjB,CAAsB,GAAGN,UAAzB;EACD;;EAKoB,aAARO,QAAQ,CAAC,CAACC,GAAD,EAAMhG,SAAN,EAAiBE,QAAjB,EAA2BD,MAA3B,EAAmCE,MAAnC,CAAD,EAMlB;IACD,MAAM8F,UAAU,GAAG,IAAInG,UAAJ,CAAeE,SAAf,EAA0BC,MAA1B,EAAkCC,QAAlC,EAA4CC,MAA5C,CAAnB;IACA6F,GAAG,CAACE,QAAJ,CAAa,KAAIC,sBAAJ,EAAcF,UAAd,CAAb;IACA,OAAOA,UAAP;EACD;;AAlHqB;;;gCAAXnG,U,WAqGI,E;gCArGJA,U,kBAsGW,CAACsG,gBAAD,EAAYC,oBAAZ,EAA6BC,0BAA7B,EAA6CC,iBAA7C,EAA2DC,sBAA3D,C;gCAtGX1G,U,aAuGM2G,kB;;AAcnBC,sBAAA,CAAaC,UAAb,CAAwB7G,UAAxB"}
|
|
1
|
+
{"version":3,"names":["StatusMain","constructor","workspace","issues","insights","remove","status","ConsumerNotFound","loader","start","BEFORE_STATUS","consumer","laneObj","getCurrentLaneObject","componentsList","ComponentsList","loadOpts","loadDocs","loadCompositions","newComponents","listNewComponents","modifiedComponent","listModifiedComponents","stagedComponents","listExportPendingComponents","addRemovedStagedIfNeeded","autoTagPendingComponents","listAutoTagPendingComponents","autoTagPendingComponentsIds","map","component","id","allInvalidComponents","listInvalidComponents","locallySoftRemoved","listLocallySoftRemoved","remotelySoftRemoved","listRemotelySoftRemoved","importPendingComponents","filter","c","error","ComponentsPendingImport","i","invalidComponents","outdatedComponents","listOutdatedComponents","mergePendingComponents","listMergePendingComponents","newAndModifiedLegacy","concat","issuesToIgnore","getIssuesToIgnoreGlobally","length","newAndModified","getManyByLegacy","includes","IssuesClasses","CircularDependencies","name","addInsightsAsComponentIssues","removeIgnoredIssuesFromComponents","componentsWithIssues","isEmpty","componentsDuringMergeState","listDuringMergeStateComponents","softTaggedComponents","listSoftTaggedComponents","snappedComponents","listSnappedComponentsOnMain","toBitId","pendingUpdatesFromMain","listUpdatesFromMainPending","currentLane","getCurrentLaneId","laneName","isDefault","Analytics","setExtraData","convertBitIdToComponentIdsAndSort","ids","ComponentID","sortIds","resolveMultipleComponentIds","convertObjToComponentIdsAndSort","objectsWithId","results","Promise","all","obj","resolveComponentId","sort","a","b","toString","localeCompare","onDestroy","versions","getLocalTagsOrHashes","latestVersion","divergeData","diverge","removedStagedIds","getRemovedStaged","removedStagedBitIds","_legacy","nonExistsInStaged","find","isEqualWithoutVersion","modelComps","scope","legacyScope","getModelComponent","push","provider","cli","statusMain","register","StatusCmd","CLIAspect","WorkspaceAspect","InsightsAspect","IssuesAspect","RemoveAspect","MainRuntime","StatusAspect","addRuntime"],"sources":["status.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { IssuesClasses, IssuesList } from '@teambit/component-issues';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport { ComponentID } from '@teambit/component-id';\nimport { Analytics } from '@teambit/legacy/dist/analytics/analytics';\nimport loader from '@teambit/legacy/dist/cli/loader';\nimport { BEFORE_STATUS } from '@teambit/legacy/dist/cli/loader/loader-messages';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport ComponentsPendingImport from '@teambit/legacy/dist/consumer/component-ops/exceptions/components-pending-import';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport ComponentsList from '@teambit/legacy/dist/consumer/component/components-list';\nimport { ModelComponent } from '@teambit/legacy/dist/scope/models';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport { InsightsAspect, InsightsMain } from '@teambit/insights';\nimport { DivergeData } from '@teambit/legacy/dist/scope/component-ops/diverge-data';\nimport IssuesAspect, { IssuesMain } from '@teambit/issues';\nimport { StatusCmd } from './status-cmd';\nimport { StatusAspect } from './status.aspect';\n\ntype DivergeDataPerId = { id: ComponentID; divergeData: DivergeData };\n\nexport type StatusResult = {\n newComponents: ComponentID[];\n modifiedComponent: ComponentID[];\n stagedComponents: { id: ComponentID; versions: string[] }[];\n componentsWithIssues: { id: ComponentID; issues: IssuesList }[];\n importPendingComponents: ComponentID[];\n autoTagPendingComponents: ComponentID[];\n invalidComponents: { id: ComponentID; error: Error }[];\n locallySoftRemoved: ComponentID[];\n remotelySoftRemoved: ComponentID[];\n outdatedComponents: { id: ComponentID; latestVersion: string }[];\n mergePendingComponents: DivergeDataPerId[];\n componentsDuringMergeState: ComponentID[];\n softTaggedComponents: ComponentID[];\n snappedComponents: ComponentID[];\n pendingUpdatesFromMain: DivergeDataPerId[];\n laneName: string | null; // null if default\n};\n\nexport class StatusMain {\n constructor(\n private workspace: Workspace,\n private issues: IssuesMain,\n private insights: InsightsMain,\n private remove: RemoveMain\n ) {}\n\n async status(): Promise<StatusResult> {\n if (!this.workspace) throw new ConsumerNotFound();\n loader.start(BEFORE_STATUS);\n const consumer = this.workspace.consumer;\n const laneObj = await consumer.getCurrentLaneObject();\n const componentsList = new ComponentsList(consumer);\n const loadOpts = {\n loadDocs: false,\n loadCompositions: false,\n };\n const newComponents: ConsumerComponent[] = (await componentsList.listNewComponents(\n true,\n loadOpts\n )) as ConsumerComponent[];\n const modifiedComponent = (await componentsList.listModifiedComponents(true, loadOpts)) as ConsumerComponent[];\n const stagedComponents: ModelComponent[] = await componentsList.listExportPendingComponents(laneObj);\n await this.addRemovedStagedIfNeeded(stagedComponents);\n\n const autoTagPendingComponents = await componentsList.listAutoTagPendingComponents();\n const autoTagPendingComponentsIds = autoTagPendingComponents.map((component) => component.id);\n const allInvalidComponents = await componentsList.listInvalidComponents();\n const locallySoftRemoved = await componentsList.listLocallySoftRemoved();\n const remotelySoftRemoved = await componentsList.listRemotelySoftRemoved();\n const importPendingComponents = allInvalidComponents\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n .filter((c) => c.error instanceof ComponentsPendingImport)\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n .map((i) => i.id);\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const invalidComponents = allInvalidComponents.filter((c) => !(c.error instanceof ComponentsPendingImport));\n const outdatedComponents = await componentsList.listOutdatedComponents();\n const mergePendingComponents = await componentsList.listMergePendingComponents();\n const newAndModifiedLegacy: ConsumerComponent[] = newComponents.concat(modifiedComponent);\n const issuesToIgnore = this.issues.getIssuesToIgnoreGlobally();\n if (newAndModifiedLegacy.length) {\n const newAndModified = await this.workspace.getManyByLegacy(newAndModifiedLegacy, loadOpts);\n if (!issuesToIgnore.includes(IssuesClasses.CircularDependencies.name)) {\n await this.insights.addInsightsAsComponentIssues(newAndModified);\n }\n this.issues.removeIgnoredIssuesFromComponents(newAndModified);\n }\n const componentsWithIssues = newAndModifiedLegacy.filter((component: ConsumerComponent) => {\n return component.issues && !component.issues.isEmpty();\n });\n const componentsDuringMergeState = componentsList.listDuringMergeStateComponents();\n const softTaggedComponents = componentsList.listSoftTaggedComponents();\n const snappedComponents = (await componentsList.listSnappedComponentsOnMain()).map((c) => c.toBitId());\n const pendingUpdatesFromMain = await componentsList.listUpdatesFromMainPending();\n const currentLane = consumer.getCurrentLaneId();\n const laneName = currentLane.isDefault() ? null : currentLane.name;\n Analytics.setExtraData('new_components', newComponents.length);\n Analytics.setExtraData('staged_components', stagedComponents.length);\n Analytics.setExtraData('num_components_with_missing_dependencies', componentsWithIssues.length);\n Analytics.setExtraData('autoTagPendingComponents', autoTagPendingComponents.length);\n Analytics.setExtraData('deleted', invalidComponents.length);\n\n const convertBitIdToComponentIdsAndSort = async (ids: BitId[]) =>\n ComponentID.sortIds(await this.workspace.resolveMultipleComponentIds(ids));\n\n const convertObjToComponentIdsAndSort = async <T>(\n objectsWithId: Array<T & { id: BitId }>\n ): Promise<Array<T & { id: ComponentID }>> => {\n const results = await Promise.all(\n objectsWithId.map(async (obj) => {\n return {\n ...obj,\n id: await this.workspace.resolveComponentId(obj.id),\n };\n })\n );\n return results.sort((a, b) => a.id.toString().localeCompare(b.id.toString()));\n };\n\n await consumer.onDestroy();\n return {\n newComponents: await convertBitIdToComponentIdsAndSort(newComponents.map((c) => c.id)),\n modifiedComponent: await convertBitIdToComponentIdsAndSort(modifiedComponent.map((c) => c.id)),\n stagedComponents: await convertObjToComponentIdsAndSort(\n stagedComponents.map((c) => ({\n id: c.toBitId(),\n versions: c.getLocalTagsOrHashes(),\n }))\n ),\n // @ts-ignore - not clear why, it fails the \"bit build\" without it\n componentsWithIssues: await convertObjToComponentIdsAndSort(\n componentsWithIssues.map((c) => ({ id: c.id, issues: c.issues }))\n ), // no need to sort, we don't print it as is\n importPendingComponents: await convertBitIdToComponentIdsAndSort(importPendingComponents), // no need to sort, we use only its length\n autoTagPendingComponents: await convertBitIdToComponentIdsAndSort(autoTagPendingComponentsIds),\n invalidComponents: await convertObjToComponentIdsAndSort(\n invalidComponents.map((c) => ({ id: c.id, error: c.error }))\n ),\n locallySoftRemoved: await convertBitIdToComponentIdsAndSort(locallySoftRemoved),\n remotelySoftRemoved: await convertBitIdToComponentIdsAndSort(remotelySoftRemoved.map((c) => c.id)),\n outdatedComponents: await convertObjToComponentIdsAndSort(\n outdatedComponents.map((c) => ({\n id: c.id, // @ts-ignore\n latestVersion: c.latestVersion,\n }))\n ),\n mergePendingComponents: await convertObjToComponentIdsAndSort(\n mergePendingComponents.map((c) => ({ id: c.id, divergeData: c.diverge }))\n ),\n componentsDuringMergeState: await convertBitIdToComponentIdsAndSort(componentsDuringMergeState),\n softTaggedComponents: await convertBitIdToComponentIdsAndSort(softTaggedComponents),\n snappedComponents: await convertBitIdToComponentIdsAndSort(snappedComponents),\n pendingUpdatesFromMain: await convertObjToComponentIdsAndSort(pendingUpdatesFromMain),\n laneName,\n };\n }\n\n private async addRemovedStagedIfNeeded(stagedComponents: ModelComponent[]) {\n const removedStagedIds = await this.remove.getRemovedStaged();\n if (!removedStagedIds.length) return;\n const removedStagedBitIds = removedStagedIds.map((id) => id._legacy);\n const nonExistsInStaged = removedStagedBitIds.filter(\n (id) => !stagedComponents.find((c) => c.toBitId().isEqualWithoutVersion(id))\n );\n if (!nonExistsInStaged.length) return;\n const modelComps = await Promise.all(\n nonExistsInStaged.map((id) => this.workspace.scope.legacyScope.getModelComponent(id))\n );\n stagedComponents.push(...modelComps);\n }\n\n static slots = [];\n static dependencies = [CLIAspect, WorkspaceAspect, InsightsAspect, IssuesAspect, RemoveAspect];\n static runtime = MainRuntime;\n static async provider([cli, workspace, insights, issues, remove]: [\n CLIMain,\n Workspace,\n InsightsMain,\n IssuesMain,\n RemoveMain\n ]) {\n const statusMain = new StatusMain(workspace, issues, insights, remove);\n cli.register(new StatusCmd(statusMain));\n return statusMain;\n }\n}\n\nStatusAspect.addRuntime(StatusMain);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;E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AAa,KAAIC,sBAAJ,EAAcF,UAAd,CAAb;IACA,OAAOA,UAAP;EACD;;AAlJqB;;;gCAAXpH,U,WAqII,E;gCArIJA,U,kBAsIW,CAACuH,gBAAD,EAAYC,oBAAZ,EAA6BC,0BAA7B,EAA6CC,iBAA7C,EAA2DC,sBAA3D,C;gCAtIX3H,U,aAuIM4H,kB;;AAcnBC,sBAAA,CAAaC,UAAb,CAAwB9H,UAAxB"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/status",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.190",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/component/status",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "status",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.190"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -16,13 +16,14 @@
|
|
|
16
16
|
"core-js": "^3.0.0",
|
|
17
17
|
"@teambit/component-version": "0.0.395",
|
|
18
18
|
"@teambit/harmony": "0.3.3",
|
|
19
|
-
"@teambit/cli": "0.0.
|
|
20
|
-
"@teambit/
|
|
19
|
+
"@teambit/cli": "0.0.588",
|
|
20
|
+
"@teambit/component-id": "0.0.418",
|
|
21
21
|
"@teambit/component-issues": "0.0.72",
|
|
22
|
-
"@teambit/insights": "0.0.
|
|
23
|
-
"@teambit/issues": "0.0.
|
|
24
|
-
"@teambit/
|
|
25
|
-
"@teambit/
|
|
22
|
+
"@teambit/insights": "0.0.878",
|
|
23
|
+
"@teambit/issues": "0.0.186",
|
|
24
|
+
"@teambit/legacy-bit-id": "0.0.414",
|
|
25
|
+
"@teambit/remove": "0.0.55",
|
|
26
|
+
"@teambit/workspace": "0.0.878"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"@types/lodash": "4.14.165",
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
"@types/node": "12.20.4"
|
|
35
36
|
},
|
|
36
37
|
"peerDependencies": {
|
|
37
|
-
"@teambit/legacy": "1.0.
|
|
38
|
+
"@teambit/legacy": "1.0.369",
|
|
38
39
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
39
40
|
"react": "^16.8.0 || ^17.0.0"
|
|
40
41
|
},
|
|
File without changes
|
|
Binary file
|