@teambit/status 0.0.192 → 0.0.194

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 CHANGED
@@ -10,19 +10,14 @@ Object.defineProperty(exports, "StatusAspect", {
10
10
  }
11
11
  });
12
12
  exports.default = void 0;
13
-
14
13
  function _status() {
15
14
  const data = require("./status.aspect");
16
-
17
15
  _status = function () {
18
16
  return data;
19
17
  };
20
-
21
18
  return data;
22
19
  }
23
-
24
20
  var _default = _status().StatusAspect;
25
-
26
21
  exports.default = _default;
27
22
 
28
23
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["StatusAspect"],"sources":["index.ts"],"sourcesContent":["import { StatusAspect } from './status.aspect';\n\nexport type { StatusMain } from './status.main.runtime';\nexport default StatusAspect;\nexport { StatusAspect };\n"],"mappings":";;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;eAGeA,sB"}
1
+ {"version":3,"names":["StatusAspect"],"sources":["index.ts"],"sourcesContent":["import { StatusAspect } from './status.aspect';\n\nexport type { StatusMain } from './status.main.runtime';\nexport default StatusAspect;\nexport { StatusAspect };\n"],"mappings":";;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA+C,eAGhCA,sBAAY;AAAA"}
@@ -46,6 +46,12 @@ export declare class StatusCmd implements Command {
46
46
  id: string;
47
47
  divergeData: DivergeData;
48
48
  }[];
49
+ updatesFromForked: {
50
+ id: string;
51
+ divergeData: DivergeData;
52
+ }[];
53
+ currentLaneId: import("@teambit/lane-id").LaneId;
54
+ forkedLaneId: import("@teambit/lane-id").LaneId | undefined;
49
55
  }>;
