@teambit/status 1.0.487 → 1.0.488
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/artifacts/__bit_junit.xml +1 -1
- package/artifacts/schema.json +6 -2
- package/dist/mini-status-cmd.js +4 -4
- package/dist/mini-status-cmd.js.map +1 -1
- package/dist/status-cmd.js +10 -10
- package/dist/status-cmd.js.map +1 -1
- package/dist/status.main.runtime.d.ts +1 -1
- package/dist/status.main.runtime.js +8 -8
- package/dist/status.main.runtime.js.map +1 -1
- package/package.json +17 -12
- /package/dist/{preview-1733714450424.js → preview-1733830651067.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="0" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.component/status@1.0.
|
|
3
|
+
<testsuite name="teambit.component/status@1.0.488" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
package/artifacts/schema.json
CHANGED
|
@@ -2202,7 +2202,11 @@
|
|
|
2202
2202
|
"character": 44
|
|
2203
2203
|
},
|
|
2204
2204
|
"name": "SnapsDistance",
|
|
2205
|
-
"
|
|
2205
|
+
"componentId": {
|
|
2206
|
+
"scope": "teambit.component",
|
|
2207
|
+
"name": "snap-distance",
|
|
2208
|
+
"version": "0.0.1"
|
|
2209
|
+
}
|
|
2206
2210
|
},
|
|
2207
2211
|
"isOptional": false
|
|
2208
2212
|
}
|
|
@@ -2294,7 +2298,7 @@
|
|
|
2294
2298
|
"componentId": {
|
|
2295
2299
|
"scope": "teambit.component",
|
|
2296
2300
|
"name": "status",
|
|
2297
|
-
"version": "1.0.
|
|
2301
|
+
"version": "1.0.488"
|
|
2298
2302
|
},
|
|
2299
2303
|
"taggedModuleExports": []
|
|
2300
2304
|
}
|
package/dist/mini-status-cmd.js
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.MiniStatusCmd = void 0;
|
|
7
|
-
function
|
|
8
|
-
const data = require("@teambit/legacy
|
|
9
|
-
|
|
7
|
+
function _legacy() {
|
|
8
|
+
const data = require("@teambit/legacy.constants");
|
|
9
|
+
_legacy = function () {
|
|
10
10
|
return data;
|
|
11
11
|
};
|
|
12
12
|
return data;
|
|
@@ -31,7 +31,7 @@ class MiniStatusCmd {
|
|
|
31
31
|
this command only checks source code changes, it doesn't check for config/aspect/dependency changes`);
|
|
32
32
|
_defineProperty(this, "arguments", [{
|
|
33
33
|
name: 'component-pattern',
|
|
34
|
-
description:
|
|
34
|
+
description: _legacy().COMPONENT_PATTERN_HELP
|
|
35
35
|
}]);
|
|
36
36
|
_defineProperty(this, "group", 'development');
|
|
37
37
|
_defineProperty(this, "alias", 'ms');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_legacy","data","require","_chalk","_interopRequireDefault","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MiniStatusCmd","constructor","status","name","description","COMPONENT_PATTERN_HELP","report","pattern","opts","modified","newComps","compWithIssues","statusMini","outputSection","title","ids","titleStr","chalk","bold","idsStr","length","map","id","toStringWithoutVersion","join","outputCompWithIssues","showIssues","issues","c","state","outputForCLI","modifiedOutput","newOutput","compWithIssuesOutput","json","m","toObjectIncludeDataAsString","exports"],"sources":["mini-status-cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy.constants';\nimport { ComponentID } from '@teambit/component-id';\nimport chalk from 'chalk';\nimport { StatusMain } from './status.main.runtime';\n\nexport type MiniStatusOpts = {\n showIssues?: boolean;\n ignoreCircularDependencies?: boolean;\n};\n\nexport class MiniStatusCmd implements Command {\n name = 'mini-status [component-pattern]';\n description = 'basic status for fast execution';\n extendedDescription = `shows only modified/new components with code changes. for the full status, use \"bit status\".\nthis command only checks source code changes, it doesn't check for config/aspect/dependency changes`;\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n group = 'development';\n alias = 'ms';\n options = [\n ['', 'show-issues', 'show component issues (slows down the command)'],\n [\n 'c',\n 'ignore-circular-dependencies',\n 'do not check for circular dependencies to get the results quicker (relevant when --show-issues flag is used)',\n ],\n ['j', 'json', 'json format'],\n ] as CommandOptions;\n loadAspects = false;\n loader = true;\n\n constructor(private status: StatusMain) {}\n\n async report([pattern]: [string], opts: MiniStatusOpts) {\n const { modified, newComps, compWithIssues } = await this.status.statusMini(pattern, opts);\n const outputSection = (title: string, ids: ComponentID[]) => {\n const titleStr = chalk.bold(title);\n const idsStr = ids.length ? ids.map((id) => id.toStringWithoutVersion()).join('\\n') : '<none>';\n return `${titleStr}:\\n${idsStr}`;\n };\n const outputCompWithIssues = () => {\n if (!opts.showIssues) return '';\n if (!compWithIssues?.length) return '<none>';\n const titleStr = chalk.bold('\\n\\ncomponent with issues');\n const issues = compWithIssues.map((c) => `${c.id.toStringWithoutVersion()}\\n ${c.state.issues.outputForCLI()}`);\n return `${titleStr}\\n${issues}`;\n };\n const modifiedOutput = outputSection('modified components (files only)', modified);\n const newOutput = outputSection('new components', newComps);\n const compWithIssuesOutput = outputCompWithIssues();\n return `${modifiedOutput}\\n\\n${newOutput}${compWithIssuesOutput}`;\n }\n\n async json([pattern]: [string], opts: MiniStatusOpts): Promise<Record<string, any>> {\n const { modified, newComps, compWithIssues } = await this.status.statusMini(pattern, opts);\n return {\n modified: modified.map((m) => m.toStringWithoutVersion()),\n newComps: newComps.map((m) => m.toStringWithoutVersion()),\n compWithIssues: compWithIssues?.map((c) => ({\n id: c.id.toStringWithoutVersion(),\n issues: c.state.issues.toObjectIncludeDataAsString(),\n })),\n };\n }\n}\n"],"mappings":";;;;;;AACA,SA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
|
|
12
12
|
};
|
|
13
13
|
return data;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
const data = require("@teambit/legacy
|
|
17
|
-
|
|
15
|
+
function _legacy() {
|
|
16
|
+
const data = require("@teambit/legacy.constants");
|
|
17
|
+
_legacy = function () {
|
|
18
18
|
return data;
|
|
19
19
|
};
|
|
20
20
|
return data;
|
|
@@ -39,7 +39,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
39
39
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
40
40
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
41
41
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
42
|
-
const TROUBLESHOOTING_MESSAGE = _chalk().default.yellow(`learn more about Bit components: ${
|
|
42
|
+
const TROUBLESHOOTING_MESSAGE = _chalk().default.yellow(`learn more about Bit components: ${_legacy().BASE_DOCS_DOMAIN}reference/components/component-anatomy`);
|
|
43
43
|
class StatusCmd {
|
|
44
44
|
constructor(status) {
|
|
45
45
|
this.status = status;
|
|
@@ -169,7 +169,7 @@ class StatusCmd {
|
|
|
169
169
|
const getStatusText = () => {
|
|
170
170
|
if (message) return message;
|
|
171
171
|
if (idWithIssues) {
|
|
172
|
-
return idWithIssues.issues.hasTagBlockerIssues() ?
|
|
172
|
+
return idWithIssues.issues.hasTagBlockerIssues() ? _legacy().statusFailureMsg : _legacy().statusWarningsMsg;
|
|
173
173
|
}
|
|
174
174
|
return 'ok';
|
|
175
175
|
};
|
|
@@ -199,7 +199,7 @@ class StatusCmd {
|
|
|
199
199
|
idFormatted += ' ... ';
|
|
200
200
|
if (showIssues && idWithIssues) {
|
|
201
201
|
showTroubleshootingLink = true;
|
|
202
|
-
const issuesTxt = idWithIssues.issues.hasTagBlockerIssues() ?
|
|
202
|
+
const issuesTxt = idWithIssues.issues.hasTagBlockerIssues() ? _legacy().statusFailureMsg : _legacy().statusWarningsMsg;
|
|
203
203
|
const issuesColor = idWithIssues.issues.hasTagBlockerIssues() ? 'red' : 'yellow';
|
|
204
204
|
return `${idFormatted} ${_chalk().default[issuesColor](issuesTxt)}${formatIssues(idWithIssues.issues)}`;
|
|
205
205
|
}
|
|
@@ -211,13 +211,13 @@ class StatusCmd {
|
|
|
211
211
|
const descOutput = description ? `${description}\n` : '';
|
|
212
212
|
return [titleOutput, descOutput, ...compsOutput].join('\n');
|
|
213
213
|
}
|
|
214
|
-
const importPendingWarning = importPendingComponents.length ? _chalk().default.yellow(`${
|
|
214
|
+
const importPendingWarning = importPendingComponents.length ? _chalk().default.yellow(`${_legacy().IMPORT_PENDING_MSG}.\n`) : '';
|
|
215
215
|
const newCompFormatted = newComponents.map(c => format(c));
|
|
216
216
|
const {
|
|
217
217
|
missing,
|
|
218
218
|
nonMissing
|
|
219
219
|
} = (0, _lodash().groupBy)(newCompFormatted, component => {
|
|
220
|
-
return component.includes(
|
|
220
|
+
return component.includes(_legacy().statusFailureMsg) ? 'missing' : 'nonMissing';
|
|
221
221
|
});
|
|
222
222
|
const outdatedTitle = 'pending updates';
|
|
223
223
|
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)';
|
|
@@ -251,7 +251,7 @@ or use "bit merge [component-id] --abort" (for prior "bit merge" command)`;
|
|
|
251
251
|
const compWithIssuesOutput = formatCategory('components with issues', compWithIssuesDesc, componentsWithIssuesToPrint.map(c => format(c.id, true)).sort());
|
|
252
252
|
const invalidDesc = 'these components failed to load';
|
|
253
253
|
const invalidComps = invalidComponents.map(c => format(c.id, false, getInvalidComponentLabel(c.error))).sort();
|
|
254
|
-
const invalidComponentOutput = formatCategory(
|
|
254
|
+
const invalidComponentOutput = formatCategory(_legacy().statusInvalidComponentsMsg, invalidDesc, invalidComps);
|
|
255
255
|
const locallySoftRemovedDesc = '(tag/snap and export the components to update the deletion to the remote. to undo deletion, run "bit recover")';
|
|
256
256
|
const locallySoftRemovedOutput = formatCategory('soft-removed components locally', locallySoftRemovedDesc, locallySoftRemoved.map(c => format(c)).sort());
|
|
257
257
|
const remotelySoftRemovedDesc = '(use "bit remove" to remove them from the workspace. use "bit recover" to undo the deletion)';
|
|
@@ -303,7 +303,7 @@ use "bit fetch ${forkedLaneId.toString()} --lanes" to update ${forkedLaneId.name
|
|
|
303
303
|
const wereWarningsFilteredOut = componentsWithIssuesToPrint.length < componentsWithIssues.length;
|
|
304
304
|
const showWarningsStr = wereWarningsFilteredOut ? `\n${_chalk().default.yellow('to view the warnings, use --warnings flag.')}` : '';
|
|
305
305
|
const statusMsg = importPendingWarning + (0, _lodash().compact)([outdatedStr, pendingMergeStr, updatesFromMainOutput, updatesFromForkedOutput, compDuringMergeStr, localOnlyComponentsOutput, newComponentsOutput, modifiedComponentOutput, snappedComponentsOutput, stagedComponentsOutput, softTaggedComponentsOutput, unavailableOnMainOutput, autoTagPendingOutput, compWithIssuesOutput, invalidComponentOutput, locallySoftRemovedOutput, remotelySoftRemovedOutput]).join(_chalk().default.underline('\n \n') + _chalk().default.white('\n')) + showWarningsStr + troubleshootingStr;
|
|
306
|
-
const results = (statusMsg || _chalk().default.yellow(
|
|
306
|
+
const results = (statusMsg || _chalk().default.yellow(_legacy().statusWorkspaceIsCleanMsg)) + getWorkspaceIssuesOutput() + getLaneStr();
|
|
307
307
|
const exitCode = componentsWithIssues.length && strict ? 1 : 0;
|
|
308
308
|
return {
|
|
309
309
|
data: results,
|
package/dist/status-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_constants","_lodash","_componentVersion","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","TROUBLESHOOTING_MESSAGE","chalk","yellow","BASE_DOCS_DOMAIN","StatusCmd","constructor","status","json","_args","lanes","ignoreCircularDependencies","newComponents","modifiedComponents","stagedComponents","componentsWithIssues","importPendingComponents","autoTagPendingComponents","invalidComponents","locallySoftRemoved","remotelySoftRemoved","outdatedComponents","mergePendingComponents","componentsDuringMergeState","softTaggedComponents","snappedComponents","unavailableOnMain","pendingUpdatesFromMain","updatesFromForked","currentLaneId","forkedLaneId","workspaceIssues","localOnly","map","c","toStringWithoutVersion","id","versions","issues","toObjectIncludeDataAsString","s","error","p","divergeData","toString","report","strict","verbose","warnings","showTroubleshootingLink","format","showIssues","message","localVersions","showSoftTagMsg","idWithIssues","find","isEqual","isSoftTagged","Boolean","softTaggedId","getStatusText","hasTagBlockerIssues","statusFailureMsg","statusWarningsMsg","getColor","messageStatusText","messageStatusTextWithSoftTag","messageStatus","idFormatted","white","cyan","join","snaps","tags","partition","version","isHash","tagsStr","snapsStr","issuesTxt","issuesColor","formatIssues","formatCategory","title","description","compsOutput","titleOutput","underline","descOutput","importPendingWarning","IMPORT_PENDING_MSG","newCompFormatted","missing","nonMissing","groupBy","component","includes","outdatedTitle","outdatedDesc","outdatedComps","latest","latestVersion","headVersion","outdatedStr","pendingMergeTitle","pendingMergeDesc","pendingMergeComps","snapsOnSourceOnly","snapsOnTargetOnly","pendingMergeStr","compDuringMergeTitle","compDuringMergeDesc","compDuringMergeComps","compDuringMergeStr","newComponentDescription","newComponentsTitle","newComponentsOutput","modifiedDesc","modifiedComponentOutput","autoTagPendingTitle","autoTagPendingOutput","componentsWithIssuesToPrint","compWithIssuesDesc","compWithIssuesOutput","sort","invalidDesc","invalidComps","getInvalidComponentLabel","invalidComponentOutput","statusInvalidComponentsMsg","locallySoftRemovedDesc","locallySoftRemovedOutput","remotelySoftRemovedDesc","remotelySoftRemovedOutput","stagedDesc","stagedComps","undefined","stagedComponentsOutput","localOnlyDesc","localOnlyComps","localOnlyComponentsOutput","softTaggedDesc","softTaggedComps","softTaggedComponentsOutput","snappedDesc","snappedComponentsOutput","unavailableOnMainDesc","unavailableOnMainOutput","getUpdateFromMsg","from","err","msg","commonSnapBeforeDiverge","toShortString","updatesFromMainDesc","pendingUpdatesFromMainIds","updatesFromMainOutput","updatesFromForkedOutput","updatesFromForkedDesc","name","pendingUpdatesFromForkedIds","getLaneStr","isDefault","prefix","bold","getWorkspaceIssuesOutput","troubleshootingStr","wereWarningsFilteredOut","showWarningsStr","statusMsg","compact","results","statusWorkspaceIsCleanMsg","exitCode","code","exports","outputForCLI","path"],"sources":["status-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { ComponentID } from '@teambit/component-id';\nimport { SnapsDistance } from '@teambit/legacy/dist/scope/component-ops/snaps-distance';\nimport { IssuesList } from '@teambit/component-issues';\nimport {\n IMPORT_PENDING_MSG,\n statusFailureMsg,\n statusWarningsMsg,\n statusInvalidComponentsMsg,\n statusWorkspaceIsCleanMsg,\n BASE_DOCS_DOMAIN,\n} from '@teambit/legacy/dist/constants';\nimport { compact, groupBy, 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 about Bit components: ${BASE_DOCS_DOMAIN}reference/components/component-anatomy`\n);\n\ntype StatusFlags = {\n strict?: boolean;\n verbose?: boolean;\n lanes?: boolean;\n ignoreCircularDependencies?: boolean;\n warnings?: boolean;\n};\n\ntype StatusJsonResults = {\n newComponents: string[];\n modifiedComponents: string[];\n stagedComponents: Array<{ id: string; versions: string[] }>;\n unavailableOnMain: string[];\n componentsWithIssues: Array<{\n id: string;\n issues: Array<{\n type: string;\n description: string;\n data: any;\n }>;\n }>;\n importPendingComponents: string[];\n autoTagPendingComponents: string[];\n invalidComponents: Array<{ id: string; error: Error }>;\n locallySoftRemoved: string[];\n remotelySoftRemoved: string[];\n outdatedComponents: Array<{ id: string; headVersion: string; latestVersion?: string }>;\n mergePendingComponents: string[];\n componentsDuringMergeState: string[];\n softTaggedComponents: string[];\n snappedComponents: string[];\n localOnly: string[];\n pendingUpdatesFromMain: Array<{\n id: string;\n divergeData: any;\n }>;\n updatesFromForked: Array<{\n id: string;\n divergeData: any;\n }>;\n currentLaneId: string;\n forkedLaneId: string | undefined;\n workspaceIssues: string[];\n};\n\nexport class StatusCmd implements Command {\n name = 'status';\n description = 'present the current status of components in the workspace, including indication of detected issues';\n group = 'development';\n extendedDescription: string;\n alias = 's';\n options = [\n ['j', 'json', 'return a json version of the component'],\n ['w', 'warnings', 'show warnings. by default, only issues that block tag/snap are shown'],\n ['', 'verbose', 'show extra data: full snap hashes for staged components, and divergence point for lanes'],\n ['l', 'lanes', 'when on a lane, show updates from main and updates from forked lanes'],\n ['', 'strict', 'in case issues found, exit with code 1'],\n ['c', 'ignore-circular-dependencies', 'do not check for circular dependencies to get the results quicker'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private status: StatusMain) {}\n\n async json(_args, { lanes, ignoreCircularDependencies }: StatusFlags): Promise<StatusJsonResults> {\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 unavailableOnMain,\n pendingUpdatesFromMain,\n updatesFromForked,\n currentLaneId,\n forkedLaneId,\n workspaceIssues,\n localOnly,\n }: StatusResult = await this.status.status({ lanes, ignoreCircularDependencies });\n return {\n newComponents: newComponents.map((c) => c.toStringWithoutVersion()),\n modifiedComponents: modifiedComponents.map((c) => c.toStringWithoutVersion()),\n stagedComponents: stagedComponents.map((c) => ({ id: c.id.toStringWithoutVersion(), versions: c.versions })),\n unavailableOnMain: unavailableOnMain.map((c) => c.toStringWithoutVersion()),\n componentsWithIssues: componentsWithIssues.map((c) => ({\n id: c.id.toStringWithoutVersion(),\n issues: c.issues?.toObjectIncludeDataAsString(),\n })),\n importPendingComponents: importPendingComponents.map((id) => id.toStringWithoutVersion()),\n autoTagPendingComponents: autoTagPendingComponents.map((s) => s.toStringWithoutVersion()),\n invalidComponents: invalidComponents.map(({ id, error }) => ({ id: id.toStringWithoutVersion(), error })),\n locallySoftRemoved: locallySoftRemoved.map((id) => id.toStringWithoutVersion()),\n remotelySoftRemoved: remotelySoftRemoved.map((id) => id.toStringWithoutVersion()),\n outdatedComponents: outdatedComponents.map((c) => ({ ...c, id: c.id.toStringWithoutVersion() })),\n mergePendingComponents: mergePendingComponents.map((c) => c.id.toStringWithoutVersion()),\n componentsDuringMergeState: componentsDuringMergeState.map((id) => id.toStringWithoutVersion()),\n softTaggedComponents: softTaggedComponents.map((s) => s.toStringWithoutVersion()),\n snappedComponents: snappedComponents.map((s) => s.toStringWithoutVersion()),\n localOnly: localOnly.map((id) => id.toStringWithoutVersion()),\n pendingUpdatesFromMain: pendingUpdatesFromMain.map((p) => ({\n id: p.id.toStringWithoutVersion(),\n divergeData: p.divergeData,\n })),\n updatesFromForked: updatesFromForked.map((p) => ({\n id: p.id.toStringWithoutVersion(),\n divergeData: p.divergeData,\n })),\n currentLaneId: currentLaneId.toString(),\n forkedLaneId: forkedLaneId?.toString(),\n workspaceIssues,\n };\n }\n\n // eslint-disable-next-line complexity\n async report(_args, { strict, verbose, lanes, ignoreCircularDependencies, warnings }: StatusFlags) {\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 localOnly,\n updatesFromForked,\n unavailableOnMain,\n currentLaneId,\n forkedLaneId,\n workspaceIssues,\n }: StatusResult = await this.status.status({ lanes, ignoreCircularDependencies });\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(\n id: ComponentID,\n showIssues = false,\n message?: string,\n localVersions?: string[],\n showSoftTagMsg = true\n ): string {\n const idWithIssues = componentsWithIssues.find((c) => c.id.isEqual(id));\n const isSoftTagged = Boolean(softTaggedComponents.find((softTaggedId) => softTaggedId.isEqual(id)));\n const getStatusText = () => {\n if (message) return message;\n if (idWithIssues) {\n return idWithIssues.issues.hasTagBlockerIssues() ? statusFailureMsg : statusWarningsMsg;\n }\n return 'ok';\n };\n const getColor = () => {\n if (message) return 'yellow';\n if (idWithIssues) return idWithIssues.issues.hasTagBlockerIssues() ? 'red' : 'yellow';\n return 'green';\n };\n const messageStatusText = getStatusText();\n const messageStatusTextWithSoftTag =\n isSoftTagged && showSoftTagMsg ? `${messageStatusText} (soft-tagged)` : messageStatusText;\n const messageStatus = chalk[getColor()](messageStatusTextWithSoftTag);\n let idFormatted = chalk.white(' > ') + chalk.cyan(id.toStringWithoutVersion());\n\n if (!showIssues && !localVersions) {\n return `${idFormatted} ... ${messageStatus}`;\n }\n if (localVersions) {\n if (verbose) {\n idFormatted += `. 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 idFormatted += `. `;\n idFormatted += tagsStr && snapsStr ? `${tagsStr}. and ${snapsStr}` : tagsStr || snapsStr;\n }\n }\n idFormatted += ' ... ';\n if (showIssues && idWithIssues) {\n showTroubleshootingLink = true;\n const issuesTxt = idWithIssues.issues.hasTagBlockerIssues() ? statusFailureMsg : statusWarningsMsg;\n const issuesColor = idWithIssues.issues.hasTagBlockerIssues() ? 'red' : 'yellow';\n return `${idFormatted} ${chalk[issuesColor](issuesTxt)}${formatIssues(idWithIssues.issues)}`;\n }\n return `${idFormatted}${messageStatus}`;\n }\n\n function formatCategory(title: string, description: string, compsOutput: string[]) {\n if (!compsOutput.length) return '';\n const titleOutput = chalk.underline.white(`${title} (${compsOutput.length})`);\n const descOutput = description ? `${description}\\n` : '';\n return [titleOutput, descOutput, ...compsOutput].join('\\n');\n }\n\n const importPendingWarning = importPendingComponents.length ? chalk.yellow(`${IMPORT_PENDING_MSG}.\\n`) : '';\n\n const newCompFormatted = newComponents.map((c) => format(c));\n const { missing, nonMissing } = groupBy(newCompFormatted, (component) => {\n return component.includes(statusFailureMsg) ? 'missing' : 'nonMissing';\n });\n\n const outdatedTitle = '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 const outdatedComps = outdatedComponents.map((component) => {\n const latest =\n component.latestVersion && component.latestVersion !== component.headVersion\n ? ` latest: ${component.latestVersion}`\n : '';\n return ` > ${chalk.cyan(component.id.toStringWithoutVersion())} current: ${component.id.version} head: ${\n component.headVersion\n }${latest}`;\n });\n const outdatedStr = formatCategory(outdatedTitle, outdatedDesc, outdatedComps);\n\n const pendingMergeTitle = 'pending merge';\n const pendingMergeDesc = `(use \"bit reset\" to discard local tags/snaps, and bit checkout head to re-merge with the remote.\nalternatively, to keep local tags/snaps history, use \"bit merge [component-id]\")`;\n const pendingMergeComps = mergePendingComponents.map((component) => {\n return ` > ${chalk.cyan(component.id.toString())} local and remote have diverged and have ${\n component.divergeData.snapsOnSourceOnly.length\n } (source) and ${component.divergeData.snapsOnTargetOnly.length} (target) uncommon snaps respectively`;\n });\n\n const pendingMergeStr = formatCategory(pendingMergeTitle, pendingMergeDesc, pendingMergeComps);\n\n const compDuringMergeTitle = 'components in merge state';\n const compDuringMergeDesc = `(use \"bit snap/tag [--unmerged]\" to complete the merge process.\nto cancel the merge operation, use either \"bit lane merge-abort\" (for prior \"bit lane merge\" command)\nor use \"bit merge [component-id] --abort\" (for prior \"bit merge\" command)`;\n const compDuringMergeComps = componentsDuringMergeState.map((c) => format(c));\n\n const compDuringMergeStr = formatCategory(compDuringMergeTitle, compDuringMergeDesc, compDuringMergeComps);\n\n const newComponentDescription = '\\n(use \"bit snap/tag\" 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 const modifiedComponentOutput = formatCategory(\n 'modified components',\n modifiedDesc,\n modifiedComponents.map((c) => format(c))\n );\n\n const autoTagPendingTitle = 'components pending auto-tag (when their modified dependencies are tagged)';\n const autoTagPendingOutput = formatCategory(\n autoTagPendingTitle,\n '',\n autoTagPendingComponents.map((c) => format(c))\n );\n\n const componentsWithIssuesToPrint = componentsWithIssues.filter((c) => c.issues.hasTagBlockerIssues() || warnings);\n const compWithIssuesDesc = '(fix the issues according to the suggested solution)';\n const compWithIssuesOutput = formatCategory(\n 'components with issues',\n compWithIssuesDesc,\n componentsWithIssuesToPrint.map((c) => format(c.id, true)).sort()\n );\n\n const invalidDesc = 'these components failed to load';\n const invalidComps = invalidComponents.map((c) => format(c.id, false, getInvalidComponentLabel(c.error))).sort();\n const invalidComponentOutput = formatCategory(statusInvalidComponentsMsg, invalidDesc, invalidComps);\n\n const locallySoftRemovedDesc =\n '(tag/snap and export the components to update the deletion to the remote. to undo deletion, run \"bit recover\")';\n const locallySoftRemovedOutput = formatCategory(\n 'soft-removed components locally',\n locallySoftRemovedDesc,\n locallySoftRemoved.map((c) => format(c)).sort()\n );\n\n const remotelySoftRemovedDesc =\n '(use \"bit remove\" to remove them from the workspace. use \"bit recover\" to undo the deletion)';\n const remotelySoftRemovedOutput = formatCategory(\n 'components deleted on the remote',\n remotelySoftRemovedDesc,\n remotelySoftRemoved.map((c) => format(c)).sort()\n );\n\n const stagedDesc = '(use \"bit export\" to push these component versions to the remote scope)';\n const stagedComps = stagedComponents.map((c) => format(c.id, false, undefined, c.versions));\n const stagedComponentsOutput = formatCategory('staged components', stagedDesc, stagedComps);\n\n const localOnlyDesc = '(these components are excluded from tag/snap/export commands)';\n const localOnlyComps = localOnly.map((c) => format(c)).sort();\n const localOnlyComponentsOutput = formatCategory('local-only components', localOnlyDesc, localOnlyComps);\n\n const softTaggedDesc = '(use \"bit tag --persist\" to complete the tag)';\n const softTaggedComps = softTaggedComponents.map((id) => format(id, false, undefined, undefined, false));\n const softTaggedComponentsOutput = formatCategory('soft-tagged components', softTaggedDesc, softTaggedComps);\n\n const snappedDesc = '(use \"bit tag\" or \"bit tag --snapped\" to lock a semver version)';\n const snappedComponentsOutput = formatCategory(\n 'snapped components (tag pending)',\n snappedDesc,\n snappedComponents.map((c) => format(c))\n );\n\n const unavailableOnMainDesc = '(use \"bit checkout head\" to make them available)';\n const unavailableOnMainOutput = formatCategory(\n 'components unavailable on main',\n unavailableOnMainDesc,\n unavailableOnMain.map((c) => format(c))\n );\n\n const getUpdateFromMsg = (divergeData: SnapsDistance, from = 'main'): string => {\n if (divergeData.err) return divergeData.err.message;\n let msg = `${from} is ahead by ${divergeData.snapsOnTargetOnly.length || 0} snaps`;\n if (divergeData.snapsOnSourceOnly && verbose) {\n msg += ` (diverged since ${divergeData.commonSnapBeforeDiverge?.toShortString()})`;\n }\n return msg;\n };\n\n const updatesFromMainDesc = '(use \"bit lane merge main\" to merge the changes)';\n const pendingUpdatesFromMainIds = pendingUpdatesFromMain.map((c) =>\n format(c.id, false, getUpdateFromMsg(c.divergeData))\n );\n const updatesFromMainOutput = formatCategory(\n 'pending updates from main',\n updatesFromMainDesc,\n pendingUpdatesFromMainIds\n );\n\n let updatesFromForkedOutput = '';\n if (forkedLaneId) {\n const updatesFromForkedDesc = `(use \"bit lane merge ${forkedLaneId.toString()}\" to merge the changes\nuse \"bit fetch ${forkedLaneId.toString()} --lanes\" to update ${forkedLaneId.name} locally)`;\n const pendingUpdatesFromForkedIds = updatesFromForked.map((c) =>\n format(c.id, false, getUpdateFromMsg(c.divergeData, forkedLaneId.name))\n );\n updatesFromForkedOutput = formatCategory(\n `updates from ${forkedLaneId.name}`,\n updatesFromForkedDesc,\n pendingUpdatesFromForkedIds\n );\n }\n\n const getLaneStr = () => {\n if (currentLaneId.isDefault()) return '';\n const prefix = `\\n\\ncurrent lane ${chalk.bold(currentLaneId.toString())}`;\n if (lanes) return prefix;\n return `${prefix}\\nconsider adding \"--lanes\" flag to see updates from main/forked`;\n };\n\n const getWorkspaceIssuesOutput = () => {\n if (!workspaceIssues.length) return '';\n const title = chalk.underline.white('workspace issues');\n const issues = workspaceIssues.join('\\n');\n return `\\n\\n${title}\\n${issues}`;\n };\n\n const troubleshootingStr = showTroubleshootingLink ? `\\n${TROUBLESHOOTING_MESSAGE}` : '';\n const wereWarningsFilteredOut = componentsWithIssuesToPrint.length < componentsWithIssues.length;\n const showWarningsStr = wereWarningsFilteredOut\n ? `\\n${chalk.yellow('to view the warnings, use --warnings flag.')}`\n : '';\n\n const statusMsg =\n importPendingWarning +\n compact([\n outdatedStr,\n pendingMergeStr,\n updatesFromMainOutput,\n updatesFromForkedOutput,\n compDuringMergeStr,\n localOnlyComponentsOutput,\n newComponentsOutput,\n modifiedComponentOutput,\n snappedComponentsOutput,\n stagedComponentsOutput,\n softTaggedComponentsOutput,\n unavailableOnMainOutput,\n autoTagPendingOutput,\n compWithIssuesOutput,\n invalidComponentOutput,\n locallySoftRemovedOutput,\n remotelySoftRemovedOutput,\n ]).join(chalk.underline('\\n \\n') + chalk.white('\\n')) +\n showWarningsStr +\n troubleshootingStr;\n\n const results = (statusMsg || chalk.yellow(statusWorkspaceIsCleanMsg)) + getWorkspaceIssuesOutput() + getLaneStr();\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\nfunction getInvalidComponentLabel(error: Error) {\n switch (error.name) {\n case 'MainFileRemoved':\n return 'main-file was removed (use \"bit add\" with \"--main\" and \"--id\" flags to add a main file)';\n case 'ComponentNotFoundInPath':\n return 'component files were deleted (use \"bit remove [component_id]\") or moved (use \"bit move <old-dir> <new-dir>\"). to restore use \"bit checkout reset [component_id]\"';\n case 'ExtensionFileNotFound':\n // @ts-ignore error.path is set for ExtensionFileNotFound\n return `extension file is missing at ${chalk.bold(error.path)}`;\n case 'ComponentsPendingImport':\n return 'component objects are missing from the scope (use \"bit import [component_id] --objects\" to get them back)';\n case 'NoComponentDir':\n return `component files were added individually without root directory (invalid on Harmony. re-add as a directory or use \"bit move --component\" to help with the move)`;\n case 'IgnoredDirectory':\n return `component files or directory were ignored (probably by .gitignore)`;\n case 'NoCommonSnap':\n return `component history is unrelated to main (merge main with --resolve-unrelated flag)`;\n default:\n return error.name;\n }\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAQA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,kBAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,iBAAA,YAAAA,CAAA;IAAA,OAAAL,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MACrB,OAAO,oEAAoE;IAC7E,KAAK,cAAc;MACjB,OAAO,mFAAmF;IAC5F;MACE,OAAOzI,KAAK,CAACuH,IAAI;EACrB;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_legacy","_lodash","_componentVersion","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","TROUBLESHOOTING_MESSAGE","chalk","yellow","BASE_DOCS_DOMAIN","StatusCmd","constructor","status","json","_args","lanes","ignoreCircularDependencies","newComponents","modifiedComponents","stagedComponents","componentsWithIssues","importPendingComponents","autoTagPendingComponents","invalidComponents","locallySoftRemoved","remotelySoftRemoved","outdatedComponents","mergePendingComponents","componentsDuringMergeState","softTaggedComponents","snappedComponents","unavailableOnMain","pendingUpdatesFromMain","updatesFromForked","currentLaneId","forkedLaneId","workspaceIssues","localOnly","map","c","toStringWithoutVersion","id","versions","issues","toObjectIncludeDataAsString","s","error","p","divergeData","toString","report","strict","verbose","warnings","showTroubleshootingLink","format","showIssues","message","localVersions","showSoftTagMsg","idWithIssues","find","isEqual","isSoftTagged","Boolean","softTaggedId","getStatusText","hasTagBlockerIssues","statusFailureMsg","statusWarningsMsg","getColor","messageStatusText","messageStatusTextWithSoftTag","messageStatus","idFormatted","white","cyan","join","snaps","tags","partition","version","isHash","tagsStr","snapsStr","issuesTxt","issuesColor","formatIssues","formatCategory","title","description","compsOutput","titleOutput","underline","descOutput","importPendingWarning","IMPORT_PENDING_MSG","newCompFormatted","missing","nonMissing","groupBy","component","includes","outdatedTitle","outdatedDesc","outdatedComps","latest","latestVersion","headVersion","outdatedStr","pendingMergeTitle","pendingMergeDesc","pendingMergeComps","snapsOnSourceOnly","snapsOnTargetOnly","pendingMergeStr","compDuringMergeTitle","compDuringMergeDesc","compDuringMergeComps","compDuringMergeStr","newComponentDescription","newComponentsTitle","newComponentsOutput","modifiedDesc","modifiedComponentOutput","autoTagPendingTitle","autoTagPendingOutput","componentsWithIssuesToPrint","compWithIssuesDesc","compWithIssuesOutput","sort","invalidDesc","invalidComps","getInvalidComponentLabel","invalidComponentOutput","statusInvalidComponentsMsg","locallySoftRemovedDesc","locallySoftRemovedOutput","remotelySoftRemovedDesc","remotelySoftRemovedOutput","stagedDesc","stagedComps","undefined","stagedComponentsOutput","localOnlyDesc","localOnlyComps","localOnlyComponentsOutput","softTaggedDesc","softTaggedComps","softTaggedComponentsOutput","snappedDesc","snappedComponentsOutput","unavailableOnMainDesc","unavailableOnMainOutput","getUpdateFromMsg","from","err","msg","commonSnapBeforeDiverge","toShortString","updatesFromMainDesc","pendingUpdatesFromMainIds","updatesFromMainOutput","updatesFromForkedOutput","updatesFromForkedDesc","name","pendingUpdatesFromForkedIds","getLaneStr","isDefault","prefix","bold","getWorkspaceIssuesOutput","troubleshootingStr","wereWarningsFilteredOut","showWarningsStr","statusMsg","compact","results","statusWorkspaceIsCleanMsg","exitCode","code","exports","outputForCLI","path"],"sources":["status-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { ComponentID } from '@teambit/component-id';\nimport { SnapsDistance } from '@teambit/component.snap-distance';\nimport { IssuesList } from '@teambit/component-issues';\nimport {\n IMPORT_PENDING_MSG,\n statusFailureMsg,\n statusWarningsMsg,\n statusInvalidComponentsMsg,\n statusWorkspaceIsCleanMsg,\n BASE_DOCS_DOMAIN,\n} from '@teambit/legacy.constants';\nimport { compact, groupBy, 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 about Bit components: ${BASE_DOCS_DOMAIN}reference/components/component-anatomy`\n);\n\ntype StatusFlags = {\n strict?: boolean;\n verbose?: boolean;\n lanes?: boolean;\n ignoreCircularDependencies?: boolean;\n warnings?: boolean;\n};\n\ntype StatusJsonResults = {\n newComponents: string[];\n modifiedComponents: string[];\n stagedComponents: Array<{ id: string; versions: string[] }>;\n unavailableOnMain: string[];\n componentsWithIssues: Array<{\n id: string;\n issues: Array<{\n type: string;\n description: string;\n data: any;\n }>;\n }>;\n importPendingComponents: string[];\n autoTagPendingComponents: string[];\n invalidComponents: Array<{ id: string; error: Error }>;\n locallySoftRemoved: string[];\n remotelySoftRemoved: string[];\n outdatedComponents: Array<{ id: string; headVersion: string; latestVersion?: string }>;\n mergePendingComponents: string[];\n componentsDuringMergeState: string[];\n softTaggedComponents: string[];\n snappedComponents: string[];\n localOnly: string[];\n pendingUpdatesFromMain: Array<{\n id: string;\n divergeData: any;\n }>;\n updatesFromForked: Array<{\n id: string;\n divergeData: any;\n }>;\n currentLaneId: string;\n forkedLaneId: string | undefined;\n workspaceIssues: string[];\n};\n\nexport class StatusCmd implements Command {\n name = 'status';\n description = 'present the current status of components in the workspace, including indication of detected issues';\n group = 'development';\n extendedDescription: string;\n alias = 's';\n options = [\n ['j', 'json', 'return a json version of the component'],\n ['w', 'warnings', 'show warnings. by default, only issues that block tag/snap are shown'],\n ['', 'verbose', 'show extra data: full snap hashes for staged components, and divergence point for lanes'],\n ['l', 'lanes', 'when on a lane, show updates from main and updates from forked lanes'],\n ['', 'strict', 'in case issues found, exit with code 1'],\n ['c', 'ignore-circular-dependencies', 'do not check for circular dependencies to get the results quicker'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private status: StatusMain) {}\n\n async json(_args, { lanes, ignoreCircularDependencies }: StatusFlags): Promise<StatusJsonResults> {\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 unavailableOnMain,\n pendingUpdatesFromMain,\n updatesFromForked,\n currentLaneId,\n forkedLaneId,\n workspaceIssues,\n localOnly,\n }: StatusResult = await this.status.status({ lanes, ignoreCircularDependencies });\n return {\n newComponents: newComponents.map((c) => c.toStringWithoutVersion()),\n modifiedComponents: modifiedComponents.map((c) => c.toStringWithoutVersion()),\n stagedComponents: stagedComponents.map((c) => ({ id: c.id.toStringWithoutVersion(), versions: c.versions })),\n unavailableOnMain: unavailableOnMain.map((c) => c.toStringWithoutVersion()),\n componentsWithIssues: componentsWithIssues.map((c) => ({\n id: c.id.toStringWithoutVersion(),\n issues: c.issues?.toObjectIncludeDataAsString(),\n })),\n importPendingComponents: importPendingComponents.map((id) => id.toStringWithoutVersion()),\n autoTagPendingComponents: autoTagPendingComponents.map((s) => s.toStringWithoutVersion()),\n invalidComponents: invalidComponents.map(({ id, error }) => ({ id: id.toStringWithoutVersion(), error })),\n locallySoftRemoved: locallySoftRemoved.map((id) => id.toStringWithoutVersion()),\n remotelySoftRemoved: remotelySoftRemoved.map((id) => id.toStringWithoutVersion()),\n outdatedComponents: outdatedComponents.map((c) => ({ ...c, id: c.id.toStringWithoutVersion() })),\n mergePendingComponents: mergePendingComponents.map((c) => c.id.toStringWithoutVersion()),\n componentsDuringMergeState: componentsDuringMergeState.map((id) => id.toStringWithoutVersion()),\n softTaggedComponents: softTaggedComponents.map((s) => s.toStringWithoutVersion()),\n snappedComponents: snappedComponents.map((s) => s.toStringWithoutVersion()),\n localOnly: localOnly.map((id) => id.toStringWithoutVersion()),\n pendingUpdatesFromMain: pendingUpdatesFromMain.map((p) => ({\n id: p.id.toStringWithoutVersion(),\n divergeData: p.divergeData,\n })),\n updatesFromForked: updatesFromForked.map((p) => ({\n id: p.id.toStringWithoutVersion(),\n divergeData: p.divergeData,\n })),\n currentLaneId: currentLaneId.toString(),\n forkedLaneId: forkedLaneId?.toString(),\n workspaceIssues,\n };\n }\n\n // eslint-disable-next-line complexity\n async report(_args, { strict, verbose, lanes, ignoreCircularDependencies, warnings }: StatusFlags) {\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 localOnly,\n updatesFromForked,\n unavailableOnMain,\n currentLaneId,\n forkedLaneId,\n workspaceIssues,\n }: StatusResult = await this.status.status({ lanes, ignoreCircularDependencies });\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(\n id: ComponentID,\n showIssues = false,\n message?: string,\n localVersions?: string[],\n showSoftTagMsg = true\n ): string {\n const idWithIssues = componentsWithIssues.find((c) => c.id.isEqual(id));\n const isSoftTagged = Boolean(softTaggedComponents.find((softTaggedId) => softTaggedId.isEqual(id)));\n const getStatusText = () => {\n if (message) return message;\n if (idWithIssues) {\n return idWithIssues.issues.hasTagBlockerIssues() ? statusFailureMsg : statusWarningsMsg;\n }\n return 'ok';\n };\n const getColor = () => {\n if (message) return 'yellow';\n if (idWithIssues) return idWithIssues.issues.hasTagBlockerIssues() ? 'red' : 'yellow';\n return 'green';\n };\n const messageStatusText = getStatusText();\n const messageStatusTextWithSoftTag =\n isSoftTagged && showSoftTagMsg ? `${messageStatusText} (soft-tagged)` : messageStatusText;\n const messageStatus = chalk[getColor()](messageStatusTextWithSoftTag);\n let idFormatted = chalk.white(' > ') + chalk.cyan(id.toStringWithoutVersion());\n\n if (!showIssues && !localVersions) {\n return `${idFormatted} ... ${messageStatus}`;\n }\n if (localVersions) {\n if (verbose) {\n idFormatted += `. 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 idFormatted += `. `;\n idFormatted += tagsStr && snapsStr ? `${tagsStr}. and ${snapsStr}` : tagsStr || snapsStr;\n }\n }\n idFormatted += ' ... ';\n if (showIssues && idWithIssues) {\n showTroubleshootingLink = true;\n const issuesTxt = idWithIssues.issues.hasTagBlockerIssues() ? statusFailureMsg : statusWarningsMsg;\n const issuesColor = idWithIssues.issues.hasTagBlockerIssues() ? 'red' : 'yellow';\n return `${idFormatted} ${chalk[issuesColor](issuesTxt)}${formatIssues(idWithIssues.issues)}`;\n }\n return `${idFormatted}${messageStatus}`;\n }\n\n function formatCategory(title: string, description: string, compsOutput: string[]) {\n if (!compsOutput.length) return '';\n const titleOutput = chalk.underline.white(`${title} (${compsOutput.length})`);\n const descOutput = description ? `${description}\\n` : '';\n return [titleOutput, descOutput, ...compsOutput].join('\\n');\n }\n\n const importPendingWarning = importPendingComponents.length ? chalk.yellow(`${IMPORT_PENDING_MSG}.\\n`) : '';\n\n const newCompFormatted = newComponents.map((c) => format(c));\n const { missing, nonMissing } = groupBy(newCompFormatted, (component) => {\n return component.includes(statusFailureMsg) ? 'missing' : 'nonMissing';\n });\n\n const outdatedTitle = '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 const outdatedComps = outdatedComponents.map((component) => {\n const latest =\n component.latestVersion && component.latestVersion !== component.headVersion\n ? ` latest: ${component.latestVersion}`\n : '';\n return ` > ${chalk.cyan(component.id.toStringWithoutVersion())} current: ${component.id.version} head: ${\n component.headVersion\n }${latest}`;\n });\n const outdatedStr = formatCategory(outdatedTitle, outdatedDesc, outdatedComps);\n\n const pendingMergeTitle = 'pending merge';\n const pendingMergeDesc = `(use \"bit reset\" to discard local tags/snaps, and bit checkout head to re-merge with the remote.\nalternatively, to keep local tags/snaps history, use \"bit merge [component-id]\")`;\n const pendingMergeComps = mergePendingComponents.map((component) => {\n return ` > ${chalk.cyan(component.id.toString())} local and remote have diverged and have ${\n component.divergeData.snapsOnSourceOnly.length\n } (source) and ${component.divergeData.snapsOnTargetOnly.length} (target) uncommon snaps respectively`;\n });\n\n const pendingMergeStr = formatCategory(pendingMergeTitle, pendingMergeDesc, pendingMergeComps);\n\n const compDuringMergeTitle = 'components in merge state';\n const compDuringMergeDesc = `(use \"bit snap/tag [--unmerged]\" to complete the merge process.\nto cancel the merge operation, use either \"bit lane merge-abort\" (for prior \"bit lane merge\" command)\nor use \"bit merge [component-id] --abort\" (for prior \"bit merge\" command)`;\n const compDuringMergeComps = componentsDuringMergeState.map((c) => format(c));\n\n const compDuringMergeStr = formatCategory(compDuringMergeTitle, compDuringMergeDesc, compDuringMergeComps);\n\n const newComponentDescription = '\\n(use \"bit snap/tag\" 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 const modifiedComponentOutput = formatCategory(\n 'modified components',\n modifiedDesc,\n modifiedComponents.map((c) => format(c))\n );\n\n const autoTagPendingTitle = 'components pending auto-tag (when their modified dependencies are tagged)';\n const autoTagPendingOutput = formatCategory(\n autoTagPendingTitle,\n '',\n autoTagPendingComponents.map((c) => format(c))\n );\n\n const componentsWithIssuesToPrint = componentsWithIssues.filter((c) => c.issues.hasTagBlockerIssues() || warnings);\n const compWithIssuesDesc = '(fix the issues according to the suggested solution)';\n const compWithIssuesOutput = formatCategory(\n 'components with issues',\n compWithIssuesDesc,\n componentsWithIssuesToPrint.map((c) => format(c.id, true)).sort()\n );\n\n const invalidDesc = 'these components failed to load';\n const invalidComps = invalidComponents.map((c) => format(c.id, false, getInvalidComponentLabel(c.error))).sort();\n const invalidComponentOutput = formatCategory(statusInvalidComponentsMsg, invalidDesc, invalidComps);\n\n const locallySoftRemovedDesc =\n '(tag/snap and export the components to update the deletion to the remote. to undo deletion, run \"bit recover\")';\n const locallySoftRemovedOutput = formatCategory(\n 'soft-removed components locally',\n locallySoftRemovedDesc,\n locallySoftRemoved.map((c) => format(c)).sort()\n );\n\n const remotelySoftRemovedDesc =\n '(use \"bit remove\" to remove them from the workspace. use \"bit recover\" to undo the deletion)';\n const remotelySoftRemovedOutput = formatCategory(\n 'components deleted on the remote',\n remotelySoftRemovedDesc,\n remotelySoftRemoved.map((c) => format(c)).sort()\n );\n\n const stagedDesc = '(use \"bit export\" to push these component versions to the remote scope)';\n const stagedComps = stagedComponents.map((c) => format(c.id, false, undefined, c.versions));\n const stagedComponentsOutput = formatCategory('staged components', stagedDesc, stagedComps);\n\n const localOnlyDesc = '(these components are excluded from tag/snap/export commands)';\n const localOnlyComps = localOnly.map((c) => format(c)).sort();\n const localOnlyComponentsOutput = formatCategory('local-only components', localOnlyDesc, localOnlyComps);\n\n const softTaggedDesc = '(use \"bit tag --persist\" to complete the tag)';\n const softTaggedComps = softTaggedComponents.map((id) => format(id, false, undefined, undefined, false));\n const softTaggedComponentsOutput = formatCategory('soft-tagged components', softTaggedDesc, softTaggedComps);\n\n const snappedDesc = '(use \"bit tag\" or \"bit tag --snapped\" to lock a semver version)';\n const snappedComponentsOutput = formatCategory(\n 'snapped components (tag pending)',\n snappedDesc,\n snappedComponents.map((c) => format(c))\n );\n\n const unavailableOnMainDesc = '(use \"bit checkout head\" to make them available)';\n const unavailableOnMainOutput = formatCategory(\n 'components unavailable on main',\n unavailableOnMainDesc,\n unavailableOnMain.map((c) => format(c))\n );\n\n const getUpdateFromMsg = (divergeData: SnapsDistance, from = 'main'): string => {\n if (divergeData.err) return divergeData.err.message;\n let msg = `${from} is ahead by ${divergeData.snapsOnTargetOnly.length || 0} snaps`;\n if (divergeData.snapsOnSourceOnly && verbose) {\n msg += ` (diverged since ${divergeData.commonSnapBeforeDiverge?.toShortString()})`;\n }\n return msg;\n };\n\n const updatesFromMainDesc = '(use \"bit lane merge main\" to merge the changes)';\n const pendingUpdatesFromMainIds = pendingUpdatesFromMain.map((c) =>\n format(c.id, false, getUpdateFromMsg(c.divergeData))\n );\n const updatesFromMainOutput = formatCategory(\n 'pending updates from main',\n updatesFromMainDesc,\n pendingUpdatesFromMainIds\n );\n\n let updatesFromForkedOutput = '';\n if (forkedLaneId) {\n const updatesFromForkedDesc = `(use \"bit lane merge ${forkedLaneId.toString()}\" to merge the changes\nuse \"bit fetch ${forkedLaneId.toString()} --lanes\" to update ${forkedLaneId.name} locally)`;\n const pendingUpdatesFromForkedIds = updatesFromForked.map((c) =>\n format(c.id, false, getUpdateFromMsg(c.divergeData, forkedLaneId.name))\n );\n updatesFromForkedOutput = formatCategory(\n `updates from ${forkedLaneId.name}`,\n updatesFromForkedDesc,\n pendingUpdatesFromForkedIds\n );\n }\n\n const getLaneStr = () => {\n if (currentLaneId.isDefault()) return '';\n const prefix = `\\n\\ncurrent lane ${chalk.bold(currentLaneId.toString())}`;\n if (lanes) return prefix;\n return `${prefix}\\nconsider adding \"--lanes\" flag to see updates from main/forked`;\n };\n\n const getWorkspaceIssuesOutput = () => {\n if (!workspaceIssues.length) return '';\n const title = chalk.underline.white('workspace issues');\n const issues = workspaceIssues.join('\\n');\n return `\\n\\n${title}\\n${issues}`;\n };\n\n const troubleshootingStr = showTroubleshootingLink ? `\\n${TROUBLESHOOTING_MESSAGE}` : '';\n const wereWarningsFilteredOut = componentsWithIssuesToPrint.length < componentsWithIssues.length;\n const showWarningsStr = wereWarningsFilteredOut\n ? `\\n${chalk.yellow('to view the warnings, use --warnings flag.')}`\n : '';\n\n const statusMsg =\n importPendingWarning +\n compact([\n outdatedStr,\n pendingMergeStr,\n updatesFromMainOutput,\n updatesFromForkedOutput,\n compDuringMergeStr,\n localOnlyComponentsOutput,\n newComponentsOutput,\n modifiedComponentOutput,\n snappedComponentsOutput,\n stagedComponentsOutput,\n softTaggedComponentsOutput,\n unavailableOnMainOutput,\n autoTagPendingOutput,\n compWithIssuesOutput,\n invalidComponentOutput,\n locallySoftRemovedOutput,\n remotelySoftRemovedOutput,\n ]).join(chalk.underline('\\n \\n') + chalk.white('\\n')) +\n showWarningsStr +\n troubleshootingStr;\n\n const results = (statusMsg || chalk.yellow(statusWorkspaceIsCleanMsg)) + getWorkspaceIssuesOutput() + getLaneStr();\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\nfunction getInvalidComponentLabel(error: Error) {\n switch (error.name) {\n case 'MainFileRemoved':\n return 'main-file was removed (use \"bit add\" with \"--main\" and \"--id\" flags to add a main file)';\n case 'ComponentNotFoundInPath':\n return 'component files were deleted (use \"bit remove [component_id]\") or moved (use \"bit move <old-dir> <new-dir>\"). to restore use \"bit checkout reset [component_id]\"';\n case 'ExtensionFileNotFound':\n // @ts-ignore error.path is set for ExtensionFileNotFound\n return `extension file is missing at ${chalk.bold(error.path)}`;\n case 'ComponentsPendingImport':\n return 'component objects are missing from the scope (use \"bit import [component_id] --objects\" to get them back)';\n case 'NoComponentDir':\n return `component files were added individually without root directory (invalid on Harmony. re-add as a directory or use \"bit move --component\" to help with the move)`;\n case 'IgnoredDirectory':\n return `component files or directory were ignored (probably by .gitignore)`;\n case 'NoCommonSnap':\n return `component history is unrelated to main (merge main with --resolve-unrelated flag)`;\n default:\n return error.name;\n }\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAQA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAA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mK,IAAI,CAAC5H,KAAK,CAACyI,IAAI,CAAC,EAAE;IACjE,KAAK,yBAAyB;MAC5B,OAAO,2GAA2G;IACpH,KAAK,gBAAgB;MACnB,OAAO,gKAAgK;IACzK,KAAK,kBAAkB;MACrB,OAAO,oEAAoE;IAC7E,KAAK,cAAc;MACjB,OAAO,mFAAmF;IAC5F;MACE,OAAOzI,KAAK,CAACuH,IAAI;EACrB;AACF","ignoreList":[]}
|
|
@@ -7,7 +7,7 @@ import { ComponentID } from '@teambit/component-id';
|
|
|
7
7
|
import { Component } from '@teambit/component';
|
|
8
8
|
import { RemoveMain } from '@teambit/remove';
|
|
9
9
|
import { InsightsMain } from '@teambit/insights';
|
|
10
|
-
import { SnapsDistance } from '@teambit/
|
|
10
|
+
import { SnapsDistance } from '@teambit/component.snap-distance';
|
|
11
11
|
import { IssuesMain } from '@teambit/issues';
|
|
12
12
|
import { MiniStatusOpts } from './mini-status-cmd';
|
|
13
13
|
import { LoggerMain, Logger } from '@teambit/logger';
|
|
@@ -53,16 +53,16 @@ function _remove() {
|
|
|
53
53
|
};
|
|
54
54
|
return data;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
const data =
|
|
58
|
-
|
|
56
|
+
function _legacy() {
|
|
57
|
+
const data = require("@teambit/legacy.consumer");
|
|
58
|
+
_legacy = function () {
|
|
59
59
|
return data;
|
|
60
60
|
};
|
|
61
61
|
return data;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function _legacy2() {
|
|
64
64
|
const data = require("@teambit/legacy.component-list");
|
|
65
|
-
|
|
65
|
+
_legacy2 = function () {
|
|
66
66
|
return data;
|
|
67
67
|
};
|
|
68
68
|
return data;
|
|
@@ -147,7 +147,7 @@ class StatusMain {
|
|
|
147
147
|
} = await this.workspace.listWithInvalid(loadOpts);
|
|
148
148
|
const consumer = this.workspace.consumer;
|
|
149
149
|
const laneObj = await consumer.getCurrentLaneObject();
|
|
150
|
-
const componentsList = new (
|
|
150
|
+
const componentsList = new (_legacy2().ComponentsList)(consumer);
|
|
151
151
|
const newComponents = await componentsList.listNewComponents(true, loadOpts);
|
|
152
152
|
const modifiedComponents = await this.workspace.modified(loadOpts);
|
|
153
153
|
const stagedComponents = await componentsList.listExportPendingComponents(laneObj);
|
|
@@ -163,9 +163,9 @@ class StatusMain {
|
|
|
163
163
|
const autoTagPendingComponentsIds = await this.workspace.listAutoTagPendingComponentIds();
|
|
164
164
|
const locallySoftRemoved = await componentsList.listLocallySoftRemoved();
|
|
165
165
|
const remotelySoftRemoved = await componentsList.listRemotelySoftRemoved();
|
|
166
|
-
const importPendingComponents = allInvalidComponents.filter(c => c.err instanceof
|
|
166
|
+
const importPendingComponents = allInvalidComponents.filter(c => c.err instanceof _legacy().ComponentsPendingImport).map(i => i.id);
|
|
167
167
|
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
|
|
168
|
-
const invalidComponents = allInvalidComponents.filter(c => !(c.error instanceof
|
|
168
|
+
const invalidComponents = allInvalidComponents.filter(c => !(c.error instanceof _legacy().ComponentsPendingImport));
|
|
169
169
|
const divergeInvalid = await this.divergeDataErrorsToInvalidComp(allComps);
|
|
170
170
|
invalidComponents.push(...divergeInvalid);
|
|
171
171
|
const idsDuringMergeState = componentsList.listDuringMergeStateComponents();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_pMapSeries","_interopRequireDefault","_componentIssues","_workspace","_lanes","_componentId","_remove","_componentsPendingImport","_legacy","_insights","_issues","_statusCmd","_status","_miniStatusCmd","_logger","_merging","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","BEFORE_STATUS","StatusMain","constructor","workspace","issues","insights","remove","lanes","logger","merging","status","ignoreCircularDependencies","OutsideWorkspaceError","setStatusLine","loadOpts","loadDocs","loadCompositions","components","allComps","invalidComponents","allInvalidComponents","listWithInvalid","consumer","laneObj","getCurrentLaneObject","componentsList","ComponentsList","newComponents","listNewComponents","modifiedComponents","modified","stagedComponents","listExportPendingComponents","addRemovedStagedIfNeeded","stagedComponentsWithVersions","pMapSeries","stagedComp","versions","getLocalTagsOrHashes","scope","objects","id","toComponentId","unavailableOnMain","getUnavailableOnMainComponents","autoTagPendingComponentsIds","listAutoTagPendingComponentIds","locallySoftRemoved","listLocallySoftRemoved","remotelySoftRemoved","listRemotelySoftRemoved","importPendingComponents","filter","c","err","ComponentsPendingImport","map","error","divergeInvalid","divergeDataErrorsToInvalidComp","push","idsDuringMergeState","listDuringMergeStateComponents","mergePendingComponents","listMergePendingComponents","mergePendingComponentsIds","ComponentIdList","fromArray","outdatedComponents","listOutdatedComponents","length","issuesFromFlag","IssuesClasses","CircularDependencies","name","issuesToIgnore","getIssuesToIgnoreGlobally","triggerAddComponentIssues","removeIgnoredIssuesFromComponents","componentsWithIssues","component","state","isEmpty","softTaggedComponents","bySoftTagged","snappedComponents","bySnappedOnMain","pendingUpdatesFromMain","listUpdatesFromMainPending","updatesFromForked","listUpdatesFromForked","currentLaneId","getCurrentLaneId","currentLane","forkedLaneId","forkedFrom","workspaceIssues","getWorkspaceIssues","localOnly","listLocalOnly","sortObjectsWithId","objectsWithId","sort","a","b","toString","localeCompare","onDestroy","ComponentID","sortIds","autoTagPendingComponents","headVersion","latestVersion","divergeData","diverge","componentsDuringMergeState","message","statusMini","componentPattern","opts","ids","idsByPattern","listIds","compFiles","getFilesModification","newComps","forEach","comp","hasVersion","isModified","comps","showIssues","getMany","compWithIssues","removedStagedIds","getRemovedStaged","removedStagedBitIds","nonExistsInStaged","find","isEqualWithoutVersion","modelComps","Promise","all","legacyScope","getModelComponent","_consumer","modelComponent","setDivergeData","getDivergeData","provider","cli","loggerMain","createLogger","StatusAspect","statusMain","register","StatusCmd","MiniStatusCmd","exports","CLIAspect","WorkspaceAspect","InsightsAspect","IssuesAspect","RemoveAspect","LanesAspect","LoggerAspect","MergingAspect","MainRuntime","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 { IssuesClasses, IssuesList } from '@teambit/component-issues';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { LanesAspect, LanesMain } from '@teambit/lanes';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { Component, InvalidComponent } from '@teambit/component';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport ComponentsPendingImport from '@teambit/legacy/dist/consumer/exceptions/components-pending-import';\nimport { ComponentsList } from '@teambit/legacy.component-list';\nimport { ModelComponent } from '@teambit/legacy/dist/scope/models';\nimport { InsightsAspect, InsightsMain } from '@teambit/insights';\nimport { SnapsDistance } from '@teambit/legacy/dist/scope/component-ops/snaps-distance';\nimport { IssuesAspect, IssuesMain } from '@teambit/issues';\nimport { StatusCmd } from './status-cmd';\nimport { StatusAspect } from './status.aspect';\nimport { MiniStatusCmd, MiniStatusOpts } from './mini-status-cmd';\nimport { LoggerAspect, LoggerMain, Logger } from '@teambit/logger';\nimport { MergingAspect, MergingMain } from '@teambit/merging';\n\ntype DivergeDataPerId = { id: ComponentID; divergeData: SnapsDistance };\nconst BEFORE_STATUS = 'fetching status';\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; headVersion: string; latestVersion?: string }[];\n mergePendingComponents: DivergeDataPerId[];\n componentsDuringMergeState: ComponentID[];\n softTaggedComponents: ComponentID[];\n snappedComponents: ComponentID[];\n pendingUpdatesFromMain: DivergeDataPerId[];\n updatesFromForked: DivergeDataPerId[];\n unavailableOnMain: ComponentID[];\n currentLaneId: LaneId;\n forkedLaneId?: LaneId;\n workspaceIssues: string[];\n localOnly: ComponentID[];\n};\n\nexport type MiniStatusResults = {\n modified: ComponentID[];\n newComps: ComponentID[];\n compWithIssues?: Component[];\n};\n\nexport class StatusMain {\n constructor(\n private workspace: Workspace,\n private issues: IssuesMain,\n private insights: InsightsMain,\n private remove: RemoveMain,\n private lanes: LanesMain,\n private logger: Logger,\n private merging: MergingMain\n ) {}\n\n async status({\n lanes,\n ignoreCircularDependencies,\n }: {\n lanes?: boolean;\n ignoreCircularDependencies?: boolean;\n }): Promise<StatusResult> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n this.logger.setStatusLine(BEFORE_STATUS);\n const loadOpts = {\n loadDocs: false,\n loadCompositions: false,\n };\n const { components: allComps, invalidComponents: allInvalidComponents } =\n await this.workspace.listWithInvalid(loadOpts);\n const consumer = this.workspace.consumer;\n const laneObj = await consumer.getCurrentLaneObject();\n const componentsList = new ComponentsList(consumer);\n const newComponents: ConsumerComponent[] = (await componentsList.listNewComponents(\n true,\n loadOpts\n )) as ConsumerComponent[];\n const modifiedComponents = await this.workspace.modified(loadOpts);\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.toComponentId(),\n versions,\n };\n });\n\n const unavailableOnMain = await this.workspace.getUnavailableOnMainComponents();\n const autoTagPendingComponentsIds = await this.workspace.listAutoTagPendingComponentIds();\n const locallySoftRemoved = await componentsList.listLocallySoftRemoved();\n const remotelySoftRemoved = await componentsList.listRemotelySoftRemoved();\n const importPendingComponents = allInvalidComponents\n .filter((c) => c.err instanceof ComponentsPendingImport)\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 divergeInvalid = await this.divergeDataErrorsToInvalidComp(allComps);\n invalidComponents.push(...divergeInvalid);\n const idsDuringMergeState = componentsList.listDuringMergeStateComponents();\n const mergePendingComponents = await this.merging.listMergePendingComponents(componentsList);\n const mergePendingComponentsIds = ComponentIdList.fromArray(mergePendingComponents.map((c) => c.id));\n const outdatedComponents = await componentsList.listOutdatedComponents(mergePendingComponentsIds, loadOpts);\n if (allComps.length) {\n const issuesFromFlag = ignoreCircularDependencies ? [IssuesClasses.CircularDependencies.name] : [];\n const issuesToIgnore = [...this.issues.getIssuesToIgnoreGlobally(), ...issuesFromFlag];\n await this.issues.triggerAddComponentIssues(allComps, issuesToIgnore);\n this.issues.removeIgnoredIssuesFromComponents(allComps);\n }\n const componentsWithIssues = allComps.filter((component) => !component.state.issues.isEmpty());\n const softTaggedComponents = this.workspace.filter.bySoftTagged();\n const snappedComponents = await this.workspace.filter.bySnappedOnMain();\n const pendingUpdatesFromMain = lanes ? await this.lanes.listUpdatesFromMainPending(componentsList) : [];\n const updatesFromForked = lanes ? await this.lanes.listUpdatesFromForked(componentsList) : [];\n const currentLaneId = consumer.getCurrentLaneId();\n const currentLane = await consumer.getCurrentLaneObject();\n const forkedLaneId = currentLane?.forkedFrom;\n const workspaceIssues = this.workspace.getWorkspaceIssues();\n const localOnly = this.workspace.listLocalOnly();\n\n const sortObjectsWithId = <T>(objectsWithId: Array<T & { id: ComponentID }>): Array<T & { id: ComponentID }> => {\n return objectsWithId.sort((a, b) => a.id.toString().localeCompare(b.id.toString()));\n };\n\n await consumer.onDestroy('status');\n return {\n newComponents: ComponentID.sortIds(newComponents.map((c) => c.id)),\n modifiedComponents: ComponentID.sortIds(modifiedComponents.map((c) => c.id)),\n stagedComponents: sortObjectsWithId(stagedComponentsWithVersions),\n componentsWithIssues: sortObjectsWithId(componentsWithIssues.map((c) => ({ id: c.id, issues: c.state.issues }))),\n importPendingComponents, // no need to sort, we use only its length\n autoTagPendingComponents: ComponentID.sortIds(autoTagPendingComponentsIds),\n invalidComponents: sortObjectsWithId(invalidComponents.map((c) => ({ id: c.id, error: c.err }))),\n locallySoftRemoved: ComponentID.sortIds(locallySoftRemoved),\n remotelySoftRemoved: ComponentID.sortIds(remotelySoftRemoved.map((c) => c.id)),\n outdatedComponents: sortObjectsWithId(\n outdatedComponents.map((c) => ({\n id: c.id,\n headVersion: c.headVersion,\n latestVersion: c.latestVersion,\n }))\n ),\n mergePendingComponents: sortObjectsWithId(\n mergePendingComponents.map((c) => ({ id: c.id, divergeData: c.diverge }))\n ),\n componentsDuringMergeState: ComponentID.sortIds(idsDuringMergeState),\n softTaggedComponents: ComponentID.sortIds(softTaggedComponents),\n snappedComponents: ComponentID.sortIds(snappedComponents),\n pendingUpdatesFromMain: sortObjectsWithId(pendingUpdatesFromMain),\n updatesFromForked: sortObjectsWithId(updatesFromForked),\n unavailableOnMain,\n currentLaneId,\n forkedLaneId,\n workspaceIssues: workspaceIssues.map((err) => err.message),\n localOnly,\n };\n }\n\n async statusMini(componentPattern?: string, opts: MiniStatusOpts = {}): Promise<MiniStatusResults> {\n const ids = componentPattern ? await this.workspace.idsByPattern(componentPattern) : this.workspace.listIds();\n const compFiles = await pMapSeries(ids, (id) => this.workspace.getFilesModification(id));\n const modified: ComponentID[] = [];\n const newComps: ComponentID[] = [];\n compFiles.forEach((comp) => {\n if (!comp.id.hasVersion()) newComps.push(comp.id);\n if (comp.isModified()) modified.push(comp.id);\n });\n const loadOpts = {\n loadDocs: false,\n loadCompositions: false,\n };\n const comps = opts.showIssues ? await this.workspace.getMany(ids, loadOpts) : [];\n if (opts.showIssues) {\n const issuesFromFlag = opts.ignoreCircularDependencies ? [IssuesClasses.CircularDependencies.name] : [];\n const issuesToIgnore = [...this.issues.getIssuesToIgnoreGlobally(), ...issuesFromFlag];\n await this.issues.triggerAddComponentIssues(comps, issuesToIgnore);\n this.issues.removeIgnoredIssuesFromComponents(comps);\n }\n const compWithIssues = comps.filter((c) => !c.state.issues.isEmpty());\n\n return { modified, newComps, compWithIssues };\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);\n const nonExistsInStaged = removedStagedBitIds.filter(\n (id) => !stagedComponents.find((c) => c.toComponentId().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 private async divergeDataErrorsToInvalidComp(components: Component[]): Promise<InvalidComponent[]> {\n const invalidComponents: InvalidComponent[] = [];\n await Promise.all(\n components.map(async (component) => {\n const comp = component.state._consumer as ConsumerComponent;\n if (!comp.modelComponent) return;\n await comp.modelComponent.setDivergeData(this.workspace.scope.legacyScope.objects, false);\n const divergeData = comp.modelComponent.getDivergeData();\n if (divergeData.err) {\n invalidComponents.push({ id: component.id, err: divergeData.err });\n }\n })\n );\n return invalidComponents;\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n WorkspaceAspect,\n InsightsAspect,\n IssuesAspect,\n RemoveAspect,\n LanesAspect,\n LoggerAspect,\n MergingAspect,\n ];\n static runtime = MainRuntime;\n static async provider([cli, workspace, insights, issues, remove, lanes, loggerMain, merging]: [\n CLIMain,\n Workspace,\n InsightsMain,\n IssuesMain,\n RemoveMain,\n LanesMain,\n LoggerMain,\n MergingMain,\n ]) {\n const logger = loggerMain.createLogger(StatusAspect.id);\n const statusMain = new StatusMain(workspace, issues, insights, remove, lanes, logger, merging);\n cli.register(new StatusCmd(statusMain), new MiniStatusCmd(statusMain));\n return statusMain;\n }\n}\n\nStatusAspect.addRuntime(StatusMain);\n"],"mappings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G+I,UAAU,CAACC,YAAY,CAACC,sBAAY,CAAChH,EAAE,CAAC;IACvD,MAAMiH,UAAU,GAAG,IAAIzJ,UAAU,CAACE,SAAS,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,KAAK,EAAEC,MAAM,EAAEC,OAAO,CAAC;IAC9F6I,GAAG,CAACK,QAAQ,CAAC,KAAIC,sBAAS,EAACF,UAAU,CAAC,EAAE,KAAIG,8BAAa,EAACH,UAAU,CAAC,CAAC;IACtE,OAAOA,UAAU;EACnB;AACF;AAACI,OAAA,CAAA7J,UAAA,GAAAA,UAAA;AAAAnB,eAAA,CApMYmB,UAAU,WAyKN,EAAE;AAAAnB,eAAA,CAzKNmB,UAAU,kBA0KC,CACpB8J,gBAAS,EACTC,4BAAe,EACfC,0BAAc,EACdC,sBAAY,EACZC,sBAAY,EACZC,oBAAW,EACXC,sBAAY,EACZC,wBAAa,CACd;AAAAxL,eAAA,CAnLUmB,UAAU,aAoLJsK,kBAAW;AAkB9Bd,sBAAY,CAACe,UAAU,CAACvK,UAAU,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_pMapSeries","_interopRequireDefault","_componentIssues","_workspace","_lanes","_componentId","_remove","_legacy","_legacy2","_insights","_issues","_statusCmd","_status","_miniStatusCmd","_logger","_merging","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","BEFORE_STATUS","StatusMain","constructor","workspace","issues","insights","remove","lanes","logger","merging","status","ignoreCircularDependencies","OutsideWorkspaceError","setStatusLine","loadOpts","loadDocs","loadCompositions","components","allComps","invalidComponents","allInvalidComponents","listWithInvalid","consumer","laneObj","getCurrentLaneObject","componentsList","ComponentsList","newComponents","listNewComponents","modifiedComponents","modified","stagedComponents","listExportPendingComponents","addRemovedStagedIfNeeded","stagedComponentsWithVersions","pMapSeries","stagedComp","versions","getLocalTagsOrHashes","scope","objects","id","toComponentId","unavailableOnMain","getUnavailableOnMainComponents","autoTagPendingComponentsIds","listAutoTagPendingComponentIds","locallySoftRemoved","listLocallySoftRemoved","remotelySoftRemoved","listRemotelySoftRemoved","importPendingComponents","filter","c","err","ComponentsPendingImport","map","error","divergeInvalid","divergeDataErrorsToInvalidComp","push","idsDuringMergeState","listDuringMergeStateComponents","mergePendingComponents","listMergePendingComponents","mergePendingComponentsIds","ComponentIdList","fromArray","outdatedComponents","listOutdatedComponents","length","issuesFromFlag","IssuesClasses","CircularDependencies","name","issuesToIgnore","getIssuesToIgnoreGlobally","triggerAddComponentIssues","removeIgnoredIssuesFromComponents","componentsWithIssues","component","state","isEmpty","softTaggedComponents","bySoftTagged","snappedComponents","bySnappedOnMain","pendingUpdatesFromMain","listUpdatesFromMainPending","updatesFromForked","listUpdatesFromForked","currentLaneId","getCurrentLaneId","currentLane","forkedLaneId","forkedFrom","workspaceIssues","getWorkspaceIssues","localOnly","listLocalOnly","sortObjectsWithId","objectsWithId","sort","a","b","toString","localeCompare","onDestroy","ComponentID","sortIds","autoTagPendingComponents","headVersion","latestVersion","divergeData","diverge","componentsDuringMergeState","message","statusMini","componentPattern","opts","ids","idsByPattern","listIds","compFiles","getFilesModification","newComps","forEach","comp","hasVersion","isModified","comps","showIssues","getMany","compWithIssues","removedStagedIds","getRemovedStaged","removedStagedBitIds","nonExistsInStaged","find","isEqualWithoutVersion","modelComps","Promise","all","legacyScope","getModelComponent","_consumer","modelComponent","setDivergeData","getDivergeData","provider","cli","loggerMain","createLogger","StatusAspect","statusMain","register","StatusCmd","MiniStatusCmd","exports","CLIAspect","WorkspaceAspect","InsightsAspect","IssuesAspect","RemoveAspect","LanesAspect","LoggerAspect","MergingAspect","MainRuntime","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 { IssuesClasses, IssuesList } from '@teambit/component-issues';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { LanesAspect, LanesMain } from '@teambit/lanes';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { Component, InvalidComponent } from '@teambit/component';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport { ComponentsPendingImport } from '@teambit/legacy.consumer';\nimport { ComponentsList } from '@teambit/legacy.component-list';\nimport { ModelComponent } from '@teambit/scope.objects';\nimport { InsightsAspect, InsightsMain } from '@teambit/insights';\nimport { SnapsDistance } from '@teambit/component.snap-distance';\nimport { IssuesAspect, IssuesMain } from '@teambit/issues';\nimport { StatusCmd } from './status-cmd';\nimport { StatusAspect } from './status.aspect';\nimport { MiniStatusCmd, MiniStatusOpts } from './mini-status-cmd';\nimport { LoggerAspect, LoggerMain, Logger } from '@teambit/logger';\nimport { MergingAspect, MergingMain } from '@teambit/merging';\n\ntype DivergeDataPerId = { id: ComponentID; divergeData: SnapsDistance };\nconst BEFORE_STATUS = 'fetching status';\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; headVersion: string; latestVersion?: string }[];\n mergePendingComponents: DivergeDataPerId[];\n componentsDuringMergeState: ComponentID[];\n softTaggedComponents: ComponentID[];\n snappedComponents: ComponentID[];\n pendingUpdatesFromMain: DivergeDataPerId[];\n updatesFromForked: DivergeDataPerId[];\n unavailableOnMain: ComponentID[];\n currentLaneId: LaneId;\n forkedLaneId?: LaneId;\n workspaceIssues: string[];\n localOnly: ComponentID[];\n};\n\nexport type MiniStatusResults = {\n modified: ComponentID[];\n newComps: ComponentID[];\n compWithIssues?: Component[];\n};\n\nexport class StatusMain {\n constructor(\n private workspace: Workspace,\n private issues: IssuesMain,\n private insights: InsightsMain,\n private remove: RemoveMain,\n private lanes: LanesMain,\n private logger: Logger,\n private merging: MergingMain\n ) {}\n\n async status({\n lanes,\n ignoreCircularDependencies,\n }: {\n lanes?: boolean;\n ignoreCircularDependencies?: boolean;\n }): Promise<StatusResult> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n this.logger.setStatusLine(BEFORE_STATUS);\n const loadOpts = {\n loadDocs: false,\n loadCompositions: false,\n };\n const { components: allComps, invalidComponents: allInvalidComponents } =\n await this.workspace.listWithInvalid(loadOpts);\n const consumer = this.workspace.consumer;\n const laneObj = await consumer.getCurrentLaneObject();\n const componentsList = new ComponentsList(consumer);\n const newComponents: ConsumerComponent[] = (await componentsList.listNewComponents(\n true,\n loadOpts\n )) as ConsumerComponent[];\n const modifiedComponents = await this.workspace.modified(loadOpts);\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.toComponentId(),\n versions,\n };\n });\n\n const unavailableOnMain = await this.workspace.getUnavailableOnMainComponents();\n const autoTagPendingComponentsIds = await this.workspace.listAutoTagPendingComponentIds();\n const locallySoftRemoved = await componentsList.listLocallySoftRemoved();\n const remotelySoftRemoved = await componentsList.listRemotelySoftRemoved();\n const importPendingComponents = allInvalidComponents\n .filter((c) => c.err instanceof ComponentsPendingImport)\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 divergeInvalid = await this.divergeDataErrorsToInvalidComp(allComps);\n invalidComponents.push(...divergeInvalid);\n const idsDuringMergeState = componentsList.listDuringMergeStateComponents();\n const mergePendingComponents = await this.merging.listMergePendingComponents(componentsList);\n const mergePendingComponentsIds = ComponentIdList.fromArray(mergePendingComponents.map((c) => c.id));\n const outdatedComponents = await componentsList.listOutdatedComponents(mergePendingComponentsIds, loadOpts);\n if (allComps.length) {\n const issuesFromFlag = ignoreCircularDependencies ? [IssuesClasses.CircularDependencies.name] : [];\n const issuesToIgnore = [...this.issues.getIssuesToIgnoreGlobally(), ...issuesFromFlag];\n await this.issues.triggerAddComponentIssues(allComps, issuesToIgnore);\n this.issues.removeIgnoredIssuesFromComponents(allComps);\n }\n const componentsWithIssues = allComps.filter((component) => !component.state.issues.isEmpty());\n const softTaggedComponents = this.workspace.filter.bySoftTagged();\n const snappedComponents = await this.workspace.filter.bySnappedOnMain();\n const pendingUpdatesFromMain = lanes ? await this.lanes.listUpdatesFromMainPending(componentsList) : [];\n const updatesFromForked = lanes ? await this.lanes.listUpdatesFromForked(componentsList) : [];\n const currentLaneId = consumer.getCurrentLaneId();\n const currentLane = await consumer.getCurrentLaneObject();\n const forkedLaneId = currentLane?.forkedFrom;\n const workspaceIssues = this.workspace.getWorkspaceIssues();\n const localOnly = this.workspace.listLocalOnly();\n\n const sortObjectsWithId = <T>(objectsWithId: Array<T & { id: ComponentID }>): Array<T & { id: ComponentID }> => {\n return objectsWithId.sort((a, b) => a.id.toString().localeCompare(b.id.toString()));\n };\n\n await consumer.onDestroy('status');\n return {\n newComponents: ComponentID.sortIds(newComponents.map((c) => c.id)),\n modifiedComponents: ComponentID.sortIds(modifiedComponents.map((c) => c.id)),\n stagedComponents: sortObjectsWithId(stagedComponentsWithVersions),\n componentsWithIssues: sortObjectsWithId(componentsWithIssues.map((c) => ({ id: c.id, issues: c.state.issues }))),\n importPendingComponents, // no need to sort, we use only its length\n autoTagPendingComponents: ComponentID.sortIds(autoTagPendingComponentsIds),\n invalidComponents: sortObjectsWithId(invalidComponents.map((c) => ({ id: c.id, error: c.err }))),\n locallySoftRemoved: ComponentID.sortIds(locallySoftRemoved),\n remotelySoftRemoved: ComponentID.sortIds(remotelySoftRemoved.map((c) => c.id)),\n outdatedComponents: sortObjectsWithId(\n outdatedComponents.map((c) => ({\n id: c.id,\n headVersion: c.headVersion,\n latestVersion: c.latestVersion,\n }))\n ),\n mergePendingComponents: sortObjectsWithId(\n mergePendingComponents.map((c) => ({ id: c.id, divergeData: c.diverge }))\n ),\n componentsDuringMergeState: ComponentID.sortIds(idsDuringMergeState),\n softTaggedComponents: ComponentID.sortIds(softTaggedComponents),\n snappedComponents: ComponentID.sortIds(snappedComponents),\n pendingUpdatesFromMain: sortObjectsWithId(pendingUpdatesFromMain),\n updatesFromForked: sortObjectsWithId(updatesFromForked),\n unavailableOnMain,\n currentLaneId,\n forkedLaneId,\n workspaceIssues: workspaceIssues.map((err) => err.message),\n localOnly,\n };\n }\n\n async statusMini(componentPattern?: string, opts: MiniStatusOpts = {}): Promise<MiniStatusResults> {\n const ids = componentPattern ? await this.workspace.idsByPattern(componentPattern) : this.workspace.listIds();\n const compFiles = await pMapSeries(ids, (id) => this.workspace.getFilesModification(id));\n const modified: ComponentID[] = [];\n const newComps: ComponentID[] = [];\n compFiles.forEach((comp) => {\n if (!comp.id.hasVersion()) newComps.push(comp.id);\n if (comp.isModified()) modified.push(comp.id);\n });\n const loadOpts = {\n loadDocs: false,\n loadCompositions: false,\n };\n const comps = opts.showIssues ? await this.workspace.getMany(ids, loadOpts) : [];\n if (opts.showIssues) {\n const issuesFromFlag = opts.ignoreCircularDependencies ? [IssuesClasses.CircularDependencies.name] : [];\n const issuesToIgnore = [...this.issues.getIssuesToIgnoreGlobally(), ...issuesFromFlag];\n await this.issues.triggerAddComponentIssues(comps, issuesToIgnore);\n this.issues.removeIgnoredIssuesFromComponents(comps);\n }\n const compWithIssues = comps.filter((c) => !c.state.issues.isEmpty());\n\n return { modified, newComps, compWithIssues };\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);\n const nonExistsInStaged = removedStagedBitIds.filter(\n (id) => !stagedComponents.find((c) => c.toComponentId().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 private async divergeDataErrorsToInvalidComp(components: Component[]): Promise<InvalidComponent[]> {\n const invalidComponents: InvalidComponent[] = [];\n await Promise.all(\n components.map(async (component) => {\n const comp = component.state._consumer as ConsumerComponent;\n if (!comp.modelComponent) return;\n await comp.modelComponent.setDivergeData(this.workspace.scope.legacyScope.objects, false);\n const divergeData = comp.modelComponent.getDivergeData();\n if (divergeData.err) {\n invalidComponents.push({ id: component.id, err: divergeData.err });\n }\n })\n );\n return invalidComponents;\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n WorkspaceAspect,\n InsightsAspect,\n IssuesAspect,\n RemoveAspect,\n LanesAspect,\n LoggerAspect,\n MergingAspect,\n ];\n static runtime = MainRuntime;\n static async provider([cli, workspace, insights, issues, remove, lanes, loggerMain, merging]: [\n CLIMain,\n Workspace,\n InsightsMain,\n IssuesMain,\n RemoveMain,\n LanesMain,\n LoggerMain,\n MergingMain,\n ]) {\n const logger = loggerMain.createLogger(StatusAspect.id);\n const statusMain = new StatusMain(workspace, issues, insights, remove, lanes, logger, merging);\n cli.register(new StatusCmd(statusMain), new MiniStatusCmd(statusMain));\n return statusMain;\n }\n}\n\nStatusAspect.addRuntime(StatusMain);\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAA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G,CAACK,QAAQ,CAAC,KAAIC,sBAAS,EAACF,UAAU,CAAC,EAAE,KAAIG,8BAAa,EAACH,UAAU,CAAC,CAAC;IACtE,OAAOA,UAAU;EACnB;AACF;AAACI,OAAA,CAAA7J,UAAA,GAAAA,UAAA;AAAAnB,eAAA,CApMYmB,UAAU,WAyKN,EAAE;AAAAnB,eAAA,CAzKNmB,UAAU,kBA0KC,CACpB8J,gBAAS,EACTC,4BAAe,EACfC,0BAAc,EACdC,sBAAY,EACZC,sBAAY,EACZC,oBAAW,EACXC,sBAAY,EACZC,wBAAa,CACd;AAAAxL,eAAA,CAnLUmB,UAAU,aAoLJsK,kBAAW;AAkB9Bd,sBAAY,CAACe,UAAU,CAACvK,UAAU,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/status",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.488",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/component/status",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "status",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.488"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -16,17 +16,22 @@
|
|
|
16
16
|
"@teambit/component-version": "1.0.3",
|
|
17
17
|
"@teambit/harmony": "0.4.6",
|
|
18
18
|
"@teambit/lane-id": "0.0.311",
|
|
19
|
-
"@teambit/cli": "0.0.
|
|
19
|
+
"@teambit/cli": "0.0.1065",
|
|
20
|
+
"@teambit/legacy.constants": "0.0.1",
|
|
20
21
|
"@teambit/component-issues": "0.0.151",
|
|
21
|
-
"@teambit/component": "
|
|
22
|
-
"@teambit/
|
|
23
|
-
"@teambit/
|
|
24
|
-
"@teambit/
|
|
25
|
-
"@teambit/
|
|
26
|
-
"@teambit/
|
|
27
|
-
"@teambit/
|
|
28
|
-
"@teambit/
|
|
29
|
-
"@teambit/
|
|
22
|
+
"@teambit/component.snap-distance": "0.0.1",
|
|
23
|
+
"@teambit/component": "1.0.488",
|
|
24
|
+
"@teambit/insights": "1.0.488",
|
|
25
|
+
"@teambit/issues": "1.0.488",
|
|
26
|
+
"@teambit/lanes": "1.0.488",
|
|
27
|
+
"@teambit/legacy.component-list": "0.0.55",
|
|
28
|
+
"@teambit/legacy.consumer-component": "0.0.2",
|
|
29
|
+
"@teambit/legacy.consumer": "0.0.1",
|
|
30
|
+
"@teambit/logger": "0.0.1158",
|
|
31
|
+
"@teambit/merging": "1.0.488",
|
|
32
|
+
"@teambit/remove": "1.0.488",
|
|
33
|
+
"@teambit/scope.objects": "0.0.1",
|
|
34
|
+
"@teambit/workspace": "1.0.488"
|
|
30
35
|
},
|
|
31
36
|
"devDependencies": {
|
|
32
37
|
"@types/lodash": "4.14.165",
|
|
File without changes
|