@teambit/lanes 1.0.1270 → 1.0.1271

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lane.cmd.js CHANGED
@@ -282,6 +282,7 @@ class LaneCreateCmd {
282
282
  }]);
283
283
  _defineProperty(this, "description", `creates a new lane and switches to it`);
284
284
  _defineProperty(this, "extendedDescription", `a lane created from main (default-lane) is empty until components are snapped.
285
+ if main has snaps that were not exported, they are moved to the new lane, and main goes back to its remote state.
285
286
  a lane created from another lane contains all the components of the original lane.`);
286
287
  _defineProperty(this, "alias", '');
287
288
  _defineProperty(this, "options", [['s', 'scope <scope-name>', '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")'], ['', 'remote-scope <scope-name>', 'DEPRECATED. use --scope'], ['', 'alias <name>', 'a local alias to refer to this lane, defaults to the `<lane-name>` (can be added later with "bit lane alias")'], ['', 'fork-lane-new-scope', 'create the new lane in a different scope than its parent lane (if created from another lane)']]);
@@ -295,8 +296,9 @@ a lane created from another lane contains all the components of the original lan
295
296
  const remoteScopeOrDefaultScope = createLaneOptions.scope ? `the remote scope ${_chalk().default.bold(createLaneOptions.scope)}` : `the default-scope ${_chalk().default.bold(result.laneId.scope)}. you can change the lane's scope, before it is exported, with the "bit lane change-scope" command`;
296
297
  const summary = (0, _cli().formatSuccessSummary)(`successfully created and checked out to lane ${_chalk().default.bold(result.alias || result.laneId.name)}`);
297
298
  const note = currentLane ? (0, _cli().formatHint)(`note - your new lane will be based on lane ${currentLane.name}`) : '';
299
+ const movedFromMain = (0, _cli().formatSection)('moved from main', 'these components had snaps on main that were not exported. the snaps were moved to the new lane', (result.movedFromMain || []).map(id => (0, _cli().formatItem)(id.toString())));
298
300
  const scopeInfo = (0, _cli().formatHint)(`this lane will be exported to ${remoteScopeOrDefaultScope}`);
299
- return (0, _cli().joinSections)([summary, note, scopeInfo]);
301
+ return (0, _cli().joinSections)([summary, note, movedFromMain, scopeInfo]);
300
302
  }
301
303
  }