50
56
  report(_args: any, { strict, verbose }: {
51
57
  strict?: boolean;
@@ -1,111 +1,78 @@
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.array.sort.js");
8
-
9
6
  require("core-js/modules/es.promise.js");
10
-
11
7
  Object.defineProperty(exports, "__esModule", {
12
8
  value: true
13
9
  });
14
10
  exports.StatusCmd = void 0;
15
11
  exports.formatIssues = formatIssues;
16
-
17
12
  function _defineProperty2() {
18
13
  const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
19
-
20
14
  _defineProperty2 = function () {
21
15
  return data;
22
16
  };
23
-
24
17
  return data;
25
18
  }
26
-
27
19
  function _chalk() {
28
20
  const data = _interopRequireDefault(require("chalk"));
29
-
30
21
  _chalk = function () {
31
22
  return data;
32
23
  };
33
-
34
24
  return data;
35
25
  }
36
-
37
26
  function _ramda() {
38
27
  const data = _interopRequireDefault(require("ramda"));
39
-
40
28
  _ramda = function () {
41
29
  return data;
42
30
  };
43
-
44
31
  return data;
45
32
  }
46
-
47
33
  function _utils() {
48
34
  const data = require("@teambit/legacy/dist/utils");
49
-
50
35
  _utils = function () {
51
36
  return data;
52
37
  };
53
-
54
38
  return data;
55
39
  }
56
-
57
40
  function _chalkBox() {
58
41
  const data = require("@teambit/legacy/dist/cli/chalk-box");
59
-
60
42
  _chalkBox = function () {
61
43
  return data;
62
44
  };
63
-
64
45
  return data;
65
46
  }
66
-
67
47
  function _componentIssuesTemplate() {
68
48
  const data = require("@teambit/legacy/dist/cli/templates/component-issues-template");
69
-
70
49
  _componentIssuesTemplate = function () {
71
50
  return data;
72
51
  };
73
-
74
52
  return data;
75
53
  }
76
-
77
54
  function _constants() {
78
55
  const data = require("@teambit/legacy/dist/constants");
79
-
80
56
  _constants = function () {
81
57
  return data;
82
58
  };
83
-
84
59
  return data;
85
60
  }
86
-
87
61
  function _lodash() {
88
62
  const data = require("lodash");
89
-
90
63
  _lodash = function () {
91
64
  return data;
92
65
  };
93
-
94
66
  return data;
95
67
  }
96
-
97
68
  function _componentVersion() {
98
69
  const data = require("@teambit/component-version");
99
-
100
70
  _componentVersion = function () {
101
71
  return data;
102
72
  };
103
-
104
73
  return data;
105
74
  }
106
-
107
75
  const TROUBLESHOOTING_MESSAGE = `${_chalk().default.yellow(`learn more at https://${_constants().BASE_DOCS_DOMAIN}/components/adding-components`)}`;
108
-
109
76
  class StatusCmd {
110
77
  constructor(status) {
111
78
  this.status = status;
@@ -114,15 +81,14 @@ class StatusCmd {
114
81
  (0, _defineProperty2().default)(this, "group", 'development');
115
82
  (0, _defineProperty2().default)(this, "extendedDescription", void 0);
116
83
  (0, _defineProperty2().default)(this, "alias", 's');
117
- (0, _defineProperty2().default)(this, "options", [['j', 'json', 'return a json version of the component'], ['', 'verbose', 'show full snap hashes'], ['', 'strict', 'in case issues found, exit with code 1']]);
84
+ (0, _defineProperty2().default)(this, "options", [['j', 'json', 'return a json version of the component'], ['', 'verbose', 'show extra data: full snap hashes for staged, divergence point for lanes and updates-from-main for forked lanes'], ['', 'strict', 'in case issues found, exit with code 1']]);
118
85
  (0, _defineProperty2().default)(this, "loader", true);
119
86
  (0, _defineProperty2().default)(this, "migration", true);
120
87
  }
121
-
122
88
  async json() {
123
89
  const {
124
90
  newComponents,
125
- modifiedComponent,
91
+ modifiedComponents,
126
92
  stagedComponents,
127
93
  componentsWithIssues,
128
94
  importPendingComponents,
@@ -135,18 +101,20 @@ class StatusCmd {
135
101
  componentsDuringMergeState,
136
102
  softTaggedComponents,
137
103
  snappedComponents,
138
- pendingUpdatesFromMain
104
+ pendingUpdatesFromMain,
105
+ updatesFromForked,
106
+ currentLaneId,
107
+ forkedLaneId
139
108
  } = await this.status.status();
140
109
  return {
141
110
  newComponents: newComponents.map(c => c.toStringWithoutVersion()),
142
- modifiedComponents: modifiedComponent.map(c => c.toString()),
111
+ modifiedComponents: modifiedComponents.map(c => c.toString()),
143
112
  stagedComponents: stagedComponents.map(c => ({
144
113
  id: c.id.toStringWithoutVersion(),
145
114
  versions: c.versions
146
115
  })),
147
116
  componentsWithIssues: componentsWithIssues.map(c => {
148
117
  var _c$issues;
149
-
150
118
  return {
151
119
  id: c.id.toString(),
152
120
  issues: (_c$issues = c.issues) === null || _c$issues === void 0 ? void 0 : _c$issues.toObject()
@@ -165,17 +133,22 @@ class StatusCmd {
165
133
  pendingUpdatesFromMain: pendingUpdatesFromMain.map(p => ({
166
134
  id: p.id.toString(),
167
135
  divergeData: p.divergeData
168
- }))
136
+ })),
137
+ updatesFromForked: updatesFromForked.map(p => ({
138
+ id: p.id.toString(),
139
+ divergeData: p.divergeData
140
+ })),
141
+ currentLaneId,
142
+ forkedLaneId
169
143
  };
170
144
  }
171
-
172
145
  async report(_args, {
173
146
  strict,
174
147
  verbose
175
148
  }) {
176
149
  const {
177
150
  newComponents,
178
- modifiedComponent,
151
+ modifiedComponents,
179
152
  stagedComponents,
180
153
  componentsWithIssues,
181
154
  importPendingComponents,
@@ -189,27 +162,24 @@ class StatusCmd {
189
162
  softTaggedComponents,
190
163
  snappedComponents,
191
164
  pendingUpdatesFromMain,
192
- laneName
193
- } = await this.status.status(); // If there is problem with at least one component we want to show a link to the
165
+ updatesFromForked,
166
+ currentLaneId,
167
+ forkedLaneId
168
+ } = await this.status.status();
169
+ // If there is problem with at least one component we want to show a link to the
194
170
  // troubleshooting doc
195
-
196
171
  let showTroubleshootingLink = false;
197
-
198
172
  function format(id, showIssues = false, message, localVersions) {
199
173
  const idWithIssues = componentsWithIssues.find(c => c.id.isEqual(id));
200
174
  const softTagged = softTaggedComponents.find(softTaggedId => softTaggedId.isEqual(id));
201
175
  const messageStatusText = message || 'ok';
202
176
  const messageStatusTextWithSoftTag = softTagged ? `${messageStatusText} (soft-tagged)` : messageStatusText;
203
177
  const color = message ? 'yellow' : 'green';
204
-
205
178
  const messageStatus = _chalk().default[color](messageStatusTextWithSoftTag);
206
-
207
179
  if (!showIssues) {
208
180
  return `${(0, _chalkBox().formatBitString)(id.toStringWithoutVersion())} ... ${messageStatus}`;
209
181
  }
210
-
211
182
  let bitFormatted = `${(0, _chalkBox().formatBitString)(id.toStringWithoutVersion())}`;
212
-
213
183
  if (localVersions) {
214
184
  if (verbose) {
215
185
  bitFormatted += `. versions: ${localVersions.join(', ')}`;
@@ -221,44 +191,35 @@ class StatusCmd {
221
191
  bitFormatted += tagsStr && snapsStr ? `${tagsStr}. and ${snapsStr}` : tagsStr || snapsStr;
222
192
  }
223
193
  }
224
-
225
194
  bitFormatted += ' ... ';
226
195
  if (!idWithIssues) return `${bitFormatted}${messageStatus}`;
227
196
  showTroubleshootingLink = true;
228
197
  return `${bitFormatted} ${_chalk().default.red(_constants().statusFailureMsg)}${formatIssues(idWithIssues.issues)}`;
229
198
  }
230
-
231
199
  const importPendingWarning = importPendingComponents.length ? _chalk().default.yellow(`${_constants().IMPORT_PENDING_MSG}.\n`) : '';
232
-
233
200
  const splitByMissing = _ramda().default.groupBy(component => {
234
201
  return component.includes(_constants().statusFailureMsg) ? 'missing' : 'nonMissing';
235
202
  });
236
-
237
203
  const {
238
204
  missing,
239
205
  nonMissing
240
206
  } = splitByMissing(newComponents.map(c => format(c, true)));
241
-
242
207
  const outdatedTitle = _chalk().default.underline.white('pending updates');
243
-
244
208
  const outdatedDesc = '(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';
245
209
  const outdatedComps = outdatedComponents.map(component => {
246
- return ` > ${_chalk().default.cyan(component.id.toStringWithoutVersion())} current: ${component.id.version} latest: ${// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
210
+ return ` > ${_chalk().default.cyan(component.id.toStringWithoutVersion())} current: ${component.id.version} latest: ${
211
+ // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
247
212
  component.latestVersion}\n`;
248
213
  }).join('');
249
214
  const outdatedStr = outdatedComponents.length ? [outdatedTitle, outdatedDesc, outdatedComps].join('\n') : '';
250
-
251
215
  const pendingMergeTitle = _chalk().default.underline.white('pending merge');
252
-
253
216
  const pendingMergeDesc = `(use "bit reset" to add local changes on top of the remote and discard local tags.
254
217
  alternatively, to keep local tags/snaps history, use "bit merge <remote-name>/<lane-name> [component-id]")\n`;
255
218
  const pendingMergeComps = mergePendingComponents.map(component => {
256
219
  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`;
257
220
  }).join('');
258
221
  const pendingMergeStr = pendingMergeComps.length ? [pendingMergeTitle, pendingMergeDesc, pendingMergeComps].join('\n') : '';
259
-
260
222
  const compDuringMergeTitle = _chalk().default.underline.white('components during merge state');
261
-
262
223
  const compDuringMergeDesc = `(use "bit snap/tag [--unmerged]" to complete the merge process
263
224
  or use "bit merge [component-id] --abort" to cancel the merge operation)\n`;
264
225
  const compDuringMergeComps = componentsDuringMergeState.map(id => {
@@ -269,7 +230,7 @@ or use "bit merge [component-id] --abort" to cancel the merge operation)\n`;
269
230
  const newComponentsTitle = newComponents.length ? _chalk().default.underline.white('new components') + newComponentDescription : '';
270
231
  const newComponentsOutput = [newComponentsTitle, ...(nonMissing || []), ...(missing || [])].join('\n');
271
232
  const modifiedDesc = '(use "bit diff" to compare changes)\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');
233
+ const modifiedComponentOutput = (0, _utils().immutableUnshift)(modifiedComponents.map(c => format(c, true)), modifiedComponents.length ? _chalk().default.underline.white('modified components') + newComponentDescription + modifiedDesc : '').join('\n');
273
234
  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');
274
235
  const invalidDesc = '\nthese components were failed to load.\n';
275
236
  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');
@@ -281,26 +242,31 @@ or use "bit merge [component-id] --abort" to cancel the merge operation)\n`;
281
242
  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');
282
243
  const snappedDesc = '\n(use "bit tag [version]" or "bit tag --snapped [version]" to lock a version)\n';
283
244
  const snappedComponentsOutput = (0, _utils().immutableUnshift)(snappedComponents.map(c => format(c)), snappedComponents.length ? _chalk().default.underline.white('snapped components') + snappedDesc : '').join('\n');
284
-
285
- const getUpdateFromMainMsg = divergeData => {
245
+ const getUpdateFromMsg = (divergeData, from = 'main') => {
286
246
  if (divergeData.err) return divergeData.err.message;
287
- let msg = `main is ahead by ${divergeData.snapsOnRemoteOnly.length || 0} snaps`;
288
-
247
+ let msg = `${from} is ahead by ${divergeData.snapsOnRemoteOnly.length || 0} snaps`;
289
248
  if (divergeData.snapsOnLocalOnly && verbose) {
290
249
  var _divergeData$commonSn;
291
-
292
250
  msg += ` (diverged since ${(_divergeData$commonSn = divergeData.commonSnapBeforeDiverge) === null || _divergeData$commonSn === void 0 ? void 0 : _divergeData$commonSn.toShortString()})`;
293
251
  }
294
-
295
252
  return msg;
296
253
  };
297
-
298
- const updatesFromMainDesc = '\n(EXPERIMENTAL. use "bit lane merge main" to merge the changes)\n';
299
- const pendingUpdatesFromMainIds = pendingUpdatesFromMain.map(c => format(c.id, false, getUpdateFromMainMsg(c.divergeData)));
300
- const updatesFromMainOutput = (0, _utils().immutableUnshift)(pendingUpdatesFromMainIds, pendingUpdatesFromMain.length ? _chalk().default.underline.white('pending updates from main') + updatesFromMainDesc : '').join('\n');
301
- const laneStr = laneName ? `\non ${_chalk().default.bold(laneName)} lane` : '';
254
+ let updatesFromMainOutput = '';
255
+ if (!forkedLaneId || verbose) {
256
+ const updatesFromMainDesc = '\n(use "bit lane merge main" to merge the changes)\n';
257
+ const pendingUpdatesFromMainIds = pendingUpdatesFromMain.map(c => format(c.id, false, getUpdateFromMsg(c.divergeData)));
258
+ updatesFromMainOutput = [pendingUpdatesFromMain.length ? _chalk().default.underline.white('pending updates from main') + updatesFromMainDesc : '', ...pendingUpdatesFromMainIds].join('\n');
259
+ }
260
+ let updatesFromForkedOutput = '';
261
+ if (forkedLaneId) {
262
+ const updatesFromForkedDesc = `\n(use "bit lane merge ${forkedLaneId.toString()}" to merge the changes
263
+ use "bit fetch ${forkedLaneId.toString()} --lanes" to update ${forkedLaneId.name} locally)\n`;
264
+ const pendingUpdatesFromForkedIds = updatesFromForked.map(c => format(c.id, false, getUpdateFromMsg(c.divergeData, forkedLaneId.name)));
265
+ updatesFromForkedOutput = [updatesFromForked.length ? _chalk().default.underline.white(`updates from ${forkedLaneId.name}`) + updatesFromForkedDesc : '', ...pendingUpdatesFromForkedIds].join('\n');
266
+ }
267
+ const laneStr = currentLaneId.isDefault() ? '' : `\non ${_chalk().default.bold(currentLaneId.toString())} lane`;
302
268
  const troubleshootingStr = showTroubleshootingLink ? `\n${TROUBLESHOOTING_MESSAGE}` : '';
303
- const statusMsg = importPendingWarning + [outdatedStr, pendingMergeStr, updatesFromMainOutput, compDuringMergeStr, newComponentsOutput, modifiedComponentOutput, snappedComponentsOutput, stagedComponentsOutput, autoTagPendingOutput, invalidComponentOutput, locallySoftRemovedOutput, remotelySoftRemovedOutput].filter(x => x).join(_chalk().default.underline('\n \n') + _chalk().default.white('\n')) + troubleshootingStr;
269
+ const statusMsg = importPendingWarning + (0, _lodash().compact)([outdatedStr, pendingMergeStr, updatesFromMainOutput, updatesFromForkedOutput, compDuringMergeStr, newComponentsOutput, modifiedComponentOutput, snappedComponentsOutput, stagedComponentsOutput, autoTagPendingOutput, invalidComponentOutput, locallySoftRemovedOutput, remotelySoftRemovedOutput]).join(_chalk().default.underline('\n \n') + _chalk().default.white('\n')) + troubleshootingStr;
304
270
  const results = (statusMsg || _chalk().default.yellow(_constants().statusWorkspaceIsCleanMsg)) + laneStr;
305
271
  const exitCode = componentsWithIssues.length && strict ? 1 : 0;
306
272
  return {
@@ -308,11 +274,8 @@ or use "bit merge [component-id] --abort" to cancel the merge operation)\n`;
308
274
  code: exitCode
309
275
  };
310
276
  }
311
-
312
277
  }
313
-
314
278
  exports.StatusCmd = StatusCmd;
315
-
316
279
  function formatIssues(issues) {
317
280
  return ` ${issues === null || issues === void 0 ? void 0 : issues.outputForCLI()}\n`;
318
281
  }
@@ -1 +1 @@
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","compDuringMergeTitle","compDuringMergeDesc","compDuringMergeComps","compDuringMergeStr","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 compDuringMergeTitle = chalk.underline.white('components during merge state');\n const compDuringMergeDesc = `(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 compDuringMergeComps = componentsDuringMergeState\n .map((id) => {\n return ` > ${chalk.cyan(id.toString())}`;\n })\n .join('\\n');\n\n const compDuringMergeStr = compDuringMergeComps.length\n ? [compDuringMergeTitle, compDuringMergeDesc, compDuringMergeComps].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 compDuringMergeStr,\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 ` ${issues?.outputForCLI()}\\n`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAIA;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;;AAOA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA,MAAMA,uBAAuB,GAAI,GAAEC,gBAAA,CAAMC,MAAN,CAChC,yBAAwBC,6BAAiB,+BADT,CAEjC,EAFF;;AAIO,MAAMC,SAAN,CAAmC;EAcxCC,WAAW,CAASC,MAAT,E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zE;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
+ {"version":3,"names":["TROUBLESHOOTING_MESSAGE","chalk","yellow","BASE_DOCS_DOMAIN","StatusCmd","constructor","status","json","newComponents","modifiedComponents","stagedComponents","componentsWithIssues","importPendingComponents","autoTagPendingComponents","invalidComponents","locallySoftRemoved","remotelySoftRemoved","outdatedComponents","mergePendingComponents","componentsDuringMergeState","softTaggedComponents","snappedComponents","pendingUpdatesFromMain","updatesFromForked","currentLaneId","forkedLaneId","map","c","toStringWithoutVersion","toString","id","versions","issues","toObject","s","p","divergeData","report","_args","strict","verbose","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","compDuringMergeTitle","compDuringMergeDesc","compDuringMergeComps","compDuringMergeStr","newComponentDescription","newComponentsTitle","newComponentsOutput","modifiedDesc","modifiedComponentOutput","immutableUnshift","autoTagPendingOutput","invalidDesc","invalidComponentOutput","getInvalidComponentLabel","error","sort","statusInvalidComponentsMsg","locallySoftRemovedDesc","locallySoftRemovedOutput","remotelySoftRemovedDesc","remotelySoftRemovedOutput","stagedDesc","stagedComponentsOutput","undefined","snappedDesc","snappedComponentsOutput","getUpdateFromMsg","from","err","msg","commonSnapBeforeDiverge","toShortString","updatesFromMainOutput","updatesFromMainDesc","pendingUpdatesFromMainIds","updatesFromForkedOutput","updatesFromForkedDesc","name","pendingUpdatesFromForkedIds","laneStr","isDefault","bold","troubleshootingStr","statusMsg","compact","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 { compact, 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 [\n '',\n 'verbose',\n 'show extra data: full snap hashes for staged, divergence point for lanes and updates-from-main for forked lanes',\n ],\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 modifiedComponents,\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 updatesFromForked,\n currentLaneId,\n forkedLaneId,\n }: StatusResult = await this.status.status();\n return {\n newComponents: newComponents.map((c) => c.toStringWithoutVersion()),\n modifiedComponents: modifiedComponents.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 updatesFromForked: updatesFromForked.map((p) => ({\n id: p.id.toString(),\n divergeData: p.divergeData,\n })),\n currentLaneId,\n forkedLaneId,\n };\n }\n\n async report(_args, { strict, verbose }: { strict?: boolean; verbose?: boolean }) {\n const {\n newComponents,\n modifiedComponents,\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 updatesFromForked,\n currentLaneId,\n forkedLaneId,\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 compDuringMergeTitle = chalk.underline.white('components during merge state');\n const compDuringMergeDesc = `(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 compDuringMergeComps = componentsDuringMergeState\n .map((id) => {\n return ` > ${chalk.cyan(id.toString())}`;\n })\n .join('\\n');\n\n const compDuringMergeStr = compDuringMergeComps.length\n ? [compDuringMergeTitle, compDuringMergeDesc, compDuringMergeComps].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 modifiedComponents.map((c) => format(c, true)),\n modifiedComponents.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 getUpdateFromMsg = (divergeData: DivergeData, from = 'main'): string => {\n if (divergeData.err) return divergeData.err.message;\n let msg = `${from} 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\n let updatesFromMainOutput = '';\n if (!forkedLaneId || verbose) {\n const updatesFromMainDesc = '\\n(use \"bit lane merge main\" to merge the changes)\\n';\n const pendingUpdatesFromMainIds = pendingUpdatesFromMain.map((c) =>\n format(c.id, false, getUpdateFromMsg(c.divergeData))\n );\n updatesFromMainOutput = [\n pendingUpdatesFromMain.length ? chalk.underline.white('pending updates from main') + updatesFromMainDesc : '',\n ...pendingUpdatesFromMainIds,\n ].join('\\n');\n }\n\n let updatesFromForkedOutput = '';\n if (forkedLaneId) {\n const updatesFromForkedDesc = `\\n(use \"bit lane merge ${forkedLaneId.toString()}\" to merge the changes\nuse \"bit fetch ${forkedLaneId.toString()} --lanes\" to update ${forkedLaneId.name} locally)\\n`;\n const pendingUpdatesFromForkedIds = updatesFromForked.map((c) =>\n format(c.id, false, getUpdateFromMsg(c.divergeData, forkedLaneId.name))\n );\n updatesFromForkedOutput = [\n updatesFromForked.length\n ? chalk.underline.white(`updates from ${forkedLaneId.name}`) + updatesFromForkedDesc\n : '',\n ...pendingUpdatesFromForkedIds,\n ].join('\\n');\n }\n\n const laneStr = currentLaneId.isDefault() ? '' : `\\non ${chalk.bold(currentLaneId.toString())} lane`;\n\n const troubleshootingStr = showTroubleshootingLink ? `\\n${TROUBLESHOOTING_MESSAGE}` : '';\n\n const statusMsg =\n importPendingWarning +\n compact([\n outdatedStr,\n pendingMergeStr,\n updatesFromMainOutput,\n updatesFromForkedOutput,\n compDuringMergeStr,\n newComponentsOutput,\n modifiedComponentOutput,\n snappedComponentsOutput,\n stagedComponentsOutput,\n autoTagPendingOutput,\n invalidComponentOutput,\n locallySoftRemovedOutput,\n remotelySoftRemovedOutput,\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 ` ${issues?.outputForCLI()}\\n`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIA;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;AAOA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA,MAAMA,uBAAuB,GAAI,GAAEC,gBAAK,CAACC,MAAM,CAC5C,yBAAwBC,6BAAiB,+BAA8B,CACxE,EAAC;AAEI,MAAMC,SAAS,CAAoB;EAkBxCC,WAAW,CAASC,MAAkB,EAAE;IAAA,KAApBA,MAAkB,GAAlBA,MAAkB;IAAA,8CAjB/B,QAAQ;IAAA,qDACD,kGAAkG;IAAA,+CACxG,aAAa;IAAA;IAAA,+CAEb,GAAG;IAAA,iDACD,CACR,CAAC,GAAG,EAAE,MAAM,EAAE,wCAAwC,CAAC,EACvD,CACE,EAAE,EACF,SAAS,EACT,iHAAiH,CAClH,EACD,CAAC,EAAE,EAAE,QAAQ,EAAE,wCAAwC,CAAC,CACzD;IAAA,gDACQ,IAAI;IAAA,mDACD,IAAI;EAEyB;EAEzC,MAAMC,IAAI,GAAG;IACX,MAAM;MACJC,aAAa;MACbC,kBAAkB;MAClBC,gBAAgB;MAChBC,oBAAoB;MACpBC,uBAAuB;MACvBC,wBAAwB;MACxBC,iBAAiB;MACjBC,kBAAkB;MAClBC,mBAAmB;MACnBC,kBAAkB;MAClBC,sBAAsB;MACtBC,0BAA0B;MAC1BC,oBAAoB;MACpBC,iBAAiB;MACjBC,sBAAsB;MACtBC,iBA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AwB,EACxBE,yBAAyB,CAC1B,CAAC,CAACvD,IAAI,CAACxD,gBAAK,CAAC8E,SAAS,CAAC,+BAA+B,CAAC,GAAG9E,gBAAK,CAAC+E,KAAK,CAAC,IAAI,CAAC,CAAC,GAC7EsD,kBAAkB;IAEpB,MAAMG,OAAO,GAAG,CAACF,SAAS,IAAItI,gBAAK,CAACC,MAAM,CAACwI,sCAAyB,CAAC,IAAIP,OAAO;IAEhF,MAAMQ,QAAQ,GAAGhI,oBAAoB,CAACqD,MAAM,IAAIzB,MAAM,GAAG,CAAC,GAAG,CAAC;IAE9D,OAAO;MACLqG,IAAI,EAAEH,OAAO;MACbI,IAAI,EAAEF;IACR,CAAC;EACH;AACF;AAAC;AAEM,SAASvE,YAAY,CAACpC,MAAkB,EAAE;EAC/C,OAAQ,UAASA,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAE8G,YAAY,EAAG,IAAG;AAC7C"}
@@ -4,21 +4,16 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.StatusAspect = 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 StatusAspect = _harmony().Aspect.create({
19
15
  id: 'teambit.component/status'
20
16
  });
21
-
22
17
  exports.StatusAspect = StatusAspect;
23
18
 
24
19
  //# sourceMappingURL=status.aspect.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["StatusAspect","Aspect","create","id"],"sources":["status.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const StatusAspect = Aspect.create({\n id: 'teambit.component/status',\n});\n"],"mappings":";;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,MAAMA,YAAY,GAAGC,iBAAA,CAAOC,MAAP,CAAc;EACxCC,EAAE,EAAE;AADoC,CAAd,CAArB"}
1
+ {"version":3,"names":["StatusAspect","Aspect","create","id"],"sources":["status.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const StatusAspect = Aspect.create({\n id: 'teambit.component/status',\n});\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,YAAY,GAAGC,iBAAM,CAACC,MAAM,CAAC;EACxCC,EAAE,EAAE;AACN,CAAC,CAAC;AAAC"}
@@ -1,4 +1,5 @@
1
1
  import { CLIMain } from '@teambit/cli';
2
+ import { LaneId } from '@teambit/lane-id';
2
3
  import { IssuesList } from '@teambit/component-issues';
3
4
  import { Workspace } from '@teambit/workspace';
4
5
  import { ComponentID } from '@teambit/component-id';
@@ -12,7 +13,7 @@ declare type DivergeDataPerId = {
12
13
  };
13
14
  export declare type StatusResult = {
14
15
  newComponents: ComponentID[];
15
- modifiedComponent: ComponentID[];
16
+ modifiedComponents: ComponentID[];
16
17
  stagedComponents: {
17
18
  id: ComponentID;
18
19
  versions: string[];
@@ -38,7 +39,9 @@ export declare type StatusResult = {
38
39
  softTaggedComponents: ComponentID[];
39
40
  snappedComponents: ComponentID[];
40
41
  pendingUpdatesFromMain: DivergeDataPerId[];
41
- laneName: string | null;
42
+ updatesFromForked: DivergeDataPerId[];
43
+ currentLaneId: LaneId;
44
+ forkedLaneId?: LaneId;
42
45
  };
43
46
  export declare class StatusMain {
44
47
  private workspace;
@@ -1,182 +1,127 @@
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.array.sort.js");
8
-
9
6
  require("core-js/modules/es.promise.js");
10
-
11
7
  Object.defineProperty(exports, "__esModule", {
12
8
  value: true
13
9
  });
14
10
  exports.StatusMain = void 0;
15
-
16
11
  function _defineProperty2() {
17
12
  const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
18
-
19
13
  _defineProperty2 = function () {
20
14
  return data;
21
15
  };
22
-
23
16
  return data;
24
17
  }
25
-
26
18
  function _cli() {
27
19
  const data = require("@teambit/cli");
28
-
29
20
  _cli = function () {
30
21
  return data;
31
22
  };
32
-
33
23
  return data;
34
24
  }
35
-
36
25
  function _pMapSeries() {
37
26
  const data = _interopRequireDefault(require("p-map-series"));
38
-
39
27
  _pMapSeries = function () {
40
28
  return data;
41
29
  };
42
-
43
30
  return data;
44
31
  }
45
-
46
32
  function _workspace() {
47
33
  const data = _interopRequireDefault(require("@teambit/workspace"));
48
-
49
34
  _workspace = function () {
50
35
  return data;
51
36
  };
52
-
53
37
  return data;
54
38
  }
55
-
56
39
  function _componentId() {
57
40
  const data = require("@teambit/component-id");
58
-
59
41
  _componentId = function () {
60
42
  return data;
61
43
  };
62
-
63
44
  return data;
64
45
  }
65
-
66
46
  function _analytics() {
67
47
  const data = require("@teambit/legacy/dist/analytics/analytics");
68
-
69
48
  _analytics = function () {
70
49
  return data;
71
50
  };
72
-
73
51
  return data;
74
52
  }
75
-
76
53
  function _loader() {
77
54
  const data = _interopRequireDefault(require("@teambit/legacy/dist/cli/loader"));
78
-
79
55
  _loader = function () {
80
56
  return data;
81
57
  };
82
-
83
58
  return data;
84
59
  }
85
-
86
60
  function _loaderMessages() {
87
61
  const data = require("@teambit/legacy/dist/cli/loader/loader-messages");
88
-
89
62
  _loaderMessages = function () {
90
63
  return data;
91
64
  };
92
-
93
65
  return data;
94
66
  }
95
-
96
67
  function _remove() {
97
68
  const data = require("@teambit/remove");
98
-
99
69
  _remove = function () {
100
70
  return data;
101
71
  };
102
-
103
72
  return data;
104
73
  }
105
-
106
74
  function _componentsPendingImport() {
107
75
  const data = _interopRequireDefault(require("@teambit/legacy/dist/consumer/component-ops/exceptions/components-pending-import"));
108
-
109
76
  _componentsPendingImport = function () {
110
77
  return data;
111
78
  };
112
-
113
79
  return data;
114
80
  }
115
-
116
81
  function _componentsList() {
117
82
  const data = _interopRequireDefault(require("@teambit/legacy/dist/consumer/component/components-list"));
118
-
119
83
  _componentsList = function () {
120
84
  return data;
121
85
  };
122
-
123
86
  return data;
124
87
  }
125
-
126
88
  function _exceptions() {
127
89
  const data = require("@teambit/legacy/dist/consumer/exceptions");
128
-
129
90
  _exceptions = function () {
130
91
  return data;
131
92
  };
132
-
133
93
  return data;
134
94
  }
135
-
136
95
  function _insights() {
137
96
  const data = require("@teambit/insights");
138
-
139
97
  _insights = function () {
140
98
  return data;
141
99
  };
142
-
143
100
  return data;
144
101
  }
145
-
146
102
  function _issues() {
147
103
  const data = _interopRequireDefault(require("@teambit/issues"));
148
-
149
104
  _issues = function () {
150
105
  return data;
151
106
  };
152
-
153
107
  return data;
154
108
  }
155
-
156
109
  function _statusCmd() {
157
110
  const data = require("./status-cmd");
158
-
159
111
  _statusCmd = function () {
160
112
  return data;
161
113
  };
162
-
163
114
  return data;
164
115
  }
165
-
166
116
  function _status() {
167
117
  const data = require("./status.aspect");
168
-
169
118
  _status = function () {
170
119
  return data;
171
120
  };
172
-
173
121
  return data;
174
122
  }
175
-
176
123
  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
124
  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
-
180
125
  class StatusMain {
181
126
  constructor(workspace, issues, insights, remove) {
182
127
  this.workspace = workspace;
@@ -184,12 +129,9 @@ class StatusMain {
184
129
  this.insights = insights;
185
130
  this.remove = remove;
186
131
  }
187
-
188
132
  async status() {
189
133
  if (!this.workspace) throw new (_exceptions().ConsumerNotFound)();
190
-
191
134
  _loader().default.start(_loaderMessages().BEFORE_STATUS);
192
-
193
135
  const consumer = this.workspace.consumer;
194
136
  const laneObj = await consumer.getCurrentLaneObject();
195
137
  const componentsList = new (_componentsList().default)(consumer);
@@ -198,7 +140,7 @@ class StatusMain {
198
140
  loadCompositions: false
199
141
  };
200
142
  const newComponents = await componentsList.listNewComponents(true, loadOpts);
201
- const modifiedComponent = await componentsList.listModifiedComponents(true, loadOpts);
143
+ const modifiedComponents = await componentsList.listModifiedComponents(true, loadOpts);
202
144
  const stagedComponents = await componentsList.listExportPendingComponents(laneObj);
203
145
  await this.addRemovedStagedIfNeeded(stagedComponents);
204
146
  const stagedComponentsWithVersions = await (0, _pMapSeries().default)(stagedComponents, async stagedComp => {
@@ -213,22 +155,22 @@ class StatusMain {
213
155
  const allInvalidComponents = await componentsList.listInvalidComponents();
214
156
  const locallySoftRemoved = await componentsList.listLocallySoftRemoved();
215
157
  const remotelySoftRemoved = await componentsList.listRemotelySoftRemoved();
216
- const importPendingComponents = allInvalidComponents // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
217
- .filter(c => c.error instanceof _componentsPendingImport().default) // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
218
- .map(i => i.id); // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
219
-
158
+ const importPendingComponents = allInvalidComponents
159
+ // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
160
+ .filter(c => c.error instanceof _componentsPendingImport().default)
161
+ // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
162
+ .map(i => i.id);
163
+ // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
220
164
  const invalidComponents = allInvalidComponents.filter(c => !(c.error instanceof _componentsPendingImport().default));
221
165
  const outdatedComponents = await componentsList.listOutdatedComponents();
222
166
  const mergePendingComponents = await componentsList.listMergePendingComponents();
223
- const newAndModifiedLegacy = newComponents.concat(modifiedComponent);
167
+ const newAndModifiedLegacy = newComponents.concat(modifiedComponents);
224
168
  const issuesToIgnore = this.issues.getIssuesToIgnoreGlobally();
225
-
226
169
  if (newAndModifiedLegacy.length) {
227
170
  const newAndModified = await this.workspace.getManyByLegacy(newAndModifiedLegacy, loadOpts);
228
171
  await this.issues.triggerAddComponentIssues(newAndModified, issuesToIgnore);
229
172
  this.issues.removeIgnoredIssuesFromComponents(newAndModified);
230
173
  }
231
-
232
174
  const componentsWithIssues = newAndModifiedLegacy.filter(component => {
233
175
  return component.issues && !component.issues.isEmpty();
234
176
  });
@@ -236,21 +178,16 @@ class StatusMain {
236
178
  const softTaggedComponents = componentsList.listSoftTaggedComponents();
237
179
  const snappedComponents = (await componentsList.listSnappedComponentsOnMain()).map(c => c.toBitId());
238
180
  const pendingUpdatesFromMain = await componentsList.listUpdatesFromMainPending();
239
- const currentLane = consumer.getCurrentLaneId();
240
- const laneName = currentLane.isDefault() ? null : currentLane.name;
241
-
181
+ const updatesFromForked = await componentsList.listUpdatesFromForked();
182
+ const currentLaneId = consumer.getCurrentLaneId();
183
+ const currentLane = await consumer.getCurrentLaneObject();
184
+ const forkedLaneId = currentLane === null || currentLane === void 0 ? void 0 : currentLane.forkedFrom;
242
185
  _analytics().Analytics.setExtraData('new_components', newComponents.length);
243
-
244
186
  _analytics().Analytics.setExtraData('staged_components', stagedComponents.length);
245
-
246
187
  _analytics().Analytics.setExtraData('num_components_with_missing_dependencies', componentsWithIssues.length);
247
-
248
188
  _analytics().Analytics.setExtraData('autoTagPendingComponents', autoTagPendingComponents.length);
249
-
250
189
  _analytics().Analytics.setExtraData('deleted', invalidComponents.length);
251
-
252
190
  const convertBitIdToComponentIdsAndSort = async ids => _componentId().ComponentID.sortIds(await this.workspace.resolveMultipleComponentIds(ids));
253
-
254
191
  const convertObjToComponentIdsAndSort = async objectsWithId => {
255
192
  const results = await Promise.all(objectsWithId.map(async obj => {
256
193
  return _objectSpread(_objectSpread({}, obj), {}, {
@@ -259,11 +196,10 @@ class StatusMain {
259
196
  }));
260
197
  return results.sort((a, b) => a.id.toString().localeCompare(b.id.toString()));
261
198
  };
262
-
263
199
  await consumer.onDestroy();
264
200
  return {
265
201
  newComponents: await convertBitIdToComponentIdsAndSort(newComponents.map(c => c.id)),
266
- modifiedComponent: await convertBitIdToComponentIdsAndSort(modifiedComponent.map(c => c.id)),
202
+ modifiedComponents: await convertBitIdToComponentIdsAndSort(modifiedComponents.map(c => c.id)),
267
203
  stagedComponents: await convertObjToComponentIdsAndSort(stagedComponentsWithVersions),
268
204
  // @ts-ignore - not clear why, it fails the "bit build" without it
269
205
  componentsWithIssues: await convertObjToComponentIdsAndSort(componentsWithIssues.map(c => ({
@@ -293,10 +229,11 @@ class StatusMain {
293
229
  softTaggedComponents: await convertBitIdToComponentIdsAndSort(softTaggedComponents),
294
230
  snappedComponents: await convertBitIdToComponentIdsAndSort(snappedComponents),
295
231
  pendingUpdatesFromMain: await convertObjToComponentIdsAndSort(pendingUpdatesFromMain),
296
- laneName
232
+ updatesFromForked: await convertObjToComponentIdsAndSort(updatesFromForked),
233
+ currentLaneId,
234
+ forkedLaneId
297
235
  };
298
236
  }
299
-
300
237
  async addRemovedStagedIfNeeded(stagedComponents) {
301
238
  const removedStagedIds = await this.remove.getRemovedStaged();
302
239
  if (!removedStagedIds.length) return;
@@ -306,20 +243,16 @@ class StatusMain {
306
243
  const modelComps = await Promise.all(nonExistsInStaged.map(id => this.workspace.scope.legacyScope.getModelComponent(id)));
307
244
  stagedComponents.push(...modelComps);
308
245
  }
309
-
310
246
  static async provider([cli, workspace, insights, issues, remove]) {
311
247
  const statusMain = new StatusMain(workspace, issues, insights, remove);
312
248
  cli.register(new (_statusCmd().StatusCmd)(statusMain));
313
249
  return statusMain;
314
250
  }
315
-
316
251
  }
317
-
318
252
  exports.StatusMain = StatusMain;
319
253
  (0, _defineProperty2().default)(StatusMain, "slots", []);
320
254
  (0, _defineProperty2().default)(StatusMain, "dependencies", [_cli().CLIAspect, _workspace().default, _insights().InsightsAspect, _issues().default, _remove().RemoveAspect]);
321
255
  (0, _defineProperty2().default)(StatusMain, "runtime", _cli().MainRuntime);
322
-
323
256
  _status().StatusAspect.addRuntime(StatusMain);
324
257
 
325
258
  //# sourceMappingURL=status.main.runtime.js.map
@@ -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","stagedComponentsWithVersions","pMapSeries","stagedComp","versions","getLocalTagsOrHashes","scope","objects","id","toBitId","autoTagPendingComponents","listAutoTagPendingComponents","autoTagPendingComponentsIds","map","component","allInvalidComponents","listInvalidComponents","locallySoftRemoved","listLocallySoftRemoved","remotelySoftRemoved","listRemotelySoftRemoved","importPendingComponents","filter","c","error","ComponentsPendingImport","i","invalidComponents","outdatedComponents","listOutdatedComponents","mergePendingComponents","listMergePendingComponents","newAndModifiedLegacy","concat","issuesToIgnore","getIssuesToIgnoreGlobally","length","newAndModified","getManyByLegacy","triggerAddComponentIssues","removeIgnoredIssuesFromComponents","componentsWithIssues","isEmpty","componentsDuringMergeState","listDuringMergeStateComponents","softTaggedComponents","listSoftTaggedComponents","snappedComponents","listSnappedComponentsOnMain","pendingUpdatesFromMain","listUpdatesFromMainPending","currentLane","getCurrentLaneId","laneName","isDefault","name","Analytics","setExtraData","convertBitIdToComponentIdsAndSort","ids","ComponentID","sortIds","resolveMultipleComponentIds","convertObjToComponentIdsAndSort","objectsWithId","results","Promise","all","obj","resolveComponentId","sort","a","b","toString","localeCompare","onDestroy","latestVersion","divergeData","diverge","removedStagedIds","getRemovedStaged","removedStagedBitIds","_legacy","nonExistsInStaged","find","isEqualWithoutVersion","modelComps","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 pMapSeries from 'p-map-series';\nimport { 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 const stagedComponentsWithVersions = await pMapSeries(stagedComponents, async (stagedComp) => {\n const versions = await stagedComp.getLocalTagsOrHashes(consumer.scope.objects);\n return {\n id: stagedComp.toBitId(),\n versions,\n };\n });\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 await this.issues.triggerAddComponentIssues(newAndModified, issuesToIgnore);\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(stagedComponentsWithVersions),\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;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;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;;;;;;AAuBO,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,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O,CAACC,GAAR,CACvBgB,iBAAiB,CAACtE,GAAlB,CAAuBL,EAAD,IAAQ,KAAK/B,SAAL,CAAe6B,KAAf,CAAqBiF,WAArB,CAAiCC,iBAAjC,CAAmDhF,EAAnD,CAA9B,CADuB,CAAzB;IAGAV,gBAAgB,CAAC2F,IAAjB,CAAsB,GAAGH,UAAzB;EACD;;EAKoB,aAARI,QAAQ,CAAC,CAACC,GAAD,EAAMlH,SAAN,EAAiBE,QAAjB,EAA2BD,MAA3B,EAAmCE,MAAnC,CAAD,EAMlB;IACD,MAAMgH,UAAU,GAAG,IAAIrH,UAAJ,CAAeE,SAAf,EAA0BC,MAA1B,EAAkCC,QAAlC,EAA4CC,MAA5C,CAAnB;IACA+G,GAAG,CAACE,QAAJ,CAAa,KAAIC,sBAAJ,EAAcF,UAAd,CAAb;IACA,OAAOA,UAAP;EACD;;AAlJqB;;;gCAAXrH,U,WAqII,E;gCArIJA,U,kBAsIW,CAACwH,gBAAD,EAAYC,oBAAZ,EAA6BC,0BAA7B,EAA6CC,iBAA7C,EAA2DC,sBAA3D,C;gCAtIX5H,U,aAuIM6H,kB;;AAcnBC,sBAAA,CAAaC,UAAb,CAAwB/H,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","modifiedComponents","listModifiedComponents","stagedComponents","listExportPendingComponents","addRemovedStagedIfNeeded","stagedComponentsWithVersions","pMapSeries","stagedComp","versions","getLocalTagsOrHashes","scope","objects","id","toBitId","autoTagPendingComponents","listAutoTagPendingComponents","autoTagPendingComponentsIds","map","component","allInvalidComponents","listInvalidComponents","locallySoftRemoved","listLocallySoftRemoved","remotelySoftRemoved","listRemotelySoftRemoved","importPendingComponents","filter","c","error","ComponentsPendingImport","i","invalidComponents","outdatedComponents","listOutdatedComponents","mergePendingComponents","listMergePendingComponents","newAndModifiedLegacy","concat","issuesToIgnore","getIssuesToIgnoreGlobally","length","newAndModified","getManyByLegacy","triggerAddComponentIssues","removeIgnoredIssuesFromComponents","componentsWithIssues","isEmpty","componentsDuringMergeState","listDuringMergeStateComponents","softTaggedComponents","listSoftTaggedComponents","snappedComponents","listSnappedComponentsOnMain","pendingUpdatesFromMain","listUpdatesFromMainPending","updatesFromForked","listUpdatesFromForked","currentLaneId","getCurrentLaneId","currentLane","forkedLaneId","forkedFrom","Analytics","setExtraData","convertBitIdToComponentIdsAndSort","ids","ComponentID","sortIds","resolveMultipleComponentIds","convertObjToComponentIdsAndSort","objectsWithId","results","Promise","all","obj","resolveComponentId","sort","a","b","toString","localeCompare","onDestroy","latestVersion","divergeData","diverge","removedStagedIds","getRemovedStaged","removedStagedBitIds","_legacy","nonExistsInStaged","find","isEqualWithoutVersion","modelComps","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 pMapSeries from 'p-map-series';\nimport { LaneId } from '@teambit/lane-id';\nimport { 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 modifiedComponents: 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 updatesFromForked: DivergeDataPerId[];\n currentLaneId: LaneId;\n forkedLaneId?: LaneId;\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 modifiedComponents = (await componentsList.listModifiedComponents(true, loadOpts)) as ConsumerComponent[];\n const stagedComponents: ModelComponent[] = await componentsList.listExportPendingComponents(laneObj);\n await this.addRemovedStagedIfNeeded(stagedComponents);\n const stagedComponentsWithVersions = await pMapSeries(stagedComponents, async (stagedComp) => {\n const versions = await stagedComp.getLocalTagsOrHashes(consumer.scope.objects);\n return {\n id: stagedComp.toBitId(),\n versions,\n };\n });\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(modifiedComponents);\n const issuesToIgnore = this.issues.getIssuesToIgnoreGlobally();\n if (newAndModifiedLegacy.length) {\n const newAndModified = await this.workspace.getManyByLegacy(newAndModifiedLegacy, loadOpts);\n await this.issues.triggerAddComponentIssues(newAndModified, issuesToIgnore);\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 updatesFromForked = await componentsList.listUpdatesFromForked();\n const currentLaneId = consumer.getCurrentLaneId();\n const currentLane = await consumer.getCurrentLaneObject();\n const forkedLaneId = currentLane?.forkedFrom;\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 modifiedComponents: await convertBitIdToComponentIdsAndSort(modifiedComponents.map((c) => c.id)),\n stagedComponents: await convertObjToComponentIdsAndSort(stagedComponentsWithVersions),\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 updatesFromForked: await convertObjToComponentIdsAndSort(updatesFromForked),\n currentLaneId,\n forkedLaneId,\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;AAGA;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;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Q,CAAC,KAAIC,sBAAS,EAACF,UAAU,CAAC,CAAC;IACvC,OAAOA,UAAU;EACnB;AACF;AAAC;AAAA,gCAvJYvH,UAAU,WAyIN,EAAE;AAAA,gCAzINA,UAAU,kBA0IC,CAAC0H,gBAAS,EAAEC,oBAAe,EAAEC,0BAAc,EAAEC,iBAAY,EAAEC,sBAAY,CAAC;AAAA,gCA1InF9H,UAAU,aA2IJ+H,kBAAW;AAc9BC,sBAAY,CAACC,UAAU,CAACjI,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/status",
3
- "version": "0.0.192",
3
+ "version": "0.0.194",
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.192"
9
+ "version": "0.0.194"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -17,14 +17,15 @@
17
17
  "core-js": "^3.0.0",
18
18
  "@teambit/component-version": "0.0.395",
19
19
  "@teambit/harmony": "0.3.3",
20
- "@teambit/cli": "0.0.590",
20
+ "@teambit/cli": "0.0.591",
21
21
  "@teambit/component-id": "0.0.418",
22
22
  "@teambit/component-issues": "0.0.73",
23
- "@teambit/insights": "0.0.880",
24
- "@teambit/issues": "0.0.188",
23
+ "@teambit/insights": "0.0.882",
24
+ "@teambit/issues": "0.0.190",
25
+ "@teambit/lane-id": "0.0.109",
25
26
  "@teambit/legacy-bit-id": "0.0.414",
26
- "@teambit/remove": "0.0.57",
27
- "@teambit/workspace": "0.0.880"
27
+ "@teambit/remove": "0.0.59",
28
+ "@teambit/workspace": "0.0.882"
28
29
  },
29
30
  "devDependencies": {
30
31
  "@types/lodash": "4.14.165",
@@ -36,7 +37,7 @@
36
37
  "@types/node": "12.20.4"
37
38
  },
38
39
  "peerDependencies": {
39
- "@teambit/legacy": "1.0.373",
40
+ "@teambit/legacy": "1.0.374",
40
41
  "react-dom": "^16.8.0 || ^17.0.0",
41
42
  "react": "^16.8.0 || ^17.0.0"
42
43
  },