@teambit/lanes 1.0.330 → 1.0.331
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 +11 -11
- package/artifacts/preview/teambit_lanes_lanes-preview.js +1 -1
- package/artifacts/schema.json +200 -943
- package/dist/create-lane.js +4 -4
- package/dist/create-lane.js.map +1 -1
- package/dist/lane.cmd.js +4 -4
- package/dist/lane.cmd.js.map +1 -1
- package/dist/lanes.main.runtime.js +15 -15
- package/dist/lanes.main.runtime.js.map +1 -1
- package/dist/{preview-1720513025675.js → preview-1720667996237.js} +2 -2
- package/dist/remove-lanes.d.ts +4 -0
- package/dist/remove-lanes.js +93 -0
- package/dist/remove-lanes.js.map +1 -0
- package/package.json +31 -27
package/dist/create-lane.js
CHANGED
@@ -49,9 +49,9 @@ function _lodash() {
|
|
49
49
|
};
|
50
50
|
return data;
|
51
51
|
}
|
52
|
-
function
|
53
|
-
const data = require("@teambit/
|
54
|
-
|
52
|
+
function _cloudModules() {
|
53
|
+
const data = require("@teambit/cloud.modules.get-cloud-user");
|
54
|
+
_cloudModules = function () {
|
55
55
|
return data;
|
56
56
|
};
|
57
57
|
return data;
|
@@ -73,7 +73,7 @@ async function createLane(workspace, laneName, scopeName, remoteLane) {
|
|
73
73
|
if (lanes.find(lane => lane.name === laneName && lane.scope === scopeName)) {
|
74
74
|
throw new (_bitError().BitError)(`lane "${scopeName}/${laneName}" already exists, to switch to this lane, please use "bit switch" command`);
|
75
75
|
}
|
76
|
-
const bitCloudUser = await (0,
|
76
|
+
const bitCloudUser = await (0, _cloudModules().getBitCloudUser)();
|
77
77
|
throwForInvalidLaneName(laneName);
|
78
78
|
if (!(0, _legacyBitId().isValidScopeName)(scopeName)) {
|
79
79
|
throw new (_legacyBitId().InvalidScopeName)(scopeName);
|
package/dist/create-lane.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_bitError","data","require","_lane","_interopRequireDefault","_componentVersion","_componentsList","_objects","_lodash","_getCloudUser","_legacyBitId","e","__esModule","default","MAX_LANE_NAME_LENGTH","createLane","workspace","laneName","scopeName","remoteLane","consumer","lanes","scope","listLanes","find","lane","name","BitError","bitCloudUser","getBitCloudUser","throwForInvalidLaneName","isValidScopeName","InvalidScopeName","throwForStagedComponents","getDataToPopulateLaneObjectIfNeeded","components","currentLaneObject","getCurrentLaneObject","laneComponents","workspaceIds","bitMap","getAllBitIds","laneComponentWithBitmapHead","Promise","all","map","id","head","compId","changeVersion","toString","isRemoved","isComponentRemoved","bitmapHead","searchWithoutVersion","isSnap","version","Ref","from","compact","forkedFrom","getLaneOrigin","newLane","Lane","hash","log","create","dataToPopulate","setLaneComponents","laneHistoryMsg","saveLane","createLaneInScope","legacyScope","currentLaneId","laneId","undefined","isLaneExported","currentLane","isValidLaneName","componentList","ComponentsList","stagedComponents","listExportPendingComponentsIds","length","join","val","test"],"sources":["create-lane.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport { LaneId } from '@teambit/lane-id';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { ScopeMain } from '@teambit/scope';\n// import { ComponentIdList } from '@teambit/component-id';\nimport Lane, { LaneComponent } from '@teambit/legacy/dist/scope/models/lane';\nimport { isSnap } from '@teambit/component-version';\nimport ComponentsList from '@teambit/legacy/dist/consumer/component/components-list';\nimport { Ref } from '@teambit/legacy/dist/scope/objects';\nimport { Workspace } from '@teambit/workspace';\nimport { compact } from 'lodash';\nimport { getBitCloudUser } from '@teambit/legacy/dist/utils/bit/get-cloud-user';\nimport { InvalidScopeName, isValidScopeName } from '@teambit/legacy-bit-id';\n\nconst MAX_LANE_NAME_LENGTH = 800;\n\nexport async function createLane(\n workspace: Workspace,\n laneName: string,\n scopeName: string,\n remoteLane?: Lane\n): Promise<Lane> {\n const consumer = workspace.consumer;\n const lanes = await consumer.scope.listLanes();\n if (lanes.find((lane) => lane.name === laneName && lane.scope === scopeName)) {\n throw new BitError(\n `lane \"${scopeName}/${laneName}\" already exists, to switch to this lane, please use \"bit switch\" command`\n );\n }\n const bitCloudUser = await getBitCloudUser();\n throwForInvalidLaneName(laneName);\n if (!isValidScopeName(scopeName)) {\n throw new InvalidScopeName(scopeName);\n }\n await throwForStagedComponents(consumer);\n const getDataToPopulateLaneObjectIfNeeded = async (): Promise<LaneComponent[]> => {\n if (remoteLane) return remoteLane.components;\n // when branching from one lane to another, copy components from the origin lane\n // when branching from main, no need to copy anything\n const currentLaneObject = await consumer.getCurrentLaneObject();\n if (!currentLaneObject) return [];\n const laneComponents = currentLaneObject.components;\n const workspaceIds = consumer.bitMap.getAllBitIds();\n const laneComponentWithBitmapHead = await Promise.all(\n laneComponents.map(async ({ id, head }) => {\n const compId = id.changeVersion(head.toString());\n const isRemoved = await workspace.scope.isComponentRemoved(compId);\n if (isRemoved) return null;\n const bitmapHead = workspaceIds.searchWithoutVersion(id);\n if (bitmapHead && isSnap(bitmapHead.version)) {\n return { id, head: Ref.from(bitmapHead.version as string) };\n }\n return { id, head };\n })\n );\n return compact(laneComponentWithBitmapHead);\n };\n\n const forkedFrom = await getLaneOrigin(consumer);\n const newLane = remoteLane\n ? Lane.from({\n name: laneName,\n hash: remoteLane.hash().toString(),\n log: remoteLane.log,\n scope: remoteLane.scope,\n forkedFrom,\n })\n : Lane.create(laneName, scopeName, forkedFrom, bitCloudUser);\n const dataToPopulate = await getDataToPopulateLaneObjectIfNeeded();\n newLane.setLaneComponents(dataToPopulate);\n\n const laneHistoryMsg = remoteLane ? `fork lane \"${remoteLane.name}\"` : 'new lane';\n await consumer.scope.lanes.saveLane(newLane, { laneHistoryMsg });\n\n return newLane;\n}\n\nexport async function createLaneInScope(laneName: string, scope: ScopeMain): Promise<Lane> {\n const lanes = await scope.legacyScope.listLanes();\n if (lanes.find((lane) => lane.name === laneName)) {\n throw new BitError(`lane \"${laneName}\" already exists`);\n }\n throwForInvalidLaneName(laneName);\n const newLane = Lane.create(laneName, scope.name);\n await scope.legacyScope.lanes.saveLane(newLane, { laneHistoryMsg: 'new lane (created from scope)' });\n return newLane;\n}\n\nasync function getLaneOrigin(consumer: Consumer): Promise<LaneId | undefined> {\n const currentLaneId = consumer.bitMap.laneId;\n if (!currentLaneId) return undefined;\n if (consumer.bitMap.isLaneExported) {\n return currentLaneId;\n }\n // current lane is new.\n const currentLane = await consumer.getCurrentLaneObject();\n return currentLane?.forkedFrom;\n}\n\nexport function throwForInvalidLaneName(laneName: string) {\n if (!isValidLaneName(laneName)) {\n throw new BitError(\n `lane \"${laneName}\" has invalid characters. lane name can only contain alphanumeric, lowercase characters, and the following [\"-\", \"_\", \"$\", \"!\"]`\n );\n }\n}\n\nexport async function throwForStagedComponents(consumer: Consumer) {\n const componentList = new ComponentsList(consumer);\n const stagedComponents = await componentList.listExportPendingComponentsIds();\n if (stagedComponents.length) {\n throw new BitError(\n `unable to switch/create a new lane, please export or reset the following components first: ${stagedComponents.join(\n ', '\n )}`\n );\n }\n}\n\nfunction isValidLaneName(val: unknown): boolean {\n if (typeof val !== 'string') return false;\n if (val.length > MAX_LANE_NAME_LENGTH) return false;\n // @todo: should we allow slash? if so, we should probably replace the lane-delimiter with something else. (maybe \":\")\n return /^[$\\-_!a-z0-9]+$/.test(val);\n}\n"],"mappings":";;;;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,kBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,iBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,gBAAA;EAAA,MAAAL,I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componentVersion","_componentsList","_objects","_lodash","_cloudModules","_legacyBitId","e","__esModule","default","MAX_LANE_NAME_LENGTH","createLane","workspace","laneName","scopeName","remoteLane","consumer","lanes","scope","listLanes","find","lane","name","BitError","bitCloudUser","getBitCloudUser","throwForInvalidLaneName","isValidScopeName","InvalidScopeName","throwForStagedComponents","getDataToPopulateLaneObjectIfNeeded","components","currentLaneObject","getCurrentLaneObject","laneComponents","workspaceIds","bitMap","getAllBitIds","laneComponentWithBitmapHead","Promise","all","map","id","head","compId","changeVersion","toString","isRemoved","isComponentRemoved","bitmapHead","searchWithoutVersion","isSnap","version","Ref","from","compact","forkedFrom","getLaneOrigin","newLane","Lane","hash","log","create","dataToPopulate","setLaneComponents","laneHistoryMsg","saveLane","createLaneInScope","legacyScope","currentLaneId","laneId","undefined","isLaneExported","currentLane","isValidLaneName","componentList","ComponentsList","stagedComponents","listExportPendingComponentsIds","length","join","val","test"],"sources":["create-lane.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport { LaneId } from '@teambit/lane-id';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { ScopeMain } from '@teambit/scope';\n// import { ComponentIdList } from '@teambit/component-id';\nimport Lane, { LaneComponent } from '@teambit/legacy/dist/scope/models/lane';\nimport { isSnap } from '@teambit/component-version';\nimport ComponentsList from '@teambit/legacy/dist/consumer/component/components-list';\nimport { Ref } from '@teambit/legacy/dist/scope/objects';\nimport { Workspace } from '@teambit/workspace';\nimport { compact } from 'lodash';\nimport { getBitCloudUser } from '@teambit/cloud.modules.get-cloud-user';\nimport { InvalidScopeName, isValidScopeName } from '@teambit/legacy-bit-id';\n\nconst MAX_LANE_NAME_LENGTH = 800;\n\nexport async function createLane(\n workspace: Workspace,\n laneName: string,\n scopeName: string,\n remoteLane?: Lane\n): Promise<Lane> {\n const consumer = workspace.consumer;\n const lanes = await consumer.scope.listLanes();\n if (lanes.find((lane) => lane.name === laneName && lane.scope === scopeName)) {\n throw new BitError(\n `lane \"${scopeName}/${laneName}\" already exists, to switch to this lane, please use \"bit switch\" command`\n );\n }\n const bitCloudUser = await getBitCloudUser();\n throwForInvalidLaneName(laneName);\n if (!isValidScopeName(scopeName)) {\n throw new InvalidScopeName(scopeName);\n }\n await throwForStagedComponents(consumer);\n const getDataToPopulateLaneObjectIfNeeded = async (): Promise<LaneComponent[]> => {\n if (remoteLane) return remoteLane.components;\n // when branching from one lane to another, copy components from the origin lane\n // when branching from main, no need to copy anything\n const currentLaneObject = await consumer.getCurrentLaneObject();\n if (!currentLaneObject) return [];\n const laneComponents = currentLaneObject.components;\n const workspaceIds = consumer.bitMap.getAllBitIds();\n const laneComponentWithBitmapHead = await Promise.all(\n laneComponents.map(async ({ id, head }) => {\n const compId = id.changeVersion(head.toString());\n const isRemoved = await workspace.scope.isComponentRemoved(compId);\n if (isRemoved) return null;\n const bitmapHead = workspaceIds.searchWithoutVersion(id);\n if (bitmapHead && isSnap(bitmapHead.version)) {\n return { id, head: Ref.from(bitmapHead.version as string) };\n }\n return { id, head };\n })\n );\n return compact(laneComponentWithBitmapHead);\n };\n\n const forkedFrom = await getLaneOrigin(consumer);\n const newLane = remoteLane\n ? Lane.from({\n name: laneName,\n hash: remoteLane.hash().toString(),\n log: remoteLane.log,\n scope: remoteLane.scope,\n forkedFrom,\n })\n : Lane.create(laneName, scopeName, forkedFrom, bitCloudUser);\n const dataToPopulate = await getDataToPopulateLaneObjectIfNeeded();\n newLane.setLaneComponents(dataToPopulate);\n\n const laneHistoryMsg = remoteLane ? `fork lane \"${remoteLane.name}\"` : 'new lane';\n await consumer.scope.lanes.saveLane(newLane, { laneHistoryMsg });\n\n return newLane;\n}\n\nexport async function createLaneInScope(laneName: string, scope: ScopeMain): Promise<Lane> {\n const lanes = await scope.legacyScope.listLanes();\n if (lanes.find((lane) => lane.name === laneName)) {\n throw new BitError(`lane \"${laneName}\" already exists`);\n }\n throwForInvalidLaneName(laneName);\n const newLane = Lane.create(laneName, scope.name);\n await scope.legacyScope.lanes.saveLane(newLane, { laneHistoryMsg: 'new lane (created from scope)' });\n return newLane;\n}\n\nasync function getLaneOrigin(consumer: Consumer): Promise<LaneId | undefined> {\n const currentLaneId = consumer.bitMap.laneId;\n if (!currentLaneId) return undefined;\n if (consumer.bitMap.isLaneExported) {\n return currentLaneId;\n }\n // current lane is new.\n const currentLane = await consumer.getCurrentLaneObject();\n return currentLane?.forkedFrom;\n}\n\nexport function throwForInvalidLaneName(laneName: string) {\n if (!isValidLaneName(laneName)) {\n throw new BitError(\n `lane \"${laneName}\" has invalid characters. lane name can only contain alphanumeric, lowercase characters, and the following [\"-\", \"_\", \"$\", \"!\"]`\n );\n }\n}\n\nexport async function throwForStagedComponents(consumer: Consumer) {\n const componentList = new ComponentsList(consumer);\n const stagedComponents = await componentList.listExportPendingComponentsIds();\n if (stagedComponents.length) {\n throw new BitError(\n `unable to switch/create a new lane, please export or reset the following components first: ${stagedComponents.join(\n ', '\n )}`\n );\n }\n}\n\nfunction isValidLaneName(val: unknown): boolean {\n if (typeof val !== 'string') return false;\n if (val.length > MAX_LANE_NAME_LENGTH) return false;\n // @todo: should we allow slash? if so, we should probably replace the lane-delimiter with something else. (maybe \":\")\n return /^[$\\-_!a-z0-9]+$/.test(val);\n}\n"],"mappings":";;;;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,kBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,iBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,gBAAA;EAAA,MAAAL,IAAA,GAAA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53
53
|
};
|
54
54
|
return data;
|
55
55
|
}
|
56
|
-
function
|
57
|
-
const data = require("@teambit/legacy
|
58
|
-
|
56
|
+
function _legacyCli() {
|
57
|
+
const data = require("@teambit/legacy.cli.prompts");
|
58
|
+
_legacyCli = function () {
|
59
59
|
return data;
|
60
60
|
};
|
61
61
|
return data;
|
@@ -444,7 +444,7 @@ class LaneRemoveCmd {
|
|
444
444
|
silent = false
|
445
445
|
}) {
|
446
446
|
if (!silent) {
|
447
|
-
const removePromptResult = await (0,
|
447
|
+
const removePromptResult = await (0, _legacyCli().approveOperation)();
|
448
448
|
// @ts-ignore
|
449
449
|
if (!(0, _yn().default)(removePromptResult.shouldProceed)) {
|
450
450
|
throw new (_bitError().BitError)('the operation has been cancelled');
|
package/dist/lane.cmd.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_yn","_laneId","_checkout","_workspace","_lanes","_bitError","_prompts","_constants","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LaneListCmd","constructor","lanes","workspace","scope","report","args","laneOptions","details","remote","merged","notMerged","laneIdStr","laneId","alias","isDefault","name","toString","getLanes","showDefaultLane","mergedLanes","filter","l","isMerged","length","chalk","green","map","m","join","unmergedLanes","currentLane","getCurrentLaneId","getDefaultLaneId","laneDataOfCurrentLane","find","isEqual","id","undefined","currentAlias","currentLaneReadmeComponentStr","outputReadmeComponent","readmeComponent","currentLaneStr","currentLaneComponents","outputComponents","components","availableLanes","laneData","readmeComponentStr","laneTitle","bold","concat","outputFooter","footer","outputCurrentLane","outputAvailableLanes","json","lanesData","serializeLaneData","getCurrentLaneNameOrAlias","exports","LaneShowCmd","Error","getCurrentLaneName","DEFAULT_LANE","parseLaneId","onlyLane","title","author","log","username","email","date","Date","parseInt","toLocaleString","link","DEFAULT_CLOUD_DOMAIN","replace","LaneCreateCmd","description","createLaneOptions","OutsideWorkspaceError","getCurrentLane","remoteScope","result","createLane","remoteScopeOrDefaultScope","yellow","remoteScopeOutput","LaneAliasCmd","laneName","aliasLane","CatLaneHistoryCmd","laneHistory","getLaneHistory","JSON","stringify","toObject","LaneCheckoutCmd","historyId","opts","checkoutHistory","checkoutOutput","LaneRevertCmd","revertHistory","LaneHistoryCmd","BitError","importLaneHistory","history","getHistory","historyItem","message","items","keys","uuid","LaneEjectCmd","COMPONENT_PATTERN_HELP","pattern","results","eject","body","LaneChangeScopeCmd","remoteScopeBefore","localName","changeScope","LaneRenameCmd","newName","currentName","rename","LaneRemoveCmd","names","force","silent","removePromptResult","approveOperation","yn","shouldProceed","laneResults","removeLanes","LaneRemoveCompCmd","LaneImportCmd","switchCmd","lane","skipDependencyInstallation","LaneFetchCmd","fetchCmd","all","getLaneIdStr","LaneCmd","LaneRemoveReadmeCmd","removeLaneReadme","red","LaneAddReadmeCmd","componentId","addLaneReadme","componentsTitle","componentsStr","c","head","component","fullName"],"sources":["lane.cmd.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport chalk from 'chalk';\nimport yn from 'yn';\nimport { ScopeMain } from '@teambit/scope';\nimport { DEFAULT_LANE, LaneId } from '@teambit/lane-id';\nimport { checkoutOutput } from '@teambit/checkout';\nimport { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { LaneData, serializeLaneData } from '@teambit/legacy/dist/scope/lanes/lanes';\nimport { BitError } from '@teambit/bit-error';\nimport { approveOperation } from '@teambit/legacy/dist/prompts';\nimport { COMPONENT_PATTERN_HELP, DEFAULT_CLOUD_DOMAIN } from '@teambit/legacy/dist/constants';\nimport { CreateLaneOptions, LanesMain } from './lanes.main.runtime';\nimport { SwitchCmd } from './switch.cmd';\nimport { FetchCmd } from '@teambit/importer';\n\ntype LaneOptions = {\n details?: boolean;\n remote?: string;\n merged?: boolean;\n notMerged?: boolean;\n json?: boolean;\n};\n\nexport class LaneListCmd implements Command {\n name = 'list';\n description = `list local or remote lanes`;\n alias = '';\n options = [\n ['d', 'details', 'show more details on the state of each component in each lane'],\n ['j', 'json', \"show lanes' details in a json format\"],\n ['r', 'remote <remote-scope-name>', 'show all remote lanes from the specified scope'],\n ['', 'merged', 'list only merged lanes'],\n ['', 'not-merged', \"list only lanes that haven't been merged\"],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n skipWorkspace = true;\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report(args, laneOptions: LaneOptions): Promise<string> {\n const { details, remote, merged, notMerged } = laneOptions;\n const laneIdStr = (laneId: LaneId, alias?: string | null) => {\n if (laneId.isDefault()) return laneId.name;\n if (alias) return `${laneId.toString()} (${alias})`;\n return laneId.toString();\n };\n const lanes = await this.lanes.getLanes({\n remote,\n merged,\n notMerged,\n showDefaultLane: true,\n });\n if (merged) {\n const mergedLanes = lanes.filter((l) => l.isMerged);\n if (!mergedLanes.length) return chalk.green('None of the lanes is merged');\n return chalk.green(mergedLanes.map((m) => m.name).join('\\n'));\n }\n if (notMerged) {\n const unmergedLanes = lanes.filter((l) => !l.isMerged);\n if (!unmergedLanes.length) return chalk.green('All lanes are merged');\n return chalk.green(unmergedLanes.map((m) => m.name).join('\\n'));\n }\n const currentLane = this.lanes.getCurrentLaneId() || this.lanes.getDefaultLaneId();\n const laneDataOfCurrentLane = currentLane ? lanes.find((l) => currentLane.isEqual(l.id)) : undefined;\n const currentAlias = laneDataOfCurrentLane ? laneDataOfCurrentLane.alias : undefined;\n const currentLaneReadmeComponentStr = outputReadmeComponent(laneDataOfCurrentLane?.readmeComponent);\n let currentLaneStr = remote\n ? ''\n : `current lane - ${chalk.green.green(laneIdStr(currentLane, currentAlias))}${currentLaneReadmeComponentStr}`;\n\n if (details) {\n const currentLaneComponents = laneDataOfCurrentLane ? outputComponents(laneDataOfCurrentLane.components) : '';\n if (currentLaneStr) {\n currentLaneStr += `\\n${currentLaneComponents}`;\n }\n }\n\n const availableLanes = lanes\n .filter((l) => !currentLane.isEqual(l.id))\n .map((laneData) => {\n const readmeComponentStr = outputReadmeComponent(laneData.readmeComponent);\n if (details) {\n const laneTitle = `> ${chalk.bold(laneIdStr(laneData.id, laneData.alias))}\\n`;\n const components = outputComponents(laneData.components);\n return laneTitle + readmeComponentStr.concat('\\n') + components;\n }\n return ` > ${chalk.green(laneIdStr(laneData.id, laneData.alias))} (${\n laneData.components.length\n } components)${readmeComponentStr}`;\n })\n .join('\\n');\n\n const outputFooter = () => {\n let footer = '\\n';\n if (details) {\n footer += 'You can use --merged and --not-merged to see which of the lanes is fully merged.';\n } else {\n footer +=\n \"to get more info on all lanes in local scope use 'bit lane list --details', or 'bit lane show <lane-name>' for a specific lane.\";\n }\n if (!remote && this.workspace)\n footer += `\\nswitch lanes using 'bit switch <name>'. create lanes using 'bit lane create <name>'.`;\n\n return footer;\n };\n\n return outputCurrentLane() + outputAvailableLanes() + outputFooter();\n\n function outputCurrentLane() {\n return currentLaneStr ? `${currentLaneStr}\\n` : '';\n }\n\n function outputAvailableLanes() {\n if (!availableLanes) return '';\n return remote ? `${availableLanes}\\n` : `\\nAvailable lanes:\\n${availableLanes}\\n`;\n }\n }\n async json(args, laneOptions: LaneOptions) {\n const { remote, merged = false, notMerged = false } = laneOptions;\n\n const lanesData = await this.lanes.getLanes({\n remote,\n showDefaultLane: true,\n merged,\n notMerged,\n });\n const lanes = lanesData.map(serializeLaneData);\n const currentLane = this.lanes.getCurrentLaneNameOrAlias();\n return { lanes, currentLane };\n }\n}\n\nexport class LaneShowCmd implements Command {\n name = 'show [lane-name]';\n description = `show lane details. if no lane specified, show the current lane`;\n alias = '';\n options = [\n ['j', 'json', 'show the lane details in json format'],\n ['r', 'remote', 'show details of the remote head of the provided lane'],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n skipWorkspace = true;\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report([name]: [string], laneOptions: LaneOptions): Promise<string> {\n const { remote } = laneOptions;\n\n if (!name && remote) {\n throw new Error('remote flag is not supported without lane name');\n }\n if (!name) {\n name = this.lanes.getCurrentLaneName() || DEFAULT_LANE;\n }\n\n const laneId = await this.lanes.parseLaneId(name);\n\n const lanes = await this.lanes.getLanes({\n name: laneId.name,\n remote: remote ? laneId.scope : undefined,\n });\n\n const onlyLane = lanes[0];\n const title = `showing information for ${chalk.bold(onlyLane.id.toString())}\\n`;\n const author = `author: ${onlyLane.log?.username || 'N/A'} <${onlyLane.log?.email || 'N/A'}>\\n`;\n const date = onlyLane.log?.date\n ? `created: ${new Date(parseInt(onlyLane.log.date)).toLocaleString()}\\n`\n : undefined;\n const link = `link: https://${DEFAULT_CLOUD_DOMAIN}/${laneId.scope.replace('.', '/')}/~lane/${laneId.name}\\n`;\n return title + author + date + link + outputComponents(onlyLane.components);\n }\n\n async json([name]: [string], laneOptions: LaneOptions) {\n const { remote } = laneOptions;\n\n const lanes = await this.lanes.getLanes({\n name,\n remote,\n });\n\n return serializeLaneData(lanes[0]);\n }\n}\n\nexport class LaneCreateCmd implements Command {\n name = 'create <lane-name>';\n arguments = [\n {\n name: 'lane-name',\n description: 'the name for the new lane',\n },\n ];\n description = `creates a new lane and switches to it`;\n extendedDescription = `a lane created from main (default-lane) is empty until components are snapped.\na lane created from another lane contains all the components of the original lane.`;\n alias = '';\n options = [\n [\n 's',\n 'scope <scope-name>',\n 'remote scope to which this lane will be exported, default to the workspace.json\\'s defaultScope (can be changed up to first export of the lane with \"bit lane change-scope\")',\n ],\n ['', 'remote-scope <scope-name>', 'DEPRECATED. use --scope'],\n [\n '',\n 'alias <name>',\n 'a local alias to refer to this lane, defaults to the `<lane-name>` (can be added later with \"bit lane alias\")',\n ],\n [\n '',\n 'fork-lane-new-scope',\n 'create the new lane in a different scope than its parent lane (if created from another lane)',\n ],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([name]: [string], createLaneOptions: CreateLaneOptions & { remoteScope?: string }): Promise<string> {\n if (!this.lanes.workspace) throw new OutsideWorkspaceError();\n const currentLane = await this.lanes.getCurrentLane();\n if (createLaneOptions.remoteScope) createLaneOptions.scope = createLaneOptions.remoteScope;\n const result = await this.lanes.createLane(name, createLaneOptions);\n const remoteScopeOrDefaultScope = createLaneOptions.scope\n ? `the remote scope ${chalk.bold(createLaneOptions.scope)}`\n : `the default-scope ${chalk.bold(\n result.laneId.scope\n )}. you can change the lane's scope, before it is exported, with the \"bit lane change-scope\" command`;\n const title = chalk.green(\n `successfully added and checked out to the new lane ${chalk.bold(result.alias || result.laneId.name)}\n ${currentLane ? chalk.yellow(`\\nnote - your new lane will be based on lane ${currentLane.name}`) : ''}\n `\n );\n const remoteScopeOutput = `this lane will be exported to ${remoteScopeOrDefaultScope}`;\n return `${title}\\n${remoteScopeOutput}`;\n }\n}\n\nexport class LaneAliasCmd implements Command {\n name = 'alias <lane-name> <alias>';\n description = 'adds an alias to a lane';\n extendedDescription = `an alias is a name that can be used locally to refer to a lane. it is saved locally and never reaches the remote.\nit is useful e.g. when having multiple lanes with the same name, but with different remote scopes.`;\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName, alias]: [string, string, string]): Promise<string> {\n const { laneId } = await this.lanes.aliasLane(laneName, alias);\n return `successfully added the alias ${chalk.bold(alias)} for lane ${chalk.bold(laneId.toString())}`;\n }\n}\n\nexport class CatLaneHistoryCmd implements Command {\n name = 'cat-lane-history <lane-name>';\n description = 'cat lane-history object by lane-name';\n private = true;\n alias = 'clh';\n options = [] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName]: [string]): Promise<string> {\n const laneId = await this.lanes.parseLaneId(laneName);\n const laneHistory = await this.lanes.getLaneHistory(laneId);\n return JSON.stringify(laneHistory.toObject(), null, 2);\n }\n}\n\nexport type LaneCheckoutOpts = { skipDependencyInstallation?: boolean };\n\nexport class LaneCheckoutCmd implements Command {\n name = 'checkout <history-id>';\n description = 'EXPERIMENTAL. checkout to a previous history of the current lane. see also \"bit lane revert\"';\n arguments = [\n { name: 'history-id', description: 'the history-id to checkout to. run \"bit lane history\" to list the ids' },\n ];\n alias = '';\n options = [\n ['x', 'skip-dependency-installation', 'do not install dependencies of the checked out components'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([historyId]: [string], opts: LaneCheckoutOpts): Promise<string> {\n const result = await this.lanes.checkoutHistory(historyId, opts);\n return checkoutOutput(result, {}, `successfully checked out according to history-id: ${historyId}`);\n }\n}\n\nexport class LaneRevertCmd implements Command {\n name = 'revert <history-id>';\n description = 'EXPERIMENTAL. revert to a previous history of the current lane. see also \"bit lane checkout\"';\n extendedDescription = `revert is similar to \"lane checkout\", but it keeps the versions and only change the files.\nchoose one or the other based on your needs.\nif you want to continue working on this lane and needs the changes from the history to be the head, then use \"lane revert\".\nif you want to fork the lane from a certain point in history, use \"lane checkout\" and create a new lane from it.`;\n arguments = [\n { name: 'history-id', description: 'the history-id to checkout to. run \"bit lane history\" to list the ids' },\n ];\n alias = '';\n options = [\n ['x', 'skip-dependency-installation', 'do not install dependencies of the checked out components'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([historyId]: [string], opts: LaneCheckoutOpts): Promise<string> {\n const result = await this.lanes.revertHistory(historyId, opts);\n return checkoutOutput(result, {}, `successfully reverted according to history-id: ${historyId}`);\n }\n}\n\nexport class LaneHistoryCmd implements Command {\n name = 'history [lane-name]';\n description = 'EXPERIMENTAL. show lane history, default to the current lane';\n alias = '';\n options = [['', 'id <string>', 'show a specific history item']] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName]: [string], { id }: { id?: string }): Promise<string> {\n const laneId = laneName ? await this.lanes.parseLaneId(laneName) : this.lanes.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) throw new BitError(`unable to show history of the default lane (main)`);\n await this.lanes.importLaneHistory(laneId);\n const laneHistory = await this.lanes.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n if (id) {\n const historyItem = history[id];\n if (!historyItem) throw new Error(`history id ${id} was not found`);\n const date = new Date(parseInt(historyItem.log.date)).toLocaleString();\n const message = historyItem.log.message;\n return `${id} ${date} ${historyItem.log.username} ${message}\\n\\n${historyItem.components.join('\\n')}`;\n }\n const items = Object.keys(history).map((uuid) => {\n const historyItem = history[uuid];\n const date = new Date(parseInt(historyItem.log.date)).toLocaleString();\n const message = historyItem.log.message;\n return `${uuid} ${date} ${historyItem.log.username} ${message}`;\n });\n return items.join('\\n');\n }\n}\n\nexport class LaneEjectCmd implements Command {\n name = 'eject <component-pattern>';\n description = `delete a component from the lane and install it as a package from main`;\n extendedDescription = `NOTE: unlike \"bit eject\" on main, this command doesn't only remove the component from the\nworkspace, but also mark it as deleted from the lane, so it won't be merged later on.`;\n alias = '';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n options = [] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([pattern]: [string]) {\n const results = await this.lanes.eject(pattern);\n const title = chalk.green('successfully ejected the following components');\n const body = results.map((r) => r.toString()).join('\\n');\n return `${title}\\n${body}`;\n }\n}\n\nexport class LaneChangeScopeCmd implements Command {\n name = 'change-scope <remote-scope-name>';\n description = `changes the remote scope of a lane`;\n extendedDescription = 'NOTE: available only before the lane is exported to the remote';\n alias = '';\n options = [\n [\n 'l',\n 'lane-name <lane-name>',\n 'the name of the lane to change its remote scope. if not specified, the current lane is used',\n ],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([remoteScope]: [string], { laneName }: { laneName?: string }): Promise<string> {\n const { remoteScopeBefore, localName } = await this.lanes.changeScope(remoteScope, laneName);\n return `the remote-scope of ${chalk.bold(localName)} has been changed from ${chalk.bold(\n remoteScopeBefore\n )} to ${chalk.bold(remoteScope)}`;\n }\n}\n\nexport class LaneRenameCmd implements Command {\n name = 'rename <new-name>';\n description = `EXPERIMENTAL. change the lane-name locally`;\n extendedDescription = 'the remote will be updated after the next \"bit export\" command';\n alias = '';\n options = [\n ['l', 'lane-name <lane-name>', 'the name of the lane to rename. if not specified, the current lane is used'],\n ] as CommandOptions;\n loader = true;\n constructor(private lanes: LanesMain) {}\n\n async report([newName]: [string], { laneName }: { laneName?: string }): Promise<string> {\n const { currentName } = await this.lanes.rename(newName, laneName);\n return `the lane ${chalk.bold(currentName)}'s name has been changed to ${chalk.bold(newName)}.`;\n }\n}\n\nexport class LaneRemoveCmd implements Command {\n name = 'remove <lanes...>';\n arguments = [{ name: 'lanes...', description: 'A list of lane names, separated by spaces' }];\n description = `remove or delete lanes`;\n group = 'collaborate';\n alias = '';\n options = [\n [\n 'r',\n 'remote',\n 'delete a remote lane. use remote/lane-id syntax e.g. bit lane remove owner.org/my-lane --remote. Delete is immediate, no export required',\n ],\n ['f', 'force', 'removes/deletes the lane even when the lane is not yet merged to main'],\n ['s', 'silent', 'skip confirmation'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report(\n [names]: [string[]],\n {\n remote = false,\n force = false,\n silent = false,\n }: {\n remote: boolean;\n force: boolean;\n silent: boolean;\n }\n ): Promise<string> {\n if (!silent) {\n const removePromptResult = await approveOperation();\n // @ts-ignore\n if (!yn(removePromptResult.shouldProceed)) {\n throw new BitError('the operation has been cancelled');\n }\n }\n const laneResults = await this.lanes.removeLanes(names, { remote, force });\n return chalk.green(`successfully removed the following lane(s): ${chalk.bold(laneResults.join(', '))}`);\n }\n}\n\nexport type RemoveCompsOpts = { workspaceOnly?: boolean; updateMain?: boolean };\n\nexport class LaneRemoveCompCmd implements Command {\n name = 'remove-comp <component-pattern>';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n description = `DEPRECATED. remove components when on a lane`;\n group = 'collaborate';\n alias = 'rc';\n options = [\n [\n '',\n 'workspace-only',\n 'do not mark the components as removed from the lane. instead, remove them from the workspace only',\n ],\n [\n '',\n 'update-main',\n 'EXPERIMENTAL. remove, i.e. delete, component/s on the main lane after merging this lane into main',\n ],\n ] as CommandOptions;\n loader = true;\n\n constructor(private workspace: Workspace, private lanes: LanesMain) {}\n\n async report(): Promise<string> {\n throw new BitError(`bit lane remove-comp has been removed. please use \"bit remove\" or \"bit delete\" instead`);\n }\n}\n\nexport class LaneImportCmd implements Command {\n name = 'import <lane>';\n description = `import a remote lane to your workspace and switch to that lane`;\n arguments = [{ name: 'lane', description: 'the remote lane name' }];\n alias = '';\n options = [\n ['x', 'skip-dependency-installation', 'do not install dependencies of the imported components'],\n [\n 'p',\n 'pattern <component-pattern>',\n 'import only components from the lane that fit the specified component-pattern to the workspace. works only when the workspace is empty',\n ],\n ] as CommandOptions;\n loader = true;\n\n constructor(private switchCmd: SwitchCmd) {}\n\n async report(\n [lane]: [string],\n { skipDependencyInstallation = false, pattern }: { skipDependencyInstallation: boolean; pattern?: string }\n ): Promise<string> {\n return this.switchCmd.report([lane], { skipDependencyInstallation, pattern });\n }\n}\n\nexport class LaneFetchCmd implements Command {\n name = 'fetch [lane-id]';\n description = `fetch component objects from lanes. if no lane-id is provided, it fetches from the current lane`;\n extendedDescription = `note, it does not save the remote lanes objects locally, only the refs`;\n alias = '';\n options = [['a', 'all', 'fetch all remote lanes']] as CommandOptions;\n loader = true;\n\n constructor(private fetchCmd: FetchCmd, private lanes: LanesMain) {}\n\n async report([laneId]: [string], { all }: { all?: boolean }): Promise<string> {\n if (all) return this.fetchCmd.report([[]], { lanes: true });\n const getLaneIdStr = () => {\n if (laneId) return laneId;\n const currentLane = this.lanes.getCurrentLaneId();\n if (!currentLane || currentLane.isDefault())\n throw new BitError('you are not checked out to any lane. please specify a lane-id to fetch or use --all flag');\n return currentLane.toString();\n };\n const lane = getLaneIdStr();\n return this.fetchCmd.report([[lane]], { lanes: true });\n }\n}\n\nexport class LaneCmd implements Command {\n name = 'lane [sub-command]';\n description = 'manage lanes - if no sub-command is used, runs \"bit lane list\"';\n alias = 'l';\n options = [\n ['d', 'details', 'show more details on the state of each component in each lane'],\n ['j', 'json', 'show lanes details in json format'],\n ['r', 'remote <remote-scope-name>', 'show all remote lanes from the specified scope'],\n ['', 'merged', 'list only merged lanes'],\n ['', 'not-merged', \"list only lanes that haven't been merged\"],\n ] as CommandOptions;\n loader = true;\n group = 'collaborate';\n remoteOp = true;\n skipWorkspace = true;\n helpUrl = 'reference/components/lanes';\n commands: Command[] = [];\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report([name]: [string], laneOptions: LaneOptions): Promise<string> {\n return new LaneListCmd(this.lanes, this.workspace, this.scope).report([name], laneOptions);\n }\n}\n\nexport class LaneRemoveReadmeCmd implements Command {\n name = 'remove-readme [laneName]';\n description = 'EXPERIMENTAL. remove lane readme component';\n options = [] as CommandOptions;\n loader = true;\n skipWorkspace = false;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName]: [string]): Promise<string> {\n const { result, message } = await this.lanes.removeLaneReadme(laneName);\n\n if (result) {\n return chalk.green(\n `the readme component has been successfully removed from the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n }\n\n return chalk.red(`${message}\\n`);\n }\n}\n\nexport class LaneAddReadmeCmd implements Command {\n name = 'add-readme <component-name> [lane-name]';\n description = 'EXPERIMENTAL. sets an existing component as the readme of a lane';\n arguments = [\n { name: 'component-id', description: \"the component name or id of the component to use as the lane's readme\" },\n { name: 'lane-name', description: 'the lane to attach the readme to (defaults to the current lane)' },\n ];\n options = [] as CommandOptions;\n loader = true;\n skipWorkspace = false;\n\n constructor(private lanes: LanesMain) {}\n\n async report([componentId, laneName]: [string, string]): Promise<string> {\n const { result, message } = await this.lanes.addLaneReadme(componentId, laneName);\n\n if (result)\n return chalk.green(\n `the component ${componentId} has been successfully added as the readme component for the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n\n return chalk.red(\n `${message || ''}\\nthe component ${componentId} could not be added as a readme component for the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n }\n}\n\nfunction outputComponents(components: LaneData['components']): string {\n const componentsTitle = `\\t${chalk.bold(`components (${components.length})`)}\\n`;\n const componentsStr = components.map((c) => `\\t ${c.id.toString()} - ${c.head}`).join('\\n');\n return componentsTitle + componentsStr;\n}\n\nfunction outputReadmeComponent(component: LaneData['readmeComponent']): string {\n if (!component) return '';\n return `\\n\\t${`${chalk.yellow('readme component')}\\n\\t ${component.id} - ${\n component.head ||\n `(unsnapped)\\n\\t(\"use bit snap ${component.id.fullName}\" to snap the readme component on the lane before exporting)`\n }`}\\n`;\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,IAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,WAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,UAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,OAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,MAAA,YAAAA,CAAA;IAAA,OAAAP,IA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,IAAK,OAAOA,CAAC,CAAC1H,EAAE,CAACpB,QAAQ,CAAC,CAAC,MAAM8I,CAAC,CAACC,IAAI,EAAE,CAAC,CAACnI,IAAI,CAAC,IAAI,CAAC;EAC5F,OAAOgI,eAAe,GAAGC,aAAa;AACxC;AAEA,SAASrH,qBAAqBA,CAACwH,SAAsC,EAAU;EAC7E,IAAI,CAACA,SAAS,EAAE,OAAO,EAAE;EACzB,OAAO,OAAO,GAAGxI,gBAAK,CAACgE,MAAM,CAAC,kBAAkB,CAAC,SAASwE,SAAS,CAAC5H,EAAE,MACpE4H,SAAS,CAACD,IAAI,IACd,iCAAiCC,SAAS,CAAC5H,EAAE,CAAC6H,QAAQ,8DAA8D,EACpH,IAAI;AACR","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_yn","_laneId","_checkout","_workspace","_lanes","_bitError","_legacyCli","_constants","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LaneListCmd","constructor","lanes","workspace","scope","report","args","laneOptions","details","remote","merged","notMerged","laneIdStr","laneId","alias","isDefault","name","toString","getLanes","showDefaultLane","mergedLanes","filter","l","isMerged","length","chalk","green","map","m","join","unmergedLanes","currentLane","getCurrentLaneId","getDefaultLaneId","laneDataOfCurrentLane","find","isEqual","id","undefined","currentAlias","currentLaneReadmeComponentStr","outputReadmeComponent","readmeComponent","currentLaneStr","currentLaneComponents","outputComponents","components","availableLanes","laneData","readmeComponentStr","laneTitle","bold","concat","outputFooter","footer","outputCurrentLane","outputAvailableLanes","json","lanesData","serializeLaneData","getCurrentLaneNameOrAlias","exports","LaneShowCmd","Error","getCurrentLaneName","DEFAULT_LANE","parseLaneId","onlyLane","title","author","log","username","email","date","Date","parseInt","toLocaleString","link","DEFAULT_CLOUD_DOMAIN","replace","LaneCreateCmd","description","createLaneOptions","OutsideWorkspaceError","getCurrentLane","remoteScope","result","createLane","remoteScopeOrDefaultScope","yellow","remoteScopeOutput","LaneAliasCmd","laneName","aliasLane","CatLaneHistoryCmd","laneHistory","getLaneHistory","JSON","stringify","toObject","LaneCheckoutCmd","historyId","opts","checkoutHistory","checkoutOutput","LaneRevertCmd","revertHistory","LaneHistoryCmd","BitError","importLaneHistory","history","getHistory","historyItem","message","items","keys","uuid","LaneEjectCmd","COMPONENT_PATTERN_HELP","pattern","results","eject","body","LaneChangeScopeCmd","remoteScopeBefore","localName","changeScope","LaneRenameCmd","newName","currentName","rename","LaneRemoveCmd","names","force","silent","removePromptResult","approveOperation","yn","shouldProceed","laneResults","removeLanes","LaneRemoveCompCmd","LaneImportCmd","switchCmd","lane","skipDependencyInstallation","LaneFetchCmd","fetchCmd","all","getLaneIdStr","LaneCmd","LaneRemoveReadmeCmd","removeLaneReadme","red","LaneAddReadmeCmd","componentId","addLaneReadme","componentsTitle","componentsStr","c","head","component","fullName"],"sources":["lane.cmd.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport chalk from 'chalk';\nimport yn from 'yn';\nimport { ScopeMain } from '@teambit/scope';\nimport { DEFAULT_LANE, LaneId } from '@teambit/lane-id';\nimport { checkoutOutput } from '@teambit/checkout';\nimport { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { LaneData, serializeLaneData } from '@teambit/legacy/dist/scope/lanes/lanes';\nimport { BitError } from '@teambit/bit-error';\nimport { approveOperation } from '@teambit/legacy.cli.prompts';\nimport { COMPONENT_PATTERN_HELP, DEFAULT_CLOUD_DOMAIN } from '@teambit/legacy/dist/constants';\nimport { CreateLaneOptions, LanesMain } from './lanes.main.runtime';\nimport { SwitchCmd } from './switch.cmd';\nimport { FetchCmd } from '@teambit/importer';\n\ntype LaneOptions = {\n details?: boolean;\n remote?: string;\n merged?: boolean;\n notMerged?: boolean;\n json?: boolean;\n};\n\nexport class LaneListCmd implements Command {\n name = 'list';\n description = `list local or remote lanes`;\n alias = '';\n options = [\n ['d', 'details', 'show more details on the state of each component in each lane'],\n ['j', 'json', \"show lanes' details in a json format\"],\n ['r', 'remote <remote-scope-name>', 'show all remote lanes from the specified scope'],\n ['', 'merged', 'list only merged lanes'],\n ['', 'not-merged', \"list only lanes that haven't been merged\"],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n skipWorkspace = true;\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report(args, laneOptions: LaneOptions): Promise<string> {\n const { details, remote, merged, notMerged } = laneOptions;\n const laneIdStr = (laneId: LaneId, alias?: string | null) => {\n if (laneId.isDefault()) return laneId.name;\n if (alias) return `${laneId.toString()} (${alias})`;\n return laneId.toString();\n };\n const lanes = await this.lanes.getLanes({\n remote,\n merged,\n notMerged,\n showDefaultLane: true,\n });\n if (merged) {\n const mergedLanes = lanes.filter((l) => l.isMerged);\n if (!mergedLanes.length) return chalk.green('None of the lanes is merged');\n return chalk.green(mergedLanes.map((m) => m.name).join('\\n'));\n }\n if (notMerged) {\n const unmergedLanes = lanes.filter((l) => !l.isMerged);\n if (!unmergedLanes.length) return chalk.green('All lanes are merged');\n return chalk.green(unmergedLanes.map((m) => m.name).join('\\n'));\n }\n const currentLane = this.lanes.getCurrentLaneId() || this.lanes.getDefaultLaneId();\n const laneDataOfCurrentLane = currentLane ? lanes.find((l) => currentLane.isEqual(l.id)) : undefined;\n const currentAlias = laneDataOfCurrentLane ? laneDataOfCurrentLane.alias : undefined;\n const currentLaneReadmeComponentStr = outputReadmeComponent(laneDataOfCurrentLane?.readmeComponent);\n let currentLaneStr = remote\n ? ''\n : `current lane - ${chalk.green.green(laneIdStr(currentLane, currentAlias))}${currentLaneReadmeComponentStr}`;\n\n if (details) {\n const currentLaneComponents = laneDataOfCurrentLane ? outputComponents(laneDataOfCurrentLane.components) : '';\n if (currentLaneStr) {\n currentLaneStr += `\\n${currentLaneComponents}`;\n }\n }\n\n const availableLanes = lanes\n .filter((l) => !currentLane.isEqual(l.id))\n .map((laneData) => {\n const readmeComponentStr = outputReadmeComponent(laneData.readmeComponent);\n if (details) {\n const laneTitle = `> ${chalk.bold(laneIdStr(laneData.id, laneData.alias))}\\n`;\n const components = outputComponents(laneData.components);\n return laneTitle + readmeComponentStr.concat('\\n') + components;\n }\n return ` > ${chalk.green(laneIdStr(laneData.id, laneData.alias))} (${\n laneData.components.length\n } components)${readmeComponentStr}`;\n })\n .join('\\n');\n\n const outputFooter = () => {\n let footer = '\\n';\n if (details) {\n footer += 'You can use --merged and --not-merged to see which of the lanes is fully merged.';\n } else {\n footer +=\n \"to get more info on all lanes in local scope use 'bit lane list --details', or 'bit lane show <lane-name>' for a specific lane.\";\n }\n if (!remote && this.workspace)\n footer += `\\nswitch lanes using 'bit switch <name>'. create lanes using 'bit lane create <name>'.`;\n\n return footer;\n };\n\n return outputCurrentLane() + outputAvailableLanes() + outputFooter();\n\n function outputCurrentLane() {\n return currentLaneStr ? `${currentLaneStr}\\n` : '';\n }\n\n function outputAvailableLanes() {\n if (!availableLanes) return '';\n return remote ? `${availableLanes}\\n` : `\\nAvailable lanes:\\n${availableLanes}\\n`;\n }\n }\n async json(args, laneOptions: LaneOptions) {\n const { remote, merged = false, notMerged = false } = laneOptions;\n\n const lanesData = await this.lanes.getLanes({\n remote,\n showDefaultLane: true,\n merged,\n notMerged,\n });\n const lanes = lanesData.map(serializeLaneData);\n const currentLane = this.lanes.getCurrentLaneNameOrAlias();\n return { lanes, currentLane };\n }\n}\n\nexport class LaneShowCmd implements Command {\n name = 'show [lane-name]';\n description = `show lane details. if no lane specified, show the current lane`;\n alias = '';\n options = [\n ['j', 'json', 'show the lane details in json format'],\n ['r', 'remote', 'show details of the remote head of the provided lane'],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n skipWorkspace = true;\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report([name]: [string], laneOptions: LaneOptions): Promise<string> {\n const { remote } = laneOptions;\n\n if (!name && remote) {\n throw new Error('remote flag is not supported without lane name');\n }\n if (!name) {\n name = this.lanes.getCurrentLaneName() || DEFAULT_LANE;\n }\n\n const laneId = await this.lanes.parseLaneId(name);\n\n const lanes = await this.lanes.getLanes({\n name: laneId.name,\n remote: remote ? laneId.scope : undefined,\n });\n\n const onlyLane = lanes[0];\n const title = `showing information for ${chalk.bold(onlyLane.id.toString())}\\n`;\n const author = `author: ${onlyLane.log?.username || 'N/A'} <${onlyLane.log?.email || 'N/A'}>\\n`;\n const date = onlyLane.log?.date\n ? `created: ${new Date(parseInt(onlyLane.log.date)).toLocaleString()}\\n`\n : undefined;\n const link = `link: https://${DEFAULT_CLOUD_DOMAIN}/${laneId.scope.replace('.', '/')}/~lane/${laneId.name}\\n`;\n return title + author + date + link + outputComponents(onlyLane.components);\n }\n\n async json([name]: [string], laneOptions: LaneOptions) {\n const { remote } = laneOptions;\n\n const lanes = await this.lanes.getLanes({\n name,\n remote,\n });\n\n return serializeLaneData(lanes[0]);\n }\n}\n\nexport class LaneCreateCmd implements Command {\n name = 'create <lane-name>';\n arguments = [\n {\n name: 'lane-name',\n description: 'the name for the new lane',\n },\n ];\n description = `creates a new lane and switches to it`;\n extendedDescription = `a lane created from main (default-lane) is empty until components are snapped.\na lane created from another lane contains all the components of the original lane.`;\n alias = '';\n options = [\n [\n 's',\n 'scope <scope-name>',\n 'remote scope to which this lane will be exported, default to the workspace.json\\'s defaultScope (can be changed up to first export of the lane with \"bit lane change-scope\")',\n ],\n ['', 'remote-scope <scope-name>', 'DEPRECATED. use --scope'],\n [\n '',\n 'alias <name>',\n 'a local alias to refer to this lane, defaults to the `<lane-name>` (can be added later with \"bit lane alias\")',\n ],\n [\n '',\n 'fork-lane-new-scope',\n 'create the new lane in a different scope than its parent lane (if created from another lane)',\n ],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([name]: [string], createLaneOptions: CreateLaneOptions & { remoteScope?: string }): Promise<string> {\n if (!this.lanes.workspace) throw new OutsideWorkspaceError();\n const currentLane = await this.lanes.getCurrentLane();\n if (createLaneOptions.remoteScope) createLaneOptions.scope = createLaneOptions.remoteScope;\n const result = await this.lanes.createLane(name, createLaneOptions);\n const remoteScopeOrDefaultScope = createLaneOptions.scope\n ? `the remote scope ${chalk.bold(createLaneOptions.scope)}`\n : `the default-scope ${chalk.bold(\n result.laneId.scope\n )}. you can change the lane's scope, before it is exported, with the \"bit lane change-scope\" command`;\n const title = chalk.green(\n `successfully added and checked out to the new lane ${chalk.bold(result.alias || result.laneId.name)}\n ${currentLane ? chalk.yellow(`\\nnote - your new lane will be based on lane ${currentLane.name}`) : ''}\n `\n );\n const remoteScopeOutput = `this lane will be exported to ${remoteScopeOrDefaultScope}`;\n return `${title}\\n${remoteScopeOutput}`;\n }\n}\n\nexport class LaneAliasCmd implements Command {\n name = 'alias <lane-name> <alias>';\n description = 'adds an alias to a lane';\n extendedDescription = `an alias is a name that can be used locally to refer to a lane. it is saved locally and never reaches the remote.\nit is useful e.g. when having multiple lanes with the same name, but with different remote scopes.`;\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName, alias]: [string, string, string]): Promise<string> {\n const { laneId } = await this.lanes.aliasLane(laneName, alias);\n return `successfully added the alias ${chalk.bold(alias)} for lane ${chalk.bold(laneId.toString())}`;\n }\n}\n\nexport class CatLaneHistoryCmd implements Command {\n name = 'cat-lane-history <lane-name>';\n description = 'cat lane-history object by lane-name';\n private = true;\n alias = 'clh';\n options = [] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName]: [string]): Promise<string> {\n const laneId = await this.lanes.parseLaneId(laneName);\n const laneHistory = await this.lanes.getLaneHistory(laneId);\n return JSON.stringify(laneHistory.toObject(), null, 2);\n }\n}\n\nexport type LaneCheckoutOpts = { skipDependencyInstallation?: boolean };\n\nexport class LaneCheckoutCmd implements Command {\n name = 'checkout <history-id>';\n description = 'EXPERIMENTAL. checkout to a previous history of the current lane. see also \"bit lane revert\"';\n arguments = [\n { name: 'history-id', description: 'the history-id to checkout to. run \"bit lane history\" to list the ids' },\n ];\n alias = '';\n options = [\n ['x', 'skip-dependency-installation', 'do not install dependencies of the checked out components'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([historyId]: [string], opts: LaneCheckoutOpts): Promise<string> {\n const result = await this.lanes.checkoutHistory(historyId, opts);\n return checkoutOutput(result, {}, `successfully checked out according to history-id: ${historyId}`);\n }\n}\n\nexport class LaneRevertCmd implements Command {\n name = 'revert <history-id>';\n description = 'EXPERIMENTAL. revert to a previous history of the current lane. see also \"bit lane checkout\"';\n extendedDescription = `revert is similar to \"lane checkout\", but it keeps the versions and only change the files.\nchoose one or the other based on your needs.\nif you want to continue working on this lane and needs the changes from the history to be the head, then use \"lane revert\".\nif you want to fork the lane from a certain point in history, use \"lane checkout\" and create a new lane from it.`;\n arguments = [\n { name: 'history-id', description: 'the history-id to checkout to. run \"bit lane history\" to list the ids' },\n ];\n alias = '';\n options = [\n ['x', 'skip-dependency-installation', 'do not install dependencies of the checked out components'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([historyId]: [string], opts: LaneCheckoutOpts): Promise<string> {\n const result = await this.lanes.revertHistory(historyId, opts);\n return checkoutOutput(result, {}, `successfully reverted according to history-id: ${historyId}`);\n }\n}\n\nexport class LaneHistoryCmd implements Command {\n name = 'history [lane-name]';\n description = 'EXPERIMENTAL. show lane history, default to the current lane';\n alias = '';\n options = [['', 'id <string>', 'show a specific history item']] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName]: [string], { id }: { id?: string }): Promise<string> {\n const laneId = laneName ? await this.lanes.parseLaneId(laneName) : this.lanes.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) throw new BitError(`unable to show history of the default lane (main)`);\n await this.lanes.importLaneHistory(laneId);\n const laneHistory = await this.lanes.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n if (id) {\n const historyItem = history[id];\n if (!historyItem) throw new Error(`history id ${id} was not found`);\n const date = new Date(parseInt(historyItem.log.date)).toLocaleString();\n const message = historyItem.log.message;\n return `${id} ${date} ${historyItem.log.username} ${message}\\n\\n${historyItem.components.join('\\n')}`;\n }\n const items = Object.keys(history).map((uuid) => {\n const historyItem = history[uuid];\n const date = new Date(parseInt(historyItem.log.date)).toLocaleString();\n const message = historyItem.log.message;\n return `${uuid} ${date} ${historyItem.log.username} ${message}`;\n });\n return items.join('\\n');\n }\n}\n\nexport class LaneEjectCmd implements Command {\n name = 'eject <component-pattern>';\n description = `delete a component from the lane and install it as a package from main`;\n extendedDescription = `NOTE: unlike \"bit eject\" on main, this command doesn't only remove the component from the\nworkspace, but also mark it as deleted from the lane, so it won't be merged later on.`;\n alias = '';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n options = [] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([pattern]: [string]) {\n const results = await this.lanes.eject(pattern);\n const title = chalk.green('successfully ejected the following components');\n const body = results.map((r) => r.toString()).join('\\n');\n return `${title}\\n${body}`;\n }\n}\n\nexport class LaneChangeScopeCmd implements Command {\n name = 'change-scope <remote-scope-name>';\n description = `changes the remote scope of a lane`;\n extendedDescription = 'NOTE: available only before the lane is exported to the remote';\n alias = '';\n options = [\n [\n 'l',\n 'lane-name <lane-name>',\n 'the name of the lane to change its remote scope. if not specified, the current lane is used',\n ],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([remoteScope]: [string], { laneName }: { laneName?: string }): Promise<string> {\n const { remoteScopeBefore, localName } = await this.lanes.changeScope(remoteScope, laneName);\n return `the remote-scope of ${chalk.bold(localName)} has been changed from ${chalk.bold(\n remoteScopeBefore\n )} to ${chalk.bold(remoteScope)}`;\n }\n}\n\nexport class LaneRenameCmd implements Command {\n name = 'rename <new-name>';\n description = `EXPERIMENTAL. change the lane-name locally`;\n extendedDescription = 'the remote will be updated after the next \"bit export\" command';\n alias = '';\n options = [\n ['l', 'lane-name <lane-name>', 'the name of the lane to rename. if not specified, the current lane is used'],\n ] as CommandOptions;\n loader = true;\n constructor(private lanes: LanesMain) {}\n\n async report([newName]: [string], { laneName }: { laneName?: string }): Promise<string> {\n const { currentName } = await this.lanes.rename(newName, laneName);\n return `the lane ${chalk.bold(currentName)}'s name has been changed to ${chalk.bold(newName)}.`;\n }\n}\n\nexport class LaneRemoveCmd implements Command {\n name = 'remove <lanes...>';\n arguments = [{ name: 'lanes...', description: 'A list of lane names, separated by spaces' }];\n description = `remove or delete lanes`;\n group = 'collaborate';\n alias = '';\n options = [\n [\n 'r',\n 'remote',\n 'delete a remote lane. use remote/lane-id syntax e.g. bit lane remove owner.org/my-lane --remote. Delete is immediate, no export required',\n ],\n ['f', 'force', 'removes/deletes the lane even when the lane is not yet merged to main'],\n ['s', 'silent', 'skip confirmation'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report(\n [names]: [string[]],\n {\n remote = false,\n force = false,\n silent = false,\n }: {\n remote: boolean;\n force: boolean;\n silent: boolean;\n }\n ): Promise<string> {\n if (!silent) {\n const removePromptResult = await approveOperation();\n // @ts-ignore\n if (!yn(removePromptResult.shouldProceed)) {\n throw new BitError('the operation has been cancelled');\n }\n }\n const laneResults = await this.lanes.removeLanes(names, { remote, force });\n return chalk.green(`successfully removed the following lane(s): ${chalk.bold(laneResults.join(', '))}`);\n }\n}\n\nexport type RemoveCompsOpts = { workspaceOnly?: boolean; updateMain?: boolean };\n\nexport class LaneRemoveCompCmd implements Command {\n name = 'remove-comp <component-pattern>';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n description = `DEPRECATED. remove components when on a lane`;\n group = 'collaborate';\n alias = 'rc';\n options = [\n [\n '',\n 'workspace-only',\n 'do not mark the components as removed from the lane. instead, remove them from the workspace only',\n ],\n [\n '',\n 'update-main',\n 'EXPERIMENTAL. remove, i.e. delete, component/s on the main lane after merging this lane into main',\n ],\n ] as CommandOptions;\n loader = true;\n\n constructor(private workspace: Workspace, private lanes: LanesMain) {}\n\n async report(): Promise<string> {\n throw new BitError(`bit lane remove-comp has been removed. please use \"bit remove\" or \"bit delete\" instead`);\n }\n}\n\nexport class LaneImportCmd implements Command {\n name = 'import <lane>';\n description = `import a remote lane to your workspace and switch to that lane`;\n arguments = [{ name: 'lane', description: 'the remote lane name' }];\n alias = '';\n options = [\n ['x', 'skip-dependency-installation', 'do not install dependencies of the imported components'],\n [\n 'p',\n 'pattern <component-pattern>',\n 'import only components from the lane that fit the specified component-pattern to the workspace. works only when the workspace is empty',\n ],\n ] as CommandOptions;\n loader = true;\n\n constructor(private switchCmd: SwitchCmd) {}\n\n async report(\n [lane]: [string],\n { skipDependencyInstallation = false, pattern }: { skipDependencyInstallation: boolean; pattern?: string }\n ): Promise<string> {\n return this.switchCmd.report([lane], { skipDependencyInstallation, pattern });\n }\n}\n\nexport class LaneFetchCmd implements Command {\n name = 'fetch [lane-id]';\n description = `fetch component objects from lanes. if no lane-id is provided, it fetches from the current lane`;\n extendedDescription = `note, it does not save the remote lanes objects locally, only the refs`;\n alias = '';\n options = [['a', 'all', 'fetch all remote lanes']] as CommandOptions;\n loader = true;\n\n constructor(private fetchCmd: FetchCmd, private lanes: LanesMain) {}\n\n async report([laneId]: [string], { all }: { all?: boolean }): Promise<string> {\n if (all) return this.fetchCmd.report([[]], { lanes: true });\n const getLaneIdStr = () => {\n if (laneId) return laneId;\n const currentLane = this.lanes.getCurrentLaneId();\n if (!currentLane || currentLane.isDefault())\n throw new BitError('you are not checked out to any lane. please specify a lane-id to fetch or use --all flag');\n return currentLane.toString();\n };\n const lane = getLaneIdStr();\n return this.fetchCmd.report([[lane]], { lanes: true });\n }\n}\n\nexport class LaneCmd implements Command {\n name = 'lane [sub-command]';\n description = 'manage lanes - if no sub-command is used, runs \"bit lane list\"';\n alias = 'l';\n options = [\n ['d', 'details', 'show more details on the state of each component in each lane'],\n ['j', 'json', 'show lanes details in json format'],\n ['r', 'remote <remote-scope-name>', 'show all remote lanes from the specified scope'],\n ['', 'merged', 'list only merged lanes'],\n ['', 'not-merged', \"list only lanes that haven't been merged\"],\n ] as CommandOptions;\n loader = true;\n group = 'collaborate';\n remoteOp = true;\n skipWorkspace = true;\n helpUrl = 'reference/components/lanes';\n commands: Command[] = [];\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report([name]: [string], laneOptions: LaneOptions): Promise<string> {\n return new LaneListCmd(this.lanes, this.workspace, this.scope).report([name], laneOptions);\n }\n}\n\nexport class LaneRemoveReadmeCmd implements Command {\n name = 'remove-readme [laneName]';\n description = 'EXPERIMENTAL. remove lane readme component';\n options = [] as CommandOptions;\n loader = true;\n skipWorkspace = false;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName]: [string]): Promise<string> {\n const { result, message } = await this.lanes.removeLaneReadme(laneName);\n\n if (result) {\n return chalk.green(\n `the readme component has been successfully removed from the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n }\n\n return chalk.red(`${message}\\n`);\n }\n}\n\nexport class LaneAddReadmeCmd implements Command {\n name = 'add-readme <component-name> [lane-name]';\n description = 'EXPERIMENTAL. sets an existing component as the readme of a lane';\n arguments = [\n { name: 'component-id', description: \"the component name or id of the component to use as the lane's readme\" },\n { name: 'lane-name', description: 'the lane to attach the readme to (defaults to the current lane)' },\n ];\n options = [] as CommandOptions;\n loader = true;\n skipWorkspace = false;\n\n constructor(private lanes: LanesMain) {}\n\n async report([componentId, laneName]: [string, string]): Promise<string> {\n const { result, message } = await this.lanes.addLaneReadme(componentId, laneName);\n\n if (result)\n return chalk.green(\n `the component ${componentId} has been successfully added as the readme component for the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n\n return chalk.red(\n `${message || ''}\\nthe component ${componentId} could not be added as a readme component for the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n }\n}\n\nfunction outputComponents(components: LaneData['components']): string {\n const componentsTitle = `\\t${chalk.bold(`components (${components.length})`)}\\n`;\n const componentsStr = components.map((c) => `\\t ${c.id.toString()} - ${c.head}`).join('\\n');\n return componentsTitle + componentsStr;\n}\n\nfunction outputReadmeComponent(component: LaneData['readmeComponent']): string {\n if (!component) return '';\n return `\\n\\t${`${chalk.yellow('readme component')}\\n\\t ${component.id} - ${\n component.head ||\n `(unsnapped)\\n\\t(\"use bit snap ${component.id.fullName}\" to snap the readme component on the lane before exporting)`\n }`}\\n`;\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,IAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,WAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,UAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,OAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,MAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAA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AAQ,CAAC,CAAC,MAAM8I,CAAC,CAACC,IAAI,EAAE,CAAC,CAACnI,IAAI,CAAC,IAAI,CAAC;EAC5F,OAAOgI,eAAe,GAAGC,aAAa;AACxC;AAEA,SAASrH,qBAAqBA,CAACwH,SAAsC,EAAU;EAC7E,IAAI,CAACA,SAAS,EAAE,OAAO,EAAE;EACzB,OAAO,OAAO,GAAGxI,gBAAK,CAACgE,MAAM,CAAC,kBAAkB,CAAC,SAASwE,SAAS,CAAC5H,EAAE,MACpE4H,SAAS,CAACD,IAAI,IACd,iCAAiCC,SAAS,CAAC5H,EAAE,CAAC6H,QAAQ,8DAA8D,EACpH,IAAI;AACR","ignoreList":[]}
|
@@ -129,13 +129,6 @@ function _component() {
|
|
129
129
|
};
|
130
130
|
return data;
|
131
131
|
}
|
132
|
-
function _removeLanes() {
|
133
|
-
const data = _interopRequireDefault(require("@teambit/legacy/dist/consumer/lanes/remove-lanes"));
|
134
|
-
_removeLanes = function () {
|
135
|
-
return data;
|
136
|
-
};
|
137
|
-
return data;
|
138
|
-
}
|
139
132
|
function _models() {
|
140
133
|
const data = require("@teambit/legacy/dist/scope/models");
|
141
134
|
_models = function () {
|
@@ -213,16 +206,23 @@ function _noCommonSnap() {
|
|
213
206
|
};
|
214
207
|
return data;
|
215
208
|
}
|
216
|
-
function
|
217
|
-
const data = require("@teambit/
|
218
|
-
|
209
|
+
function _harmonyModules() {
|
210
|
+
const data = require("@teambit/harmony.modules.concurrency");
|
211
|
+
_harmonyModules = function () {
|
219
212
|
return data;
|
220
213
|
};
|
221
214
|
return data;
|
222
215
|
}
|
223
|
-
function
|
216
|
+
function _harmonyModules2() {
|
224
217
|
const data = require("@teambit/harmony.modules.feature-toggle");
|
225
|
-
|
218
|
+
_harmonyModules2 = function () {
|
219
|
+
return data;
|
220
|
+
};
|
221
|
+
return data;
|
222
|
+
}
|
223
|
+
function _removeLanes() {
|
224
|
+
const data = require("./remove-lanes");
|
225
|
+
_removeLanes = function () {
|
226
226
|
return data;
|
227
227
|
};
|
228
228
|
return data;
|
@@ -661,7 +661,7 @@ please create a new lane instead, which will include all components of this lane
|
|
661
661
|
await this.scope.legacyScope.lanes.removeLanes(this.scope.legacyScope, laneNames, true);
|
662
662
|
return laneNames;
|
663
663
|
}
|
664
|
-
const results = await (0, _removeLanes().
|
664
|
+
const results = await (0, _removeLanes().removeLanes)(this.workspace?.consumer, laneNames, !!opts?.remote, !!opts?.force);
|
665
665
|
if (this.workspace) await this.workspace.consumer.onDestroy('lane-remove');
|
666
666
|
return results.laneResults;
|
667
667
|
}
|
@@ -860,7 +860,7 @@ please create a new lane instead, which will include all components of this lane
|
|
860
860
|
});
|
861
861
|
}
|
862
862
|
}, {
|
863
|
-
concurrency: (0,
|
863
|
+
concurrency: (0, _harmonyModules().concurrentComponentsLimit)()
|
864
864
|
});
|
865
865
|
this.logger.profile(`get snaps distance for source lane: ${sourceLane?.id.name} and target lane: ${targetLane?.id.name} with ${diffProps.length} components`);
|
866
866
|
const commonSnapsToImport = (0, _lodash().compact)([...snapDistancesByComponentId.values()].map(s => s.snapsDistance.commonSnapBeforeDiverge ? s.componentId.changeVersion(s.snapsDistance.commonSnapBeforeDiverge.hash) : null));
|
@@ -1142,7 +1142,7 @@ please create a new lane instead, which will include all components of this lane
|
|
1142
1142
|
const fetchCmd = new (_importer().FetchCmd)(importer);
|
1143
1143
|
const laneCmd = new (_lane().LaneCmd)(lanesMain, workspace, scope);
|
1144
1144
|
laneCmd.commands = [new (_lane().LaneListCmd)(lanesMain, workspace, scope), switchCmd, new (_lane().LaneShowCmd)(lanesMain, workspace, scope), new (_lane().LaneCreateCmd)(lanesMain), new (_lane().LaneRemoveCmd)(lanesMain), new (_lane().LaneChangeScopeCmd)(lanesMain), new (_lane().LaneAliasCmd)(lanesMain), new (_lane().LaneRenameCmd)(lanesMain), new (_lanesModules().LaneDiffCmd)(workspace, scope, componentCompare), new (_lane().LaneAddReadmeCmd)(lanesMain), new (_lane().LaneRemoveReadmeCmd)(lanesMain), new (_lane().LaneImportCmd)(switchCmd), new (_lane().LaneRemoveCompCmd)(workspace, lanesMain), new (_lane().LaneFetchCmd)(fetchCmd, lanesMain), new (_lane().LaneEjectCmd)(lanesMain)];
|
1145
|
-
if ((0,
|
1145
|
+
if ((0, _harmonyModules2().isFeatureEnabled)(_harmonyModules2().SUPPORT_LANE_HISTORY)) {
|
1146
1146
|
laneCmd.commands.push(new (_lane().LaneHistoryCmd)(lanesMain));
|
1147
1147
|
laneCmd.commands.push(new (_lane().LaneCheckoutCmd)(lanesMain));
|
1148
1148
|
laneCmd.commands.push(new (_lane().LaneRevertCmd)(lanesMain));
|