302
304
  exports.LaneCreateCmd = LaneCreateCmd;
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_laneId","_checkout","_workspace","_cli","_legacy","_bitError","_yesno","_legacy2","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","LaneListCmd","constructor","lanes","workspace","scope","report","args","laneOptions","details","remote","merged","notMerged","laneIdStr","laneId","alias","isDefault","name","toString","getLanes","showDefaultLane","mergedLanes","l","isMerged","formatHint","items","map","m","formatItem","formatSection","unmergedLanes","currentLane","getCurrentLaneId","getDefaultLaneId","laneDataOfCurrentLane","find","isEqual","id","undefined","currentAlias","currentLaneReadmeComponentStr","outputReadmeComponent","readmeComponent","getCurrentLaneOutput","currentLaneLabel","chalk","green","outputComponents","components","getAvailableLanesOutput","otherLanes","laneData","readmeComponentStr","laneTitle","bold","join","getFooter","hints","joinSections","json","lanesData","serializeLaneData","getCurrentLaneNameOrAlias","exports","LaneCurrentCmd","currentLaneId","DEFAULT_LANE","LaneShowCmd","geLanesData","onlyLane","title","formatTitle","author","log","username","email","date","Date","parseInt","toLocaleString","link","DEFAULT_CLOUD_DOMAIN","replace","meta","Boolean","Error","getCurrentLaneName","parseLaneId","LaneCreateCmd","description","createLaneOptions","OutsideWorkspaceError","getCurrentLane","remoteScope","result","createLane","remoteScopeOrDefaultScope","summary","formatSuccessSummary","note","scopeInfo","LaneAliasCmd","laneName","aliasLane","CatLaneHistoryCmd","laneHistory","getLaneHistory","JSON","stringify","toObject","LaneCheckoutCmd","historyId","opts","checkoutHistory","checkoutOutput","LaneRevertCmd","revertHistory","component","filesStatus","entries","reduce","acc","filePath","status","removedComponents","addedComponents","newComponents","failedComponents","unchangedMessage","unchangedLegitimately","leftUnresolvedConflicts","newFromLane","newFromLaneAdded","version","resolvedComponents","abortedComponents","installationError","message","compilationError","mergeSnapError","mergeSnapResults","snappedComponents","toStringArray","exportedIds","workspaceConfigUpdateResult","logs","LaneHistoryCmd","getHistoryData","BitError","importLaneHistory","history","getHistory","historyItem","singleItem","sortedIds","getHistoryIds","getDateString","updateDependentsBlock","updateDependents","uuid","item","LaneUpdatesCmd","getLaneId","undo","reportUndo","ids","source","remoteError","getLaneUpdateDependents","sourceHint","section","removed","remoteSkipped","localChanged","undoLaneUpdateDependents","nothingToRemove","noun","hint","remoteChanged","LaneEjectCmd","COMPONENT_PATTERN_HELP","pattern","results","eject","body","LaneChangeScopeCmd","remoteScopeBefore","localName","changeScope","LaneRenameCmd","newName","currentName","rename","LaneRemoveCmd","names","force","silent","logger","clearStatusLine","shouldProceed","yesno","question","laneResults","removeLanes","LaneRemoveCompCmd","LaneImportCmd","switchCmd","lane","skipDependencyInstallation","branch","autoMergeResolve","forceOurs","forceTheirs","targetLaneId","fetchLaneWithItsComponents","yellow","LaneFetchCmd","fetchCmd","all","getLaneIdStr","LaneCmd","LaneRemoveReadmeCmd","removeLaneReadme","red","c","head","fullName","prefix","warnSymbol"],"sources":["lane.cmd.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport chalk from 'chalk';\nimport type { ScopeMain } from '@teambit/scope';\nimport type { LaneId } from '@teambit/lane-id';\nimport { DEFAULT_LANE } from '@teambit/lane-id';\nimport { checkoutOutput } from '@teambit/checkout';\nimport type { Workspace } from '@teambit/workspace';\nimport { OutsideWorkspaceError } from '@teambit/workspace';\nimport type { Command, CommandOptions, Report } from '@teambit/cli';\nimport {\n formatTitle,\n formatSection,\n formatItem,\n formatSuccessSummary,\n formatHint,\n warnSymbol,\n joinSections,\n} from '@teambit/cli';\nimport type { LaneData } from '@teambit/legacy.scope';\nimport { serializeLaneData } from '@teambit/legacy.scope';\nimport { BitError } from '@teambit/bit-error';\nimport yesno from 'yesno';\nimport { COMPONENT_PATTERN_HELP, DEFAULT_CLOUD_DOMAIN } from '@teambit/legacy.constants';\nimport type { CreateLaneOptions, LanesMain } from './lanes.main.runtime';\nimport type { MergeStrategy } from '@teambit/component.modules.merge-helper';\nimport type { SwitchCmd } from './switch.cmd';\nimport type { 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(\n private lanes: LanesMain,\n private workspace: Workspace,\n private scope: ScopeMain\n ) {}\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 formatHint('none of the lanes is merged');\n const items = mergedLanes.map((m) => formatItem(m.name));\n return formatSection('merged lanes', '', items);\n }\n if (notMerged) {\n const unmergedLanes = lanes.filter((l) => !l.isMerged);\n if (!unmergedLanes.length) return formatHint('all lanes are merged');\n const items = unmergedLanes.map((m) => formatItem(m.name));\n return formatSection('unmerged lanes', '', items);\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\n const getCurrentLaneOutput = () => {\n if (remote) return '';\n const currentLaneLabel = `current lane - ${chalk.green(laneIdStr(currentLane, currentAlias))}${currentLaneReadmeComponentStr}`;\n if (details && laneDataOfCurrentLane) {\n return `${currentLaneLabel}\\n${outputComponents(laneDataOfCurrentLane.components)}`;\n }\n return currentLaneLabel;\n };\n\n const getAvailableLanesOutput = () => {\n const otherLanes = lanes.filter((l) => !currentLane.isEqual(l.id));\n if (!otherLanes.length) return '';\n if (details) {\n const items = otherLanes.map((laneData) => {\n const readmeComponentStr = outputReadmeComponent(laneData.readmeComponent);\n const laneTitle = `> ${chalk.bold(laneIdStr(laneData.id, laneData.alias))}`;\n const components = outputComponents(laneData.components);\n return `${laneTitle}${readmeComponentStr}\\n${components}`;\n });\n return items.join('\\n\\n');\n }\n const items = otherLanes.map((laneData) => {\n const readmeComponentStr = outputReadmeComponent(laneData.readmeComponent);\n return formatItem(\n `${chalk.green(laneIdStr(laneData.id, laneData.alias))} (${laneData.components.length} components)${readmeComponentStr}`\n );\n });\n return formatSection('available lanes', '', items);\n };\n\n const getFooter = () => {\n const hints: string[] = [];\n if (details) {\n hints.push('use --merged and --not-merged to see which of the lanes is fully merged');\n } else {\n hints.push(\"use 'bit lane list --details' or 'bit lane show <lane-name>' for more info\");\n }\n if (!remote && this.workspace) {\n hints.push(\"switch lanes using 'bit switch <name>'. create lanes using 'bit lane create <name>'\");\n }\n return formatHint(hints.join('\\n'));\n };\n\n return joinSections([getCurrentLaneOutput(), getAvailableLanesOutput(), getFooter()]);\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 LaneCurrentCmd implements Command {\n name = 'current';\n description = 'display the name of the current lane';\n alias = '';\n options = [['j', 'json', 'output in json format']] as CommandOptions;\n loader = false;\n skipWorkspace = false;\n\n constructor(private lanes: LanesMain) {}\n\n async report(): Promise<string> {\n const currentLaneId = this.lanes.getCurrentLaneId();\n if (!currentLaneId || currentLaneId.isDefault()) {\n return DEFAULT_LANE;\n }\n const alias = this.lanes.getCurrentLaneNameOrAlias();\n if (alias && alias !== currentLaneId.name) {\n return `${currentLaneId.toString()} (${alias})`;\n }\n return currentLaneId.toString();\n }\n\n async json(): Promise<Record<string, unknown>> {\n const currentLaneId = this.lanes.getCurrentLaneId();\n if (!currentLaneId || currentLaneId.isDefault()) {\n return { name: DEFAULT_LANE, scope: null, id: DEFAULT_LANE, isDefault: true, alias: null };\n }\n const alias = this.lanes.getCurrentLaneNameOrAlias();\n return {\n name: currentLaneId.name,\n scope: currentLaneId.scope,\n id: currentLaneId.toString(),\n isDefault: false,\n alias: alias !== currentLaneId.name ? alias : null,\n };\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(\n private lanes: LanesMain,\n private workspace: Workspace,\n private scope: ScopeMain\n ) {}\n\n async report([name]: [string], laneOptions: LaneOptions): Promise<string> {\n const lanes = await this.geLanesData([name], laneOptions);\n const onlyLane = lanes[0];\n const laneId = onlyLane.id;\n const laneIdStr = laneId.isDefault() ? DEFAULT_LANE : laneId.toString();\n const title = formatTitle(laneIdStr);\n const author = onlyLane.log ? `author: ${onlyLane.log?.username || 'N/A'} <${onlyLane.log?.email || 'N/A'}>` : '';\n const date = onlyLane.log?.date ? `created: ${new Date(parseInt(onlyLane.log.date)).toLocaleString()}` : '';\n const link = laneId.isDefault()\n ? ''\n : `link: https://${DEFAULT_CLOUD_DOMAIN}/${laneId.scope.replace('.', '/')}/~lane/${laneId.name}`;\n const meta = [author, date, link].filter(Boolean).join('\\n');\n return joinSections([title, meta, outputComponents(onlyLane.components)]);\n }\n\n private async geLanesData([name]: [string], laneOptions: LaneOptions) {\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 return lanes;\n }\n\n async json([name]: [string], laneOptions: LaneOptions) {\n const lanes = await this.geLanesData([name], laneOptions);\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 summary = formatSuccessSummary(\n `successfully created and checked out to lane ${chalk.bold(result.alias || result.laneId.name)}`\n );\n const note = currentLane ? formatHint(`note - your new lane will be based on lane ${currentLane.name}`) : '';\n const scopeInfo = formatHint(`this lane will be exported to ${remoteScopeOrDefaultScope}`);\n return joinSections([summary, note, scopeInfo]);\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 group = 'advanced';\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 = {\n skipDependencyInstallation?: boolean;\n restoreDeletedComponents?: boolean;\n};\n\nexport class LaneCheckoutCmd implements Command {\n name = 'checkout <history-id>';\n description = '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 | Report> {\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 = '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 changes the files.\nchoose one or the other based on your needs.\nif you want to continue working on this lane and need 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 ['', 'restore-deleted-components', 'restore components that were deleted after this history point'],\n ['j', 'json', 'return the revert result in json format'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([historyId]: [string], opts: LaneCheckoutOpts): Promise<string | Report> {\n const result = await this.lanes.revertHistory(historyId, opts);\n return checkoutOutput(result, {}, `successfully reverted according to history-id: ${historyId}`);\n }\n\n async json([historyId]: [string], opts: LaneCheckoutOpts) {\n const result = await this.lanes.revertHistory(historyId, opts);\n return {\n components: result.components?.map((component) => ({\n id: component.id.toString(),\n filesStatus: Object.entries(component.filesStatus || {}).reduce(\n (acc, [filePath, status]) => {\n acc[filePath] = status;\n return acc;\n },\n {} as Record<string, string>\n ),\n })),\n removedComponents: result.removedComponents?.map((id) => id.toString()),\n addedComponents: result.addedComponents?.map((id) => id.toString()),\n newComponents: result.newComponents?.map((id) => id.toString()),\n failedComponents: result.failedComponents?.map((component) => ({\n id: component.id.toString(),\n unchangedMessage: component.unchangedMessage,\n unchangedLegitimately: component.unchangedLegitimately,\n })),\n leftUnresolvedConflicts: result.leftUnresolvedConflicts,\n newFromLane: result.newFromLane,\n newFromLaneAdded: result.newFromLaneAdded,\n version: result.version,\n resolvedComponents: result.resolvedComponents?.map((component) => component.id.toString()),\n abortedComponents: result.abortedComponents?.map((component) => ({\n id: component.id.toString(),\n filesStatus: Object.entries(component.filesStatus || {}).reduce(\n (acc, [filePath, status]) => {\n acc[filePath] = status;\n return acc;\n },\n {} as Record<string, string>\n ),\n })),\n installationError: result.installationError?.message,\n compilationError: result.compilationError?.message,\n mergeSnapError: result.mergeSnapError?.message,\n mergeSnapResults: result.mergeSnapResults\n ? {\n snappedComponents: result.mergeSnapResults.snappedComponents?.map((component) => component.id.toString()),\n removedComponents: result.mergeSnapResults.removedComponents?.toStringArray(),\n exportedIds: result.mergeSnapResults.exportedIds?.map((id) => id.toString()),\n }\n : null,\n workspaceConfigUpdateResult: result.workspaceConfigUpdateResult\n ? {\n logs: result.workspaceConfigUpdateResult.logs,\n }\n : undefined,\n historyId,\n };\n }\n}\n\nexport class LaneHistoryCmd implements Command {\n name = 'history [lane-name]';\n description = 'show lane history, default to the current lane';\n extendedDescription = `list from the oldest to the newest history items`;\n alias = '';\n options = [\n ['', 'id <string>', 'show a specific history item'],\n ['j', 'json', 'return the lane history in json format'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n private async getHistoryData(laneName?: string, id?: 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\n if (id) {\n const historyItem = history[id];\n if (!historyItem) throw new Error(`history id ${id} was not found`);\n return { historyItem, id, history, singleItem: true as const };\n }\n\n return { history, sortedIds: laneHistory.getHistoryIds(), singleItem: false as const };\n }\n\n private getDateString(date: string) {\n return new Date(parseInt(date)).toLocaleString();\n }\n\n async report([laneName]: [string], { id }: { id?: string }): Promise<string> {\n const data = await this.getHistoryData(laneName, id);\n\n if (data.singleItem) {\n const { historyItem } = data;\n const date = this.getDateString(historyItem.log.date);\n const message = historyItem.log.message;\n const updateDependentsBlock = historyItem.updateDependents?.length\n ? `\\n\\nupdateDependents:\\n${historyItem.updateDependents.join('\\n')}`\n : '';\n return `${id} ${date} ${historyItem.log.username} ${message}\\n\\n${historyItem.components.join('\\n')}${updateDependentsBlock}`;\n }\n\n const { history, sortedIds } = data;\n const items = sortedIds.map((uuid) => {\n const item = history[uuid];\n const date = this.getDateString(item.log.date);\n const message = item.log.message;\n return `${uuid} ${date} ${item.log.username} ${message}`;\n });\n return items.join('\\n');\n }\n\n async json([laneName]: [string], { id }: { id?: string }) {\n const data = await this.getHistoryData(laneName, id);\n\n if (data.singleItem) {\n const { historyItem, id: historyId } = data;\n return {\n id: historyId,\n date: historyItem.log.date,\n username: historyItem.log.username,\n message: historyItem.log.message,\n components: historyItem.components,\n ...(historyItem.updateDependents?.length && { updateDependents: historyItem.updateDependents }),\n };\n }\n\n const { history, sortedIds } = data;\n return sortedIds.map((uuid) => {\n const item = history[uuid];\n return {\n id: uuid,\n date: item.log.date,\n username: item.log.username,\n message: item.log.message,\n components: item.components,\n ...(item.updateDependents?.length && { updateDependents: item.updateDependents }),\n };\n });\n }\n}\n\nexport class LaneUpdatesCmd implements Command {\n name = 'updates [lane-name]';\n description = 'show the dependents Ripple CI cascaded onto a lane, default to the current lane';\n extendedDescription = `after a lane is exported, Ripple CI may snap the dependents of the lane components against the new\nheads and add them to the lane as hidden \"update\" entries. they are part of the lane graph (Ripple CI builds them, merge\nrefreshes them) but stay hidden from the workspace (\"bit status\", .bitmap).\nthe entries are read from the remote lane. the local lane object is used only when the remote is unavailable.\nuse --undo to remove them from the lane, on the remote and locally, e.g. when the cascade is not wanted.`;\n alias = '';\n group = 'collaborate';\n options = [\n ['', 'undo', 'remove the cascaded dependents from the lane, on the remote and locally'],\n ['j', 'json', 'return the results in json format'],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n // the entries live on the remote lane, so a named lane can be inspected from a bare scope as well\n skipWorkspace = true;\n\n constructor(private lanes: LanesMain) {}\n\n private async getLaneId(laneName?: string): Promise<LaneId> {\n const laneId = laneName ? await this.lanes.parseLaneId(laneName) : this.lanes.getCurrentLaneId();\n if (!laneId) {\n throw new BitError('unable to detect the current lane, specify a lane name, e.g. \"bit lane updates scope/name\"');\n }\n if (laneId.isDefault()) {\n throw new BitError('the default lane (main) has no cascaded updates. switch to a lane or specify a lane name');\n }\n return laneId;\n }\n\n async report([laneName]: [string], { undo }: { undo?: boolean }): Promise<string> {\n const laneId = await this.getLaneId(laneName);\n if (undo) return this.reportUndo(laneId);\n\n const { ids, source, remoteError } = await this.lanes.getLaneUpdateDependents(laneId);\n const sourceHint =\n source === 'remote'\n ? ''\n : formatHint(\n source === 'no-remote-lane'\n ? 'showing the local lane object, the lane was not found on the remote'\n : `showing the local lane object, the remote lane could not be fetched: ${remoteError}`\n );\n if (!ids.length) {\n return joinSections([`no dependents were cascaded onto lane \"${laneId.toString()}\" by Ripple CI.`, sourceHint]);\n }\n const items = ids.map((id) => formatItem(id.toString()));\n const section = formatSection(\n `updates cascaded onto lane \"${laneId.toString()}\"`,\n '(use --undo to remove them from the lane)',\n items\n );\n return joinSections([section, sourceHint]);\n }\n\n private async reportUndo(laneId: LaneId): Promise<string> {\n const { removed, remoteSkipped, localChanged } = await this.lanes.undoLaneUpdateDependents(laneId);\n if (!removed.length) {\n const nothingToRemove = `no cascaded updates to remove from lane \"${laneId.toString()}\".`;\n return localChanged ? `${nothingToRemove} stale entries were cleaned from the local lane.` : nothingToRemove;\n }\n const noun = removed.length === 1 ? 'update' : 'updates';\n const summary = formatSuccessSummary(`removed ${removed.length} cascaded ${noun} from lane \"${laneId.toString()}\"`);\n const items = removed.map((id) => formatItem(id.toString()));\n const hint = remoteSkipped\n ? formatHint('the lane was not found on the remote, so only the local lane object was changed')\n : '';\n return joinSections([[summary, ...items].join('\\n'), hint]);\n }\n\n async json([laneName]: [string], { undo }: { undo?: boolean }) {\n const laneId = await this.getLaneId(laneName);\n if (undo) {\n const { removed, remoteChanged, localChanged, remoteSkipped } = await this.lanes.undoLaneUpdateDependents(laneId);\n return {\n laneId: laneId.toString(),\n removed: removed.map((id) => id.toString()),\n remoteChanged,\n localChanged,\n remoteSkipped,\n };\n }\n const { ids, source, remoteError } = await this.lanes.getLaneUpdateDependents(laneId);\n return {\n laneId: laneId.toString(),\n updateDependents: ids.map((id) => id.toString()),\n source,\n ...(remoteError && { remoteError }),\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 = `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 this.lanes.logger.clearStatusLine(); // stop the logger to avoid polluting the prompt\n const shouldProceed = await yesno({\n question: 'Are you sure you would like to proceed with this operation? [yes(y)/no(n)]',\n });\n if (!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(\n private workspace: Workspace,\n private lanes: LanesMain\n ) {}\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`;\n extendedDescription = `when on the default lane, the workspace is switched to the imported lane.\nwhen already on the same lane, only the latest objects are fetched from the remote — run \"bit checkout head\" to update the workspace.\nwhen on a different lane, the lane is fetched locally without switching to avoid disrupting your work — run \\`bit switch <lane>\\` to switch.`;\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 ['', 'branch', 'create and checkout a new git branch named after the lane'],\n [\n 'r',\n 'auto-merge-resolve <merge-strategy>',\n 'merge local changes with the checked out version. strategy should be \"theirs\", \"ours\" or \"manual\"',\n ],\n ['', 'force-ours', 'do not merge, preserve local files as is'],\n ['', 'force-theirs', 'do not merge, just overwrite with incoming files'],\n ] as CommandOptions;\n loader = true;\n\n constructor(\n private switchCmd: SwitchCmd,\n private lanes: LanesMain\n ) {}\n\n async report(\n [lane]: [string],\n {\n skipDependencyInstallation = false,\n pattern,\n branch = false,\n autoMergeResolve,\n forceOurs = false,\n forceTheirs = false,\n }: {\n skipDependencyInstallation: boolean;\n pattern?: string;\n branch?: boolean;\n autoMergeResolve?: MergeStrategy;\n forceOurs?: boolean;\n forceTheirs?: boolean;\n }\n ): Promise<string | Report> {\n if (forceOurs && forceTheirs) {\n throw new BitError('please use either --force-ours or --force-theirs, not both');\n }\n\n const currentLaneId = this.lanes.getCurrentLaneId();\n // when on the default lane (or outside a workspace), keep the original behavior: switch to the imported lane.\n if (!currentLaneId || currentLaneId.isDefault()) {\n return this.switchCmd.report([lane], {\n skipDependencyInstallation,\n pattern,\n branch,\n autoMergeResolve,\n forceOurs,\n forceTheirs,\n });\n }\n\n // already on a (non-default) lane: do not auto-switch, only fetch the lane locally.\n const targetLaneId = await this.lanes.parseLaneId(lane);\n await this.lanes.fetchLaneWithItsComponents(targetLaneId);\n\n if (currentLaneId.isEqual(targetLaneId)) {\n return joinSections([\n formatSuccessSummary(\n `you are already on lane \"${chalk.bold(targetLaneId.toString())}\". the lane has been fetched from the remote, but your workspace files were ${chalk.bold('not')} updated.`\n ),\n `${chalk.yellow('to update your workspace files to the latest')}, run \"${chalk.bold('bit checkout head')}\".`,\n ]);\n }\n\n return joinSections([\n formatSuccessSummary(`imported lane \"${chalk.bold(targetLaneId.toString())}\" locally`),\n formatHint(\n `you are still on lane \"${currentLaneId.toString()}\". to switch to the imported lane, run \"bit switch ${targetLaneId.toString()}\"`\n ),\n ]);\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(\n private fetchCmd: FetchCmd,\n private lanes: LanesMain\n ) {}\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 for parallel development';\n extendedDescription = `lanes allow isolated development of features without affecting main branch components.\ncreate, switch between, and merge lanes to coordinate parallel work across teams.\nwithout a sub-command, lists all available lanes.`;\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(\n private lanes: LanesMain,\n private workspace: Workspace,\n private scope: ScopeMain\n ) {}\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\n/**\n * @deprecated - only use it to revert the add-readme command changes\n */\nexport class LaneRemoveReadmeCmd implements Command {\n name = 'remove-readme [laneName]';\n description =\n 'DEPRECATED (only use it if you have used add-readme and want to undo it). 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\nfunction outputComponents(components: LaneData['components']): string {\n const items = components.map((c) => formatItem(`${c.id.toString()} - ${c.head}`));\n return formatSection('components', '', items);\n}\n\nfunction outputReadmeComponent(component: LaneData['readmeComponent']): string {\n if (!component) return '';\n const head = component.head || '(unsnapped)';\n const hint = component.head ? '' : ` - use \"bit snap ${component.id.fullName}\" to snap before exporting`;\n const prefix = component.head ? ' ' : ` ${warnSymbol} `;\n return `${prefix}readme: ${component.id} - ${head}${hint}`;\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;AAGA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,UAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,KAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,IAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAUA,SAAAO,QAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,OAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,UAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,SAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,OAAA;EAAA,MAAAT,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAO,MAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAU,SAAA;EAAA,M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,EAAE,CAACnB,QAAQ,CAAC,CAAC,MAAM8M,CAAC,CAACC,IAAI,EAAE,CAAC,CAAC;EACjF,OAAO,IAAApM,oBAAa,EAAC,YAAY,EAAE,EAAE,EAAEJ,KAAK,CAAC;AAC/C;AAEA,SAASgB,qBAAqBA,CAAC4E,SAAsC,EAAU;EAC7E,IAAI,CAACA,SAAS,EAAE,OAAO,EAAE;EACzB,MAAM4G,IAAI,GAAG5G,SAAS,CAAC4G,IAAI,IAAI,aAAa;EAC5C,MAAMhD,IAAI,GAAG5D,SAAS,CAAC4G,IAAI,GAAG,EAAE,GAAG,oBAAoB5G,SAAS,CAAChF,EAAE,CAAC6L,QAAQ,4BAA4B;EACxG,MAAMC,MAAM,GAAG9G,SAAS,CAAC4G,IAAI,GAAG,GAAG,GAAG,IAAIG,iBAAU,GAAG;EACvD,OAAO,GAAGD,MAAM,WAAW9G,SAAS,CAAChF,EAAE,MAAM4L,IAAI,GAAGhD,IAAI,EAAE;AAC5D","ignoreList":[]}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_laneId","_checkout","_workspace","_cli","_legacy","_bitError","_yesno","_legacy2","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","LaneListCmd","constructor","lanes","workspace","scope","report","args","laneOptions","details","remote","merged","notMerged","laneIdStr","laneId","alias","isDefault","name","toString","getLanes","showDefaultLane","mergedLanes","l","isMerged","formatHint","items","map","m","formatItem","formatSection","unmergedLanes","currentLane","getCurrentLaneId","getDefaultLaneId","laneDataOfCurrentLane","find","isEqual","id","undefined","currentAlias","currentLaneReadmeComponentStr","outputReadmeComponent","readmeComponent","getCurrentLaneOutput","currentLaneLabel","chalk","green","outputComponents","components","getAvailableLanesOutput","otherLanes","laneData","readmeComponentStr","laneTitle","bold","join","getFooter","hints","joinSections","json","lanesData","serializeLaneData","getCurrentLaneNameOrAlias","exports","LaneCurrentCmd","currentLaneId","DEFAULT_LANE","LaneShowCmd","geLanesData","onlyLane","title","formatTitle","author","log","username","email","date","Date","parseInt","toLocaleString","link","DEFAULT_CLOUD_DOMAIN","replace","meta","Boolean","Error","getCurrentLaneName","parseLaneId","LaneCreateCmd","description","createLaneOptions","OutsideWorkspaceError","getCurrentLane","remoteScope","result","createLane","remoteScopeOrDefaultScope","summary","formatSuccessSummary","note","movedFromMain","scopeInfo","LaneAliasCmd","laneName","aliasLane","CatLaneHistoryCmd","laneHistory","getLaneHistory","JSON","stringify","toObject","LaneCheckoutCmd","historyId","opts","checkoutHistory","checkoutOutput","LaneRevertCmd","revertHistory","component","filesStatus","entries","reduce","acc","filePath","status","removedComponents","addedComponents","newComponents","failedComponents","unchangedMessage","unchangedLegitimately","leftUnresolvedConflicts","newFromLane","newFromLaneAdded","version","resolvedComponents","abortedComponents","installationError","message","compilationError","mergeSnapError","mergeSnapResults","snappedComponents","toStringArray","exportedIds","workspaceConfigUpdateResult","logs","LaneHistoryCmd","getHistoryData","BitError","importLaneHistory","history","getHistory","historyItem","singleItem","sortedIds","getHistoryIds","getDateString","updateDependentsBlock","updateDependents","uuid","item","LaneUpdatesCmd","getLaneId","undo","reportUndo","ids","source","remoteError","getLaneUpdateDependents","sourceHint","section","removed","remoteSkipped","localChanged","undoLaneUpdateDependents","nothingToRemove","noun","hint","remoteChanged","LaneEjectCmd","COMPONENT_PATTERN_HELP","pattern","results","eject","body","LaneChangeScopeCmd","remoteScopeBefore","localName","changeScope","LaneRenameCmd","newName","currentName","rename","LaneRemoveCmd","names","force","silent","logger","clearStatusLine","shouldProceed","yesno","question","laneResults","removeLanes","LaneRemoveCompCmd","LaneImportCmd","switchCmd","lane","skipDependencyInstallation","branch","autoMergeResolve","forceOurs","forceTheirs","targetLaneId","fetchLaneWithItsComponents","yellow","LaneFetchCmd","fetchCmd","all","getLaneIdStr","LaneCmd","LaneRemoveReadmeCmd","removeLaneReadme","red","c","head","fullName","prefix","warnSymbol"],"sources":["lane.cmd.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport chalk from 'chalk';\nimport type { ScopeMain } from '@teambit/scope';\nimport type { LaneId } from '@teambit/lane-id';\nimport { DEFAULT_LANE } from '@teambit/lane-id';\nimport { checkoutOutput } from '@teambit/checkout';\nimport type { Workspace } from '@teambit/workspace';\nimport { OutsideWorkspaceError } from '@teambit/workspace';\nimport type { Command, CommandOptions, Report } from '@teambit/cli';\nimport {\n formatTitle,\n formatSection,\n formatItem,\n formatSuccessSummary,\n formatHint,\n warnSymbol,\n joinSections,\n} from '@teambit/cli';\nimport type { LaneData } from '@teambit/legacy.scope';\nimport { serializeLaneData } from '@teambit/legacy.scope';\nimport { BitError } from '@teambit/bit-error';\nimport yesno from 'yesno';\nimport { COMPONENT_PATTERN_HELP, DEFAULT_CLOUD_DOMAIN } from '@teambit/legacy.constants';\nimport type { CreateLaneOptions, LanesMain } from './lanes.main.runtime';\nimport type { MergeStrategy } from '@teambit/component.modules.merge-helper';\nimport type { SwitchCmd } from './switch.cmd';\nimport type { 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(\n private lanes: LanesMain,\n private workspace: Workspace,\n private scope: ScopeMain\n ) {}\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 formatHint('none of the lanes is merged');\n const items = mergedLanes.map((m) => formatItem(m.name));\n return formatSection('merged lanes', '', items);\n }\n if (notMerged) {\n const unmergedLanes = lanes.filter((l) => !l.isMerged);\n if (!unmergedLanes.length) return formatHint('all lanes are merged');\n const items = unmergedLanes.map((m) => formatItem(m.name));\n return formatSection('unmerged lanes', '', items);\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\n const getCurrentLaneOutput = () => {\n if (remote) return '';\n const currentLaneLabel = `current lane - ${chalk.green(laneIdStr(currentLane, currentAlias))}${currentLaneReadmeComponentStr}`;\n if (details && laneDataOfCurrentLane) {\n return `${currentLaneLabel}\\n${outputComponents(laneDataOfCurrentLane.components)}`;\n }\n return currentLaneLabel;\n };\n\n const getAvailableLanesOutput = () => {\n const otherLanes = lanes.filter((l) => !currentLane.isEqual(l.id));\n if (!otherLanes.length) return '';\n if (details) {\n const items = otherLanes.map((laneData) => {\n const readmeComponentStr = outputReadmeComponent(laneData.readmeComponent);\n const laneTitle = `> ${chalk.bold(laneIdStr(laneData.id, laneData.alias))}`;\n const components = outputComponents(laneData.components);\n return `${laneTitle}${readmeComponentStr}\\n${components}`;\n });\n return items.join('\\n\\n');\n }\n const items = otherLanes.map((laneData) => {\n const readmeComponentStr = outputReadmeComponent(laneData.readmeComponent);\n return formatItem(\n `${chalk.green(laneIdStr(laneData.id, laneData.alias))} (${laneData.components.length} components)${readmeComponentStr}`\n );\n });\n return formatSection('available lanes', '', items);\n };\n\n const getFooter = () => {\n const hints: string[] = [];\n if (details) {\n hints.push('use --merged and --not-merged to see which of the lanes is fully merged');\n } else {\n hints.push(\"use 'bit lane list --details' or 'bit lane show <lane-name>' for more info\");\n }\n if (!remote && this.workspace) {\n hints.push(\"switch lanes using 'bit switch <name>'. create lanes using 'bit lane create <name>'\");\n }\n return formatHint(hints.join('\\n'));\n };\n\n return joinSections([getCurrentLaneOutput(), getAvailableLanesOutput(), getFooter()]);\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 LaneCurrentCmd implements Command {\n name = 'current';\n description = 'display the name of the current lane';\n alias = '';\n options = [['j', 'json', 'output in json format']] as CommandOptions;\n loader = false;\n skipWorkspace = false;\n\n constructor(private lanes: LanesMain) {}\n\n async report(): Promise<string> {\n const currentLaneId = this.lanes.getCurrentLaneId();\n if (!currentLaneId || currentLaneId.isDefault()) {\n return DEFAULT_LANE;\n }\n const alias = this.lanes.getCurrentLaneNameOrAlias();\n if (alias && alias !== currentLaneId.name) {\n return `${currentLaneId.toString()} (${alias})`;\n }\n return currentLaneId.toString();\n }\n\n async json(): Promise<Record<string, unknown>> {\n const currentLaneId = this.lanes.getCurrentLaneId();\n if (!currentLaneId || currentLaneId.isDefault()) {\n return { name: DEFAULT_LANE, scope: null, id: DEFAULT_LANE, isDefault: true, alias: null };\n }\n const alias = this.lanes.getCurrentLaneNameOrAlias();\n return {\n name: currentLaneId.name,\n scope: currentLaneId.scope,\n id: currentLaneId.toString(),\n isDefault: false,\n alias: alias !== currentLaneId.name ? alias : null,\n };\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(\n private lanes: LanesMain,\n private workspace: Workspace,\n private scope: ScopeMain\n ) {}\n\n async report([name]: [string], laneOptions: LaneOptions): Promise<string> {\n const lanes = await this.geLanesData([name], laneOptions);\n const onlyLane = lanes[0];\n const laneId = onlyLane.id;\n const laneIdStr = laneId.isDefault() ? DEFAULT_LANE : laneId.toString();\n const title = formatTitle(laneIdStr);\n const author = onlyLane.log ? `author: ${onlyLane.log?.username || 'N/A'} <${onlyLane.log?.email || 'N/A'}>` : '';\n const date = onlyLane.log?.date ? `created: ${new Date(parseInt(onlyLane.log.date)).toLocaleString()}` : '';\n const link = laneId.isDefault()\n ? ''\n : `link: https://${DEFAULT_CLOUD_DOMAIN}/${laneId.scope.replace('.', '/')}/~lane/${laneId.name}`;\n const meta = [author, date, link].filter(Boolean).join('\\n');\n return joinSections([title, meta, outputComponents(onlyLane.components)]);\n }\n\n private async geLanesData([name]: [string], laneOptions: LaneOptions) {\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 return lanes;\n }\n\n async json([name]: [string], laneOptions: LaneOptions) {\n const lanes = await this.geLanesData([name], laneOptions);\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.\nif main has snaps that were not exported, they are moved to the new lane, and main goes back to its remote state.\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 summary = formatSuccessSummary(\n `successfully created and checked out to lane ${chalk.bold(result.alias || result.laneId.name)}`\n );\n const note = currentLane ? formatHint(`note - your new lane will be based on lane ${currentLane.name}`) : '';\n const movedFromMain = formatSection(\n 'moved from main',\n 'these components had snaps on main that were not exported. the snaps were moved to the new lane',\n (result.movedFromMain || []).map((id) => formatItem(id.toString()))\n );\n const scopeInfo = formatHint(`this lane will be exported to ${remoteScopeOrDefaultScope}`);\n return joinSections([summary, note, movedFromMain, scopeInfo]);\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 group = 'advanced';\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 = {\n skipDependencyInstallation?: boolean;\n restoreDeletedComponents?: boolean;\n};\n\nexport class LaneCheckoutCmd implements Command {\n name = 'checkout <history-id>';\n description = '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 | Report> {\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 = '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 changes the files.\nchoose one or the other based on your needs.\nif you want to continue working on this lane and need 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 ['', 'restore-deleted-components', 'restore components that were deleted after this history point'],\n ['j', 'json', 'return the revert result in json format'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([historyId]: [string], opts: LaneCheckoutOpts): Promise<string | Report> {\n const result = await this.lanes.revertHistory(historyId, opts);\n return checkoutOutput(result, {}, `successfully reverted according to history-id: ${historyId}`);\n }\n\n async json([historyId]: [string], opts: LaneCheckoutOpts) {\n const result = await this.lanes.revertHistory(historyId, opts);\n return {\n components: result.components?.map((component) => ({\n id: component.id.toString(),\n filesStatus: Object.entries(component.filesStatus || {}).reduce(\n (acc, [filePath, status]) => {\n acc[filePath] = status;\n return acc;\n },\n {} as Record<string, string>\n ),\n })),\n removedComponents: result.removedComponents?.map((id) => id.toString()),\n addedComponents: result.addedComponents?.map((id) => id.toString()),\n newComponents: result.newComponents?.map((id) => id.toString()),\n failedComponents: result.failedComponents?.map((component) => ({\n id: component.id.toString(),\n unchangedMessage: component.unchangedMessage,\n unchangedLegitimately: component.unchangedLegitimately,\n })),\n leftUnresolvedConflicts: result.leftUnresolvedConflicts,\n newFromLane: result.newFromLane,\n newFromLaneAdded: result.newFromLaneAdded,\n version: result.version,\n resolvedComponents: result.resolvedComponents?.map((component) => component.id.toString()),\n abortedComponents: result.abortedComponents?.map((component) => ({\n id: component.id.toString(),\n filesStatus: Object.entries(component.filesStatus || {}).reduce(\n (acc, [filePath, status]) => {\n acc[filePath] = status;\n return acc;\n },\n {} as Record<string, string>\n ),\n })),\n installationError: result.installationError?.message,\n compilationError: result.compilationError?.message,\n mergeSnapError: result.mergeSnapError?.message,\n mergeSnapResults: result.mergeSnapResults\n ? {\n snappedComponents: result.mergeSnapResults.snappedComponents?.map((component) => component.id.toString()),\n removedComponents: result.mergeSnapResults.removedComponents?.toStringArray(),\n exportedIds: result.mergeSnapResults.exportedIds?.map((id) => id.toString()),\n }\n : null,\n workspaceConfigUpdateResult: result.workspaceConfigUpdateResult\n ? {\n logs: result.workspaceConfigUpdateResult.logs,\n }\n : undefined,\n historyId,\n };\n }\n}\n\nexport class LaneHistoryCmd implements Command {\n name = 'history [lane-name]';\n description = 'show lane history, default to the current lane';\n extendedDescription = `list from the oldest to the newest history items`;\n alias = '';\n options = [\n ['', 'id <string>', 'show a specific history item'],\n ['j', 'json', 'return the lane history in json format'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n private async getHistoryData(laneName?: string, id?: 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\n if (id) {\n const historyItem = history[id];\n if (!historyItem) throw new Error(`history id ${id} was not found`);\n return { historyItem, id, history, singleItem: true as const };\n }\n\n return { history, sortedIds: laneHistory.getHistoryIds(), singleItem: false as const };\n }\n\n private getDateString(date: string) {\n return new Date(parseInt(date)).toLocaleString();\n }\n\n async report([laneName]: [string], { id }: { id?: string }): Promise<string> {\n const data = await this.getHistoryData(laneName, id);\n\n if (data.singleItem) {\n const { historyItem } = data;\n const date = this.getDateString(historyItem.log.date);\n const message = historyItem.log.message;\n const updateDependentsBlock = historyItem.updateDependents?.length\n ? `\\n\\nupdateDependents:\\n${historyItem.updateDependents.join('\\n')}`\n : '';\n return `${id} ${date} ${historyItem.log.username} ${message}\\n\\n${historyItem.components.join('\\n')}${updateDependentsBlock}`;\n }\n\n const { history, sortedIds } = data;\n const items = sortedIds.map((uuid) => {\n const item = history[uuid];\n const date = this.getDateString(item.log.date);\n const message = item.log.message;\n return `${uuid} ${date} ${item.log.username} ${message}`;\n });\n return items.join('\\n');\n }\n\n async json([laneName]: [string], { id }: { id?: string }) {\n const data = await this.getHistoryData(laneName, id);\n\n if (data.singleItem) {\n const { historyItem, id: historyId } = data;\n return {\n id: historyId,\n date: historyItem.log.date,\n username: historyItem.log.username,\n message: historyItem.log.message,\n components: historyItem.components,\n ...(historyItem.updateDependents?.length && { updateDependents: historyItem.updateDependents }),\n };\n }\n\n const { history, sortedIds } = data;\n return sortedIds.map((uuid) => {\n const item = history[uuid];\n return {\n id: uuid,\n date: item.log.date,\n username: item.log.username,\n message: item.log.message,\n components: item.components,\n ...(item.updateDependents?.length && { updateDependents: item.updateDependents }),\n };\n });\n }\n}\n\nexport class LaneUpdatesCmd implements Command {\n name = 'updates [lane-name]';\n description = 'show the dependents Ripple CI cascaded onto a lane, default to the current lane';\n extendedDescription = `after a lane is exported, Ripple CI may snap the dependents of the lane components against the new\nheads and add them to the lane as hidden \"update\" entries. they are part of the lane graph (Ripple CI builds them, merge\nrefreshes them) but stay hidden from the workspace (\"bit status\", .bitmap).\nthe entries are read from the remote lane. the local lane object is used only when the remote is unavailable.\nuse --undo to remove them from the lane, on the remote and locally, e.g. when the cascade is not wanted.`;\n alias = '';\n group = 'collaborate';\n options = [\n ['', 'undo', 'remove the cascaded dependents from the lane, on the remote and locally'],\n ['j', 'json', 'return the results in json format'],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n // the entries live on the remote lane, so a named lane can be inspected from a bare scope as well\n skipWorkspace = true;\n\n constructor(private lanes: LanesMain) {}\n\n private async getLaneId(laneName?: string): Promise<LaneId> {\n const laneId = laneName ? await this.lanes.parseLaneId(laneName) : this.lanes.getCurrentLaneId();\n if (!laneId) {\n throw new BitError('unable to detect the current lane, specify a lane name, e.g. \"bit lane updates scope/name\"');\n }\n if (laneId.isDefault()) {\n throw new BitError('the default lane (main) has no cascaded updates. switch to a lane or specify a lane name');\n }\n return laneId;\n }\n\n async report([laneName]: [string], { undo }: { undo?: boolean }): Promise<string> {\n const laneId = await this.getLaneId(laneName);\n if (undo) return this.reportUndo(laneId);\n\n const { ids, source, remoteError } = await this.lanes.getLaneUpdateDependents(laneId);\n const sourceHint =\n source === 'remote'\n ? ''\n : formatHint(\n source === 'no-remote-lane'\n ? 'showing the local lane object, the lane was not found on the remote'\n : `showing the local lane object, the remote lane could not be fetched: ${remoteError}`\n );\n if (!ids.length) {\n return joinSections([`no dependents were cascaded onto lane \"${laneId.toString()}\" by Ripple CI.`, sourceHint]);\n }\n const items = ids.map((id) => formatItem(id.toString()));\n const section = formatSection(\n `updates cascaded onto lane \"${laneId.toString()}\"`,\n '(use --undo to remove them from the lane)',\n items\n );\n return joinSections([section, sourceHint]);\n }\n\n private async reportUndo(laneId: LaneId): Promise<string> {\n const { removed, remoteSkipped, localChanged } = await this.lanes.undoLaneUpdateDependents(laneId);\n if (!removed.length) {\n const nothingToRemove = `no cascaded updates to remove from lane \"${laneId.toString()}\".`;\n return localChanged ? `${nothingToRemove} stale entries were cleaned from the local lane.` : nothingToRemove;\n }\n const noun = removed.length === 1 ? 'update' : 'updates';\n const summary = formatSuccessSummary(`removed ${removed.length} cascaded ${noun} from lane \"${laneId.toString()}\"`);\n const items = removed.map((id) => formatItem(id.toString()));\n const hint = remoteSkipped\n ? formatHint('the lane was not found on the remote, so only the local lane object was changed')\n : '';\n return joinSections([[summary, ...items].join('\\n'), hint]);\n }\n\n async json([laneName]: [string], { undo }: { undo?: boolean }) {\n const laneId = await this.getLaneId(laneName);\n if (undo) {\n const { removed, remoteChanged, localChanged, remoteSkipped } = await this.lanes.undoLaneUpdateDependents(laneId);\n return {\n laneId: laneId.toString(),\n removed: removed.map((id) => id.toString()),\n remoteChanged,\n localChanged,\n remoteSkipped,\n };\n }\n const { ids, source, remoteError } = await this.lanes.getLaneUpdateDependents(laneId);\n return {\n laneId: laneId.toString(),\n updateDependents: ids.map((id) => id.toString()),\n source,\n ...(remoteError && { remoteError }),\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 = `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 this.lanes.logger.clearStatusLine(); // stop the logger to avoid polluting the prompt\n const shouldProceed = await yesno({\n question: 'Are you sure you would like to proceed with this operation? [yes(y)/no(n)]',\n });\n if (!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(\n private workspace: Workspace,\n private lanes: LanesMain\n ) {}\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`;\n extendedDescription = `when on the default lane, the workspace is switched to the imported lane.\nwhen already on the same lane, only the latest objects are fetched from the remote — run \"bit checkout head\" to update the workspace.\nwhen on a different lane, the lane is fetched locally without switching to avoid disrupting your work — run \\`bit switch <lane>\\` to switch.`;\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 ['', 'branch', 'create and checkout a new git branch named after the lane'],\n [\n 'r',\n 'auto-merge-resolve <merge-strategy>',\n 'merge local changes with the checked out version. strategy should be \"theirs\", \"ours\" or \"manual\"',\n ],\n ['', 'force-ours', 'do not merge, preserve local files as is'],\n ['', 'force-theirs', 'do not merge, just overwrite with incoming files'],\n ] as CommandOptions;\n loader = true;\n\n constructor(\n private switchCmd: SwitchCmd,\n private lanes: LanesMain\n ) {}\n\n async report(\n [lane]: [string],\n {\n skipDependencyInstallation = false,\n pattern,\n branch = false,\n autoMergeResolve,\n forceOurs = false,\n forceTheirs = false,\n }: {\n skipDependencyInstallation: boolean;\n pattern?: string;\n branch?: boolean;\n autoMergeResolve?: MergeStrategy;\n forceOurs?: boolean;\n forceTheirs?: boolean;\n }\n ): Promise<string | Report> {\n if (forceOurs && forceTheirs) {\n throw new BitError('please use either --force-ours or --force-theirs, not both');\n }\n\n const currentLaneId = this.lanes.getCurrentLaneId();\n // when on the default lane (or outside a workspace), keep the original behavior: switch to the imported lane.\n if (!currentLaneId || currentLaneId.isDefault()) {\n return this.switchCmd.report([lane], {\n skipDependencyInstallation,\n pattern,\n branch,\n autoMergeResolve,\n forceOurs,\n forceTheirs,\n });\n }\n\n // already on a (non-default) lane: do not auto-switch, only fetch the lane locally.\n const targetLaneId = await this.lanes.parseLaneId(lane);\n await this.lanes.fetchLaneWithItsComponents(targetLaneId);\n\n if (currentLaneId.isEqual(targetLaneId)) {\n return joinSections([\n formatSuccessSummary(\n `you are already on lane \"${chalk.bold(targetLaneId.toString())}\". the lane has been fetched from the remote, but your workspace files were ${chalk.bold('not')} updated.`\n ),\n `${chalk.yellow('to update your workspace files to the latest')}, run \"${chalk.bold('bit checkout head')}\".`,\n ]);\n }\n\n return joinSections([\n formatSuccessSummary(`imported lane \"${chalk.bold(targetLaneId.toString())}\" locally`),\n formatHint(\n `you are still on lane \"${currentLaneId.toString()}\". to switch to the imported lane, run \"bit switch ${targetLaneId.toString()}\"`\n ),\n ]);\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(\n private fetchCmd: FetchCmd,\n private lanes: LanesMain\n ) {}\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 for parallel development';\n extendedDescription = `lanes allow isolated development of features without affecting main branch components.\ncreate, switch between, and merge lanes to coordinate parallel work across teams.\nwithout a sub-command, lists all available lanes.`;\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(\n private lanes: LanesMain,\n private workspace: Workspace,\n private scope: ScopeMain\n ) {}\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\n/**\n * @deprecated - only use it to revert the add-readme command changes\n */\nexport class LaneRemoveReadmeCmd implements Command {\n name = 'remove-readme [laneName]';\n description =\n 'DEPRECATED (only use it if you have used add-readme and want to undo it). 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\nfunction outputComponents(components: LaneData['components']): string {\n const items = components.map((c) => formatItem(`${c.id.toString()} - ${c.head}`));\n return formatSection('components', '', items);\n}\n\nfunction outputReadmeComponent(component: LaneData['readmeComponent']): string {\n if (!component) return '';\n const head = component.head || '(unsnapped)';\n const hint = component.head ? '' : ` - use \"bit snap ${component.id.fullName}\" to snap before exporting`;\n const prefix = component.head ? ' ' : ` ${warnSymbol} `;\n return `${prefix}readme: ${component.id} - ${head}${hint}`;\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;AAGA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,UAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,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AI,aAAa;EAC5C,MAAMhD,IAAI,GAAG5D,SAAS,CAAC4G,IAAI,GAAG,EAAE,GAAG,oBAAoB5G,SAAS,CAACjF,EAAE,CAAC8L,QAAQ,4BAA4B;EACxG,MAAMC,MAAM,GAAG9G,SAAS,CAAC4G,IAAI,GAAG,GAAG,GAAG,IAAIG,iBAAU,GAAG;EACvD,OAAO,GAAGD,MAAM,WAAW9G,SAAS,CAACjF,EAAE,MAAM6L,IAAI,GAAGhD,IAAI,EAAE;AAC5D","ignoreList":[]}
@@ -152,6 +152,7 @@ export type CreateLaneResult = {
152
152
  laneId: LaneId;
153
153
  hash: string;
154
154
  alias?: string;
155
+ movedFromMain?: ComponentID[];
155
156
  };
156
157
  export declare class LanesMain {
157
158
  readonly workspace: Workspace | undefined;
@@ -637,7 +637,9 @@ if you wish to keep ${scope} scope, please re-run the command with "--fork-lane-
637
637
  lane: laneObj,
638
638
  alias,
639
639
  laneId: laneObj.toLaneId(),
640
- hash: laneObj.hash().toString()
640
+ hash: laneObj.hash().toString(),
641
+ // a lane created from main gets only the staged snaps of main, which are moved to it
642
+ movedFromMain: currentLaneId.isDefault() ? laneObj.components.map(c => c.id) : undefined
641
643
  };
642
644
  return results;
643
645
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_harmonyModules","data","require","_cli","_pMap","_interopRequireDefault","_pLimit","_scope","_graphql","_express","_workspace","_scope2","_lanesModules","_legacy","_laneId","_legacy2","_bitError","_logger","_merging","_componentModules","_importer","_componentId","_legacyBitId","_component","_objects","_component2","_export","_lodash","_componentCompare","_componentWriter","_remove","_checkout","_lanesEntities","_harmonyModules2","_fsExtra","_execa","_gitModules","_removeLanes","_lanes","_lane","_lanes2","_switch","_switchLanes","_lanesModules2","_lanesCreate","_lanesDelete","_lanesRestore","_install","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","LanesMain","constructor","workspace","scope","merging","componentAspect","logger","importer","exporter","componentCompare","componentWriter","remove","checkout","install","pLimit","concurrentComponentsLimit","Map","laneDiffCache","_laneDiffCache","LaneDiffCache","tryDiffStatusResultMemo","resultMemoKey","sourceLaneId","targetLaneId","cached","getDiffStatus","undefined","source","target","getDefaultLaneId","componentsStatus","prewarmCompareCaches","host","visibleDiffProps","allVersionedIds","comparePairs","componentId","sourceHead","targetHead","compareId","changeVersion","baseId","toString","Promise","all","pMap","id","get","concurrency","catch","compareComponents","resolve","populateDiffStatusMemoAsync","results","map","status","changes","deriveComponentChanges","then","anyFailed","some","s","changesContext","skipped","storeDiffStatus","getLanes","name","remote","merged","showDefaultLane","notMerged","showMergeData","Boolean","consumer","Error","laneId","LaneId","from","remoteObj","getRemoteByName","lanes","listLanes","DEFAULT_LANE","defaultLane","getLaneDataOfDefaultLane","legacyScope","getLanesData","parseLaneId","idStr","parseLaneIdFromString","getLaneHistory","lane","loadLane","BitError","laneHistory","getOrCreateLaneHistory","checkoutHistory","historyId","options","historyItem","getHistoryItemOfCurrentLane","ids","components","ComponentID","fromString","getCurrentLane","versionPerId","allowAddingComponentsFromScope","skipNpmInstall","skipDependencyInstallation","isLane","revertHistory","historyComponentIds","existingIds","deletedIds","restoreDeletedComponents","currentBitmap","bitMap","getAllBitIdsFromAllLanes","currentComponentIdsSet","Set","toStringWithoutVersion","has","revert","deletedResults","addedComponents","getCurrentLaneId","isDefault","importLaneHistory","history","getHistory","existingLane","isNew","importLaneObject","isLaneExistsOnRemote","scopeImporter","importLanes","getCurrentLaneName","getCurrentLaneNameOrAlias","currentLaneId","trackingData","getLocalTrackedLaneByRemoteName","setCurrentLane","alias","exported","createLane","forkLaneNewScope","newLane","createLaneInScope","toLaneId","hash","throwForInvalidLaneName","currentLaneScope","defaultScope","laneObj","trackLaneData","localLane","remoteLane","remoteScope","trackLane","scopeJson","setLaneAsNew","onDestroy","localName","remoteName","beforeTrackData","getRemoteTrackedDataByLocalLane","beforeTrackDataCloned","afterTrackData","aliasLane","laneName","includes","LANE_REMOTE_DELIMITER","trackData","laneNameWithoutScope","split","removeTrackLane","changeScope","isValidScopeName","InvalidScopeName","remoteScopeBefore","newLaneId","saveLane","laneHistoryMsg","rename","newName","currentName","existingAliasWithNewName","remoteIdStr","objects","remoteLanes","renameRefByNewLaneName","renameLane","isEqual","isExported","isLaneExported","exportLane","pushToScopes","laneObject","ComponentIdList","allVersions","persistIfNotExists","includeLaneHistory","eject","pattern","idsByPattern","modelComp","getBitObjectModelComponent","head","deletedComps","deleteComps","packages","c","getPackageName","getHeadOnMain","fetchLaneWithItsComponents","debug","fetchLaneComponents","removeLanes","laneNames","opts","force","laneResults","restoreLane","laneHash","ref","Ref","objectsFromTrash","getFromTrash","laneIdFromTrash","existingWithSameId","restoreFromTrash","switchLanes","merge","forceOurs","forceTheirs","workspaceOnly","restrictToScopes","skipFetch","branch","OutsideWorkspaceError","inInstallContext","mergeStrategy","mergeOptions","MergeOptions","join","switchProps","existingOnWorkspaceOnly","checkoutProps","promptMergeOptions","reset","gitBranchWarning","createGitBranchForLane","switchResult","LaneSwitcher","switch","isGit","fs","pathExists","warning","warn","gitExecutablePath","getGitExecutablePath","execa","cwd","path","info","err","detailedError","stderr","trim","message","command","getDiff","values","diffOptions","laneDiffGenerator","LaneDiffGenerator","generate","getLaneComponentModels","getHost","laneComponentIds","getLaneComponentIds","getMany","laneComponents","isCurrentLane","bitIdsFromBitmap","filteredComponentIds","laneComponent","bitmapComponentId","isEqualWithoutVersion","getLaneUpdateDependentIds","updateDependents","getLaneUpdateDependentComponents","getLaneReadmeComponent","laneReadmeComponent","readmeComponent","laneReadmeComponentId","removeLaneReadme","currentLaneName","result","readmeComponentId","existingLaneConfig","getSpecificComponentConfig","LanesAspect","remoteLaneIdStr","readme","removeSpecificComponentConfig","addSpecificComponentConfig","setReadmeComponent","write","diffStatus","ensureLoaded","profile","sourceLane","sourceLaneComponents","main","targetLane","targetLaneIds","toBitIds","targetIsMain","baseWasLocalByComp","sourceComponentIds","resolveComponentId","cid","getModelComponentIfExist","set","importMainHeads","targetMainHeads","compact","headOnMain","diffStatusKey","earlyReturn","importObjectsFromMainIfExist","cache","diffProps","sourceVersionObj","load","isRemoved","headOnTargetLane","searchWithoutVersion","version","targetVersionObj","snapDistancesByComponentId","memoHits","memoKey","snapsDistanceKey","getSnapsDistance","snapsDistance","computed","getSnapsDistanceBetweenTwoSnaps","NoCommonSnap","storeSnapsDistance","skipUpToDate","d","snapsOnSourceOnly","isUpToDate","commonSnapsToImport","commonSnapBeforeDiverge","sourceOrTargetLane","skipChanges","deferChanges","importWithoutDeps","fromArray","reason","baseSource","componentDiffStatus","prewarmCaches","noCommonSnap","upToDate","unrelated","commonSnap","deriveChangeTypes","changeType","onSource","onTarget","snapsOnTargetOnly","common","context","changeTypesKey","getChangeTypes","pending","changeTypesInflight","deriveChangesLimit","storeChangeTypes","finally","delete","ChangeType","NEW","repo","loadPair","baseVersion","compareVersion","missing","ignoreMissingHead","classifyVersionChanges","obj","toObject","extensionDependencies","cloneAsString","recreateNewLaneIfDeleted","getCurrentLaneObject","listUpdatesFromForked","componentsList","isOnMain","forkedFromLaneId","forkedFrom","forkedFromLane","workspaceIds","getAllBitIds","duringMergeIds","listDuringMergeStateComponents","componentsFromModel","getModelComponents","compFromModelOnWorkspace","hasWithoutVersion","toComponentId","remoteForkedLane","getRemoteLane","modelComponent","headOnForked","find","headOnLane","laneHeadLocal","divergeData","getDivergeData","throws","listUpdatesFromMainPending","allIds","includeVersionHistory","checkedOutVersion","getRef","getLaneUpdateDependents","remoteError","isLaneLocalOnly","LaneNotFound","undoLaneUpdateDependents","current","remoteSkipped","removed","toRemove","localChanged","pruneStaleUpdateDependents","remoteChanged","removedIdsStr","removeLaneUpdateDependents","removeUpdateDependents","remoteIds","localIds","stale","remoteId","bitIds","scopeComponents","list","component","getIdsOfDefaultLane","bitId","isMerged","createRoutePath","deleteRoutePath","restoreRoutePath","provider","cli","graphql","loggerMain","express","createLogger","lanesMain","switchCmd","SwitchCmd","fetchCmd","FetchCmd","laneCmd","LaneCmd","commands","LaneListCmd","LaneShowCmd","LaneCreateCmd","LaneRemoveCmd","LaneChangeScopeCmd","LaneAliasCmd","LaneRenameCmd","LaneDiffCmd","LaneRemoveReadmeCmd","LaneImportCmd","LaneRemoveCompCmd","LaneFetchCmd","LaneEjectCmd","LaneCurrentCmd","LaneHistoryCmd","LaneHistoryDiffCmd","LaneCheckoutCmd","LaneRevertCmd","LaneUpdatesCmd","register","CatLaneHistoryCmd","registerOnStart","lanesSchema","LanesCreateRoute","LanesDeleteRoute","LanesRestoreRoute","exports","CLIAspect","ScopeAspect","WorkspaceAspect","GraphqlAspect","MergingAspect","ComponentAspect","LoggerAspect","ImporterAspect","ExportAspect","ExpressAspect","ComponentCompareAspect","ComponentWriterAspect","RemoveAspect","CheckoutAspect","InstallAspect","MainRuntime","addRuntime","_default"],"sources":["lanes.main.runtime.ts"],"sourcesContent":["/* eslint-disable max-lines */\nimport type { CLIMain } from '@teambit/cli';\nimport { MainRuntime } from '@teambit/harmony.modules.runtimes';\nimport { CLIAspect } from '@teambit/cli';\nimport pMap from 'p-map';\nimport pLimit from 'p-limit';\nimport type { ScopeMain } from '@teambit/scope';\nimport { ScopeAspect } from '@teambit/scope';\nimport type { GraphqlMain } from '@teambit/graphql';\nimport { GraphqlAspect } from '@teambit/graphql';\nimport type { ExpressMain } from '@teambit/express';\nimport { ExpressAspect } from '@teambit/express';\nimport type { Workspace } from '@teambit/workspace';\nimport { OutsideWorkspaceError, WorkspaceAspect } from '@teambit/workspace';\nimport { getRemoteByName } from '@teambit/scope.remotes';\nimport type { LaneDiffResults } from '@teambit/lanes.modules.diff';\nimport {\n LaneDiffCache,\n LaneDiffCmd,\n LaneDiffGenerator,\n LaneHistoryDiffCmd,\n classifyVersionChanges,\n getHeadOnMain,\n importMainHeads,\n} from '@teambit/lanes.modules.diff';\nimport type { Scope as LegacyScope, TrackLane, LaneData } from '@teambit/legacy.scope';\nimport { NoCommonSnap } from '@teambit/legacy.scope';\nimport { LaneId, DEFAULT_LANE, LANE_REMOTE_DELIMITER } from '@teambit/lane-id';\nimport { LaneNotFound } from '@teambit/legacy.scope-api';\nimport { BitError } from '@teambit/bit-error';\nimport type { Logger, LoggerMain } from '@teambit/logger';\nimport { LoggerAspect } from '@teambit/logger';\nimport type { DiffOptions } from '@teambit/legacy.component-diff';\nimport type { MergeStrategy } from '@teambit/component.modules.merge-helper';\nimport type { MergingMain } from '@teambit/merging';\nimport { MergingAspect } from '@teambit/merging';\nimport { MergeOptions } from '@teambit/component.modules.merge-helper';\nimport type { ImporterMain } from '@teambit/importer';\nimport { FetchCmd, ImporterAspect } from '@teambit/importer';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport { InvalidScopeName, isValidScopeName } from '@teambit/legacy-bit-id';\nimport type { Component, ComponentMain } from '@teambit/component';\nimport { ComponentAspect } from '@teambit/component';\nimport type { HistoryItem, LaneHistory, Version } from '@teambit/objects';\nimport { Ref, Lane } from '@teambit/objects';\nimport type { SnapsDistance } from '@teambit/component.snap-distance';\nimport { getDivergeData } from '@teambit/component.snap-distance';\nimport type { ExportMain } from '@teambit/export';\nimport { ExportAspect } from '@teambit/export';\nimport { compact } from 'lodash';\nimport type { ComponentCompareMain } from '@teambit/component-compare';\nimport { ComponentCompareAspect } from '@teambit/component-compare';\nimport type { ComponentWriterMain } from '@teambit/component-writer';\nimport { ComponentWriterAspect } from '@teambit/component-writer';\nimport type { RemoveMain } from '@teambit/remove';\nimport { RemoveAspect } from '@teambit/remove';\nimport type { CheckoutMain } from '@teambit/checkout';\nimport { CheckoutAspect } from '@teambit/checkout';\nimport { ChangeType } from '@teambit/lanes.entities.lane-diff';\nimport type { ComponentsList } from '@teambit/legacy.component-list';\nimport { concurrentComponentsLimit } from '@teambit/harmony.modules.concurrency';\nimport fs from 'fs-extra';\nimport execa from 'execa';\nimport { getGitExecutablePath } from '@teambit/git.modules.git-executable';\nimport { removeLanes } from './remove-lanes';\nimport { LanesAspect } from './lanes.aspect';\nimport type { LaneCheckoutOpts } from './lane.cmd';\nimport {\n LaneCmd,\n LaneCreateCmd,\n LaneCurrentCmd,\n LaneImportCmd,\n LaneListCmd,\n LaneRemoveCmd,\n LaneShowCmd,\n LaneChangeScopeCmd,\n LaneAliasCmd,\n LaneRenameCmd,\n LaneRemoveReadmeCmd,\n LaneRemoveCompCmd,\n CatLaneHistoryCmd,\n LaneHistoryCmd,\n LaneCheckoutCmd,\n LaneRevertCmd,\n LaneUpdatesCmd,\n LaneFetchCmd,\n LaneEjectCmd,\n} from './lane.cmd';\nimport { lanesSchema } from './lanes.graphql';\nimport { SwitchCmd } from './switch.cmd';\nimport { LaneSwitcher } from './switch-lanes';\nimport { createLane, createLaneInScope, throwForInvalidLaneName } from '@teambit/lanes.modules.create-lane';\nimport { LanesCreateRoute } from './lanes.create.route';\nimport { LanesDeleteRoute } from './lanes.delete.route';\nimport { LanesRestoreRoute } from './lanes.restore.route';\nimport type { InstallMain } from '@teambit/install';\nimport { InstallAspect } from '@teambit/install';\n\nexport { Lane };\n\nexport type SnapsDistanceObj = {\n onSource: string[];\n onTarget: string[];\n common?: string;\n};\n\nexport type LaneResults = {\n lanes: LaneData[];\n currentLane?: string | null;\n};\n\nexport type CreateLaneOptions = {\n scope?: string; // default to the defaultScope in workspace.jsonc\n alias?: string; // default to the remote name\n forkLaneNewScope?: boolean;\n};\n\nexport type SwitchLaneOptions = {\n skipFetch?: boolean;\n alias?: string;\n merge?: MergeStrategy;\n forceOurs?: boolean;\n forceTheirs?: boolean;\n workspaceOnly?: boolean;\n pattern?: string;\n /** switch only the lane components from these scopes (see `SwitchProps.restrictToScopes`) */\n restrictToScopes?: string[];\n skipDependencyInstallation?: boolean;\n verbose?: boolean;\n override?: boolean;\n branch?: boolean;\n};\n\n/**\n * where the entries were read from. the remote lane is the source of truth, so anything else means the\n * local lane object was used instead, and why.\n */\nexport type LaneUpdateDependentsSource =\n /** the lane on the remote */\n | 'remote'\n /** the remote has no such lane - it was never exported, or it was removed there */\n | 'no-remote-lane'\n /** the remote could not be reached or failed, so the local entries may be stale */\n | 'remote-unavailable';\n\nexport type LaneUpdateDependentsResult = {\n laneId: LaneId;\n /** the cascaded entries. each id carries the cascade snap hash as its version */\n ids: ComponentID[];\n source: LaneUpdateDependentsSource;\n /** the remote failure message, when the remote was tried and failed */\n remoteError?: string;\n};\n\nexport type UndoLaneUpdateDependentsResult = {\n laneId: LaneId;\n removed: ComponentID[];\n remoteChanged: boolean;\n localChanged: boolean;\n /** the lane was never exported, so only the local lane object was changed */\n remoteSkipped: boolean;\n};\n\n/** where the base was resolved from: `workspace` (already local) or `scope` (fetched from remote). */\nexport type DiffBaseSource = 'workspace' | 'scope';\n\nexport type LaneComponentDiffStatus = {\n componentId: ComponentID;\n sourceHead: string;\n targetHead?: string;\n /** where the base was resolved from (workspace vs remote scope). @see DiffBaseSource */\n baseSource?: DiffBaseSource;\n /**\n * @deprecated\n * use changes to get list of all the changes\n */\n changeType?: ChangeType;\n changes?: ChangeType[];\n upToDate?: boolean;\n snapsDistance?: SnapsDistanceObj;\n unrelated?: boolean;\n /**\n * internal context for deferred derivation of `changes`. not exposed on the GraphQL schema —\n * the `changes` field resolver consumes this via `deriveComponentChanges` so the heavy\n * `componentCompare.compare()` + `getAPIDiff()` work only runs when the field is selected,\n * lazily per-component, in parallel via graphql-js list resolution.\n */\n changesContext?: {\n commonSnap?: { hash: string } | null;\n skipped?: boolean;\n pending?: Promise<ChangeType[] | undefined>;\n };\n};\n\nexport type LaneDiffStatusOptions = {\n /** skip importing the common snaps and computing `changes` entirely */\n skipChanges?: boolean;\n /**\n * drop components where the snaps-distance says the source already includes everything on the\n * target. these contribute nothing to a target→source merge view but each costs an\n * `importWithoutDeps` round trip + an `apiDiff` schema extraction.\n */\n skipUpToDate?: boolean;\n /**\n * still classify snap distance, but don't compute `changes` eagerly. callers derive them lazily\n * via `deriveComponentChanges` (used by GraphQL field resolvers).\n */\n deferChanges?: boolean;\n /**\n * after computing the result, eagerly warm the compare/host caches the lane-compare UI will hit next.\n * UI-only: it fans out concurrent component loads, so CLI/programmatic callers (which never make those\n * follow-up queries) must leave it off to avoid paying — and multiplying — that cold-load cost.\n */\n prewarmCaches?: boolean;\n};\n\nexport type DivergeDataPerId = { id: ComponentID; divergeData: SnapsDistance };\n\nexport type LaneDiffStatus = {\n source: LaneId;\n target: LaneId;\n componentsStatus: LaneComponentDiffStatus[];\n};\n\nexport type MarkRemoveOnLaneResult = { removedFromWs: ComponentID[]; markedRemoved: ComponentID[] };\n\nexport type CreateLaneResult = {\n lane: Lane;\n laneId: LaneId;\n hash: string;\n alias?: string;\n};\n\nexport class LanesMain {\n constructor(\n readonly workspace: Workspace | undefined,\n private scope: ScopeMain,\n private merging: MergingMain,\n private componentAspect: ComponentMain,\n public logger: Logger,\n readonly importer: ImporterMain,\n private exporter: ExportMain,\n private componentCompare: ComponentCompareMain,\n readonly componentWriter: ComponentWriterMain,\n private remove: RemoveMain,\n readonly checkout: CheckoutMain,\n private install: InstallMain\n ) {}\n\n /**\n * disk-persisted memo layer for the lane-diff computation (snaps-distance, change-types and the\n * top-level result). extracted to its own class — see `LaneDiffCache` in lanes/diff.\n */\n private _laneDiffCache?: LaneDiffCache;\n private get laneDiffCache(): LaneDiffCache {\n if (!this._laneDiffCache) this._laneDiffCache = new LaneDiffCache(this.logger);\n return this._laneDiffCache;\n }\n\n /**\n * Bound the parallelism of `deriveChangeTypes` across all in-flight requests. graphql-js resolves\n * list fields in parallel via `Promise.all`, so an uncapped derivation fires one `compare()` per\n * component at once. The old cap of 4 existed because derivation also ran `getAPIDiff` (serial\n * tsserver schema extraction) — that's now deferred to the API view, so derivation only does the\n * I/O+CPU-bound `compare()`, which parallelizes well. Cap to the component concurrency limit.\n */\n private deriveChangesLimit = pLimit(concurrentComponentsLimit());\n\n /** single-flight for concurrent `deriveComponentChanges` calls on the same memo key. */\n private changeTypesInflight = new Map<string, Promise<ChangeType[] | undefined>>();\n\n private tryDiffStatusResultMemo(\n resultMemoKey: string,\n sourceLaneId: LaneId,\n targetLaneId: LaneId | undefined\n ): LaneDiffStatus | undefined {\n const cached = this.laneDiffCache.getDiffStatus(resultMemoKey);\n if (!cached) return undefined;\n return {\n source: sourceLaneId,\n target: targetLaneId || this.getDefaultLaneId(),\n componentsStatus: cached,\n };\n }\n\n /**\n * Pre-warm the downstream caches the lane-compare UI hits right after `LaneDiffStatus`:\n * - the scope's `ScopeComponentLoader.componentsCache` via `host.getMany([…])`\n * - `componentCompare`'s disk-persisted result memo via `compareComponents(pairs)`\n *\n * Fire-and-forget. The UI's follow-up `Component` and `CompareComponents` queries arrive ~50–200 ms\n * after we return; this kickoff happens *before* we return, so the work overlaps the UI's render\n * tick and the response serialization. By the time the UI's queries land on the server, the caches\n * are populated (or, worst case, the pre-warm work is in-flight and the resolver-level single-flight\n * in `componentCompare` dedupes the load).\n */\n private prewarmCompareCaches(\n host: any,\n visibleDiffProps: Array<{ componentId: ComponentID; sourceHead: string; targetHead?: string }>\n ) {\n const allVersionedIds: ComponentID[] = [];\n const comparePairs: Array<{ baseId: string; compareId: string }> = [];\n for (const { componentId, sourceHead, targetHead } of visibleDiffProps) {\n const compareId = componentId.changeVersion(sourceHead);\n allVersionedIds.push(compareId);\n if (targetHead) {\n const baseId = componentId.changeVersion(targetHead);\n allVersionedIds.push(baseId);\n comparePairs.push({ baseId: baseId.toString(), compareId: compareId.toString() });\n }\n }\n if (allVersionedIds.length === 0) return;\n // NOTE: `host.getMany` uses mapSeries internally (sequential). For cold pre-warm to actually\n // beat the UI's concurrent N-op `Component` batch we have to drive parallelism ourselves. pMap\n // here uses the same `concurrentComponentsLimit()` cap as the lane diff body, matching what\n // downstream loaders are tuned for.\n Promise.all([\n // wrap in try/catch since `host.get` could be missing or throw synchronously; the previous\n // `host.get?.(id).catch(...)` chained .catch on `undefined` when get was absent.\n pMap(\n allVersionedIds,\n async (id) => {\n try {\n return await host.get?.(id);\n } catch {\n return undefined;\n }\n },\n { concurrency: concurrentComponentsLimit() }\n ).catch(() => undefined),\n comparePairs.length > 0\n ? this.componentCompare.compareComponents(comparePairs).catch(() => undefined)\n : Promise.resolve(),\n ]).catch(() => {});\n }\n\n private populateDiffStatusMemoAsync(resultMemoKey: string, results: LaneComponentDiffStatus[]) {\n Promise.all(\n results.map(async (status) => {\n if (status.changes) return;\n status.changes = await this.deriveComponentChanges(status);\n })\n )\n .then(() => {\n // don't persist a result set where a component's change types couldn't be derived: `changes`\n // came back undefined for a reason OTHER than being explicitly skipped (i.e. a transient\n // Version-load failure). persisting it under the immutable lane-pair key would serve that gap\n // forever; it recomputes and persists on a later request once the objects are available.\n const anyFailed = results.some((s) => s.changes === undefined && !s.changesContext?.skipped);\n if (!anyFailed) this.laneDiffCache.storeDiffStatus(resultMemoKey, results);\n })\n .catch(() => {});\n }\n /**\n * return the lane data without the deleted components.\n * the deleted components are filtered out in legacyScope.lanes.getLanesData()\n */\n async getLanes({\n name,\n remote,\n merged,\n showDefaultLane,\n notMerged,\n }: {\n name?: string;\n remote?: string;\n merged?: boolean;\n showDefaultLane?: boolean;\n notMerged?: boolean;\n }): Promise<LaneData[]> {\n const showMergeData = Boolean(merged || notMerged);\n const consumer = this.workspace?.consumer;\n if (!this.scope) throw new Error(`error: please run the command from a workspace or a scope directory`);\n if (remote) {\n const laneId = name ? LaneId.from(name, remote) : undefined;\n const remoteObj = await getRemoteByName(remote, consumer);\n const lanes = await remoteObj.listLanes(laneId?.toString(), showMergeData);\n // if the remote is http, it eventually calls this method from the remote without the \"remote\" param.\n // again, the deleted components are filtered out.\n return lanes;\n }\n\n if (name === DEFAULT_LANE) {\n const defaultLane = await this.getLaneDataOfDefaultLane();\n return defaultLane ? [defaultLane] : [];\n }\n\n const lanes = await this.scope.legacyScope.lanes.getLanesData(this.scope.legacyScope, name, showMergeData);\n\n if (showDefaultLane) {\n const defaultLane = await this.getLaneDataOfDefaultLane();\n if (defaultLane) lanes.push(defaultLane);\n }\n\n return lanes;\n }\n\n async parseLaneId(idStr: string): Promise<LaneId> {\n const scope: LegacyScope = this.scope.legacyScope;\n return scope.lanes.parseLaneIdFromString(idStr);\n }\n\n async getLaneHistory(laneId: LaneId): Promise<LaneHistory> {\n const lane = await this.loadLane(laneId);\n if (!lane) throw new BitError(`unable to find a lane \"${laneId.toString()}\"`);\n const laneHistory = await this.scope.legacyScope.lanes.getOrCreateLaneHistory(lane);\n return laneHistory;\n }\n\n async checkoutHistory(historyId: string, options?: LaneCheckoutOpts) {\n const historyItem = await this.getHistoryItemOfCurrentLane(historyId);\n const ids = historyItem.components.map((id) => ComponentID.fromString(id));\n const lane = await this.getCurrentLane();\n const results = await this.checkout.checkout({\n ids: ids.map((id) => id.changeVersion(undefined)),\n versionPerId: ids,\n allowAddingComponentsFromScope: true,\n skipNpmInstall: options?.skipDependencyInstallation,\n isLane: true,\n lane,\n });\n return results;\n }\n\n async revertHistory(historyId: string, options?: LaneCheckoutOpts) {\n const historyItem = await this.getHistoryItemOfCurrentLane(historyId);\n const lane = await this.getCurrentLane();\n\n const historyComponentIds = historyItem.components.map((id) => ComponentID.fromString(id));\n\n // When restoreDeletedComponents is set, we need to identify which components from the history\n // are currently not in the workspace (i.e., were deleted after that history point)\n let existingIds = historyComponentIds;\n let deletedIds: ComponentID[] = [];\n\n if (options?.restoreDeletedComponents) {\n const currentBitmap = this.workspace?.consumer.bitMap.getAllBitIdsFromAllLanes() || [];\n const currentComponentIdsSet = new Set(currentBitmap.map((id) => id.toStringWithoutVersion()));\n\n existingIds = historyComponentIds.filter((id) => currentComponentIdsSet.has(id.toStringWithoutVersion()));\n deletedIds = historyComponentIds.filter((id) => !currentComponentIdsSet.has(id.toStringWithoutVersion()));\n }\n\n // First, revert the existing components (keeps bitmap versions)\n const results = await this.checkout.checkout({\n ids: existingIds.map((id) => id.changeVersion(undefined)),\n versionPerId: existingIds,\n allowAddingComponentsFromScope: true,\n revert: true,\n skipNpmInstall: options?.skipDependencyInstallation,\n isLane: true,\n lane,\n });\n\n // If there are deleted components to restore, checkout them separately (updates bitmap)\n if (deletedIds.length > 0) {\n const deletedResults = await this.checkout.checkout({\n ids: deletedIds.map((id) => id.changeVersion(undefined)),\n versionPerId: deletedIds,\n allowAddingComponentsFromScope: true,\n revert: false, // Don't use revert mode for deleted components - we want to update bitmap\n skipNpmInstall: options?.skipDependencyInstallation,\n isLane: true,\n lane,\n });\n\n // Merge the results\n results.components = [...(results.components || []), ...(deletedResults.components || [])];\n results.addedComponents = [...(results.addedComponents || []), ...(deletedResults.addedComponents || [])];\n }\n\n return results;\n }\n\n private async getHistoryItemOfCurrentLane(historyId: string): Promise<HistoryItem> {\n const laneId = this.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) {\n throw new BitError(`unable to checkout history \"${historyId}\" while on main`);\n }\n await this.importLaneHistory(laneId);\n const laneHistory = await this.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n const historyItem = history[historyId];\n if (!historyItem) {\n throw new BitError(`unable to find history \"${historyId}\" in lane \"${laneId.toString()}\"`);\n }\n return historyItem;\n }\n\n async importLaneHistory(laneId: LaneId) {\n const existingLane = await this.loadLane(laneId);\n if (existingLane?.isNew) return;\n await this.importer.importLaneObject(laneId, undefined, true);\n }\n\n async isLaneExistsOnRemote(laneId: LaneId): Promise<boolean> {\n const results = await this.scope.legacyScope.scopeImporter.importLanes([laneId]);\n return results.length > 0;\n }\n\n getCurrentLaneName(): string | null {\n return this.getCurrentLaneId()?.name || null;\n }\n\n getCurrentLaneNameOrAlias(): string | null {\n const currentLaneId = this.getCurrentLaneId();\n if (!currentLaneId) return null;\n const trackingData = this.scope.legacyScope.lanes.getLocalTrackedLaneByRemoteName(\n currentLaneId.name,\n currentLaneId.scope\n );\n return trackingData || currentLaneId.name;\n }\n\n getCurrentLaneId(): LaneId | null {\n if (!this.workspace) return null;\n return this.workspace.consumer.getCurrentLaneId();\n }\n\n /**\n * get the currently checked out lane object, if on main - return null.\n */\n async getCurrentLane(): Promise<Lane | undefined> {\n const laneId = this.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) return undefined;\n return this.loadLane(laneId);\n }\n\n getDefaultLaneId(): LaneId {\n return LaneId.from(DEFAULT_LANE, this.scope.name);\n }\n\n setCurrentLane(laneId: LaneId, alias?: string, exported?: boolean) {\n this.workspace?.consumer.setCurrentLane(laneId, exported);\n }\n\n async createLane(\n name: string,\n { scope, alias, forkLaneNewScope }: CreateLaneOptions = {}\n ): Promise<CreateLaneResult> {\n if (!this.workspace) {\n const newLane = await createLaneInScope(name, this.scope);\n return {\n lane: newLane,\n laneId: newLane.toLaneId(),\n hash: newLane.hash().toString(),\n };\n }\n if (alias) {\n throwForInvalidLaneName(alias);\n }\n const currentLaneId = this.workspace.getCurrentLaneId();\n const currentLaneScope = currentLaneId.isDefault() ? undefined : currentLaneId.scope;\n if (!forkLaneNewScope && !currentLaneId.isDefault() && scope && currentLaneScope !== scope) {\n throw new BitError(`you're about to create a lane forked from ${currentLaneId.toString()} and assign it to a different scope \"${scope}\".\nif the lane components have a large history, it would be best to stick with the same scope as the current lane.\nto do that, re-run the command without the \"--scope\" flag. it will create the lane and set the scope to \"${currentLaneScope}\"\nif you wish to keep ${scope} scope, please re-run the command with \"--fork-lane-new-scope\" flag.`);\n }\n scope = scope || (currentLaneId.isDefault() ? this.workspace.defaultScope : currentLaneId.scope);\n const laneObj = await createLane(this.workspace, name, scope);\n const laneId = LaneId.from(name, scope);\n this.setCurrentLane(laneId, alias, false);\n const trackLaneData = {\n localLane: alias || name,\n remoteLane: name,\n remoteScope: scope,\n };\n this.scope.legacyScope.lanes.trackLane(trackLaneData);\n this.scope.legacyScope.scopeJson.setLaneAsNew(name);\n await this.workspace.consumer.onDestroy('lane-create');\n\n const results = {\n lane: laneObj,\n alias,\n laneId: laneObj.toLaneId(),\n hash: laneObj.hash().toString(),\n };\n return results;\n }\n\n async loadLane(id: LaneId): Promise<Lane | undefined> {\n return this.scope.legacyScope.lanes.loadLane(id);\n }\n\n async trackLane(\n localName: string,\n remoteScope: string,\n remoteName?: string\n ): Promise<{ beforeTrackData?: TrackLane; afterTrackData: TrackLane }> {\n if (!this.workspace) {\n throw new BitError(`unable to track a lane outside of Bit workspace`);\n }\n const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(localName);\n const lane = await this.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${localName}\"`);\n }\n const beforeTrackData = this.scope.legacyScope.lanes.getRemoteTrackedDataByLocalLane(localName);\n const beforeTrackDataCloned = beforeTrackData ? { ...beforeTrackData } : undefined;\n const afterTrackData = {\n localLane: localName,\n remoteLane: remoteName || beforeTrackData?.remoteLane || localName,\n remoteScope,\n };\n this.scope.legacyScope.lanes.trackLane(afterTrackData);\n await this.workspace.consumer.onDestroy('lane-track');\n\n return { beforeTrackData: beforeTrackDataCloned, afterTrackData };\n }\n\n async aliasLane(laneName: string, alias: string): Promise<{ laneId: LaneId }> {\n if (!this.workspace) {\n throw new BitError(`unable to alias a lane outside of Bit workspace`);\n }\n if (alias.includes(LANE_REMOTE_DELIMITER)) {\n throw new BitError(`an alias cannot include a delimiter \"${LANE_REMOTE_DELIMITER}\"`);\n }\n if (alias === laneName) {\n throw new BitError(`an alias cannot be the same as the lane name`);\n }\n const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(laneName);\n const lane = await this.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${laneName}\"`);\n }\n const trackData = {\n localLane: alias,\n remoteLane: laneId.name,\n remoteScope: laneId.scope,\n };\n const laneNameWithoutScope = laneName.includes(LANE_REMOTE_DELIMITER)\n ? laneName.split(LANE_REMOTE_DELIMITER)[1]\n : laneName;\n this.scope.legacyScope.lanes.removeTrackLane(laneNameWithoutScope);\n this.scope.legacyScope.lanes.trackLane(trackData);\n await this.workspace.consumer.onDestroy('lane-alias');\n\n return { laneId };\n }\n\n async changeScope(remoteScope: string, laneName?: string): Promise<{ remoteScopeBefore: string; localName: string }> {\n if (!this.workspace) {\n throw new BitError(`unable to change-scope of a lane outside of Bit workspace`);\n }\n let laneId: LaneId;\n let laneNameWithoutScope: string;\n if (laneName) {\n laneNameWithoutScope = laneName.includes(LANE_REMOTE_DELIMITER)\n ? laneName.split(LANE_REMOTE_DELIMITER)[1]\n : laneName;\n laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(laneName);\n } else {\n laneId = this.workspace.getCurrentLaneId();\n laneNameWithoutScope = laneId.name;\n }\n const lane = await this.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${laneName}\"`);\n }\n if (!lane.isNew) {\n throw new BitError(`changing lane scope-name is allowed for new lanes only. this lane has been exported already.\nplease create a new lane instead, which will include all components of this lane`);\n }\n if (!isValidScopeName(remoteScope)) {\n throw new InvalidScopeName(remoteScope);\n }\n const remoteScopeBefore = lane.scope;\n lane.changeScope(remoteScope);\n const newLaneId = LaneId.from(laneId.name, remoteScope);\n const trackData = {\n localLane: laneNameWithoutScope,\n remoteLane: laneId.name,\n remoteScope,\n };\n this.scope.legacyScope.lanes.trackLane(trackData);\n await this.scope.legacyScope.lanes.saveLane(lane, {\n laneHistoryMsg: `change scope from ${remoteScopeBefore} to ${remoteScope}`,\n });\n this.workspace.consumer.bitMap.setCurrentLane(newLaneId, false);\n await this.workspace.consumer.onDestroy('lane-scope-change');\n\n return { remoteScopeBefore, localName: laneNameWithoutScope };\n }\n\n /**\n * change a lane-name and if possible, export the lane to the remote\n */\n async rename(newName: string, laneName?: string): Promise<{ currentName: string }> {\n if (!this.workspace) {\n throw new BitError(`unable to rename a lane outside of Bit workspace`);\n }\n throwForInvalidLaneName(newName);\n const currentName = laneName || this.workspace.getCurrentLaneId().name;\n const existingAliasWithNewName = this.scope.legacyScope.lanes.getRemoteTrackedDataByLocalLane(newName);\n if (existingAliasWithNewName) {\n const remoteIdStr = `${existingAliasWithNewName.remoteLane}/${existingAliasWithNewName.remoteScope}`;\n throw new BitError(`unable to rename to ${newName}. this name is already used to track: ${remoteIdStr}`);\n }\n const laneNameWithoutScope = currentName.includes(LANE_REMOTE_DELIMITER)\n ? currentName.split(LANE_REMOTE_DELIMITER)[1]\n : currentName;\n const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(currentName);\n const lane = await this.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${currentName}\"`);\n }\n\n // rename the ref file\n await this.scope.legacyScope.objects.remoteLanes.renameRefByNewLaneName(laneNameWithoutScope, newName, lane.scope);\n\n // change scope.json related data and change the lane object\n await this.scope.legacyScope.lanes.renameLane(lane, newName);\n\n // change current-lane if needed\n const currentLaneId = this.getCurrentLaneId();\n if (currentLaneId?.isEqual(laneId)) {\n const newLaneId = LaneId.from(newName, lane.scope);\n const isExported = this.workspace.consumer.bitMap.isLaneExported;\n this.setCurrentLane(newLaneId, undefined, isExported);\n }\n\n // this writes the changes done on scope.json file (along with .bitmap)\n await this.workspace.consumer.onDestroy('lane-rename');\n\n return { currentName };\n }\n\n async exportLane(lane: Lane) {\n await this.exporter.pushToScopes({\n scope: this.scope.legacyScope,\n laneObject: lane,\n ids: new ComponentIdList(),\n allVersions: false,\n });\n }\n\n async importLaneObject(laneId: LaneId, persistIfNotExists = true, includeLaneHistory = false): Promise<Lane> {\n return this.importer.importLaneObject(laneId, persistIfNotExists, includeLaneHistory);\n }\n\n async eject(pattern: string): Promise<ComponentID[]> {\n if (!this.workspace) {\n throw new BitError(`unable to eject a component outside of Bit workspace`);\n }\n const ids = await this.workspace.idsByPattern(pattern);\n await Promise.all(\n ids.map(async (id) => {\n const modelComp = await this.scope.getBitObjectModelComponent(id, true);\n if (!modelComp!.head) {\n throw new BitError(`unable to eject \"${id.toString()}\" as it has no main version`);\n }\n })\n );\n\n const deletedComps = await this.remove.deleteComps(pattern);\n const packages = deletedComps.map((c) => c.getPackageName());\n await this.install.install(packages);\n return deletedComps.map((c) => c.id);\n }\n\n /** head hash of main, with remote-scope fallback. undefined only for a genuinely-new component. */\n async getHeadOnMain(componentId: ComponentID): Promise<string | undefined> {\n return getHeadOnMain(this.scope, componentId);\n }\n\n /**\n * fetch the lane object and its components from the remote.\n * save the objects and the lane to the local scope.\n * this method doesn't change anything in the workspace.\n */\n async fetchLaneWithItsComponents(laneId: LaneId): Promise<Lane> {\n this.logger.debug(`fetching lane ${laneId.toString()}`);\n const lane = await this.importer.importLaneObject(laneId);\n if (!lane) throw new Error(`unable to import lane ${laneId.toString()} from the remote`);\n\n await this.importer.fetchLaneComponents(lane);\n this.logger.debug(`fetching lane ${laneId.toString()} done, fetched ${lane.components.length} components`);\n return lane;\n }\n\n async removeLanes(laneNames: string[], opts?: { remote: boolean; force: boolean }): Promise<string[]> {\n if (!this.workspace && !opts?.remote) {\n await this.scope.legacyScope.lanes.removeLanes(this.scope.legacyScope, laneNames, true);\n return laneNames;\n }\n const results = await removeLanes(this.workspace?.consumer, laneNames, !!opts?.remote, !!opts?.force);\n if (this.workspace) await this.workspace.consumer.onDestroy('lane-remove');\n\n return results.laneResults;\n }\n\n /**\n * when deleting a lane object, it is sent into the \"trash\" directory in the scope.\n * this method restores it and put it back in the \"objects\" directory.\n * as an argument, it needs a hash. the reason for not supporting lane-id is because the trash may have multiple\n * lanes with the same lane-id but different hashes.\n */\n async restoreLane(laneHash: string) {\n const ref = Ref.from(laneHash);\n const objectsFromTrash = (await this.scope.legacyScope.objects.getFromTrash([ref])) as Lane[];\n const laneIdFromTrash = objectsFromTrash[0].toLaneId();\n const existingWithSameId = await this.loadLane(laneIdFromTrash);\n if (existingWithSameId) {\n if (existingWithSameId.hash().isEqual(ref)) {\n throw new BitError(`unable to restore lane ${laneIdFromTrash.toString()}, as it already exists`);\n }\n throw new BitError(\n `unable to restore lane ${laneIdFromTrash.toString()}, as a lane with the same id already exists`\n );\n }\n await this.scope.legacyScope.objects.restoreFromTrash([ref]);\n }\n\n /**\n * switch to a different local or remote lane.\n * switching to a remote lane also imports and writes the components of that remote lane.\n * by default, only the components existing on the workspace will be imported from that lane, unless the \"getAll\"\n * flag is true.\n */\n async switchLanes(\n laneName: string,\n {\n alias,\n merge,\n forceOurs,\n forceTheirs,\n pattern,\n workspaceOnly,\n restrictToScopes,\n skipDependencyInstallation = false,\n skipFetch = false,\n branch = false,\n }: SwitchLaneOptions\n ) {\n if (!this.workspace) {\n throw new OutsideWorkspaceError();\n }\n this.workspace.inInstallContext = true;\n let mergeStrategy;\n if (merge && typeof merge === 'string') {\n const mergeOptions = Object.keys(MergeOptions);\n if (!mergeOptions.includes(merge)) {\n throw new BitError(`merge must be one of the following: ${mergeOptions.join(', ')}`);\n }\n mergeStrategy = merge;\n }\n if (alias) {\n throwForInvalidLaneName(alias);\n }\n\n const switchProps = {\n laneName,\n existingOnWorkspaceOnly: workspaceOnly,\n pattern,\n restrictToScopes,\n alias,\n skipFetch,\n };\n const checkoutProps = {\n mergeStrategy,\n forceOurs,\n forceTheirs,\n skipNpmInstall: skipDependencyInstallation,\n isLane: true,\n promptMergeOptions: false,\n reset: false,\n all: false,\n };\n\n // Create git branch if requested and git is available\n let gitBranchWarning: string | undefined;\n if (branch) {\n gitBranchWarning = await this.createGitBranchForLane(laneName);\n }\n\n const switchResult = await new LaneSwitcher(this.workspace, this.logger, switchProps, checkoutProps, this).switch();\n\n // Add git branch warning to the result if present\n if (gitBranchWarning) {\n switchResult.gitBranchWarning = gitBranchWarning;\n }\n\n return switchResult;\n }\n\n private async createGitBranchForLane(laneName: string): Promise<string | undefined> {\n if (!this.workspace) return;\n\n try {\n // Check if git exists in the project\n const isGit = await fs.pathExists('.git');\n if (!isGit) {\n const warning = 'Git repository not found. Skipping git branch creation.';\n this.logger.warn(warning);\n return warning;\n }\n\n const gitExecutablePath = getGitExecutablePath();\n\n // Create and checkout to the new git branch\n await execa(gitExecutablePath, ['checkout', '-b', laneName], {\n cwd: this.workspace.path,\n });\n\n this.logger.info(`Created and checked out git branch: ${laneName}`);\n return undefined; // No warning\n } catch (err: any) {\n // Don't fail the lane import if git branch creation fails\n const detailedError = err.stderr?.trim() || err.message;\n const warning = `Failed to create git branch \"${laneName}\".\n - Command: ${err.command}\n - Reason: ${detailedError}`;\n\n this.logger.warn(warning);\n return warning;\n }\n }\n\n /**\n * the values array may include zero to two values and will be processed as following:\n * [] => diff between the current lane and default lane. (only inside workspace).\n * [to] => diff between the current lane (or default-lane when in scope) and \"to\" lane.\n * [from, to] => diff between \"from\" lane and \"to\" lane.\n */\n public async getDiff(values: string[], diffOptions: DiffOptions = {}, pattern?: string): Promise<LaneDiffResults> {\n const laneDiffGenerator = new LaneDiffGenerator(this.workspace, this.scope, this.componentCompare);\n return laneDiffGenerator.generate(values, diffOptions, pattern);\n }\n\n async getLaneComponentModels(lane: LaneData): Promise<Component[]> {\n const host = this.componentAspect.getHost();\n const laneComponentIds = await this.getLaneComponentIds(lane);\n const components = await host.getMany(laneComponentIds);\n return components;\n }\n\n async getLaneComponentIds(lane: LaneData): Promise<ComponentID[]> {\n if (!lane) return [];\n\n const laneComponents = lane.components;\n const workspace = this.workspace;\n // the bitmap filter only makes sense for the lane currently checked out — it keeps that view\n // aligned with what's actually in the workspace. any OTHER lane lives only in the local scope:\n // its components are never in the bitmap, so filtering by it empties the lane (a fully-fetched\n // lane renders as \"no components\" in the overview) even though every object is available.\n const isCurrentLane = Boolean(workspace && this.getCurrentLaneId()?.isEqual(lane.id));\n const bitIdsFromBitmap = workspace && isCurrentLane ? workspace.consumer.bitMap.getAllBitIdsFromAllLanes() : [];\n\n const filteredComponentIds = isCurrentLane\n ? laneComponents.filter((laneComponent) =>\n bitIdsFromBitmap.some((bitmapComponentId) => bitmapComponentId.isEqualWithoutVersion(laneComponent.id))\n )\n : laneComponents;\n\n return filteredComponentIds.map((laneComponent) => laneComponent.id.changeVersion(laneComponent.head));\n }\n\n /**\n * hidden lane.updateDependents are intentionally excluded from `getLaneComponentIds` so the\n * default GraphQL `Lane.components` field stays workspace-facing. Consumers that need the full\n * lane graph (e.g. a CI dashboard surfacing cascade entries) opt in via this method or its\n * `updateDependentIds` / `updateDependentComponents` GraphQL counterparts. No bitmap filter\n * here — hidden entries by definition don't live in the bitmap.\n */\n async getLaneUpdateDependentIds(lane: LaneData): Promise<ComponentID[]> {\n if (!lane?.updateDependents?.length) return [];\n return lane.updateDependents.map((c) => c.id.changeVersion(c.head));\n }\n\n async getLaneUpdateDependentComponents(lane: LaneData): Promise<Component[]> {\n const ids = await this.getLaneUpdateDependentIds(lane);\n if (!ids.length) return [];\n const host = this.componentAspect.getHost();\n return host.getMany(ids);\n }\n\n async getLaneReadmeComponent(lane: LaneData): Promise<Component | undefined> {\n if (!lane) return undefined;\n const laneReadmeComponent = lane.readmeComponent;\n if (!laneReadmeComponent) return undefined;\n const host = this.componentAspect.getHost();\n const laneReadmeComponentId = laneReadmeComponent.id.changeVersion(laneReadmeComponent.head);\n const readmeComponent = await host.get(laneReadmeComponentId);\n return readmeComponent;\n }\n\n async removeLaneReadme(laneName?: string): Promise<{ result: boolean; message?: string }> {\n if (!this.workspace) {\n throw new BitError('unable to remove the lane readme component outside of Bit workspace');\n }\n const currentLaneName = this.getCurrentLaneName();\n\n if (!laneName && !currentLaneName) {\n return {\n result: false,\n message: 'unable to remove the lane readme component. Either pass a laneName or switch to a lane',\n };\n }\n\n const scope: LegacyScope = this.workspace.scope.legacyScope;\n const laneId: LaneId = laneName\n ? await scope.lanes.parseLaneIdFromString(laneName)\n : (this.getCurrentLaneId() as LaneId);\n const lane: Lane | null | undefined = await scope.loadLane(laneId);\n\n if (!lane?.readmeComponent) {\n throw new BitError(`there is no readme component added to the lane ${laneName || currentLaneName}`);\n }\n\n const readmeComponentId = lane.readmeComponent.id;\n const existingLaneConfig =\n (await this.workspace.getSpecificComponentConfig(readmeComponentId, LanesAspect.id)) || {};\n\n const remoteLaneIdStr = lane.toLaneId().toString();\n\n if (existingLaneConfig.readme) {\n delete existingLaneConfig.readme[remoteLaneIdStr];\n await this.workspace.removeSpecificComponentConfig(readmeComponentId, LanesAspect.id, false);\n await this.workspace.addSpecificComponentConfig(readmeComponentId, LanesAspect.id, existingLaneConfig);\n }\n\n lane.setReadmeComponent(undefined);\n await scope.lanes.saveLane(lane, { laneHistoryMsg: 'remove readme' });\n await this.workspace.bitMap.write(`lane-remove-readme`);\n\n return { result: true };\n }\n\n async diffStatus(\n sourceLaneId: LaneId,\n targetLaneId?: LaneId,\n options?: LaneDiffStatusOptions\n ): Promise<LaneDiffStatus> {\n await this.laneDiffCache.ensureLoaded();\n this.logger.profile(`diff status for source lane: ${sourceLaneId.name} and target lane: ${targetLaneId?.name}`);\n\n const sourceLane = sourceLaneId.isDefault()\n ? await this.getLaneDataOfDefaultLane()\n : await this.loadLane(sourceLaneId);\n\n const sourceLaneComponents = sourceLaneId.isDefault()\n ? sourceLane?.components.map((main) => ({ id: main.id, head: Ref.from(main.head) }))\n : sourceLane?.components;\n\n const targetLane = targetLaneId ? await this.loadLane(targetLaneId) : undefined;\n const targetLaneIds = targetLane?.toBitIds();\n const host = this.componentAspect.getHost();\n\n // Resolve the main-side heads up-front: they feed BOTH the memo key (so the cache invalidates\n // when main advances) and the diff computation below. The target=main case has no single lane\n // hash, so without this the key was constant ('default') and stale results were served when main\n // moved ahead (lanes.spec \"not up to date when main is ahead\").\n const targetIsMain = !targetLaneId || Boolean(targetLaneId?.isDefault());\n // whether each base on main was already local (snapshot *before* the remote fetch) - drives the\n // UI \"workspace vs remote scope\" source indicator.\n const baseWasLocalByComp = new Map<string, boolean>();\n if (targetIsMain) {\n const sourceComponentIds = await Promise.all(\n (sourceLaneComponents || []).map(({ id }) => host.resolveComponentId(id))\n );\n await Promise.all(\n sourceComponentIds.map(async (cid) => {\n const modelComp = await this.scope.legacyScope.getModelComponentIfExist(cid);\n baseWasLocalByComp.set(cid.toString(), Boolean(modelComp?.head));\n })\n );\n // the base on main may live only on the remote scope; pull it so the diff is real, not a spurious NEW.\n await importMainHeads(this.scope, sourceComponentIds);\n }\n const targetMainHeads = targetIsMain\n ? compact(\n await Promise.all(\n (sourceLaneComponents || []).map(async ({ id }) => {\n const componentId = await host.resolveComponentId(id);\n const headOnMain = await this.getHeadOnMain(componentId);\n return headOnMain ? id.changeVersion(headOnMain) : undefined;\n })\n )\n )\n : [];\n\n const resultMemoKey = this.laneDiffCache.diffStatusKey(\n sourceLaneId,\n sourceLane ?? undefined,\n targetLaneId,\n targetLane ?? undefined,\n options,\n targetMainHeads\n );\n const earlyReturn = this.tryDiffStatusResultMemo(resultMemoKey, sourceLaneId, targetLaneId);\n if (earlyReturn) {\n this.logger.profile(`diff status for source lane: ${sourceLaneId.name} and target lane: ${targetLaneId?.name}`);\n return earlyReturn;\n }\n\n await this.importer.importObjectsFromMainIfExist(targetMainHeads, { cache: true });\n\n const diffProps = compact(\n await Promise.all(\n (sourceLaneComponents || []).map(async ({ id, head }) => {\n const componentId = await host.resolveComponentId(id);\n const sourceVersionObj = (await this.scope.legacyScope.objects.load(head, true)) as Version;\n\n if (sourceVersionObj.isRemoved()) {\n return null;\n }\n\n const headOnTargetLane = targetLaneIds\n ? targetLaneIds.searchWithoutVersion(id)?.version\n : await this.getHeadOnMain(componentId);\n\n if (headOnTargetLane) {\n const targetVersionObj = (await this.scope.legacyScope.objects.load(\n Ref.from(headOnTargetLane),\n true\n )) as Version;\n\n if (targetVersionObj.isRemoved()) {\n return null;\n }\n }\n\n const sourceHead = head.toString();\n const targetHead = headOnTargetLane;\n\n return { componentId, sourceHead, targetHead };\n })\n )\n );\n\n const snapDistancesByComponentId = new Map<\n string,\n {\n snapsDistance: SnapsDistance;\n sourceHead: string;\n targetHead?: string;\n componentId: ComponentID;\n }\n >();\n\n this.logger.profile(\n `get snaps distance for source lane: ${sourceLane?.id.name} and target lane: ${targetLane?.id.name} with ${diffProps.length} components`\n );\n let memoHits = 0;\n await pMap(\n diffProps,\n async ({ componentId, sourceHead, targetHead }) => {\n const memoKey = this.laneDiffCache.snapsDistanceKey(componentId, sourceHead, targetHead);\n const cached = this.laneDiffCache.getSnapsDistance(memoKey, componentId.toString());\n let snapsDistance: SnapsDistance | undefined;\n if (cached) {\n memoHits += 1;\n snapsDistance = cached;\n } else {\n const computed = await this.scope.getSnapsDistanceBetweenTwoSnaps(componentId, sourceHead, targetHead, false);\n if (computed) {\n // cache success + the deterministic \"unrelated\" outcome. transient errors stay uncached.\n if (!computed.err || computed.err instanceof NoCommonSnap) {\n this.laneDiffCache.storeSnapsDistance(memoKey, computed);\n }\n snapsDistance = computed;\n }\n }\n if (snapsDistance) {\n snapDistancesByComponentId.set(componentId.toString(), {\n snapsDistance,\n sourceHead,\n targetHead,\n componentId,\n });\n }\n },\n { concurrency: concurrentComponentsLimit() }\n );\n this.logger.profile(\n `get snaps distance for source lane: ${sourceLane?.id.name} and target lane: ${targetLane?.id.name} with ${diffProps.length} components (memo hits: ${memoHits}/${diffProps.length})`\n );\n\n // when `skipUpToDate` is set, drop only components with NO difference vs the target. keep any\n // divergence — crucially `isSourceAhead()` (the lane's own changes): a lane forked from main has no\n // target-only snaps, so `isUpToDate()` (=!isTargetAhead) alone would wrongly hide the whole diff.\n const visibleDiffProps = options?.skipUpToDate\n ? diffProps.filter(({ componentId }) => {\n // `d` may be a memo reconstruction exposing only data + `isUpToDate()`; test source-ahead via\n // `snapsOnSourceOnly.length`, not the `isSourceAhead()` method (absent on the reconstruction).\n const d = snapDistancesByComponentId.get(componentId.toString())?.snapsDistance;\n return !d || (d.snapsOnSourceOnly?.length ?? 0) > 0 || !d.isUpToDate();\n })\n : diffProps;\n\n const commonSnapsToImport = compact(\n visibleDiffProps.map(({ componentId }) => {\n const s = snapDistancesByComponentId.get(componentId.toString());\n return s?.snapsDistance.commonSnapBeforeDiverge\n ? s.componentId.changeVersion(s.snapsDistance.commonSnapBeforeDiverge.hash)\n : null;\n })\n );\n\n const sourceOrTargetLane =\n ((sourceLaneId.isDefault() ? null : (sourceLane as Lane)) ||\n (targetLaneId?.isDefault() ? null : (targetLane as Lane))) ??\n undefined;\n\n if (commonSnapsToImport.length > 0 && !options?.skipChanges && !options?.deferChanges) {\n this.logger.profile(`import common snaps for lane diff (${commonSnapsToImport.length} snaps)`);\n await this.scope.legacyScope.scopeImporter.importWithoutDeps(ComponentIdList.fromArray(commonSnapsToImport), {\n cache: true,\n reason: `get the common snap for lane diff`,\n lane: sourceOrTargetLane,\n });\n this.logger.profile(`import common snaps for lane diff (${commonSnapsToImport.length} snaps)`);\n }\n\n this.logger.profile(`componentDiffStatus pMap (${visibleDiffProps.length} components)`);\n // run in parallel — bounded by `concurrentComponentsLimit()`. previously this was pMapSeries which\n // serialized 30 schema extractions and dominated the cold call (minutes).\n const results = await pMap(\n visibleDiffProps,\n async ({ componentId, sourceHead, targetHead }) => {\n // report whether an existing main base was already local (`workspace`) or pulled from remote (`scope`).\n const baseSource: DiffBaseSource | undefined =\n targetIsMain && targetHead\n ? baseWasLocalByComp.get(componentId.toString())\n ? 'workspace'\n : 'scope'\n : undefined;\n return this.componentDiffStatus(\n componentId,\n sourceHead,\n targetHead,\n snapDistancesByComponentId.get(componentId.toString())?.snapsDistance,\n options,\n baseSource\n );\n },\n { concurrency: concurrentComponentsLimit() }\n );\n this.logger.profile(`componentDiffStatus pMap (${visibleDiffProps.length} components)`);\n\n // best-effort populate the top-level result memo. eagerly resolve `changes` for any deferred\n // components so the next cold call can return immediately — does not block this response.\n if (resultMemoKey) this.populateDiffStatusMemoAsync(resultMemoKey, results);\n\n // Pre-warm caches the lane-compare UI will hit right after this query returns:\n // - `host.getMany([base+compare versioned ids])` populates `ScopeComponentLoader.componentsCache`\n // so the UI's 20 per-component `getHost.get` queries (componentFields + componentFieldWithLogs\n // for each side of each visible pair) all hit cache instead of racing through cold loads.\n // - `componentCompare.compareComponents(pairs)` populates the new compare-result memo so the UI's\n // `CompareComponents` query is answered from cache.\n // Fired *after* we have the answer ready — never blocks the response, catch() hides any failure.\n // Gated to `prewarmCaches` (the UI caller) so CLI/programmatic consumers don't pay & multiply it.\n if (options?.prewarmCaches && visibleDiffProps.length > 0) this.prewarmCompareCaches(host, visibleDiffProps);\n\n this.logger.profile(`diff status for source lane: ${sourceLaneId.name} and target lane: ${targetLaneId?.name}`);\n\n return {\n source: sourceLaneId,\n target: targetLaneId || this.getDefaultLaneId(),\n componentsStatus: results,\n };\n }\n\n private async componentDiffStatus(\n componentId: ComponentID,\n sourceHead: string,\n targetHead?: string,\n snapsDistance?: SnapsDistance,\n options?: LaneDiffStatusOptions,\n baseSource?: DiffBaseSource\n ): Promise<LaneComponentDiffStatus> {\n if (snapsDistance?.err) {\n const noCommonSnap = snapsDistance.err instanceof NoCommonSnap;\n\n return {\n componentId,\n sourceHead,\n targetHead,\n baseSource,\n upToDate: snapsDistance?.isUpToDate(),\n unrelated: noCommonSnap || undefined,\n changes: [],\n };\n }\n\n const commonSnap = snapsDistance?.commonSnapBeforeDiverge;\n\n // when changes are skipped or deferred, return the snap-distance metadata immediately and leave\n // `changes` unset. callers derive them lazily through `deriveComponentChanges` (used by the GraphQL\n // `changes` field resolver, which runs the work per-component in parallel only when the client\n // selects the field — keeps cold p50 under 200 ms even for many components).\n const changes =\n options?.skipChanges || options?.deferChanges\n ? undefined\n : await this.deriveChangeTypes(commonSnap, componentId, sourceHead);\n const changeType = changes ? changes[0] : undefined;\n\n return {\n componentId,\n changeType,\n changes,\n sourceHead,\n targetHead: commonSnap?.hash,\n baseSource,\n upToDate: snapsDistance?.isUpToDate(),\n snapsDistance: {\n onSource: snapsDistance?.snapsOnSourceOnly.map((s) => s.hash) ?? [],\n onTarget: snapsDistance?.snapsOnTargetOnly.map((s) => s.hash) ?? [],\n common: snapsDistance?.commonSnapBeforeDiverge?.hash,\n },\n changesContext: { commonSnap, skipped: options?.skipChanges },\n };\n }\n\n /**\n * Lazily derive the change types for a single component diff status. Used by the GraphQL `changes`\n * field resolver so the (expensive) derivation only runs when the field is selected. Memoized per\n * status object via `changesContext.pending`, so selecting both `changes` and `changeType` computes\n * the value once.\n */\n async deriveComponentChanges(status: LaneComponentDiffStatus): Promise<ChangeType[] | undefined> {\n if (status.changes) return status.changes;\n const context = status.changesContext;\n if (!context || context.skipped) return undefined;\n\n await this.laneDiffCache.ensureLoaded();\n\n // top-level memo on the final ChangeType[] — short-circuits BEFORE compare()/getAPIDiff() run.\n // Persisted to disk, keyed on immutable hashes, so a cold server start with a populated cache\n // answers the entire derivation from a Map.get().\n const memoKey = this.laneDiffCache.changeTypesKey(\n status.componentId,\n status.sourceHead,\n context.commonSnap?.hash ?? null\n );\n const cached = this.laneDiffCache.getChangeTypes(memoKey);\n if (cached) return cached;\n\n // single-flight concurrent requests for the same (componentId, sourceHead, commonSnap) tuple.\n let pending = this.changeTypesInflight.get(memoKey);\n if (!pending) {\n pending = this.deriveChangesLimit(() =>\n this.deriveChangeTypes(context.commonSnap, status.componentId, status.sourceHead)\n )\n .then((result) => {\n // `undefined` means the derivation couldn't load a Version object (transient) — don't persist\n // it under the immutable-hash key; let it recompute on a later request once the object exists.\n if (result) this.laneDiffCache.storeChangeTypes(memoKey, result);\n return result;\n })\n .finally(() => {\n this.changeTypesInflight.delete(memoKey);\n });\n this.changeTypesInflight.set(memoKey, pending);\n }\n context.pending = pending;\n return pending;\n }\n\n private async deriveChangeTypes(\n commonSnap: { hash: string } | null | undefined,\n componentId: ComponentID,\n sourceHead: string\n ): Promise<ChangeType[] | undefined> {\n if (!commonSnap) return [ChangeType.NEW];\n\n // Classify changes by comparing the two raw `Version` objects directly (files-by-hash, deps,\n // extensions) instead of `componentCompare.compare()`. compare() loads full consumer components\n // (aspect calculation, capsules) for both sides just to extract two booleans — dominating the cold\n // derivation for a large lane. Loading the raw Version objects is a cheap object read.\n // The API change type is intentionally not computed here: it needs serial tsserver schema\n // extraction and is resolved lazily by the API view, gated on the SOURCE_CODE/DEPENDENCY evidence.\n const repo = this.scope.legacyScope.objects;\n const loadPair = () =>\n Promise.all([repo.load(Ref.from(commonSnap.hash), false), repo.load(Ref.from(sourceHead), false)]) as Promise<\n [Version | undefined, Version | undefined]\n >;\n let [baseVersion, compareVersion] = await loadPair();\n\n // the deferChanges path (the default for UI lane compares) skips the eager common-snap import, so\n // the merge-base Version can be absent locally here. rather than give up — which classifies a\n // genuinely-changed component as \"couldn't classify\" and drops it from the diff views — import the\n // missing snap(s) on demand and retry once. this fires only on a miss and is per-component, so the\n // fast deferred path stays fast while staying correct; the derived result is memoized afterwards.\n if (!baseVersion || !compareVersion) {\n const missing: ComponentID[] = [];\n if (!baseVersion) missing.push(componentId.changeVersion(commonSnap.hash));\n if (!compareVersion) missing.push(componentId.changeVersion(sourceHead));\n try {\n await this.scope.legacyScope.scopeImporter.importWithoutDeps(ComponentIdList.fromArray(missing), {\n cache: true,\n ignoreMissingHead: true,\n reason: `derive lane diff change types (snap missing locally)`,\n });\n [baseVersion, compareVersion] = await loadPair();\n } catch {\n // best-effort: if the import fails (e.g. the snap only exists on a lane we lack context for here),\n // fall through to the undefined return below rather than throwing out of the field resolver.\n }\n }\n\n // still couldn't load a Version. this is a transient \"couldn't classify\", NOT \"no changes\"\n // ([ChangeType.NONE]) — return undefined so it's distinguishable and never persisted to the\n // immutable-hash-keyed memo, or the component would be reported with no change types forever.\n if (!baseVersion || !compareVersion) return undefined;\n\n // pure classification of the two raw Version shapes — extracted & unit-tested in lanes/diff.\n return classifyVersionChanges(\n { obj: baseVersion.toObject(), extensionDependencies: baseVersion.extensionDependencies.cloneAsString() },\n { obj: compareVersion.toObject(), extensionDependencies: compareVersion.extensionDependencies.cloneAsString() }\n );\n }\n\n private async recreateNewLaneIfDeleted() {\n if (!this.workspace) return;\n const laneId = this.getCurrentLaneId();\n if (!laneId || laneId.isDefault() || this.workspace.consumer.bitMap.isLaneExported) {\n return;\n }\n const laneObj = await this.scope.legacyScope.getCurrentLaneObject();\n if (laneObj) {\n return;\n }\n await this.createLane(laneId.name, { scope: laneId.scope });\n }\n\n /**\n * if the local lane was forked from another lane, this gets the differences between the two.\n * it also fetches the original lane from the remote to make sure the data is up to date.\n */\n async listUpdatesFromForked(componentsList: ComponentsList): Promise<DivergeDataPerId[]> {\n const consumer = this.workspace?.consumer;\n if (!consumer) throw new Error(`unable to get listUpdatesFromForked outside of a workspace`);\n if (consumer.isOnMain()) {\n return [];\n }\n const lane = await consumer.getCurrentLaneObject();\n const forkedFromLaneId = lane?.forkedFrom;\n if (!forkedFromLaneId) {\n return [];\n }\n const forkedFromLane = await consumer.scope.loadLane(forkedFromLaneId);\n if (!forkedFromLane) return []; // should we fetch it here?\n\n const workspaceIds = consumer.bitMap.getAllBitIds();\n\n const duringMergeIds = componentsList.listDuringMergeStateComponents();\n\n const componentsFromModel = await componentsList.getModelComponents();\n const compFromModelOnWorkspace = componentsFromModel\n .filter((c) => workspaceIds.hasWithoutVersion(c.toComponentId()))\n // if a component is merge-pending, it needs to be resolved first before getting more updates from main\n .filter((c) => !duringMergeIds.hasWithoutVersion(c.toComponentId()));\n\n // by default, when on a lane, forked is not fetched. we need to fetch it to get the latest updates.\n await this.fetchLaneWithItsComponents(forkedFromLaneId);\n\n const remoteForkedLane = await consumer.scope.objects.remoteLanes.getRemoteLane(forkedFromLaneId);\n if (!remoteForkedLane.length) return [];\n\n const results = await Promise.all(\n compFromModelOnWorkspace.map(async (modelComponent) => {\n const headOnForked = remoteForkedLane.find((c) => c.id.isEqualWithoutVersion(modelComponent.toComponentId()));\n const headOnLane = modelComponent.laneHeadLocal;\n if (!headOnForked || !headOnLane) return undefined;\n const divergeData = await getDivergeData({\n repo: consumer.scope.objects,\n modelComponent,\n targetHead: headOnForked.head,\n sourceHead: headOnLane,\n throws: false,\n });\n if (!divergeData.snapsOnTargetOnly.length && !divergeData.err) return undefined;\n return { id: modelComponent.toComponentId(), divergeData };\n })\n );\n\n return compact(results);\n }\n\n /**\n * list components on a lane that their main got updates.\n */\n async listUpdatesFromMainPending(componentsList: ComponentsList): Promise<DivergeDataPerId[]> {\n const consumer = this.workspace?.consumer;\n if (!consumer) throw new Error(`unable to get listUpdatesFromForked outside of a workspace`);\n if (consumer.isOnMain()) {\n return [];\n }\n const allIds = consumer.bitMap.getAllBitIds();\n\n const duringMergeIds = componentsList.listDuringMergeStateComponents();\n\n const componentsFromModel = await componentsList.getModelComponents();\n const compFromModelOnWorkspace = componentsFromModel\n .filter((c) => allIds.hasWithoutVersion(c.toComponentId()))\n // if a component is merge-pending, it needs to be resolved first before getting more updates from main\n .filter((c) => !duringMergeIds.hasWithoutVersion(c.toComponentId()));\n\n // by default, when on a lane, main is not fetched. we need to fetch it to get the latest updates.\n await consumer.scope.scopeImporter.importWithoutDeps(\n ComponentIdList.fromArray(compFromModelOnWorkspace.map((c) => c.toComponentId())),\n {\n cache: false,\n includeVersionHistory: true,\n ignoreMissingHead: true,\n reason: 'main components of the current lane to check for updates',\n }\n );\n const results = await Promise.all(\n compFromModelOnWorkspace.map(async (modelComponent) => {\n const headOnMain = modelComponent.head;\n if (!headOnMain) return undefined;\n const checkedOutVersion = allIds.searchWithoutVersion(modelComponent.toComponentId())?.version;\n if (!checkedOutVersion) {\n throw new Error(\n `listUpdatesFromMainPending: unable to find ${modelComponent.toComponentId()} in the workspace`\n );\n }\n const headOnLane = modelComponent.getRef(checkedOutVersion);\n\n const divergeData = await getDivergeData({\n repo: consumer.scope.objects,\n modelComponent,\n targetHead: headOnMain,\n sourceHead: headOnLane,\n throws: false,\n });\n if (!divergeData.snapsOnTargetOnly.length && !divergeData.err) return undefined;\n return { id: modelComponent.toComponentId(), divergeData };\n })\n );\n\n return compact(results);\n }\n\n /**\n * the dependents Ripple CI cascaded onto a lane (hidden `lane.updateDependents` entries).\n * the cascade producer runs on the remote, so the remote lane is the source of truth. the local lane\n * object is used only when the remote lane can't be fetched (e.g. the lane was never exported).\n */\n async getLaneUpdateDependents(laneId: LaneId): Promise<LaneUpdateDependentsResult> {\n let remoteError: Error | undefined;\n const remoteLane = this.isLaneLocalOnly(laneId)\n ? undefined\n : await this.importLaneObject(laneId, false).catch((err: Error) => {\n remoteError = err;\n return undefined;\n });\n if (remoteLane) {\n return { laneId, ids: remoteLane.updateDependents || [], source: 'remote' };\n }\n const localLane = await this.loadLane(laneId);\n if (!localLane) {\n const reason = remoteError ? `, and fetching it from the remote failed: ${remoteError.message}` : '';\n throw new BitError(`lane \"${laneId.toString()}\" was not found locally${reason}`);\n }\n // no error means no fetch was attempted, i.e. the lane is local-only. LaneNotFound means the same\n // thing from the remote's side: either way the remote has no lane to be the source of truth.\n const source = !remoteError || remoteError instanceof LaneNotFound ? 'no-remote-lane' : 'remote-unavailable';\n return { laneId, ids: localLane.updateDependents || [], source, remoteError: remoteError?.message };\n }\n\n /**\n * remove the dependents Ripple CI cascaded onto a lane.\n * exporting a lane never removes hidden entries from the remote (the remote-side merge walks the\n * incoming entries only), so the removal is done directly on the remote, the same way the cloud UI\n * does. the local lane object is updated as well so it doesn't keep stale entries until the next\n * import. a lane that was never exported is changed locally only.\n */\n async undoLaneUpdateDependents(laneId: LaneId, ids?: ComponentID[]): Promise<UndoLaneUpdateDependentsResult> {\n const current = await this.getLaneUpdateDependents(laneId);\n if (current.source === 'remote-unavailable') {\n // the remote is the source of truth for these entries. removing them locally while the remote keeps\n // them would only be reverted by the next import, so fail instead of pretending it worked.\n throw new BitError(\n `unable to undo the cascaded updates of lane \"${laneId.toString()}\": the remote lane could not be fetched (${current.remoteError}). the remote is the source of truth for these entries, retry when it's reachable`\n );\n }\n // the remote has no such lane, so there's nothing to remove there: change the local lane only\n const remoteSkipped = current.source === 'no-remote-lane';\n const removed = ids?.length\n ? current.ids.filter((id) => ids.some((toRemove) => toRemove.isEqualWithoutVersion(id)))\n : current.ids;\n if (!removed.length) {\n // nothing left to remove on the remote, but the local lane can still hold entries the remote already\n // dropped - e.g. an earlier undo whose local save failed after the remote removal succeeded. reconcile\n // them here so retrying the command fixes it, instead of the stale entries lingering until the next import.\n const localChanged = remoteSkipped ? false : await this.pruneStaleUpdateDependents(laneId, current.ids);\n return { laneId, removed, remoteChanged: false, localChanged, remoteSkipped };\n }\n // remove exactly the resolved entries, on the remote and locally. this keeps local-only entries (e.g. a\n // workspace cascade that wasn't exported yet) intact instead of wiping them with a remove-all.\n const removedIdsStr = removed.map((id) => id.toString());\n let remoteChanged = false;\n if (!remoteSkipped) {\n const remote = await getRemoteByName(laneId.scope, this.workspace?.consumer);\n remoteChanged = await remote.removeLaneUpdateDependents(laneId.toString(), removedIdsStr);\n }\n const localLane = await this.loadLane(laneId);\n // the local removal matches by component-id and not by the full versioned id on purpose. when a local\n // cascade moved ahead of the remote, that entry is still for a component the user just undid: it can't\n // be exported (the remote refuses new hidden entries without the override flag) and the next import\n // prunes it anyway. keeping it would leave a hidden entry that \"bit lane updates\" no longer reports.\n const localChanged = localLane ? await this.removeUpdateDependents(laneId, removed) : false;\n return { laneId, removed, remoteChanged, localChanged, remoteSkipped };\n }\n\n /**\n * remove local hidden entries whose component-id is absent from `remoteIds`, i.e. entries the remote has\n * already dropped. matches by component-id and not by version, the same rule the import-side reconciliation\n * in the lane merge uses, so a local cascade that only moved ahead of the remote survives.\n * returns true if the local lane has changed.\n */\n private async pruneStaleUpdateDependents(laneId: LaneId, remoteIds: ComponentID[]): Promise<boolean> {\n const localLane = await this.loadLane(laneId);\n const localIds = localLane?.updateDependents;\n if (!localIds?.length) return false;\n const stale = localIds.filter((id) => !remoteIds.some((remoteId) => remoteId.isEqualWithoutVersion(id)));\n if (!stale.length) return false;\n return this.removeUpdateDependents(laneId, stale);\n }\n\n /**\n * true when `laneId` is the current lane and it was never exported, i.e. it doesn't exist on the remote yet.\n */\n private isLaneLocalOnly(laneId: LaneId): boolean {\n if (!this.workspace) return false;\n const currentLaneId = this.getCurrentLaneId();\n if (!currentLaneId?.isEqual(laneId)) return false;\n return !this.workspace.consumer.bitMap.isLaneExported;\n }\n\n /**\n * default to remove all of them.\n * returns true if the lane has changed\n */\n removeUpdateDependents(laneId: LaneId, ids?: ComponentID[]): Promise<boolean> {\n return this.scope.legacyScope.lanes.removeUpdateDependents(laneId, ids);\n }\n\n private async getLaneDataOfDefaultLane(): Promise<LaneData | null> {\n const consumer = this.workspace?.consumer;\n let bitIds: ComponentID[] = [];\n if (!consumer) {\n const scopeComponents = await this.scope.list();\n bitIds = scopeComponents.filter((component) => component.head).map((component) => component.id);\n } else {\n bitIds = await consumer.getIdsOfDefaultLane();\n }\n\n return {\n name: DEFAULT_LANE,\n remote: null,\n id: this.getDefaultLaneId(),\n components: bitIds.map((bitId) => ({ id: bitId, head: bitId.version as string })),\n isMerged: null,\n hash: '',\n };\n }\n\n get createRoutePath() {\n return '/lanes/create';\n }\n\n get deleteRoutePath() {\n return '/lanes/delete';\n }\n\n get restoreRoutePath() {\n return '/lanes/restore';\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n ScopeAspect,\n WorkspaceAspect,\n GraphqlAspect,\n MergingAspect,\n ComponentAspect,\n LoggerAspect,\n ImporterAspect,\n ExportAspect,\n ExpressAspect,\n ComponentCompareAspect,\n ComponentWriterAspect,\n RemoveAspect,\n CheckoutAspect,\n InstallAspect,\n ];\n static runtime = MainRuntime;\n static async provider([\n cli,\n scope,\n workspace,\n graphql,\n merging,\n component,\n loggerMain,\n importer,\n exporter,\n express,\n componentCompare,\n componentWriter,\n remove,\n checkout,\n install,\n ]: [\n CLIMain,\n ScopeMain,\n Workspace,\n GraphqlMain,\n MergingMain,\n ComponentMain,\n LoggerMain,\n ImporterMain,\n ExportMain,\n ExpressMain,\n ComponentCompareMain,\n ComponentWriterMain,\n RemoveMain,\n CheckoutMain,\n InstallMain,\n ]) {\n const logger = loggerMain.createLogger(LanesAspect.id);\n const lanesMain = new LanesMain(\n workspace,\n scope,\n merging,\n component,\n logger,\n importer,\n exporter,\n componentCompare,\n componentWriter,\n remove,\n checkout,\n install\n );\n const switchCmd = new SwitchCmd(lanesMain);\n const fetchCmd = new FetchCmd(importer);\n const laneCmd = new LaneCmd(lanesMain, workspace, scope);\n laneCmd.commands = [\n new LaneListCmd(lanesMain, workspace, scope),\n switchCmd,\n new LaneShowCmd(lanesMain, workspace, scope),\n new LaneCreateCmd(lanesMain),\n new LaneRemoveCmd(lanesMain),\n new LaneChangeScopeCmd(lanesMain),\n new LaneAliasCmd(lanesMain),\n new LaneRenameCmd(lanesMain),\n new LaneDiffCmd(workspace, scope, componentCompare),\n new LaneRemoveReadmeCmd(lanesMain),\n new LaneImportCmd(switchCmd, lanesMain),\n new LaneRemoveCompCmd(workspace, lanesMain),\n new LaneFetchCmd(fetchCmd, lanesMain),\n new LaneEjectCmd(lanesMain),\n ];\n laneCmd.commands.push(new LaneCurrentCmd(lanesMain));\n laneCmd.commands.push(new LaneHistoryCmd(lanesMain));\n laneCmd.commands.push(new LaneHistoryDiffCmd(lanesMain, workspace, scope, componentCompare));\n laneCmd.commands.push(new LaneCheckoutCmd(lanesMain));\n laneCmd.commands.push(new LaneRevertCmd(lanesMain));\n laneCmd.commands.push(new LaneUpdatesCmd(lanesMain));\n cli.register(laneCmd, switchCmd, new CatLaneHistoryCmd(lanesMain));\n cli.registerOnStart(async () => {\n await lanesMain.recreateNewLaneIfDeleted();\n });\n graphql.register(() => lanesSchema(lanesMain));\n express.register([\n new LanesCreateRoute(lanesMain, logger),\n new LanesDeleteRoute(lanesMain, logger),\n new LanesRestoreRoute(lanesMain, logger),\n ]);\n return lanesMain;\n }\n}\n\nLanesAspect.addRuntime(LanesMain);\n\nexport default LanesMain;\n"],"mappings":";;;;;;;;;;;;AAEA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,KAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAE,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAC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+BAAgB,EAAC/B,SAAS,EAAE7c,MAAM,CAAC,EACvC,KAAI6e,+BAAgB,EAAChC,SAAS,EAAE7c,MAAM,CAAC,EACvC,KAAI8e,iCAAiB,EAACjC,SAAS,EAAE7c,MAAM,CAAC,CACzC,CAAC;IACF,OAAO6c,SAAS;EAClB;AACF;AAACkC,OAAA,CAAArf,SAAA,GAAAA,SAAA;AAAAhB,eAAA,CAzgDYgB,SAAS,WAi6CL,EAAE;AAAAhB,eAAA,CAj6CNgB,SAAS,kBAk6CE,CACpBsf,gBAAS,EACTC,oBAAW,EACXC,4BAAe,EACfC,wBAAa,EACbC,wBAAa,EACbC,4BAAe,EACfC,sBAAY,EACZC,0BAAc,EACdC,sBAAY,EACZC,wBAAa,EACbC,0CAAsB,EACtBC,wCAAqB,EACrBC,sBAAY,EACZC,0BAAc,EACdC,wBAAa,CACd;AAAAphB,eAAA,CAl7CUgB,SAAS,aAm7CHqgB,6BAAW;AAwF9BrN,oBAAW,CAACsN,UAAU,CAACtgB,SAAS,CAAC;AAAC,IAAAugB,QAAA,GAAAlB,OAAA,CAAAthB,OAAA,GAEnBiC,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["_harmonyModules","data","require","_cli","_pMap","_interopRequireDefault","_pLimit","_scope","_graphql","_express","_workspace","_scope2","_lanesModules","_legacy","_laneId","_legacy2","_bitError","_logger","_merging","_componentModules","_importer","_componentId","_legacyBitId","_component","_objects","_component2","_export","_lodash","_componentCompare","_componentWriter","_remove","_checkout","_lanesEntities","_harmonyModules2","_fsExtra","_execa","_gitModules","_removeLanes","_lanes","_lane","_lanes2","_switch","_switchLanes","_lanesModules2","_lanesCreate","_lanesDelete","_lanesRestore","_install","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","LanesMain","constructor","workspace","scope","merging","componentAspect","logger","importer","exporter","componentCompare","componentWriter","remove","checkout","install","pLimit","concurrentComponentsLimit","Map","laneDiffCache","_laneDiffCache","LaneDiffCache","tryDiffStatusResultMemo","resultMemoKey","sourceLaneId","targetLaneId","cached","getDiffStatus","undefined","source","target","getDefaultLaneId","componentsStatus","prewarmCompareCaches","host","visibleDiffProps","allVersionedIds","comparePairs","componentId","sourceHead","targetHead","compareId","changeVersion","baseId","toString","Promise","all","pMap","id","get","concurrency","catch","compareComponents","resolve","populateDiffStatusMemoAsync","results","map","status","changes","deriveComponentChanges","then","anyFailed","some","s","changesContext","skipped","storeDiffStatus","getLanes","name","remote","merged","showDefaultLane","notMerged","showMergeData","Boolean","consumer","Error","laneId","LaneId","from","remoteObj","getRemoteByName","lanes","listLanes","DEFAULT_LANE","defaultLane","getLaneDataOfDefaultLane","legacyScope","getLanesData","parseLaneId","idStr","parseLaneIdFromString","getLaneHistory","lane","loadLane","BitError","laneHistory","getOrCreateLaneHistory","checkoutHistory","historyId","options","historyItem","getHistoryItemOfCurrentLane","ids","components","ComponentID","fromString","getCurrentLane","versionPerId","allowAddingComponentsFromScope","skipNpmInstall","skipDependencyInstallation","isLane","revertHistory","historyComponentIds","existingIds","deletedIds","restoreDeletedComponents","currentBitmap","bitMap","getAllBitIdsFromAllLanes","currentComponentIdsSet","Set","toStringWithoutVersion","has","revert","deletedResults","addedComponents","getCurrentLaneId","isDefault","importLaneHistory","history","getHistory","existingLane","isNew","importLaneObject","isLaneExistsOnRemote","scopeImporter","importLanes","getCurrentLaneName","getCurrentLaneNameOrAlias","currentLaneId","trackingData","getLocalTrackedLaneByRemoteName","setCurrentLane","alias","exported","createLane","forkLaneNewScope","newLane","createLaneInScope","toLaneId","hash","throwForInvalidLaneName","currentLaneScope","defaultScope","laneObj","trackLaneData","localLane","remoteLane","remoteScope","trackLane","scopeJson","setLaneAsNew","onDestroy","movedFromMain","c","localName","remoteName","beforeTrackData","getRemoteTrackedDataByLocalLane","beforeTrackDataCloned","afterTrackData","aliasLane","laneName","includes","LANE_REMOTE_DELIMITER","trackData","laneNameWithoutScope","split","removeTrackLane","changeScope","isValidScopeName","InvalidScopeName","remoteScopeBefore","newLaneId","saveLane","laneHistoryMsg","rename","newName","currentName","existingAliasWithNewName","remoteIdStr","objects","remoteLanes","renameRefByNewLaneName","renameLane","isEqual","isExported","isLaneExported","exportLane","pushToScopes","laneObject","ComponentIdList","allVersions","persistIfNotExists","includeLaneHistory","eject","pattern","idsByPattern","modelComp","getBitObjectModelComponent","head","deletedComps","deleteComps","packages","getPackageName","getHeadOnMain","fetchLaneWithItsComponents","debug","fetchLaneComponents","removeLanes","laneNames","opts","force","laneResults","restoreLane","laneHash","ref","Ref","objectsFromTrash","getFromTrash","laneIdFromTrash","existingWithSameId","restoreFromTrash","switchLanes","merge","forceOurs","forceTheirs","workspaceOnly","restrictToScopes","skipFetch","branch","OutsideWorkspaceError","inInstallContext","mergeStrategy","mergeOptions","MergeOptions","join","switchProps","existingOnWorkspaceOnly","checkoutProps","promptMergeOptions","reset","gitBranchWarning","createGitBranchForLane","switchResult","LaneSwitcher","switch","isGit","fs","pathExists","warning","warn","gitExecutablePath","getGitExecutablePath","execa","cwd","path","info","err","detailedError","stderr","trim","message","command","getDiff","values","diffOptions","laneDiffGenerator","LaneDiffGenerator","generate","getLaneComponentModels","getHost","laneComponentIds","getLaneComponentIds","getMany","laneComponents","isCurrentLane","bitIdsFromBitmap","filteredComponentIds","laneComponent","bitmapComponentId","isEqualWithoutVersion","getLaneUpdateDependentIds","updateDependents","getLaneUpdateDependentComponents","getLaneReadmeComponent","laneReadmeComponent","readmeComponent","laneReadmeComponentId","removeLaneReadme","currentLaneName","result","readmeComponentId","existingLaneConfig","getSpecificComponentConfig","LanesAspect","remoteLaneIdStr","readme","removeSpecificComponentConfig","addSpecificComponentConfig","setReadmeComponent","write","diffStatus","ensureLoaded","profile","sourceLane","sourceLaneComponents","main","targetLane","targetLaneIds","toBitIds","targetIsMain","baseWasLocalByComp","sourceComponentIds","resolveComponentId","cid","getModelComponentIfExist","set","importMainHeads","targetMainHeads","compact","headOnMain","diffStatusKey","earlyReturn","importObjectsFromMainIfExist","cache","diffProps","sourceVersionObj","load","isRemoved","headOnTargetLane","searchWithoutVersion","version","targetVersionObj","snapDistancesByComponentId","memoHits","memoKey","snapsDistanceKey","getSnapsDistance","snapsDistance","computed","getSnapsDistanceBetweenTwoSnaps","NoCommonSnap","storeSnapsDistance","skipUpToDate","d","snapsOnSourceOnly","isUpToDate","commonSnapsToImport","commonSnapBeforeDiverge","sourceOrTargetLane","skipChanges","deferChanges","importWithoutDeps","fromArray","reason","baseSource","componentDiffStatus","prewarmCaches","noCommonSnap","upToDate","unrelated","commonSnap","deriveChangeTypes","changeType","onSource","onTarget","snapsOnTargetOnly","common","context","changeTypesKey","getChangeTypes","pending","changeTypesInflight","deriveChangesLimit","storeChangeTypes","finally","delete","ChangeType","NEW","repo","loadPair","baseVersion","compareVersion","missing","ignoreMissingHead","classifyVersionChanges","obj","toObject","extensionDependencies","cloneAsString","recreateNewLaneIfDeleted","getCurrentLaneObject","listUpdatesFromForked","componentsList","isOnMain","forkedFromLaneId","forkedFrom","forkedFromLane","workspaceIds","getAllBitIds","duringMergeIds","listDuringMergeStateComponents","componentsFromModel","getModelComponents","compFromModelOnWorkspace","hasWithoutVersion","toComponentId","remoteForkedLane","getRemoteLane","modelComponent","headOnForked","find","headOnLane","laneHeadLocal","divergeData","getDivergeData","throws","listUpdatesFromMainPending","allIds","includeVersionHistory","checkedOutVersion","getRef","getLaneUpdateDependents","remoteError","isLaneLocalOnly","LaneNotFound","undoLaneUpdateDependents","current","remoteSkipped","removed","toRemove","localChanged","pruneStaleUpdateDependents","remoteChanged","removedIdsStr","removeLaneUpdateDependents","removeUpdateDependents","remoteIds","localIds","stale","remoteId","bitIds","scopeComponents","list","component","getIdsOfDefaultLane","bitId","isMerged","createRoutePath","deleteRoutePath","restoreRoutePath","provider","cli","graphql","loggerMain","express","createLogger","lanesMain","switchCmd","SwitchCmd","fetchCmd","FetchCmd","laneCmd","LaneCmd","commands","LaneListCmd","LaneShowCmd","LaneCreateCmd","LaneRemoveCmd","LaneChangeScopeCmd","LaneAliasCmd","LaneRenameCmd","LaneDiffCmd","LaneRemoveReadmeCmd","LaneImportCmd","LaneRemoveCompCmd","LaneFetchCmd","LaneEjectCmd","LaneCurrentCmd","LaneHistoryCmd","LaneHistoryDiffCmd","LaneCheckoutCmd","LaneRevertCmd","LaneUpdatesCmd","register","CatLaneHistoryCmd","registerOnStart","lanesSchema","LanesCreateRoute","LanesDeleteRoute","LanesRestoreRoute","exports","CLIAspect","ScopeAspect","WorkspaceAspect","GraphqlAspect","MergingAspect","ComponentAspect","LoggerAspect","ImporterAspect","ExportAspect","ExpressAspect","ComponentCompareAspect","ComponentWriterAspect","RemoveAspect","CheckoutAspect","InstallAspect","MainRuntime","addRuntime","_default"],"sources":["lanes.main.runtime.ts"],"sourcesContent":["/* eslint-disable max-lines */\nimport type { CLIMain } from '@teambit/cli';\nimport { MainRuntime } from '@teambit/harmony.modules.runtimes';\nimport { CLIAspect } from '@teambit/cli';\nimport pMap from 'p-map';\nimport pLimit from 'p-limit';\nimport type { ScopeMain } from '@teambit/scope';\nimport { ScopeAspect } from '@teambit/scope';\nimport type { GraphqlMain } from '@teambit/graphql';\nimport { GraphqlAspect } from '@teambit/graphql';\nimport type { ExpressMain } from '@teambit/express';\nimport { ExpressAspect } from '@teambit/express';\nimport type { Workspace } from '@teambit/workspace';\nimport { OutsideWorkspaceError, WorkspaceAspect } from '@teambit/workspace';\nimport { getRemoteByName } from '@teambit/scope.remotes';\nimport type { LaneDiffResults } from '@teambit/lanes.modules.diff';\nimport {\n LaneDiffCache,\n LaneDiffCmd,\n LaneDiffGenerator,\n LaneHistoryDiffCmd,\n classifyVersionChanges,\n getHeadOnMain,\n importMainHeads,\n} from '@teambit/lanes.modules.diff';\nimport type { Scope as LegacyScope, TrackLane, LaneData } from '@teambit/legacy.scope';\nimport { NoCommonSnap } from '@teambit/legacy.scope';\nimport { LaneId, DEFAULT_LANE, LANE_REMOTE_DELIMITER } from '@teambit/lane-id';\nimport { LaneNotFound } from '@teambit/legacy.scope-api';\nimport { BitError } from '@teambit/bit-error';\nimport type { Logger, LoggerMain } from '@teambit/logger';\nimport { LoggerAspect } from '@teambit/logger';\nimport type { DiffOptions } from '@teambit/legacy.component-diff';\nimport type { MergeStrategy } from '@teambit/component.modules.merge-helper';\nimport type { MergingMain } from '@teambit/merging';\nimport { MergingAspect } from '@teambit/merging';\nimport { MergeOptions } from '@teambit/component.modules.merge-helper';\nimport type { ImporterMain } from '@teambit/importer';\nimport { FetchCmd, ImporterAspect } from '@teambit/importer';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport { InvalidScopeName, isValidScopeName } from '@teambit/legacy-bit-id';\nimport type { Component, ComponentMain } from '@teambit/component';\nimport { ComponentAspect } from '@teambit/component';\nimport type { HistoryItem, LaneHistory, Version } from '@teambit/objects';\nimport { Ref, Lane } from '@teambit/objects';\nimport type { SnapsDistance } from '@teambit/component.snap-distance';\nimport { getDivergeData } from '@teambit/component.snap-distance';\nimport type { ExportMain } from '@teambit/export';\nimport { ExportAspect } from '@teambit/export';\nimport { compact } from 'lodash';\nimport type { ComponentCompareMain } from '@teambit/component-compare';\nimport { ComponentCompareAspect } from '@teambit/component-compare';\nimport type { ComponentWriterMain } from '@teambit/component-writer';\nimport { ComponentWriterAspect } from '@teambit/component-writer';\nimport type { RemoveMain } from '@teambit/remove';\nimport { RemoveAspect } from '@teambit/remove';\nimport type { CheckoutMain } from '@teambit/checkout';\nimport { CheckoutAspect } from '@teambit/checkout';\nimport { ChangeType } from '@teambit/lanes.entities.lane-diff';\nimport type { ComponentsList } from '@teambit/legacy.component-list';\nimport { concurrentComponentsLimit } from '@teambit/harmony.modules.concurrency';\nimport fs from 'fs-extra';\nimport execa from 'execa';\nimport { getGitExecutablePath } from '@teambit/git.modules.git-executable';\nimport { removeLanes } from './remove-lanes';\nimport { LanesAspect } from './lanes.aspect';\nimport type { LaneCheckoutOpts } from './lane.cmd';\nimport {\n LaneCmd,\n LaneCreateCmd,\n LaneCurrentCmd,\n LaneImportCmd,\n LaneListCmd,\n LaneRemoveCmd,\n LaneShowCmd,\n LaneChangeScopeCmd,\n LaneAliasCmd,\n LaneRenameCmd,\n LaneRemoveReadmeCmd,\n LaneRemoveCompCmd,\n CatLaneHistoryCmd,\n LaneHistoryCmd,\n LaneCheckoutCmd,\n LaneRevertCmd,\n LaneUpdatesCmd,\n LaneFetchCmd,\n LaneEjectCmd,\n} from './lane.cmd';\nimport { lanesSchema } from './lanes.graphql';\nimport { SwitchCmd } from './switch.cmd';\nimport { LaneSwitcher } from './switch-lanes';\nimport { createLane, createLaneInScope, throwForInvalidLaneName } from '@teambit/lanes.modules.create-lane';\nimport { LanesCreateRoute } from './lanes.create.route';\nimport { LanesDeleteRoute } from './lanes.delete.route';\nimport { LanesRestoreRoute } from './lanes.restore.route';\nimport type { InstallMain } from '@teambit/install';\nimport { InstallAspect } from '@teambit/install';\n\nexport { Lane };\n\nexport type SnapsDistanceObj = {\n onSource: string[];\n onTarget: string[];\n common?: string;\n};\n\nexport type LaneResults = {\n lanes: LaneData[];\n currentLane?: string | null;\n};\n\nexport type CreateLaneOptions = {\n scope?: string; // default to the defaultScope in workspace.jsonc\n alias?: string; // default to the remote name\n forkLaneNewScope?: boolean;\n};\n\nexport type SwitchLaneOptions = {\n skipFetch?: boolean;\n alias?: string;\n merge?: MergeStrategy;\n forceOurs?: boolean;\n forceTheirs?: boolean;\n workspaceOnly?: boolean;\n pattern?: string;\n /** switch only the lane components from these scopes (see `SwitchProps.restrictToScopes`) */\n restrictToScopes?: string[];\n skipDependencyInstallation?: boolean;\n verbose?: boolean;\n override?: boolean;\n branch?: boolean;\n};\n\n/**\n * where the entries were read from. the remote lane is the source of truth, so anything else means the\n * local lane object was used instead, and why.\n */\nexport type LaneUpdateDependentsSource =\n /** the lane on the remote */\n | 'remote'\n /** the remote has no such lane - it was never exported, or it was removed there */\n | 'no-remote-lane'\n /** the remote could not be reached or failed, so the local entries may be stale */\n | 'remote-unavailable';\n\nexport type LaneUpdateDependentsResult = {\n laneId: LaneId;\n /** the cascaded entries. each id carries the cascade snap hash as its version */\n ids: ComponentID[];\n source: LaneUpdateDependentsSource;\n /** the remote failure message, when the remote was tried and failed */\n remoteError?: string;\n};\n\nexport type UndoLaneUpdateDependentsResult = {\n laneId: LaneId;\n removed: ComponentID[];\n remoteChanged: boolean;\n localChanged: boolean;\n /** the lane was never exported, so only the local lane object was changed */\n remoteSkipped: boolean;\n};\n\n/** where the base was resolved from: `workspace` (already local) or `scope` (fetched from remote). */\nexport type DiffBaseSource = 'workspace' | 'scope';\n\nexport type LaneComponentDiffStatus = {\n componentId: ComponentID;\n sourceHead: string;\n targetHead?: string;\n /** where the base was resolved from (workspace vs remote scope). @see DiffBaseSource */\n baseSource?: DiffBaseSource;\n /**\n * @deprecated\n * use changes to get list of all the changes\n */\n changeType?: ChangeType;\n changes?: ChangeType[];\n upToDate?: boolean;\n snapsDistance?: SnapsDistanceObj;\n unrelated?: boolean;\n /**\n * internal context for deferred derivation of `changes`. not exposed on the GraphQL schema —\n * the `changes` field resolver consumes this via `deriveComponentChanges` so the heavy\n * `componentCompare.compare()` + `getAPIDiff()` work only runs when the field is selected,\n * lazily per-component, in parallel via graphql-js list resolution.\n */\n changesContext?: {\n commonSnap?: { hash: string } | null;\n skipped?: boolean;\n pending?: Promise<ChangeType[] | undefined>;\n };\n};\n\nexport type LaneDiffStatusOptions = {\n /** skip importing the common snaps and computing `changes` entirely */\n skipChanges?: boolean;\n /**\n * drop components where the snaps-distance says the source already includes everything on the\n * target. these contribute nothing to a target→source merge view but each costs an\n * `importWithoutDeps` round trip + an `apiDiff` schema extraction.\n */\n skipUpToDate?: boolean;\n /**\n * still classify snap distance, but don't compute `changes` eagerly. callers derive them lazily\n * via `deriveComponentChanges` (used by GraphQL field resolvers).\n */\n deferChanges?: boolean;\n /**\n * after computing the result, eagerly warm the compare/host caches the lane-compare UI will hit next.\n * UI-only: it fans out concurrent component loads, so CLI/programmatic callers (which never make those\n * follow-up queries) must leave it off to avoid paying — and multiplying — that cold-load cost.\n */\n prewarmCaches?: boolean;\n};\n\nexport type DivergeDataPerId = { id: ComponentID; divergeData: SnapsDistance };\n\nexport type LaneDiffStatus = {\n source: LaneId;\n target: LaneId;\n componentsStatus: LaneComponentDiffStatus[];\n};\n\nexport type MarkRemoveOnLaneResult = { removedFromWs: ComponentID[]; markedRemoved: ComponentID[] };\n\nexport type CreateLaneResult = {\n lane: Lane;\n laneId: LaneId;\n hash: string;\n alias?: string;\n movedFromMain?: ComponentID[]; // components whose staged snaps on main were moved to the new lane\n};\n\nexport class LanesMain {\n constructor(\n readonly workspace: Workspace | undefined,\n private scope: ScopeMain,\n private merging: MergingMain,\n private componentAspect: ComponentMain,\n public logger: Logger,\n readonly importer: ImporterMain,\n private exporter: ExportMain,\n private componentCompare: ComponentCompareMain,\n readonly componentWriter: ComponentWriterMain,\n private remove: RemoveMain,\n readonly checkout: CheckoutMain,\n private install: InstallMain\n ) {}\n\n /**\n * disk-persisted memo layer for the lane-diff computation (snaps-distance, change-types and the\n * top-level result). extracted to its own class — see `LaneDiffCache` in lanes/diff.\n */\n private _laneDiffCache?: LaneDiffCache;\n private get laneDiffCache(): LaneDiffCache {\n if (!this._laneDiffCache) this._laneDiffCache = new LaneDiffCache(this.logger);\n return this._laneDiffCache;\n }\n\n /**\n * Bound the parallelism of `deriveChangeTypes` across all in-flight requests. graphql-js resolves\n * list fields in parallel via `Promise.all`, so an uncapped derivation fires one `compare()` per\n * component at once. The old cap of 4 existed because derivation also ran `getAPIDiff` (serial\n * tsserver schema extraction) — that's now deferred to the API view, so derivation only does the\n * I/O+CPU-bound `compare()`, which parallelizes well. Cap to the component concurrency limit.\n */\n private deriveChangesLimit = pLimit(concurrentComponentsLimit());\n\n /** single-flight for concurrent `deriveComponentChanges` calls on the same memo key. */\n private changeTypesInflight = new Map<string, Promise<ChangeType[] | undefined>>();\n\n private tryDiffStatusResultMemo(\n resultMemoKey: string,\n sourceLaneId: LaneId,\n targetLaneId: LaneId | undefined\n ): LaneDiffStatus | undefined {\n const cached = this.laneDiffCache.getDiffStatus(resultMemoKey);\n if (!cached) return undefined;\n return {\n source: sourceLaneId,\n target: targetLaneId || this.getDefaultLaneId(),\n componentsStatus: cached,\n };\n }\n\n /**\n * Pre-warm the downstream caches the lane-compare UI hits right after `LaneDiffStatus`:\n * - the scope's `ScopeComponentLoader.componentsCache` via `host.getMany([…])`\n * - `componentCompare`'s disk-persisted result memo via `compareComponents(pairs)`\n *\n * Fire-and-forget. The UI's follow-up `Component` and `CompareComponents` queries arrive ~50–200 ms\n * after we return; this kickoff happens *before* we return, so the work overlaps the UI's render\n * tick and the response serialization. By the time the UI's queries land on the server, the caches\n * are populated (or, worst case, the pre-warm work is in-flight and the resolver-level single-flight\n * in `componentCompare` dedupes the load).\n */\n private prewarmCompareCaches(\n host: any,\n visibleDiffProps: Array<{ componentId: ComponentID; sourceHead: string; targetHead?: string }>\n ) {\n const allVersionedIds: ComponentID[] = [];\n const comparePairs: Array<{ baseId: string; compareId: string }> = [];\n for (const { componentId, sourceHead, targetHead } of visibleDiffProps) {\n const compareId = componentId.changeVersion(sourceHead);\n allVersionedIds.push(compareId);\n if (targetHead) {\n const baseId = componentId.changeVersion(targetHead);\n allVersionedIds.push(baseId);\n comparePairs.push({ baseId: baseId.toString(), compareId: compareId.toString() });\n }\n }\n if (allVersionedIds.length === 0) return;\n // NOTE: `host.getMany` uses mapSeries internally (sequential). For cold pre-warm to actually\n // beat the UI's concurrent N-op `Component` batch we have to drive parallelism ourselves. pMap\n // here uses the same `concurrentComponentsLimit()` cap as the lane diff body, matching what\n // downstream loaders are tuned for.\n Promise.all([\n // wrap in try/catch since `host.get` could be missing or throw synchronously; the previous\n // `host.get?.(id).catch(...)` chained .catch on `undefined` when get was absent.\n pMap(\n allVersionedIds,\n async (id) => {\n try {\n return await host.get?.(id);\n } catch {\n return undefined;\n }\n },\n { concurrency: concurrentComponentsLimit() }\n ).catch(() => undefined),\n comparePairs.length > 0\n ? this.componentCompare.compareComponents(comparePairs).catch(() => undefined)\n : Promise.resolve(),\n ]).catch(() => {});\n }\n\n private populateDiffStatusMemoAsync(resultMemoKey: string, results: LaneComponentDiffStatus[]) {\n Promise.all(\n results.map(async (status) => {\n if (status.changes) return;\n status.changes = await this.deriveComponentChanges(status);\n })\n )\n .then(() => {\n // don't persist a result set where a component's change types couldn't be derived: `changes`\n // came back undefined for a reason OTHER than being explicitly skipped (i.e. a transient\n // Version-load failure). persisting it under the immutable lane-pair key would serve that gap\n // forever; it recomputes and persists on a later request once the objects are available.\n const anyFailed = results.some((s) => s.changes === undefined && !s.changesContext?.skipped);\n if (!anyFailed) this.laneDiffCache.storeDiffStatus(resultMemoKey, results);\n })\n .catch(() => {});\n }\n /**\n * return the lane data without the deleted components.\n * the deleted components are filtered out in legacyScope.lanes.getLanesData()\n */\n async getLanes({\n name,\n remote,\n merged,\n showDefaultLane,\n notMerged,\n }: {\n name?: string;\n remote?: string;\n merged?: boolean;\n showDefaultLane?: boolean;\n notMerged?: boolean;\n }): Promise<LaneData[]> {\n const showMergeData = Boolean(merged || notMerged);\n const consumer = this.workspace?.consumer;\n if (!this.scope) throw new Error(`error: please run the command from a workspace or a scope directory`);\n if (remote) {\n const laneId = name ? LaneId.from(name, remote) : undefined;\n const remoteObj = await getRemoteByName(remote, consumer);\n const lanes = await remoteObj.listLanes(laneId?.toString(), showMergeData);\n // if the remote is http, it eventually calls this method from the remote without the \"remote\" param.\n // again, the deleted components are filtered out.\n return lanes;\n }\n\n if (name === DEFAULT_LANE) {\n const defaultLane = await this.getLaneDataOfDefaultLane();\n return defaultLane ? [defaultLane] : [];\n }\n\n const lanes = await this.scope.legacyScope.lanes.getLanesData(this.scope.legacyScope, name, showMergeData);\n\n if (showDefaultLane) {\n const defaultLane = await this.getLaneDataOfDefaultLane();\n if (defaultLane) lanes.push(defaultLane);\n }\n\n return lanes;\n }\n\n async parseLaneId(idStr: string): Promise<LaneId> {\n const scope: LegacyScope = this.scope.legacyScope;\n return scope.lanes.parseLaneIdFromString(idStr);\n }\n\n async getLaneHistory(laneId: LaneId): Promise<LaneHistory> {\n const lane = await this.loadLane(laneId);\n if (!lane) throw new BitError(`unable to find a lane \"${laneId.toString()}\"`);\n const laneHistory = await this.scope.legacyScope.lanes.getOrCreateLaneHistory(lane);\n return laneHistory;\n }\n\n async checkoutHistory(historyId: string, options?: LaneCheckoutOpts) {\n const historyItem = await this.getHistoryItemOfCurrentLane(historyId);\n const ids = historyItem.components.map((id) => ComponentID.fromString(id));\n const lane = await this.getCurrentLane();\n const results = await this.checkout.checkout({\n ids: ids.map((id) => id.changeVersion(undefined)),\n versionPerId: ids,\n allowAddingComponentsFromScope: true,\n skipNpmInstall: options?.skipDependencyInstallation,\n isLane: true,\n lane,\n });\n return results;\n }\n\n async revertHistory(historyId: string, options?: LaneCheckoutOpts) {\n const historyItem = await this.getHistoryItemOfCurrentLane(historyId);\n const lane = await this.getCurrentLane();\n\n const historyComponentIds = historyItem.components.map((id) => ComponentID.fromString(id));\n\n // When restoreDeletedComponents is set, we need to identify which components from the history\n // are currently not in the workspace (i.e., were deleted after that history point)\n let existingIds = historyComponentIds;\n let deletedIds: ComponentID[] = [];\n\n if (options?.restoreDeletedComponents) {\n const currentBitmap = this.workspace?.consumer.bitMap.getAllBitIdsFromAllLanes() || [];\n const currentComponentIdsSet = new Set(currentBitmap.map((id) => id.toStringWithoutVersion()));\n\n existingIds = historyComponentIds.filter((id) => currentComponentIdsSet.has(id.toStringWithoutVersion()));\n deletedIds = historyComponentIds.filter((id) => !currentComponentIdsSet.has(id.toStringWithoutVersion()));\n }\n\n // First, revert the existing components (keeps bitmap versions)\n const results = await this.checkout.checkout({\n ids: existingIds.map((id) => id.changeVersion(undefined)),\n versionPerId: existingIds,\n allowAddingComponentsFromScope: true,\n revert: true,\n skipNpmInstall: options?.skipDependencyInstallation,\n isLane: true,\n lane,\n });\n\n // If there are deleted components to restore, checkout them separately (updates bitmap)\n if (deletedIds.length > 0) {\n const deletedResults = await this.checkout.checkout({\n ids: deletedIds.map((id) => id.changeVersion(undefined)),\n versionPerId: deletedIds,\n allowAddingComponentsFromScope: true,\n revert: false, // Don't use revert mode for deleted components - we want to update bitmap\n skipNpmInstall: options?.skipDependencyInstallation,\n isLane: true,\n lane,\n });\n\n // Merge the results\n results.components = [...(results.components || []), ...(deletedResults.components || [])];\n results.addedComponents = [...(results.addedComponents || []), ...(deletedResults.addedComponents || [])];\n }\n\n return results;\n }\n\n private async getHistoryItemOfCurrentLane(historyId: string): Promise<HistoryItem> {\n const laneId = this.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) {\n throw new BitError(`unable to checkout history \"${historyId}\" while on main`);\n }\n await this.importLaneHistory(laneId);\n const laneHistory = await this.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n const historyItem = history[historyId];\n if (!historyItem) {\n throw new BitError(`unable to find history \"${historyId}\" in lane \"${laneId.toString()}\"`);\n }\n return historyItem;\n }\n\n async importLaneHistory(laneId: LaneId) {\n const existingLane = await this.loadLane(laneId);\n if (existingLane?.isNew) return;\n await this.importer.importLaneObject(laneId, undefined, true);\n }\n\n async isLaneExistsOnRemote(laneId: LaneId): Promise<boolean> {\n const results = await this.scope.legacyScope.scopeImporter.importLanes([laneId]);\n return results.length > 0;\n }\n\n getCurrentLaneName(): string | null {\n return this.getCurrentLaneId()?.name || null;\n }\n\n getCurrentLaneNameOrAlias(): string | null {\n const currentLaneId = this.getCurrentLaneId();\n if (!currentLaneId) return null;\n const trackingData = this.scope.legacyScope.lanes.getLocalTrackedLaneByRemoteName(\n currentLaneId.name,\n currentLaneId.scope\n );\n return trackingData || currentLaneId.name;\n }\n\n getCurrentLaneId(): LaneId | null {\n if (!this.workspace) return null;\n return this.workspace.consumer.getCurrentLaneId();\n }\n\n /**\n * get the currently checked out lane object, if on main - return null.\n */\n async getCurrentLane(): Promise<Lane | undefined> {\n const laneId = this.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) return undefined;\n return this.loadLane(laneId);\n }\n\n getDefaultLaneId(): LaneId {\n return LaneId.from(DEFAULT_LANE, this.scope.name);\n }\n\n setCurrentLane(laneId: LaneId, alias?: string, exported?: boolean) {\n this.workspace?.consumer.setCurrentLane(laneId, exported);\n }\n\n async createLane(\n name: string,\n { scope, alias, forkLaneNewScope }: CreateLaneOptions = {}\n ): Promise<CreateLaneResult> {\n if (!this.workspace) {\n const newLane = await createLaneInScope(name, this.scope);\n return {\n lane: newLane,\n laneId: newLane.toLaneId(),\n hash: newLane.hash().toString(),\n };\n }\n if (alias) {\n throwForInvalidLaneName(alias);\n }\n const currentLaneId = this.workspace.getCurrentLaneId();\n const currentLaneScope = currentLaneId.isDefault() ? undefined : currentLaneId.scope;\n if (!forkLaneNewScope && !currentLaneId.isDefault() && scope && currentLaneScope !== scope) {\n throw new BitError(`you're about to create a lane forked from ${currentLaneId.toString()} and assign it to a different scope \"${scope}\".\nif the lane components have a large history, it would be best to stick with the same scope as the current lane.\nto do that, re-run the command without the \"--scope\" flag. it will create the lane and set the scope to \"${currentLaneScope}\"\nif you wish to keep ${scope} scope, please re-run the command with \"--fork-lane-new-scope\" flag.`);\n }\n scope = scope || (currentLaneId.isDefault() ? this.workspace.defaultScope : currentLaneId.scope);\n const laneObj = await createLane(this.workspace, name, scope);\n const laneId = LaneId.from(name, scope);\n this.setCurrentLane(laneId, alias, false);\n const trackLaneData = {\n localLane: alias || name,\n remoteLane: name,\n remoteScope: scope,\n };\n this.scope.legacyScope.lanes.trackLane(trackLaneData);\n this.scope.legacyScope.scopeJson.setLaneAsNew(name);\n await this.workspace.consumer.onDestroy('lane-create');\n\n const results = {\n lane: laneObj,\n alias,\n laneId: laneObj.toLaneId(),\n hash: laneObj.hash().toString(),\n // a lane created from main gets only the staged snaps of main, which are moved to it\n movedFromMain: currentLaneId.isDefault() ? laneObj.components.map((c) => c.id) : undefined,\n };\n return results;\n }\n\n async loadLane(id: LaneId): Promise<Lane | undefined> {\n return this.scope.legacyScope.lanes.loadLane(id);\n }\n\n async trackLane(\n localName: string,\n remoteScope: string,\n remoteName?: string\n ): Promise<{ beforeTrackData?: TrackLane; afterTrackData: TrackLane }> {\n if (!this.workspace) {\n throw new BitError(`unable to track a lane outside of Bit workspace`);\n }\n const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(localName);\n const lane = await this.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${localName}\"`);\n }\n const beforeTrackData = this.scope.legacyScope.lanes.getRemoteTrackedDataByLocalLane(localName);\n const beforeTrackDataCloned = beforeTrackData ? { ...beforeTrackData } : undefined;\n const afterTrackData = {\n localLane: localName,\n remoteLane: remoteName || beforeTrackData?.remoteLane || localName,\n remoteScope,\n };\n this.scope.legacyScope.lanes.trackLane(afterTrackData);\n await this.workspace.consumer.onDestroy('lane-track');\n\n return { beforeTrackData: beforeTrackDataCloned, afterTrackData };\n }\n\n async aliasLane(laneName: string, alias: string): Promise<{ laneId: LaneId }> {\n if (!this.workspace) {\n throw new BitError(`unable to alias a lane outside of Bit workspace`);\n }\n if (alias.includes(LANE_REMOTE_DELIMITER)) {\n throw new BitError(`an alias cannot include a delimiter \"${LANE_REMOTE_DELIMITER}\"`);\n }\n if (alias === laneName) {\n throw new BitError(`an alias cannot be the same as the lane name`);\n }\n const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(laneName);\n const lane = await this.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${laneName}\"`);\n }\n const trackData = {\n localLane: alias,\n remoteLane: laneId.name,\n remoteScope: laneId.scope,\n };\n const laneNameWithoutScope = laneName.includes(LANE_REMOTE_DELIMITER)\n ? laneName.split(LANE_REMOTE_DELIMITER)[1]\n : laneName;\n this.scope.legacyScope.lanes.removeTrackLane(laneNameWithoutScope);\n this.scope.legacyScope.lanes.trackLane(trackData);\n await this.workspace.consumer.onDestroy('lane-alias');\n\n return { laneId };\n }\n\n async changeScope(remoteScope: string, laneName?: string): Promise<{ remoteScopeBefore: string; localName: string }> {\n if (!this.workspace) {\n throw new BitError(`unable to change-scope of a lane outside of Bit workspace`);\n }\n let laneId: LaneId;\n let laneNameWithoutScope: string;\n if (laneName) {\n laneNameWithoutScope = laneName.includes(LANE_REMOTE_DELIMITER)\n ? laneName.split(LANE_REMOTE_DELIMITER)[1]\n : laneName;\n laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(laneName);\n } else {\n laneId = this.workspace.getCurrentLaneId();\n laneNameWithoutScope = laneId.name;\n }\n const lane = await this.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${laneName}\"`);\n }\n if (!lane.isNew) {\n throw new BitError(`changing lane scope-name is allowed for new lanes only. this lane has been exported already.\nplease create a new lane instead, which will include all components of this lane`);\n }\n if (!isValidScopeName(remoteScope)) {\n throw new InvalidScopeName(remoteScope);\n }\n const remoteScopeBefore = lane.scope;\n lane.changeScope(remoteScope);\n const newLaneId = LaneId.from(laneId.name, remoteScope);\n const trackData = {\n localLane: laneNameWithoutScope,\n remoteLane: laneId.name,\n remoteScope,\n };\n this.scope.legacyScope.lanes.trackLane(trackData);\n await this.scope.legacyScope.lanes.saveLane(lane, {\n laneHistoryMsg: `change scope from ${remoteScopeBefore} to ${remoteScope}`,\n });\n this.workspace.consumer.bitMap.setCurrentLane(newLaneId, false);\n await this.workspace.consumer.onDestroy('lane-scope-change');\n\n return { remoteScopeBefore, localName: laneNameWithoutScope };\n }\n\n /**\n * change a lane-name and if possible, export the lane to the remote\n */\n async rename(newName: string, laneName?: string): Promise<{ currentName: string }> {\n if (!this.workspace) {\n throw new BitError(`unable to rename a lane outside of Bit workspace`);\n }\n throwForInvalidLaneName(newName);\n const currentName = laneName || this.workspace.getCurrentLaneId().name;\n const existingAliasWithNewName = this.scope.legacyScope.lanes.getRemoteTrackedDataByLocalLane(newName);\n if (existingAliasWithNewName) {\n const remoteIdStr = `${existingAliasWithNewName.remoteLane}/${existingAliasWithNewName.remoteScope}`;\n throw new BitError(`unable to rename to ${newName}. this name is already used to track: ${remoteIdStr}`);\n }\n const laneNameWithoutScope = currentName.includes(LANE_REMOTE_DELIMITER)\n ? currentName.split(LANE_REMOTE_DELIMITER)[1]\n : currentName;\n const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(currentName);\n const lane = await this.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${currentName}\"`);\n }\n\n // rename the ref file\n await this.scope.legacyScope.objects.remoteLanes.renameRefByNewLaneName(laneNameWithoutScope, newName, lane.scope);\n\n // change scope.json related data and change the lane object\n await this.scope.legacyScope.lanes.renameLane(lane, newName);\n\n // change current-lane if needed\n const currentLaneId = this.getCurrentLaneId();\n if (currentLaneId?.isEqual(laneId)) {\n const newLaneId = LaneId.from(newName, lane.scope);\n const isExported = this.workspace.consumer.bitMap.isLaneExported;\n this.setCurrentLane(newLaneId, undefined, isExported);\n }\n\n // this writes the changes done on scope.json file (along with .bitmap)\n await this.workspace.consumer.onDestroy('lane-rename');\n\n return { currentName };\n }\n\n async exportLane(lane: Lane) {\n await this.exporter.pushToScopes({\n scope: this.scope.legacyScope,\n laneObject: lane,\n ids: new ComponentIdList(),\n allVersions: false,\n });\n }\n\n async importLaneObject(laneId: LaneId, persistIfNotExists = true, includeLaneHistory = false): Promise<Lane> {\n return this.importer.importLaneObject(laneId, persistIfNotExists, includeLaneHistory);\n }\n\n async eject(pattern: string): Promise<ComponentID[]> {\n if (!this.workspace) {\n throw new BitError(`unable to eject a component outside of Bit workspace`);\n }\n const ids = await this.workspace.idsByPattern(pattern);\n await Promise.all(\n ids.map(async (id) => {\n const modelComp = await this.scope.getBitObjectModelComponent(id, true);\n if (!modelComp!.head) {\n throw new BitError(`unable to eject \"${id.toString()}\" as it has no main version`);\n }\n })\n );\n\n const deletedComps = await this.remove.deleteComps(pattern);\n const packages = deletedComps.map((c) => c.getPackageName());\n await this.install.install(packages);\n return deletedComps.map((c) => c.id);\n }\n\n /** head hash of main, with remote-scope fallback. undefined only for a genuinely-new component. */\n async getHeadOnMain(componentId: ComponentID): Promise<string | undefined> {\n return getHeadOnMain(this.scope, componentId);\n }\n\n /**\n * fetch the lane object and its components from the remote.\n * save the objects and the lane to the local scope.\n * this method doesn't change anything in the workspace.\n */\n async fetchLaneWithItsComponents(laneId: LaneId): Promise<Lane> {\n this.logger.debug(`fetching lane ${laneId.toString()}`);\n const lane = await this.importer.importLaneObject(laneId);\n if (!lane) throw new Error(`unable to import lane ${laneId.toString()} from the remote`);\n\n await this.importer.fetchLaneComponents(lane);\n this.logger.debug(`fetching lane ${laneId.toString()} done, fetched ${lane.components.length} components`);\n return lane;\n }\n\n async removeLanes(laneNames: string[], opts?: { remote: boolean; force: boolean }): Promise<string[]> {\n if (!this.workspace && !opts?.remote) {\n await this.scope.legacyScope.lanes.removeLanes(this.scope.legacyScope, laneNames, true);\n return laneNames;\n }\n const results = await removeLanes(this.workspace?.consumer, laneNames, !!opts?.remote, !!opts?.force);\n if (this.workspace) await this.workspace.consumer.onDestroy('lane-remove');\n\n return results.laneResults;\n }\n\n /**\n * when deleting a lane object, it is sent into the \"trash\" directory in the scope.\n * this method restores it and put it back in the \"objects\" directory.\n * as an argument, it needs a hash. the reason for not supporting lane-id is because the trash may have multiple\n * lanes with the same lane-id but different hashes.\n */\n async restoreLane(laneHash: string) {\n const ref = Ref.from(laneHash);\n const objectsFromTrash = (await this.scope.legacyScope.objects.getFromTrash([ref])) as Lane[];\n const laneIdFromTrash = objectsFromTrash[0].toLaneId();\n const existingWithSameId = await this.loadLane(laneIdFromTrash);\n if (existingWithSameId) {\n if (existingWithSameId.hash().isEqual(ref)) {\n throw new BitError(`unable to restore lane ${laneIdFromTrash.toString()}, as it already exists`);\n }\n throw new BitError(\n `unable to restore lane ${laneIdFromTrash.toString()}, as a lane with the same id already exists`\n );\n }\n await this.scope.legacyScope.objects.restoreFromTrash([ref]);\n }\n\n /**\n * switch to a different local or remote lane.\n * switching to a remote lane also imports and writes the components of that remote lane.\n * by default, only the components existing on the workspace will be imported from that lane, unless the \"getAll\"\n * flag is true.\n */\n async switchLanes(\n laneName: string,\n {\n alias,\n merge,\n forceOurs,\n forceTheirs,\n pattern,\n workspaceOnly,\n restrictToScopes,\n skipDependencyInstallation = false,\n skipFetch = false,\n branch = false,\n }: SwitchLaneOptions\n ) {\n if (!this.workspace) {\n throw new OutsideWorkspaceError();\n }\n this.workspace.inInstallContext = true;\n let mergeStrategy;\n if (merge && typeof merge === 'string') {\n const mergeOptions = Object.keys(MergeOptions);\n if (!mergeOptions.includes(merge)) {\n throw new BitError(`merge must be one of the following: ${mergeOptions.join(', ')}`);\n }\n mergeStrategy = merge;\n }\n if (alias) {\n throwForInvalidLaneName(alias);\n }\n\n const switchProps = {\n laneName,\n existingOnWorkspaceOnly: workspaceOnly,\n pattern,\n restrictToScopes,\n alias,\n skipFetch,\n };\n const checkoutProps = {\n mergeStrategy,\n forceOurs,\n forceTheirs,\n skipNpmInstall: skipDependencyInstallation,\n isLane: true,\n promptMergeOptions: false,\n reset: false,\n all: false,\n };\n\n // Create git branch if requested and git is available\n let gitBranchWarning: string | undefined;\n if (branch) {\n gitBranchWarning = await this.createGitBranchForLane(laneName);\n }\n\n const switchResult = await new LaneSwitcher(this.workspace, this.logger, switchProps, checkoutProps, this).switch();\n\n // Add git branch warning to the result if present\n if (gitBranchWarning) {\n switchResult.gitBranchWarning = gitBranchWarning;\n }\n\n return switchResult;\n }\n\n private async createGitBranchForLane(laneName: string): Promise<string | undefined> {\n if (!this.workspace) return;\n\n try {\n // Check if git exists in the project\n const isGit = await fs.pathExists('.git');\n if (!isGit) {\n const warning = 'Git repository not found. Skipping git branch creation.';\n this.logger.warn(warning);\n return warning;\n }\n\n const gitExecutablePath = getGitExecutablePath();\n\n // Create and checkout to the new git branch\n await execa(gitExecutablePath, ['checkout', '-b', laneName], {\n cwd: this.workspace.path,\n });\n\n this.logger.info(`Created and checked out git branch: ${laneName}`);\n return undefined; // No warning\n } catch (err: any) {\n // Don't fail the lane import if git branch creation fails\n const detailedError = err.stderr?.trim() || err.message;\n const warning = `Failed to create git branch \"${laneName}\".\n - Command: ${err.command}\n - Reason: ${detailedError}`;\n\n this.logger.warn(warning);\n return warning;\n }\n }\n\n /**\n * the values array may include zero to two values and will be processed as following:\n * [] => diff between the current lane and default lane. (only inside workspace).\n * [to] => diff between the current lane (or default-lane when in scope) and \"to\" lane.\n * [from, to] => diff between \"from\" lane and \"to\" lane.\n */\n public async getDiff(values: string[], diffOptions: DiffOptions = {}, pattern?: string): Promise<LaneDiffResults> {\n const laneDiffGenerator = new LaneDiffGenerator(this.workspace, this.scope, this.componentCompare);\n return laneDiffGenerator.generate(values, diffOptions, pattern);\n }\n\n async getLaneComponentModels(lane: LaneData): Promise<Component[]> {\n const host = this.componentAspect.getHost();\n const laneComponentIds = await this.getLaneComponentIds(lane);\n const components = await host.getMany(laneComponentIds);\n return components;\n }\n\n async getLaneComponentIds(lane: LaneData): Promise<ComponentID[]> {\n if (!lane) return [];\n\n const laneComponents = lane.components;\n const workspace = this.workspace;\n // the bitmap filter only makes sense for the lane currently checked out — it keeps that view\n // aligned with what's actually in the workspace. any OTHER lane lives only in the local scope:\n // its components are never in the bitmap, so filtering by it empties the lane (a fully-fetched\n // lane renders as \"no components\" in the overview) even though every object is available.\n const isCurrentLane = Boolean(workspace && this.getCurrentLaneId()?.isEqual(lane.id));\n const bitIdsFromBitmap = workspace && isCurrentLane ? workspace.consumer.bitMap.getAllBitIdsFromAllLanes() : [];\n\n const filteredComponentIds = isCurrentLane\n ? laneComponents.filter((laneComponent) =>\n bitIdsFromBitmap.some((bitmapComponentId) => bitmapComponentId.isEqualWithoutVersion(laneComponent.id))\n )\n : laneComponents;\n\n return filteredComponentIds.map((laneComponent) => laneComponent.id.changeVersion(laneComponent.head));\n }\n\n /**\n * hidden lane.updateDependents are intentionally excluded from `getLaneComponentIds` so the\n * default GraphQL `Lane.components` field stays workspace-facing. Consumers that need the full\n * lane graph (e.g. a CI dashboard surfacing cascade entries) opt in via this method or its\n * `updateDependentIds` / `updateDependentComponents` GraphQL counterparts. No bitmap filter\n * here — hidden entries by definition don't live in the bitmap.\n */\n async getLaneUpdateDependentIds(lane: LaneData): Promise<ComponentID[]> {\n if (!lane?.updateDependents?.length) return [];\n return lane.updateDependents.map((c) => c.id.changeVersion(c.head));\n }\n\n async getLaneUpdateDependentComponents(lane: LaneData): Promise<Component[]> {\n const ids = await this.getLaneUpdateDependentIds(lane);\n if (!ids.length) return [];\n const host = this.componentAspect.getHost();\n return host.getMany(ids);\n }\n\n async getLaneReadmeComponent(lane: LaneData): Promise<Component | undefined> {\n if (!lane) return undefined;\n const laneReadmeComponent = lane.readmeComponent;\n if (!laneReadmeComponent) return undefined;\n const host = this.componentAspect.getHost();\n const laneReadmeComponentId = laneReadmeComponent.id.changeVersion(laneReadmeComponent.head);\n const readmeComponent = await host.get(laneReadmeComponentId);\n return readmeComponent;\n }\n\n async removeLaneReadme(laneName?: string): Promise<{ result: boolean; message?: string }> {\n if (!this.workspace) {\n throw new BitError('unable to remove the lane readme component outside of Bit workspace');\n }\n const currentLaneName = this.getCurrentLaneName();\n\n if (!laneName && !currentLaneName) {\n return {\n result: false,\n message: 'unable to remove the lane readme component. Either pass a laneName or switch to a lane',\n };\n }\n\n const scope: LegacyScope = this.workspace.scope.legacyScope;\n const laneId: LaneId = laneName\n ? await scope.lanes.parseLaneIdFromString(laneName)\n : (this.getCurrentLaneId() as LaneId);\n const lane: Lane | null | undefined = await scope.loadLane(laneId);\n\n if (!lane?.readmeComponent) {\n throw new BitError(`there is no readme component added to the lane ${laneName || currentLaneName}`);\n }\n\n const readmeComponentId = lane.readmeComponent.id;\n const existingLaneConfig =\n (await this.workspace.getSpecificComponentConfig(readmeComponentId, LanesAspect.id)) || {};\n\n const remoteLaneIdStr = lane.toLaneId().toString();\n\n if (existingLaneConfig.readme) {\n delete existingLaneConfig.readme[remoteLaneIdStr];\n await this.workspace.removeSpecificComponentConfig(readmeComponentId, LanesAspect.id, false);\n await this.workspace.addSpecificComponentConfig(readmeComponentId, LanesAspect.id, existingLaneConfig);\n }\n\n lane.setReadmeComponent(undefined);\n await scope.lanes.saveLane(lane, { laneHistoryMsg: 'remove readme' });\n await this.workspace.bitMap.write(`lane-remove-readme`);\n\n return { result: true };\n }\n\n async diffStatus(\n sourceLaneId: LaneId,\n targetLaneId?: LaneId,\n options?: LaneDiffStatusOptions\n ): Promise<LaneDiffStatus> {\n await this.laneDiffCache.ensureLoaded();\n this.logger.profile(`diff status for source lane: ${sourceLaneId.name} and target lane: ${targetLaneId?.name}`);\n\n const sourceLane = sourceLaneId.isDefault()\n ? await this.getLaneDataOfDefaultLane()\n : await this.loadLane(sourceLaneId);\n\n const sourceLaneComponents = sourceLaneId.isDefault()\n ? sourceLane?.components.map((main) => ({ id: main.id, head: Ref.from(main.head) }))\n : sourceLane?.components;\n\n const targetLane = targetLaneId ? await this.loadLane(targetLaneId) : undefined;\n const targetLaneIds = targetLane?.toBitIds();\n const host = this.componentAspect.getHost();\n\n // Resolve the main-side heads up-front: they feed BOTH the memo key (so the cache invalidates\n // when main advances) and the diff computation below. The target=main case has no single lane\n // hash, so without this the key was constant ('default') and stale results were served when main\n // moved ahead (lanes.spec \"not up to date when main is ahead\").\n const targetIsMain = !targetLaneId || Boolean(targetLaneId?.isDefault());\n // whether each base on main was already local (snapshot *before* the remote fetch) - drives the\n // UI \"workspace vs remote scope\" source indicator.\n const baseWasLocalByComp = new Map<string, boolean>();\n if (targetIsMain) {\n const sourceComponentIds = await Promise.all(\n (sourceLaneComponents || []).map(({ id }) => host.resolveComponentId(id))\n );\n await Promise.all(\n sourceComponentIds.map(async (cid) => {\n const modelComp = await this.scope.legacyScope.getModelComponentIfExist(cid);\n baseWasLocalByComp.set(cid.toString(), Boolean(modelComp?.head));\n })\n );\n // the base on main may live only on the remote scope; pull it so the diff is real, not a spurious NEW.\n await importMainHeads(this.scope, sourceComponentIds);\n }\n const targetMainHeads = targetIsMain\n ? compact(\n await Promise.all(\n (sourceLaneComponents || []).map(async ({ id }) => {\n const componentId = await host.resolveComponentId(id);\n const headOnMain = await this.getHeadOnMain(componentId);\n return headOnMain ? id.changeVersion(headOnMain) : undefined;\n })\n )\n )\n : [];\n\n const resultMemoKey = this.laneDiffCache.diffStatusKey(\n sourceLaneId,\n sourceLane ?? undefined,\n targetLaneId,\n targetLane ?? undefined,\n options,\n targetMainHeads\n );\n const earlyReturn = this.tryDiffStatusResultMemo(resultMemoKey, sourceLaneId, targetLaneId);\n if (earlyReturn) {\n this.logger.profile(`diff status for source lane: ${sourceLaneId.name} and target lane: ${targetLaneId?.name}`);\n return earlyReturn;\n }\n\n await this.importer.importObjectsFromMainIfExist(targetMainHeads, { cache: true });\n\n const diffProps = compact(\n await Promise.all(\n (sourceLaneComponents || []).map(async ({ id, head }) => {\n const componentId = await host.resolveComponentId(id);\n const sourceVersionObj = (await this.scope.legacyScope.objects.load(head, true)) as Version;\n\n if (sourceVersionObj.isRemoved()) {\n return null;\n }\n\n const headOnTargetLane = targetLaneIds\n ? targetLaneIds.searchWithoutVersion(id)?.version\n : await this.getHeadOnMain(componentId);\n\n if (headOnTargetLane) {\n const targetVersionObj = (await this.scope.legacyScope.objects.load(\n Ref.from(headOnTargetLane),\n true\n )) as Version;\n\n if (targetVersionObj.isRemoved()) {\n return null;\n }\n }\n\n const sourceHead = head.toString();\n const targetHead = headOnTargetLane;\n\n return { componentId, sourceHead, targetHead };\n })\n )\n );\n\n const snapDistancesByComponentId = new Map<\n string,\n {\n snapsDistance: SnapsDistance;\n sourceHead: string;\n targetHead?: string;\n componentId: ComponentID;\n }\n >();\n\n this.logger.profile(\n `get snaps distance for source lane: ${sourceLane?.id.name} and target lane: ${targetLane?.id.name} with ${diffProps.length} components`\n );\n let memoHits = 0;\n await pMap(\n diffProps,\n async ({ componentId, sourceHead, targetHead }) => {\n const memoKey = this.laneDiffCache.snapsDistanceKey(componentId, sourceHead, targetHead);\n const cached = this.laneDiffCache.getSnapsDistance(memoKey, componentId.toString());\n let snapsDistance: SnapsDistance | undefined;\n if (cached) {\n memoHits += 1;\n snapsDistance = cached;\n } else {\n const computed = await this.scope.getSnapsDistanceBetweenTwoSnaps(componentId, sourceHead, targetHead, false);\n if (computed) {\n // cache success + the deterministic \"unrelated\" outcome. transient errors stay uncached.\n if (!computed.err || computed.err instanceof NoCommonSnap) {\n this.laneDiffCache.storeSnapsDistance(memoKey, computed);\n }\n snapsDistance = computed;\n }\n }\n if (snapsDistance) {\n snapDistancesByComponentId.set(componentId.toString(), {\n snapsDistance,\n sourceHead,\n targetHead,\n componentId,\n });\n }\n },\n { concurrency: concurrentComponentsLimit() }\n );\n this.logger.profile(\n `get snaps distance for source lane: ${sourceLane?.id.name} and target lane: ${targetLane?.id.name} with ${diffProps.length} components (memo hits: ${memoHits}/${diffProps.length})`\n );\n\n // when `skipUpToDate` is set, drop only components with NO difference vs the target. keep any\n // divergence — crucially `isSourceAhead()` (the lane's own changes): a lane forked from main has no\n // target-only snaps, so `isUpToDate()` (=!isTargetAhead) alone would wrongly hide the whole diff.\n const visibleDiffProps = options?.skipUpToDate\n ? diffProps.filter(({ componentId }) => {\n // `d` may be a memo reconstruction exposing only data + `isUpToDate()`; test source-ahead via\n // `snapsOnSourceOnly.length`, not the `isSourceAhead()` method (absent on the reconstruction).\n const d = snapDistancesByComponentId.get(componentId.toString())?.snapsDistance;\n return !d || (d.snapsOnSourceOnly?.length ?? 0) > 0 || !d.isUpToDate();\n })\n : diffProps;\n\n const commonSnapsToImport = compact(\n visibleDiffProps.map(({ componentId }) => {\n const s = snapDistancesByComponentId.get(componentId.toString());\n return s?.snapsDistance.commonSnapBeforeDiverge\n ? s.componentId.changeVersion(s.snapsDistance.commonSnapBeforeDiverge.hash)\n : null;\n })\n );\n\n const sourceOrTargetLane =\n ((sourceLaneId.isDefault() ? null : (sourceLane as Lane)) ||\n (targetLaneId?.isDefault() ? null : (targetLane as Lane))) ??\n undefined;\n\n if (commonSnapsToImport.length > 0 && !options?.skipChanges && !options?.deferChanges) {\n this.logger.profile(`import common snaps for lane diff (${commonSnapsToImport.length} snaps)`);\n await this.scope.legacyScope.scopeImporter.importWithoutDeps(ComponentIdList.fromArray(commonSnapsToImport), {\n cache: true,\n reason: `get the common snap for lane diff`,\n lane: sourceOrTargetLane,\n });\n this.logger.profile(`import common snaps for lane diff (${commonSnapsToImport.length} snaps)`);\n }\n\n this.logger.profile(`componentDiffStatus pMap (${visibleDiffProps.length} components)`);\n // run in parallel — bounded by `concurrentComponentsLimit()`. previously this was pMapSeries which\n // serialized 30 schema extractions and dominated the cold call (minutes).\n const results = await pMap(\n visibleDiffProps,\n async ({ componentId, sourceHead, targetHead }) => {\n // report whether an existing main base was already local (`workspace`) or pulled from remote (`scope`).\n const baseSource: DiffBaseSource | undefined =\n targetIsMain && targetHead\n ? baseWasLocalByComp.get(componentId.toString())\n ? 'workspace'\n : 'scope'\n : undefined;\n return this.componentDiffStatus(\n componentId,\n sourceHead,\n targetHead,\n snapDistancesByComponentId.get(componentId.toString())?.snapsDistance,\n options,\n baseSource\n );\n },\n { concurrency: concurrentComponentsLimit() }\n );\n this.logger.profile(`componentDiffStatus pMap (${visibleDiffProps.length} components)`);\n\n // best-effort populate the top-level result memo. eagerly resolve `changes` for any deferred\n // components so the next cold call can return immediately — does not block this response.\n if (resultMemoKey) this.populateDiffStatusMemoAsync(resultMemoKey, results);\n\n // Pre-warm caches the lane-compare UI will hit right after this query returns:\n // - `host.getMany([base+compare versioned ids])` populates `ScopeComponentLoader.componentsCache`\n // so the UI's 20 per-component `getHost.get` queries (componentFields + componentFieldWithLogs\n // for each side of each visible pair) all hit cache instead of racing through cold loads.\n // - `componentCompare.compareComponents(pairs)` populates the new compare-result memo so the UI's\n // `CompareComponents` query is answered from cache.\n // Fired *after* we have the answer ready — never blocks the response, catch() hides any failure.\n // Gated to `prewarmCaches` (the UI caller) so CLI/programmatic consumers don't pay & multiply it.\n if (options?.prewarmCaches && visibleDiffProps.length > 0) this.prewarmCompareCaches(host, visibleDiffProps);\n\n this.logger.profile(`diff status for source lane: ${sourceLaneId.name} and target lane: ${targetLaneId?.name}`);\n\n return {\n source: sourceLaneId,\n target: targetLaneId || this.getDefaultLaneId(),\n componentsStatus: results,\n };\n }\n\n private async componentDiffStatus(\n componentId: ComponentID,\n sourceHead: string,\n targetHead?: string,\n snapsDistance?: SnapsDistance,\n options?: LaneDiffStatusOptions,\n baseSource?: DiffBaseSource\n ): Promise<LaneComponentDiffStatus> {\n if (snapsDistance?.err) {\n const noCommonSnap = snapsDistance.err instanceof NoCommonSnap;\n\n return {\n componentId,\n sourceHead,\n targetHead,\n baseSource,\n upToDate: snapsDistance?.isUpToDate(),\n unrelated: noCommonSnap || undefined,\n changes: [],\n };\n }\n\n const commonSnap = snapsDistance?.commonSnapBeforeDiverge;\n\n // when changes are skipped or deferred, return the snap-distance metadata immediately and leave\n // `changes` unset. callers derive them lazily through `deriveComponentChanges` (used by the GraphQL\n // `changes` field resolver, which runs the work per-component in parallel only when the client\n // selects the field — keeps cold p50 under 200 ms even for many components).\n const changes =\n options?.skipChanges || options?.deferChanges\n ? undefined\n : await this.deriveChangeTypes(commonSnap, componentId, sourceHead);\n const changeType = changes ? changes[0] : undefined;\n\n return {\n componentId,\n changeType,\n changes,\n sourceHead,\n targetHead: commonSnap?.hash,\n baseSource,\n upToDate: snapsDistance?.isUpToDate(),\n snapsDistance: {\n onSource: snapsDistance?.snapsOnSourceOnly.map((s) => s.hash) ?? [],\n onTarget: snapsDistance?.snapsOnTargetOnly.map((s) => s.hash) ?? [],\n common: snapsDistance?.commonSnapBeforeDiverge?.hash,\n },\n changesContext: { commonSnap, skipped: options?.skipChanges },\n };\n }\n\n /**\n * Lazily derive the change types for a single component diff status. Used by the GraphQL `changes`\n * field resolver so the (expensive) derivation only runs when the field is selected. Memoized per\n * status object via `changesContext.pending`, so selecting both `changes` and `changeType` computes\n * the value once.\n */\n async deriveComponentChanges(status: LaneComponentDiffStatus): Promise<ChangeType[] | undefined> {\n if (status.changes) return status.changes;\n const context = status.changesContext;\n if (!context || context.skipped) return undefined;\n\n await this.laneDiffCache.ensureLoaded();\n\n // top-level memo on the final ChangeType[] — short-circuits BEFORE compare()/getAPIDiff() run.\n // Persisted to disk, keyed on immutable hashes, so a cold server start with a populated cache\n // answers the entire derivation from a Map.get().\n const memoKey = this.laneDiffCache.changeTypesKey(\n status.componentId,\n status.sourceHead,\n context.commonSnap?.hash ?? null\n );\n const cached = this.laneDiffCache.getChangeTypes(memoKey);\n if (cached) return cached;\n\n // single-flight concurrent requests for the same (componentId, sourceHead, commonSnap) tuple.\n let pending = this.changeTypesInflight.get(memoKey);\n if (!pending) {\n pending = this.deriveChangesLimit(() =>\n this.deriveChangeTypes(context.commonSnap, status.componentId, status.sourceHead)\n )\n .then((result) => {\n // `undefined` means the derivation couldn't load a Version object (transient) — don't persist\n // it under the immutable-hash key; let it recompute on a later request once the object exists.\n if (result) this.laneDiffCache.storeChangeTypes(memoKey, result);\n return result;\n })\n .finally(() => {\n this.changeTypesInflight.delete(memoKey);\n });\n this.changeTypesInflight.set(memoKey, pending);\n }\n context.pending = pending;\n return pending;\n }\n\n private async deriveChangeTypes(\n commonSnap: { hash: string } | null | undefined,\n componentId: ComponentID,\n sourceHead: string\n ): Promise<ChangeType[] | undefined> {\n if (!commonSnap) return [ChangeType.NEW];\n\n // Classify changes by comparing the two raw `Version` objects directly (files-by-hash, deps,\n // extensions) instead of `componentCompare.compare()`. compare() loads full consumer components\n // (aspect calculation, capsules) for both sides just to extract two booleans — dominating the cold\n // derivation for a large lane. Loading the raw Version objects is a cheap object read.\n // The API change type is intentionally not computed here: it needs serial tsserver schema\n // extraction and is resolved lazily by the API view, gated on the SOURCE_CODE/DEPENDENCY evidence.\n const repo = this.scope.legacyScope.objects;\n const loadPair = () =>\n Promise.all([repo.load(Ref.from(commonSnap.hash), false), repo.load(Ref.from(sourceHead), false)]) as Promise<\n [Version | undefined, Version | undefined]\n >;\n let [baseVersion, compareVersion] = await loadPair();\n\n // the deferChanges path (the default for UI lane compares) skips the eager common-snap import, so\n // the merge-base Version can be absent locally here. rather than give up — which classifies a\n // genuinely-changed component as \"couldn't classify\" and drops it from the diff views — import the\n // missing snap(s) on demand and retry once. this fires only on a miss and is per-component, so the\n // fast deferred path stays fast while staying correct; the derived result is memoized afterwards.\n if (!baseVersion || !compareVersion) {\n const missing: ComponentID[] = [];\n if (!baseVersion) missing.push(componentId.changeVersion(commonSnap.hash));\n if (!compareVersion) missing.push(componentId.changeVersion(sourceHead));\n try {\n await this.scope.legacyScope.scopeImporter.importWithoutDeps(ComponentIdList.fromArray(missing), {\n cache: true,\n ignoreMissingHead: true,\n reason: `derive lane diff change types (snap missing locally)`,\n });\n [baseVersion, compareVersion] = await loadPair();\n } catch {\n // best-effort: if the import fails (e.g. the snap only exists on a lane we lack context for here),\n // fall through to the undefined return below rather than throwing out of the field resolver.\n }\n }\n\n // still couldn't load a Version. this is a transient \"couldn't classify\", NOT \"no changes\"\n // ([ChangeType.NONE]) — return undefined so it's distinguishable and never persisted to the\n // immutable-hash-keyed memo, or the component would be reported with no change types forever.\n if (!baseVersion || !compareVersion) return undefined;\n\n // pure classification of the two raw Version shapes — extracted & unit-tested in lanes/diff.\n return classifyVersionChanges(\n { obj: baseVersion.toObject(), extensionDependencies: baseVersion.extensionDependencies.cloneAsString() },\n { obj: compareVersion.toObject(), extensionDependencies: compareVersion.extensionDependencies.cloneAsString() }\n );\n }\n\n private async recreateNewLaneIfDeleted() {\n if (!this.workspace) return;\n const laneId = this.getCurrentLaneId();\n if (!laneId || laneId.isDefault() || this.workspace.consumer.bitMap.isLaneExported) {\n return;\n }\n const laneObj = await this.scope.legacyScope.getCurrentLaneObject();\n if (laneObj) {\n return;\n }\n await this.createLane(laneId.name, { scope: laneId.scope });\n }\n\n /**\n * if the local lane was forked from another lane, this gets the differences between the two.\n * it also fetches the original lane from the remote to make sure the data is up to date.\n */\n async listUpdatesFromForked(componentsList: ComponentsList): Promise<DivergeDataPerId[]> {\n const consumer = this.workspace?.consumer;\n if (!consumer) throw new Error(`unable to get listUpdatesFromForked outside of a workspace`);\n if (consumer.isOnMain()) {\n return [];\n }\n const lane = await consumer.getCurrentLaneObject();\n const forkedFromLaneId = lane?.forkedFrom;\n if (!forkedFromLaneId) {\n return [];\n }\n const forkedFromLane = await consumer.scope.loadLane(forkedFromLaneId);\n if (!forkedFromLane) return []; // should we fetch it here?\n\n const workspaceIds = consumer.bitMap.getAllBitIds();\n\n const duringMergeIds = componentsList.listDuringMergeStateComponents();\n\n const componentsFromModel = await componentsList.getModelComponents();\n const compFromModelOnWorkspace = componentsFromModel\n .filter((c) => workspaceIds.hasWithoutVersion(c.toComponentId()))\n // if a component is merge-pending, it needs to be resolved first before getting more updates from main\n .filter((c) => !duringMergeIds.hasWithoutVersion(c.toComponentId()));\n\n // by default, when on a lane, forked is not fetched. we need to fetch it to get the latest updates.\n await this.fetchLaneWithItsComponents(forkedFromLaneId);\n\n const remoteForkedLane = await consumer.scope.objects.remoteLanes.getRemoteLane(forkedFromLaneId);\n if (!remoteForkedLane.length) return [];\n\n const results = await Promise.all(\n compFromModelOnWorkspace.map(async (modelComponent) => {\n const headOnForked = remoteForkedLane.find((c) => c.id.isEqualWithoutVersion(modelComponent.toComponentId()));\n const headOnLane = modelComponent.laneHeadLocal;\n if (!headOnForked || !headOnLane) return undefined;\n const divergeData = await getDivergeData({\n repo: consumer.scope.objects,\n modelComponent,\n targetHead: headOnForked.head,\n sourceHead: headOnLane,\n throws: false,\n });\n if (!divergeData.snapsOnTargetOnly.length && !divergeData.err) return undefined;\n return { id: modelComponent.toComponentId(), divergeData };\n })\n );\n\n return compact(results);\n }\n\n /**\n * list components on a lane that their main got updates.\n */\n async listUpdatesFromMainPending(componentsList: ComponentsList): Promise<DivergeDataPerId[]> {\n const consumer = this.workspace?.consumer;\n if (!consumer) throw new Error(`unable to get listUpdatesFromForked outside of a workspace`);\n if (consumer.isOnMain()) {\n return [];\n }\n const allIds = consumer.bitMap.getAllBitIds();\n\n const duringMergeIds = componentsList.listDuringMergeStateComponents();\n\n const componentsFromModel = await componentsList.getModelComponents();\n const compFromModelOnWorkspace = componentsFromModel\n .filter((c) => allIds.hasWithoutVersion(c.toComponentId()))\n // if a component is merge-pending, it needs to be resolved first before getting more updates from main\n .filter((c) => !duringMergeIds.hasWithoutVersion(c.toComponentId()));\n\n // by default, when on a lane, main is not fetched. we need to fetch it to get the latest updates.\n await consumer.scope.scopeImporter.importWithoutDeps(\n ComponentIdList.fromArray(compFromModelOnWorkspace.map((c) => c.toComponentId())),\n {\n cache: false,\n includeVersionHistory: true,\n ignoreMissingHead: true,\n reason: 'main components of the current lane to check for updates',\n }\n );\n const results = await Promise.all(\n compFromModelOnWorkspace.map(async (modelComponent) => {\n const headOnMain = modelComponent.head;\n if (!headOnMain) return undefined;\n const checkedOutVersion = allIds.searchWithoutVersion(modelComponent.toComponentId())?.version;\n if (!checkedOutVersion) {\n throw new Error(\n `listUpdatesFromMainPending: unable to find ${modelComponent.toComponentId()} in the workspace`\n );\n }\n const headOnLane = modelComponent.getRef(checkedOutVersion);\n\n const divergeData = await getDivergeData({\n repo: consumer.scope.objects,\n modelComponent,\n targetHead: headOnMain,\n sourceHead: headOnLane,\n throws: false,\n });\n if (!divergeData.snapsOnTargetOnly.length && !divergeData.err) return undefined;\n return { id: modelComponent.toComponentId(), divergeData };\n })\n );\n\n return compact(results);\n }\n\n /**\n * the dependents Ripple CI cascaded onto a lane (hidden `lane.updateDependents` entries).\n * the cascade producer runs on the remote, so the remote lane is the source of truth. the local lane\n * object is used only when the remote lane can't be fetched (e.g. the lane was never exported).\n */\n async getLaneUpdateDependents(laneId: LaneId): Promise<LaneUpdateDependentsResult> {\n let remoteError: Error | undefined;\n const remoteLane = this.isLaneLocalOnly(laneId)\n ? undefined\n : await this.importLaneObject(laneId, false).catch((err: Error) => {\n remoteError = err;\n return undefined;\n });\n if (remoteLane) {\n return { laneId, ids: remoteLane.updateDependents || [], source: 'remote' };\n }\n const localLane = await this.loadLane(laneId);\n if (!localLane) {\n const reason = remoteError ? `, and fetching it from the remote failed: ${remoteError.message}` : '';\n throw new BitError(`lane \"${laneId.toString()}\" was not found locally${reason}`);\n }\n // no error means no fetch was attempted, i.e. the lane is local-only. LaneNotFound means the same\n // thing from the remote's side: either way the remote has no lane to be the source of truth.\n const source = !remoteError || remoteError instanceof LaneNotFound ? 'no-remote-lane' : 'remote-unavailable';\n return { laneId, ids: localLane.updateDependents || [], source, remoteError: remoteError?.message };\n }\n\n /**\n * remove the dependents Ripple CI cascaded onto a lane.\n * exporting a lane never removes hidden entries from the remote (the remote-side merge walks the\n * incoming entries only), so the removal is done directly on the remote, the same way the cloud UI\n * does. the local lane object is updated as well so it doesn't keep stale entries until the next\n * import. a lane that was never exported is changed locally only.\n */\n async undoLaneUpdateDependents(laneId: LaneId, ids?: ComponentID[]): Promise<UndoLaneUpdateDependentsResult> {\n const current = await this.getLaneUpdateDependents(laneId);\n if (current.source === 'remote-unavailable') {\n // the remote is the source of truth for these entries. removing them locally while the remote keeps\n // them would only be reverted by the next import, so fail instead of pretending it worked.\n throw new BitError(\n `unable to undo the cascaded updates of lane \"${laneId.toString()}\": the remote lane could not be fetched (${current.remoteError}). the remote is the source of truth for these entries, retry when it's reachable`\n );\n }\n // the remote has no such lane, so there's nothing to remove there: change the local lane only\n const remoteSkipped = current.source === 'no-remote-lane';\n const removed = ids?.length\n ? current.ids.filter((id) => ids.some((toRemove) => toRemove.isEqualWithoutVersion(id)))\n : current.ids;\n if (!removed.length) {\n // nothing left to remove on the remote, but the local lane can still hold entries the remote already\n // dropped - e.g. an earlier undo whose local save failed after the remote removal succeeded. reconcile\n // them here so retrying the command fixes it, instead of the stale entries lingering until the next import.\n const localChanged = remoteSkipped ? false : await this.pruneStaleUpdateDependents(laneId, current.ids);\n return { laneId, removed, remoteChanged: false, localChanged, remoteSkipped };\n }\n // remove exactly the resolved entries, on the remote and locally. this keeps local-only entries (e.g. a\n // workspace cascade that wasn't exported yet) intact instead of wiping them with a remove-all.\n const removedIdsStr = removed.map((id) => id.toString());\n let remoteChanged = false;\n if (!remoteSkipped) {\n const remote = await getRemoteByName(laneId.scope, this.workspace?.consumer);\n remoteChanged = await remote.removeLaneUpdateDependents(laneId.toString(), removedIdsStr);\n }\n const localLane = await this.loadLane(laneId);\n // the local removal matches by component-id and not by the full versioned id on purpose. when a local\n // cascade moved ahead of the remote, that entry is still for a component the user just undid: it can't\n // be exported (the remote refuses new hidden entries without the override flag) and the next import\n // prunes it anyway. keeping it would leave a hidden entry that \"bit lane updates\" no longer reports.\n const localChanged = localLane ? await this.removeUpdateDependents(laneId, removed) : false;\n return { laneId, removed, remoteChanged, localChanged, remoteSkipped };\n }\n\n /**\n * remove local hidden entries whose component-id is absent from `remoteIds`, i.e. entries the remote has\n * already dropped. matches by component-id and not by version, the same rule the import-side reconciliation\n * in the lane merge uses, so a local cascade that only moved ahead of the remote survives.\n * returns true if the local lane has changed.\n */\n private async pruneStaleUpdateDependents(laneId: LaneId, remoteIds: ComponentID[]): Promise<boolean> {\n const localLane = await this.loadLane(laneId);\n const localIds = localLane?.updateDependents;\n if (!localIds?.length) return false;\n const stale = localIds.filter((id) => !remoteIds.some((remoteId) => remoteId.isEqualWithoutVersion(id)));\n if (!stale.length) return false;\n return this.removeUpdateDependents(laneId, stale);\n }\n\n /**\n * true when `laneId` is the current lane and it was never exported, i.e. it doesn't exist on the remote yet.\n */\n private isLaneLocalOnly(laneId: LaneId): boolean {\n if (!this.workspace) return false;\n const currentLaneId = this.getCurrentLaneId();\n if (!currentLaneId?.isEqual(laneId)) return false;\n return !this.workspace.consumer.bitMap.isLaneExported;\n }\n\n /**\n * default to remove all of them.\n * returns true if the lane has changed\n */\n removeUpdateDependents(laneId: LaneId, ids?: ComponentID[]): Promise<boolean> {\n return this.scope.legacyScope.lanes.removeUpdateDependents(laneId, ids);\n }\n\n private async getLaneDataOfDefaultLane(): Promise<LaneData | null> {\n const consumer = this.workspace?.consumer;\n let bitIds: ComponentID[] = [];\n if (!consumer) {\n const scopeComponents = await this.scope.list();\n bitIds = scopeComponents.filter((component) => component.head).map((component) => component.id);\n } else {\n bitIds = await consumer.getIdsOfDefaultLane();\n }\n\n return {\n name: DEFAULT_LANE,\n remote: null,\n id: this.getDefaultLaneId(),\n components: bitIds.map((bitId) => ({ id: bitId, head: bitId.version as string })),\n isMerged: null,\n hash: '',\n };\n }\n\n get createRoutePath() {\n return '/lanes/create';\n }\n\n get deleteRoutePath() {\n return '/lanes/delete';\n }\n\n get restoreRoutePath() {\n return '/lanes/restore';\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n ScopeAspect,\n WorkspaceAspect,\n GraphqlAspect,\n MergingAspect,\n ComponentAspect,\n LoggerAspect,\n ImporterAspect,\n ExportAspect,\n ExpressAspect,\n ComponentCompareAspect,\n ComponentWriterAspect,\n RemoveAspect,\n CheckoutAspect,\n InstallAspect,\n ];\n static runtime = MainRuntime;\n static async provider([\n cli,\n scope,\n workspace,\n graphql,\n merging,\n component,\n loggerMain,\n importer,\n exporter,\n express,\n componentCompare,\n componentWriter,\n remove,\n checkout,\n install,\n ]: [\n CLIMain,\n ScopeMain,\n Workspace,\n GraphqlMain,\n MergingMain,\n ComponentMain,\n LoggerMain,\n ImporterMain,\n ExportMain,\n ExpressMain,\n ComponentCompareMain,\n ComponentWriterMain,\n RemoveMain,\n CheckoutMain,\n InstallMain,\n ]) {\n const logger = loggerMain.createLogger(LanesAspect.id);\n const lanesMain = new LanesMain(\n workspace,\n scope,\n merging,\n component,\n logger,\n importer,\n exporter,\n componentCompare,\n componentWriter,\n remove,\n checkout,\n install\n );\n const switchCmd = new SwitchCmd(lanesMain);\n const fetchCmd = new FetchCmd(importer);\n const laneCmd = new LaneCmd(lanesMain, workspace, scope);\n laneCmd.commands = [\n new LaneListCmd(lanesMain, workspace, scope),\n switchCmd,\n new LaneShowCmd(lanesMain, workspace, scope),\n new LaneCreateCmd(lanesMain),\n new LaneRemoveCmd(lanesMain),\n new LaneChangeScopeCmd(lanesMain),\n new LaneAliasCmd(lanesMain),\n new LaneRenameCmd(lanesMain),\n new LaneDiffCmd(workspace, scope, componentCompare),\n new LaneRemoveReadmeCmd(lanesMain),\n new LaneImportCmd(switchCmd, lanesMain),\n new LaneRemoveCompCmd(workspace, lanesMain),\n new LaneFetchCmd(fetchCmd, lanesMain),\n new LaneEjectCmd(lanesMain),\n ];\n laneCmd.commands.push(new LaneCurrentCmd(lanesMain));\n laneCmd.commands.push(new LaneHistoryCmd(lanesMain));\n laneCmd.commands.push(new LaneHistoryDiffCmd(lanesMain, workspace, scope, componentCompare));\n laneCmd.commands.push(new LaneCheckoutCmd(lanesMain));\n laneCmd.commands.push(new LaneRevertCmd(lanesMain));\n laneCmd.commands.push(new LaneUpdatesCmd(lanesMain));\n cli.register(laneCmd, switchCmd, new CatLaneHistoryCmd(lanesMain));\n cli.registerOnStart(async () => {\n await lanesMain.recreateNewLaneIfDeleted();\n });\n graphql.register(() => lanesSchema(lanesMain));\n express.register([\n new LanesCreateRoute(lanesMain, logger),\n new LanesDeleteRoute(lanesMain, logger),\n new LanesRestoreRoute(lanesMain, logger),\n ]);\n return lanesMain;\n }\n}\n\nLanesAspect.addRuntime(LanesMain);\n\nexport default LanesMain;\n"],"mappings":";;;;;;;;;;;;AAEA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,KAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAH,OAAA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AAS,CAAC,CAAC;IAClEL,GAAG,CAACkC,eAAe,CAAC,YAAY;MAC9B,MAAM7B,SAAS,CAACnE,wBAAwB,CAAC,CAAC;IAC5C,CAAC,CAAC;IACF+D,OAAO,CAAC+B,QAAQ,CAAC,MAAM,IAAAG,qBAAW,EAAC9B,SAAS,CAAC,CAAC;IAC9CF,OAAO,CAAC6B,QAAQ,CAAC,CACf,KAAII,+BAAgB,EAAC/B,SAAS,EAAE9c,MAAM,CAAC,EACvC,KAAI8e,+BAAgB,EAAChC,SAAS,EAAE9c,MAAM,CAAC,EACvC,KAAI+e,iCAAiB,EAACjC,SAAS,EAAE9c,MAAM,CAAC,CACzC,CAAC;IACF,OAAO8c,SAAS;EAClB;AACF;AAACkC,OAAA,CAAAtf,SAAA,GAAAA,SAAA;AAAAhB,eAAA,CA3gDYgB,SAAS,WAm6CL,EAAE;AAAAhB,eAAA,CAn6CNgB,SAAS,kBAo6CE,CACpBuf,gBAAS,EACTC,oBAAW,EACXC,4BAAe,EACfC,wBAAa,EACbC,wBAAa,EACbC,4BAAe,EACfC,sBAAY,EACZC,0BAAc,EACdC,sBAAY,EACZC,wBAAa,EACbC,0CAAsB,EACtBC,wCAAqB,EACrBC,sBAAY,EACZC,0BAAc,EACdC,wBAAa,CACd;AAAArhB,eAAA,CAp7CUgB,SAAS,aAq7CHsgB,6BAAW;AAwF9BrN,oBAAW,CAACsN,UAAU,CAACvgB,SAAS,CAAC;AAAC,IAAAwgB,QAAA,GAAAlB,OAAA,CAAAvhB,OAAA,GAEnBiC,SAAS","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.lanes_lanes@1.0.1270/dist/lanes.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.lanes_lanes@1.0.1270/dist/lanes.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.lanes_lanes@1.0.1271/dist/lanes.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.lanes_lanes@1.0.1271/dist/lanes.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/lanes",
3
- "version": "1.0.1270",
3
+ "version": "1.0.1271",
4
4
  "homepage": "https://bit.cloud/teambit/lanes/lanes",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.lanes",
8
8
  "name": "lanes",
9
- "version": "1.0.1270"
9
+ "version": "1.0.1271"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "4.1.2",
@@ -23,28 +23,36 @@
23
23
  "@teambit/bit-error": "0.0.404",
24
24
  "@teambit/cli": "0.0.1420",
25
25
  "@teambit/component.modules.merge-helper": "0.0.133",
26
+ "@teambit/importer": "1.0.1244",
26
27
  "@teambit/lane-id": "0.0.312",
27
28
  "@teambit/legacy.constants": "0.0.50",
28
29
  "@teambit/legacy.scope": "0.0.189",
30
+ "@teambit/scope": "1.0.1244",
31
+ "@teambit/workspace": "1.0.1244",
29
32
  "@teambit/harmony": "0.4.12",
30
33
  "@teambit/express": "0.0.1506",
31
34
  "@teambit/logger": "0.0.1500",
32
35
  "@teambit/component-id": "1.2.5",
33
36
  "@teambit/graphql": "1.0.1207",
37
+ "@teambit/component-compare": "1.0.1244",
38
+ "@teambit/component-writer": "1.0.1244",
34
39
  "@teambit/component.snap-distance": "0.0.190",
35
40
  "@teambit/component": "1.0.1230",
41
+ "@teambit/export": "1.0.1246",
36
42
  "@teambit/git.modules.git-executable": "0.0.51",
37
43
  "@teambit/harmony.modules.concurrency": "0.0.51",
38
44
  "@teambit/harmony.modules.runtimes": "0.0.4",
45
+ "@teambit/install": "1.0.1244",
39
46
  "@teambit/lanes.entities.lane-diff": "0.0.206",
40
- "@teambit/lanes.modules.create-lane": "0.0.225",
41
47
  "@teambit/lanes.modules.diff": "0.0.696",
42
48
  "@teambit/legacy-bit-id": "1.1.4",
43
49
  "@teambit/legacy.component-diff": "0.0.245",
44
50
  "@teambit/legacy.component-list": "0.0.243",
45
51
  "@teambit/legacy.scope-api": "0.0.244",
46
52
  "@teambit/objects": "0.0.723",
53
+ "@teambit/remove": "1.0.1244",
47
54
  "@teambit/scope.remotes": "0.0.189",
55
+ "@teambit/command-bar": "1.0.1244",
48
56
  "@teambit/component.ui.component-compare.models.component-compare-props": "0.0.147",
49
57
  "@teambit/design.ui.pages.not-found": "0.0.371",
50
58
  "@teambit/lanes.hooks.use-lanes": "0.0.300",
@@ -59,20 +67,12 @@
59
67
  "@teambit/ui-foundation.ui.menu": "0.0.503",
60
68
  "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.533",
61
69
  "@teambit/ui-foundation.ui.react-router.use-query": "0.0.505",
70
+ "@teambit/ui": "1.0.1244",
62
71
  "@teambit/legacy.consumer": "0.0.189",
63
72
  "@teambit/scope.network": "0.0.189",
64
- "@teambit/checkout": "1.0.1249",
65
- "@teambit/importer": "1.0.1244",
66
- "@teambit/scope": "1.0.1244",
67
- "@teambit/workspace": "1.0.1244",
68
- "@teambit/component-compare": "1.0.1244",
69
- "@teambit/component-writer": "1.0.1244",
70
- "@teambit/export": "1.0.1246",
71
- "@teambit/install": "1.0.1244",
72
- "@teambit/merging": "1.0.1251",
73
- "@teambit/remove": "1.0.1244",
74
- "@teambit/command-bar": "1.0.1244",
75
- "@teambit/ui": "1.0.1244"
73
+ "@teambit/checkout": "1.0.1250",
74
+ "@teambit/lanes.modules.create-lane": "0.0.226",
75
+ "@teambit/merging": "1.0.1252"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@types/lodash": "4.14.165",
@@ -82,7 +82,7 @@
82
82
  "@teambit/harmony.testing.load-aspect": "0.0.459",
83
83
  "@teambit/workspace.testing.mock-workspace": "0.0.273",
84
84
  "@teambit/harmony.envs.core-aspect-env": "2.1.2",
85
- "@teambit/snapping": "1.0.1247"
85
+ "@teambit/snapping": "1.0.1248"
86
86
  },
87
87
  "peerDependencies": {
88
88
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0",