@teambit/lanes 0.0.700 → 0.0.702

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
@@ -353,12 +353,11 @@ and then after snap+export, the remote-lane gets updated as well. upon lane-merg
353
353
  in case the components are not part of the lane or the lane is new, it simply removes the components from the workspace`);
354
354
  (0, _defineProperty2().default)(this, "group", 'collaborate');
355
355
  (0, _defineProperty2().default)(this, "alias", 'rc');
356
- (0, _defineProperty2().default)(this, "options", [['', 'workspace-only', 'do not mark the components as removed. instead, remove them from the workspace only'], ['', 'update-main', 'NOT IMPLEMENTED YET. mark as removed on main after merging this lane into main']]);
356
+ (0, _defineProperty2().default)(this, "options", [['', 'workspace-only', 'do not mark the components as removed. instead, remove them from the workspace only'], ['', 'update-main', 'EXPERIMENTAL. mark as removed on main after merging this lane into main']]);
357
357
  (0, _defineProperty2().default)(this, "loader", true);
358
358
  (0, _defineProperty2().default)(this, "migration", true);
359
359
  }
360
360
  async report([componentsPattern], removeCompsOpts) {
361
- if (removeCompsOpts.updateMain) throw new Error('not implemented yet');
362
361
  if (!this.workspace) throw new (_workspace().OutsideWorkspaceError)();
363
362
  if (this.workspace.isOnMain()) {
364
363
  throw new Error(`error: you're checked out to main, please use "bit remove" instead`);
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_yn","_laneId","_workspace","_bitError","_prompts","_constants","LaneListCmd","constructor","lanes","workspace","scope","_defineProperty2","default","report","args","laneOptions","details","remote","merged","notMerged","laneIdStr","laneId","alias","isDefault","name","toString","getLanes","showDefaultLane","mergedLanes","filter","l","isMerged","length","chalk","green","map","m","join","unmergedLanes","currentLane","getCurrentLaneId","getDefaultLaneId","laneDataOfCurrentLane","find","isEqual","id","undefined","currentAlias","currentLaneReadmeComponentStr","outputReadmeComponent","readmeComponent","currentLaneStr","currentLaneComponents","outputComponents","components","availableLanes","laneData","readmeComponentStr","laneTitle","bold","concat","outputFooter","footer","outputCurrentLane","outputAvailableLanes","json","getCurrentLaneNameOrAlias","exports","LaneShowCmd","_onlyLane$log","_onlyLane$log2","_onlyLane$log3","getCurrentLaneName","DEFAULT_LANE","Error","parseLaneId","onlyLane","title","author","log","username","email","date","Date","parseInt","toLocaleString","LaneCreateCmd","description","createLaneOptions","getCurrentLane","remoteScope","result","createLane","remoteScopeOrDefaultScope","yellow","remoteScopeOutput","LaneAliasCmd","laneName","aliasLane","LaneChangeScopeCmd","localName","remoteScopeBefore","changeScope","LaneRenameCmd","currentName","newName","exported","exportErr","rename","exportedStr","message","LaneRemoveCmd","names","force","silent","removePromptResult","approveOperation","yn","shouldProceed","BitError","laneResults","removeLanes","LaneRemoveCompCmd","COMPONENT_PATTERN_HELP","componentsPattern","removeCompsOpts","updateMain","OutsideWorkspaceError","isOnMain","removedFromWs","markedRemoved","removeComps","getMarkedRemovedStr","getRemovedFromWsStr","LaneImportCmd","switchCmd","lane","skipDependencyInstallation","pattern","getAll","LaneCmd","LaneRemoveReadmeCmd","removeLaneReadme","red","LaneAddReadmeCmd","componentId","addLaneReadme","componentsTitle","componentsStr","c","head","component"],"sources":["lane.cmd.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport chalk from 'chalk';\nimport yn from 'yn';\nimport { ScopeMain } from '@teambit/scope';\nimport { DEFAULT_LANE, LaneId } from '@teambit/lane-id';\nimport { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { LaneData } from '@teambit/legacy/dist/scope/lanes/lanes';\nimport { BitError } from '@teambit/bit-error';\nimport { approveOperation } from '@teambit/legacy/dist/prompts';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { CreateLaneOptions, LanesMain } from './lanes.main.runtime';\nimport { SwitchCmd } from './switch.cmd';\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 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 remote lanes'],\n ['', 'merged', 'show merged lanes'],\n ['', 'not-merged', 'show lanes that are not merged'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n skipWorkspace = true;\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report(args, laneOptions: LaneOptions): Promise<string> {\n const { details, remote, merged, notMerged } = laneOptions;\n const laneIdStr = (laneId: LaneId, alias?: string | null) => {\n if (laneId.isDefault()) return laneId.name;\n if (alias) return `${laneId.toString()} (${alias})`;\n return laneId.toString();\n };\n const lanes = await this.lanes.getLanes({\n remote,\n merged,\n notMerged,\n showDefaultLane: true,\n });\n if (merged) {\n const mergedLanes = lanes.filter((l) => l.isMerged);\n if (!mergedLanes.length) return chalk.green('None of the lanes is merged');\n return chalk.green(mergedLanes.map((m) => m.name).join('\\n'));\n }\n if (notMerged) {\n const unmergedLanes = lanes.filter((l) => !l.isMerged);\n if (!unmergedLanes.length) return chalk.green('All lanes are merged');\n return chalk.green(unmergedLanes.map((m) => m.name).join('\\n'));\n }\n const currentLane = this.lanes.getCurrentLaneId() || this.lanes.getDefaultLaneId();\n const laneDataOfCurrentLane = currentLane ? lanes.find((l) => currentLane.isEqual(l.id)) : undefined;\n const currentAlias = laneDataOfCurrentLane ? laneDataOfCurrentLane.alias : undefined;\n const currentLaneReadmeComponentStr = outputReadmeComponent(laneDataOfCurrentLane?.readmeComponent);\n let currentLaneStr = `current lane - ${chalk.green.green(laneIdStr(currentLane, currentAlias))}`;\n currentLaneStr += currentLaneReadmeComponentStr;\n\n if (details) {\n const currentLaneComponents = laneDataOfCurrentLane ? outputComponents(laneDataOfCurrentLane.components) : '';\n if (currentLaneStr) {\n currentLaneStr += `\\n${currentLaneComponents}`;\n }\n }\n\n const availableLanes = lanes\n .filter((l) => !currentLane.isEqual(l.id))\n .map((laneData) => {\n const readmeComponentStr = outputReadmeComponent(laneData.readmeComponent);\n if (details) {\n const laneTitle = `> ${chalk.bold(laneIdStr(laneData.id, laneData.alias))}\\n`;\n const components = outputComponents(laneData.components);\n return laneTitle + readmeComponentStr.concat('\\n') + components;\n }\n return ` > ${chalk.green(laneIdStr(laneData.id, laneData.alias))} (${\n laneData.components.length\n } components)${readmeComponentStr}`;\n })\n .join('\\n');\n\n const outputFooter = () => {\n let footer = '\\n';\n if (details) {\n footer += 'You can use --merged and --not-merged to see which of the lanes is fully merged.';\n } else {\n footer +=\n \"to get more info on all lanes in workspace use 'bit lane list --details' or 'bit lane show <lane-name>' for a specific lane.\";\n }\n if (!remote && this.workspace) footer += `\\nswitch lanes using 'bit switch <name>'.`;\n\n return footer;\n };\n\n return outputCurrentLane() + outputAvailableLanes() + outputFooter();\n\n function outputCurrentLane() {\n return currentLaneStr ? `${currentLaneStr}\\n` : '';\n }\n\n function outputAvailableLanes() {\n if (!availableLanes) return '';\n return remote ? `${availableLanes}\\n` : `\\nAvailable lanes:\\n${availableLanes}\\n`;\n }\n }\n async json(args, laneOptions: LaneOptions) {\n const { remote, merged = false, notMerged = false } = laneOptions;\n\n const lanes = await this.lanes.getLanes({\n remote,\n showDefaultLane: true,\n merged,\n notMerged,\n });\n const currentLane = this.lanes.getCurrentLaneNameOrAlias();\n return { lanes, currentLane };\n }\n}\n\nexport class LaneShowCmd implements Command {\n name = 'show [lane-name]';\n description = `show lane details. if no lane specified, show the current lane`;\n alias = '';\n options = [\n ['j', 'json', 'show the lane details in json format'],\n ['r', 'remote', 'show the lane from remote'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n skipWorkspace = true;\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report([name]: [string], laneOptions: LaneOptions): Promise<string> {\n const { remote } = laneOptions;\n\n if (!name) {\n name = this.lanes.getCurrentLaneName() || DEFAULT_LANE;\n }\n\n if (!name && remote) {\n throw new Error('remote flag is not supported without lane name');\n }\n\n const laneId = await this.lanes.parseLaneId(name);\n\n const lanes = await this.lanes.getLanes({\n name: laneId.name,\n remote: remote ? laneId.scope : undefined,\n });\n\n const onlyLane = lanes[0];\n const title = `showing information for ${chalk.bold(onlyLane.id.toString())}\\n`;\n const author = `author: ${onlyLane.log?.username || 'N/A'} <${onlyLane.log?.email || 'N/A'}>\\n`;\n const date = onlyLane.log?.date\n ? `created: ${new Date(parseInt(onlyLane.log.date)).toLocaleString()}\\n`\n : undefined;\n return title + author + date + outputComponents(onlyLane.components);\n }\n\n async json([name]: [string], laneOptions: LaneOptions) {\n const { remote } = laneOptions;\n\n const lanes = await this.lanes.getLanes({\n name,\n remote,\n });\n\n return 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 has all the components of the original lane.`;\n alias = '';\n options = [\n [\n 's',\n 'scope <scope-name>',\n 'remote scope where this lane will be exported to, default to the defaultScope (can be changed later 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 ['', 'fork-lane-new-scope', 'allow forking a lane into a different scope than the original lane'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([name]: [string], createLaneOptions: CreateLaneOptions & { remoteScope?: string }): Promise<string> {\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 )}. to change it, please run \"bit lane change-scope\" command`;\n const title = chalk.green(\n `successfully added and checked out to a new lane ${chalk.bold(result.alias || result.laneId.name)}\n ${currentLane !== null ? chalk.yellow(`\\nnote - your new lane will be based on lane ${currentLane.name}`) : ''}\n `\n );\n const remoteScopeOutput = `this lane will be exported to ${remoteScopeOrDefaultScope}`;\n return `${title}\\n${remoteScopeOutput}`;\n }\n}\n\nexport class LaneAliasCmd implements Command {\n name = 'alias <lane-name> <alias>';\n description = 'adds an alias to a lane';\n extendedDescription = `an alias is a name that can be used to refer to a lane. it is saved locally and never reach the remote.\nit is useful when having multiple lanes with the same name, but with different remote scopes.`;\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = 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)} to the lane ${chalk.bold(laneId.toString())}`;\n }\n}\n\nexport class LaneChangeScopeCmd implements Command {\n name = 'change-scope <lane-name> <remote-scope-name>';\n description = `changes the remote scope of a lane`;\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([localName, remoteScope]: [string, string]): Promise<string> {\n const { remoteScopeBefore } = await this.lanes.changeScope(localName, remoteScope);\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 <current-name> <new-name>';\n description = `EXPERIMENTAL. change the lane-name locally and on the remote (if exported)`;\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = true;\n constructor(private lanes: LanesMain) {}\n\n async report([currentName, newName]: [string, string]): Promise<string> {\n const { exported, exportErr } = await this.lanes.rename(currentName, newName);\n const exportedStr = exported\n ? `and have been exported successfully to the remote`\n : `however if failed to export the renamed lane to the remote, due to an error: ${\n exportErr?.message || 'unknown'\n }`;\n return `the lane ${chalk.bold(currentName)} has been changed to ${chalk.bold(newName)}, ${exportedStr}`;\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 lanes`;\n group = 'collaborate';\n alias = '';\n options = [\n ['r', 'remote', 'remove a remote lane (in the lane arg, use remote/lane-id syntax)'],\n ['f', 'force', 'removes the lane even when the lane was not merged yet'],\n ['s', 'silent', 'skip confirmation'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report(\n [names]: [string[]],\n {\n remote = false,\n force = false,\n silent = false,\n }: {\n remote: boolean;\n force: boolean;\n silent: boolean;\n }\n ): Promise<string> {\n if (!silent) {\n const removePromptResult = await approveOperation();\n // @ts-ignore\n if (!yn(removePromptResult.shouldProceed)) {\n throw new BitError('the operation has been canceled');\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 = `remove components when on a lane`;\n extendedDescription = `in case the components are part of the lane and the lane is exported, it marks the components as removed,\nand then after snap+export, the remote-lane gets updated as well. upon lane-merge, these components are skipped.\n\nin case the components are not part of the lane or the lane is new, it simply removes the components from the workspace`;\n group = 'collaborate';\n alias = 'rc';\n options = [\n ['', 'workspace-only', 'do not mark the components as removed. instead, remove them from the workspace only'],\n ['', 'update-main', 'NOT IMPLEMENTED YET. mark as removed on main after merging this lane into main'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private workspace: Workspace, private lanes: LanesMain) {}\n\n async report([componentsPattern]: [string], removeCompsOpts: RemoveCompsOpts): Promise<string> {\n if (removeCompsOpts.updateMain) throw new Error('not implemented yet');\n if (!this.workspace) throw new OutsideWorkspaceError();\n if (this.workspace.isOnMain()) {\n throw new Error(`error: you're checked out to main, please use \"bit remove\" instead`);\n }\n const { removedFromWs, markedRemoved } = await this.lanes.removeComps(componentsPattern, removeCompsOpts);\n const getMarkedRemovedStr = () => {\n if (!markedRemoved.length) return '';\n return `${chalk.green('successfully marked the following components as removed:')}\n${markedRemoved.join('\\n')}\n\n${chalk.bold('to update the remote, please snap and then export. to revert, please use \"bit recover\"')}\n`;\n };\n const getRemovedFromWsStr = () => {\n if (!removedFromWs.length) return '';\n return `\\n${chalk.green('successfully removed the following components from the workspace:')}\n(either: these components were not part of the lane, so there was no need to mark them as removed or --workspace-only was used)\n${removedFromWs.join('\\n')}`;\n };\n return getMarkedRemovedStr() + getRemovedFromWsStr();\n }\n}\n\nexport class LaneImportCmd implements Command {\n name = 'import <lane>';\n description = `import a remote lane to your workspace`;\n arguments = [{ name: 'lane', description: 'the remote lane name' }];\n alias = '';\n options = [\n ['x', 'skip-dependency-installation', 'do not install packages of the imported components'],\n [\n 'p',\n 'pattern <component-pattern>',\n 'switch only the specified component-pattern. works only when the workspace is empty',\n ],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private switchCmd: SwitchCmd) {}\n\n async report(\n [lane]: [string],\n { skipDependencyInstallation = false, pattern }: { skipDependencyInstallation: boolean; pattern?: string }\n ): Promise<string> {\n return this.switchCmd.report([lane], { getAll: true, skipDependencyInstallation, pattern });\n }\n}\n\nexport class LaneCmd implements Command {\n name = 'lane [lane-name]';\n description = 'manage 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 <string>', 'show remote lanes'],\n ['', 'merged', 'show merged lanes'],\n ['', 'not-merged', 'show not merged lanes'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n group = 'collaborate';\n remoteOp = true;\n skipWorkspace = true;\n helpUrl = 'docs/components/lanes';\n commands: Command[] = [];\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report([name]: [string], laneOptions: LaneOptions): Promise<string> {\n return new LaneListCmd(this.lanes, this.workspace, this.scope).report([name], laneOptions);\n }\n}\n\nexport class LaneRemoveReadmeCmd implements Command {\n name = 'remove-readme [laneName]';\n description = 'EXPERIMENTAL. remove lane readme component';\n options = [] as CommandOptions;\n loader = true;\n skipWorkspace = false;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName]: [string]): Promise<string> {\n const { result, message } = await this.lanes.removeLaneReadme(laneName);\n\n if (result) {\n return chalk.green(\n `the readme component has been successfully removed from the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n }\n\n return chalk.red(`${message}\\n`);\n }\n}\n\nexport class LaneAddReadmeCmd implements Command {\n name = 'add-readme <component-name> [lane-name]';\n description = 'EXPERIMENTAL. adds a readme component to a lane';\n arguments = [\n { name: 'component-id', description: \"the component name or id of the component to use as the lane's readme\" },\n { name: 'lane-name', description: 'the lane to attach the readme to (defaults to the current lane)' },\n ];\n options = [] as CommandOptions;\n loader = true;\n skipWorkspace = false;\n\n constructor(private lanes: LanesMain) {}\n\n async report([componentId, laneName]: [string, string]): Promise<string> {\n const { result, message } = await this.lanes.addLaneReadme(componentId, laneName);\n\n if (result)\n return chalk.green(\n `the component ${componentId} has been successfully added as the readme component for the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n\n return chalk.red(\n `${message || ''}\\nthe component ${componentId} could not be added as a readme component for the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n }\n}\n\nfunction outputComponents(components: LaneData['components']): string {\n const componentsTitle = `\\t${chalk.bold(`components (${components.length})`)}\\n`;\n const componentsStr = components.map((c) => `\\t ${c.id.toString()} - ${c.head}`).join('\\n');\n return componentsTitle + componentsStr;\n}\n\nfunction outputReadmeComponent(component: LaneData['readmeComponent']): string {\n if (!component) return '';\n return `\\n\\t${`${chalk.yellow('readme component')}\\n\\t ${component.id} - ${\n component.head ||\n `(unsnapped)\\n\\t(\"use bit snap ${component.id.name}\" to snap the readme component on the lane before exporting)`\n }`}\\n`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,IAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAM,UAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,SAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,SAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,QAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,WAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,UAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAVA;;AAsBO,MAAMS,WAAW,CAAoB;EAgB1CC,WAAWA,CAASC,KAAgB,EAAUC,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,IAAI,IAAI,CAACzF,KAAK,CAACgE,kBAAkB,CAAC,CAC3C,EACH,CAAC;IAEH,OAAOvC,gBAAK,CAAC8G,GAAG,CACb,GAAEjC,OAAO,IAAI,EAAG,mBAAkBmC,WAAY,0DAC7ChD,QAAQ,IAAI,IAAI,CAACzF,KAAK,CAACgE,kBAAkB,CAAC,CAC3C,EACH,CAAC;EACH;AACF;AAACL,OAAA,CAAA6E,gBAAA,GAAAA,gBAAA;AAED,SAAS3F,gBAAgBA,CAACC,UAAkC,EAAU;EACpE,MAAM6F,eAAe,GAAI,KAAIlH,gBAAK,CAAC0B,IAAI,CAAE,eAAcL,UAAU,CAACtB,MAAO,GAAE,CAAE,IAAG;EAChF,MAAMoH,aAAa,GAAG9F,UAAU,CAACnB,GAAG,CAAEkH,CAAC,IAAM,OAAMA,CAAC,CAACxG,EAAE,CAACpB,QAAQ,CAAC,CAAE,MAAK4H,CAAC,CAACC,IAAK,EAAC,CAAC,CAACjH,IAAI,CAAC,IAAI,CAAC;EAC5F,OAAO8G,eAAe,GAAGC,aAAa;AACxC;AAEA,SAASnG,qBAAqBA,CAACsG,SAAsC,EAAU;EAC7E,IAAI,CAACA,SAAS,EAAE,OAAO,EAAE;EACzB,OAAQ,OAAO,GAAEtH,gBAAK,CAAC6D,MAAM,CAAC,kBAAkB,CAAE,SAAQyD,SAAS,CAAC1G,EAAG,MACrE0G,SAAS,CAACD,IAAI,IACb,iCAAgCC,SAAS,CAAC1G,EAAE,CAACrB,IAAK,8DACpD,EAAE,IAAG;AACR"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_yn","_laneId","_workspace","_bitError","_prompts","_constants","LaneListCmd","constructor","lanes","workspace","scope","_defineProperty2","default","report","args","laneOptions","details","remote","merged","notMerged","laneIdStr","laneId","alias","isDefault","name","toString","getLanes","showDefaultLane","mergedLanes","filter","l","isMerged","length","chalk","green","map","m","join","unmergedLanes","currentLane","getCurrentLaneId","getDefaultLaneId","laneDataOfCurrentLane","find","isEqual","id","undefined","currentAlias","currentLaneReadmeComponentStr","outputReadmeComponent","readmeComponent","currentLaneStr","currentLaneComponents","outputComponents","components","availableLanes","laneData","readmeComponentStr","laneTitle","bold","concat","outputFooter","footer","outputCurrentLane","outputAvailableLanes","json","getCurrentLaneNameOrAlias","exports","LaneShowCmd","_onlyLane$log","_onlyLane$log2","_onlyLane$log3","getCurrentLaneName","DEFAULT_LANE","Error","parseLaneId","onlyLane","title","author","log","username","email","date","Date","parseInt","toLocaleString","LaneCreateCmd","description","createLaneOptions","getCurrentLane","remoteScope","result","createLane","remoteScopeOrDefaultScope","yellow","remoteScopeOutput","LaneAliasCmd","laneName","aliasLane","LaneChangeScopeCmd","localName","remoteScopeBefore","changeScope","LaneRenameCmd","currentName","newName","exported","exportErr","rename","exportedStr","message","LaneRemoveCmd","names","force","silent","removePromptResult","approveOperation","yn","shouldProceed","BitError","laneResults","removeLanes","LaneRemoveCompCmd","COMPONENT_PATTERN_HELP","componentsPattern","removeCompsOpts","OutsideWorkspaceError","isOnMain","removedFromWs","markedRemoved","removeComps","getMarkedRemovedStr","getRemovedFromWsStr","LaneImportCmd","switchCmd","lane","skipDependencyInstallation","pattern","getAll","LaneCmd","LaneRemoveReadmeCmd","removeLaneReadme","red","LaneAddReadmeCmd","componentId","addLaneReadme","componentsTitle","componentsStr","c","head","component"],"sources":["lane.cmd.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport chalk from 'chalk';\nimport yn from 'yn';\nimport { ScopeMain } from '@teambit/scope';\nimport { DEFAULT_LANE, LaneId } from '@teambit/lane-id';\nimport { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { LaneData } from '@teambit/legacy/dist/scope/lanes/lanes';\nimport { BitError } from '@teambit/bit-error';\nimport { approveOperation } from '@teambit/legacy/dist/prompts';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { CreateLaneOptions, LanesMain } from './lanes.main.runtime';\nimport { SwitchCmd } from './switch.cmd';\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 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 remote lanes'],\n ['', 'merged', 'show merged lanes'],\n ['', 'not-merged', 'show lanes that are not merged'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n skipWorkspace = true;\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report(args, laneOptions: LaneOptions): Promise<string> {\n const { details, remote, merged, notMerged } = laneOptions;\n const laneIdStr = (laneId: LaneId, alias?: string | null) => {\n if (laneId.isDefault()) return laneId.name;\n if (alias) return `${laneId.toString()} (${alias})`;\n return laneId.toString();\n };\n const lanes = await this.lanes.getLanes({\n remote,\n merged,\n notMerged,\n showDefaultLane: true,\n });\n if (merged) {\n const mergedLanes = lanes.filter((l) => l.isMerged);\n if (!mergedLanes.length) return chalk.green('None of the lanes is merged');\n return chalk.green(mergedLanes.map((m) => m.name).join('\\n'));\n }\n if (notMerged) {\n const unmergedLanes = lanes.filter((l) => !l.isMerged);\n if (!unmergedLanes.length) return chalk.green('All lanes are merged');\n return chalk.green(unmergedLanes.map((m) => m.name).join('\\n'));\n }\n const currentLane = this.lanes.getCurrentLaneId() || this.lanes.getDefaultLaneId();\n const laneDataOfCurrentLane = currentLane ? lanes.find((l) => currentLane.isEqual(l.id)) : undefined;\n const currentAlias = laneDataOfCurrentLane ? laneDataOfCurrentLane.alias : undefined;\n const currentLaneReadmeComponentStr = outputReadmeComponent(laneDataOfCurrentLane?.readmeComponent);\n let currentLaneStr = `current lane - ${chalk.green.green(laneIdStr(currentLane, currentAlias))}`;\n currentLaneStr += currentLaneReadmeComponentStr;\n\n if (details) {\n const currentLaneComponents = laneDataOfCurrentLane ? outputComponents(laneDataOfCurrentLane.components) : '';\n if (currentLaneStr) {\n currentLaneStr += `\\n${currentLaneComponents}`;\n }\n }\n\n const availableLanes = lanes\n .filter((l) => !currentLane.isEqual(l.id))\n .map((laneData) => {\n const readmeComponentStr = outputReadmeComponent(laneData.readmeComponent);\n if (details) {\n const laneTitle = `> ${chalk.bold(laneIdStr(laneData.id, laneData.alias))}\\n`;\n const components = outputComponents(laneData.components);\n return laneTitle + readmeComponentStr.concat('\\n') + components;\n }\n return ` > ${chalk.green(laneIdStr(laneData.id, laneData.alias))} (${\n laneData.components.length\n } components)${readmeComponentStr}`;\n })\n .join('\\n');\n\n const outputFooter = () => {\n let footer = '\\n';\n if (details) {\n footer += 'You can use --merged and --not-merged to see which of the lanes is fully merged.';\n } else {\n footer +=\n \"to get more info on all lanes in workspace use 'bit lane list --details' or 'bit lane show <lane-name>' for a specific lane.\";\n }\n if (!remote && this.workspace) footer += `\\nswitch lanes using 'bit switch <name>'.`;\n\n return footer;\n };\n\n return outputCurrentLane() + outputAvailableLanes() + outputFooter();\n\n function outputCurrentLane() {\n return currentLaneStr ? `${currentLaneStr}\\n` : '';\n }\n\n function outputAvailableLanes() {\n if (!availableLanes) return '';\n return remote ? `${availableLanes}\\n` : `\\nAvailable lanes:\\n${availableLanes}\\n`;\n }\n }\n async json(args, laneOptions: LaneOptions) {\n const { remote, merged = false, notMerged = false } = laneOptions;\n\n const lanes = await this.lanes.getLanes({\n remote,\n showDefaultLane: true,\n merged,\n notMerged,\n });\n const currentLane = this.lanes.getCurrentLaneNameOrAlias();\n return { lanes, currentLane };\n }\n}\n\nexport class LaneShowCmd implements Command {\n name = 'show [lane-name]';\n description = `show lane details. if no lane specified, show the current lane`;\n alias = '';\n options = [\n ['j', 'json', 'show the lane details in json format'],\n ['r', 'remote', 'show the lane from remote'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n skipWorkspace = true;\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report([name]: [string], laneOptions: LaneOptions): Promise<string> {\n const { remote } = laneOptions;\n\n if (!name) {\n name = this.lanes.getCurrentLaneName() || DEFAULT_LANE;\n }\n\n if (!name && remote) {\n throw new Error('remote flag is not supported without lane name');\n }\n\n const laneId = await this.lanes.parseLaneId(name);\n\n const lanes = await this.lanes.getLanes({\n name: laneId.name,\n remote: remote ? laneId.scope : undefined,\n });\n\n const onlyLane = lanes[0];\n const title = `showing information for ${chalk.bold(onlyLane.id.toString())}\\n`;\n const author = `author: ${onlyLane.log?.username || 'N/A'} <${onlyLane.log?.email || 'N/A'}>\\n`;\n const date = onlyLane.log?.date\n ? `created: ${new Date(parseInt(onlyLane.log.date)).toLocaleString()}\\n`\n : undefined;\n return title + author + date + outputComponents(onlyLane.components);\n }\n\n async json([name]: [string], laneOptions: LaneOptions) {\n const { remote } = laneOptions;\n\n const lanes = await this.lanes.getLanes({\n name,\n remote,\n });\n\n return 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 has all the components of the original lane.`;\n alias = '';\n options = [\n [\n 's',\n 'scope <scope-name>',\n 'remote scope where this lane will be exported to, default to the defaultScope (can be changed later 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 ['', 'fork-lane-new-scope', 'allow forking a lane into a different scope than the original lane'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([name]: [string], createLaneOptions: CreateLaneOptions & { remoteScope?: string }): Promise<string> {\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 )}. to change it, please run \"bit lane change-scope\" command`;\n const title = chalk.green(\n `successfully added and checked out to a new lane ${chalk.bold(result.alias || result.laneId.name)}\n ${currentLane !== null ? chalk.yellow(`\\nnote - your new lane will be based on lane ${currentLane.name}`) : ''}\n `\n );\n const remoteScopeOutput = `this lane will be exported to ${remoteScopeOrDefaultScope}`;\n return `${title}\\n${remoteScopeOutput}`;\n }\n}\n\nexport class LaneAliasCmd implements Command {\n name = 'alias <lane-name> <alias>';\n description = 'adds an alias to a lane';\n extendedDescription = `an alias is a name that can be used to refer to a lane. it is saved locally and never reach the remote.\nit is useful when having multiple lanes with the same name, but with different remote scopes.`;\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = 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)} to the lane ${chalk.bold(laneId.toString())}`;\n }\n}\n\nexport class LaneChangeScopeCmd implements Command {\n name = 'change-scope <lane-name> <remote-scope-name>';\n description = `changes the remote scope of a lane`;\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([localName, remoteScope]: [string, string]): Promise<string> {\n const { remoteScopeBefore } = await this.lanes.changeScope(localName, remoteScope);\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 <current-name> <new-name>';\n description = `EXPERIMENTAL. change the lane-name locally and on the remote (if exported)`;\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = true;\n constructor(private lanes: LanesMain) {}\n\n async report([currentName, newName]: [string, string]): Promise<string> {\n const { exported, exportErr } = await this.lanes.rename(currentName, newName);\n const exportedStr = exported\n ? `and have been exported successfully to the remote`\n : `however if failed to export the renamed lane to the remote, due to an error: ${\n exportErr?.message || 'unknown'\n }`;\n return `the lane ${chalk.bold(currentName)} has been changed to ${chalk.bold(newName)}, ${exportedStr}`;\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 lanes`;\n group = 'collaborate';\n alias = '';\n options = [\n ['r', 'remote', 'remove a remote lane (in the lane arg, use remote/lane-id syntax)'],\n ['f', 'force', 'removes the lane even when the lane was not merged yet'],\n ['s', 'silent', 'skip confirmation'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report(\n [names]: [string[]],\n {\n remote = false,\n force = false,\n silent = false,\n }: {\n remote: boolean;\n force: boolean;\n silent: boolean;\n }\n ): Promise<string> {\n if (!silent) {\n const removePromptResult = await approveOperation();\n // @ts-ignore\n if (!yn(removePromptResult.shouldProceed)) {\n throw new BitError('the operation has been canceled');\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 = `remove components when on a lane`;\n extendedDescription = `in case the components are part of the lane and the lane is exported, it marks the components as removed,\nand then after snap+export, the remote-lane gets updated as well. upon lane-merge, these components are skipped.\n\nin case the components are not part of the lane or the lane is new, it simply removes the components from the workspace`;\n group = 'collaborate';\n alias = 'rc';\n options = [\n ['', 'workspace-only', 'do not mark the components as removed. instead, remove them from the workspace only'],\n ['', 'update-main', 'EXPERIMENTAL. mark as removed on main after merging this lane into main'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private workspace: Workspace, private lanes: LanesMain) {}\n\n async report([componentsPattern]: [string], removeCompsOpts: RemoveCompsOpts): Promise<string> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n if (this.workspace.isOnMain()) {\n throw new Error(`error: you're checked out to main, please use \"bit remove\" instead`);\n }\n const { removedFromWs, markedRemoved } = await this.lanes.removeComps(componentsPattern, removeCompsOpts);\n const getMarkedRemovedStr = () => {\n if (!markedRemoved.length) return '';\n return `${chalk.green('successfully marked the following components as removed:')}\n${markedRemoved.join('\\n')}\n\n${chalk.bold('to update the remote, please snap and then export. to revert, please use \"bit recover\"')}\n`;\n };\n const getRemovedFromWsStr = () => {\n if (!removedFromWs.length) return '';\n return `\\n${chalk.green('successfully removed the following components from the workspace:')}\n(either: these components were not part of the lane, so there was no need to mark them as removed or --workspace-only was used)\n${removedFromWs.join('\\n')}`;\n };\n return getMarkedRemovedStr() + getRemovedFromWsStr();\n }\n}\n\nexport class LaneImportCmd implements Command {\n name = 'import <lane>';\n description = `import a remote lane to your workspace`;\n arguments = [{ name: 'lane', description: 'the remote lane name' }];\n alias = '';\n options = [\n ['x', 'skip-dependency-installation', 'do not install packages of the imported components'],\n [\n 'p',\n 'pattern <component-pattern>',\n 'switch only the specified component-pattern. works only when the workspace is empty',\n ],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private switchCmd: SwitchCmd) {}\n\n async report(\n [lane]: [string],\n { skipDependencyInstallation = false, pattern }: { skipDependencyInstallation: boolean; pattern?: string }\n ): Promise<string> {\n return this.switchCmd.report([lane], { getAll: true, skipDependencyInstallation, pattern });\n }\n}\n\nexport class LaneCmd implements Command {\n name = 'lane [lane-name]';\n description = 'manage 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 <string>', 'show remote lanes'],\n ['', 'merged', 'show merged lanes'],\n ['', 'not-merged', 'show not merged lanes'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n group = 'collaborate';\n remoteOp = true;\n skipWorkspace = true;\n helpUrl = 'docs/components/lanes';\n commands: Command[] = [];\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report([name]: [string], laneOptions: LaneOptions): Promise<string> {\n return new LaneListCmd(this.lanes, this.workspace, this.scope).report([name], laneOptions);\n }\n}\n\nexport class LaneRemoveReadmeCmd implements Command {\n name = 'remove-readme [laneName]';\n description = 'EXPERIMENTAL. remove lane readme component';\n options = [] as CommandOptions;\n loader = true;\n skipWorkspace = false;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName]: [string]): Promise<string> {\n const { result, message } = await this.lanes.removeLaneReadme(laneName);\n\n if (result) {\n return chalk.green(\n `the readme component has been successfully removed from the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n }\n\n return chalk.red(`${message}\\n`);\n }\n}\n\nexport class LaneAddReadmeCmd implements Command {\n name = 'add-readme <component-name> [lane-name]';\n description = 'EXPERIMENTAL. adds a readme component to a lane';\n arguments = [\n { name: 'component-id', description: \"the component name or id of the component to use as the lane's readme\" },\n { name: 'lane-name', description: 'the lane to attach the readme to (defaults to the current lane)' },\n ];\n options = [] as CommandOptions;\n loader = true;\n skipWorkspace = false;\n\n constructor(private lanes: LanesMain) {}\n\n async report([componentId, laneName]: [string, string]): Promise<string> {\n const { result, message } = await this.lanes.addLaneReadme(componentId, laneName);\n\n if (result)\n return chalk.green(\n `the component ${componentId} has been successfully added as the readme component for the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n\n return chalk.red(\n `${message || ''}\\nthe component ${componentId} could not be added as a readme component for the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n }\n}\n\nfunction outputComponents(components: LaneData['components']): string {\n const componentsTitle = `\\t${chalk.bold(`components (${components.length})`)}\\n`;\n const componentsStr = components.map((c) => `\\t ${c.id.toString()} - ${c.head}`).join('\\n');\n return componentsTitle + componentsStr;\n}\n\nfunction outputReadmeComponent(component: LaneData['readmeComponent']): string {\n if (!component) return '';\n return `\\n\\t${`${chalk.yellow('readme component')}\\n\\t ${component.id} - ${\n component.head ||\n `(unsnapped)\\n\\t(\"use bit snap ${component.id.name}\" to snap the readme component on the lane before exporting)`\n }`}\\n`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,IAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAM,UAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,SAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,SAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,QAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,WAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,UAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;A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,IAAI,IAAI,CAACzF,KAAK,CAACgE,kBAAkB,CAAC,CAC3C,EACH,CAAC;IAEH,OAAOvC,gBAAK,CAAC6G,GAAG,CACb,GAAEhC,OAAO,IAAI,EAAG,mBAAkBkC,WAAY,0DAC7C/C,QAAQ,IAAI,IAAI,CAACzF,KAAK,CAACgE,kBAAkB,CAAC,CAC3C,EACH,CAAC;EACH;AACF;AAACL,OAAA,CAAA4E,gBAAA,GAAAA,gBAAA;AAED,SAAS1F,gBAAgBA,CAACC,UAAkC,EAAU;EACpE,MAAM4F,eAAe,GAAI,KAAIjH,gBAAK,CAAC0B,IAAI,CAAE,eAAcL,UAAU,CAACtB,MAAO,GAAE,CAAE,IAAG;EAChF,MAAMmH,aAAa,GAAG7F,UAAU,CAACnB,GAAG,CAAEiH,CAAC,IAAM,OAAMA,CAAC,CAACvG,EAAE,CAACpB,QAAQ,CAAC,CAAE,MAAK2H,CAAC,CAACC,IAAK,EAAC,CAAC,CAAChH,IAAI,CAAC,IAAI,CAAC;EAC5F,OAAO6G,eAAe,GAAGC,aAAa;AACxC;AAEA,SAASlG,qBAAqBA,CAACqG,SAAsC,EAAU;EAC7E,IAAI,CAACA,SAAS,EAAE,OAAO,EAAE;EACzB,OAAQ,OAAO,GAAErH,gBAAK,CAAC6D,MAAM,CAAC,kBAAkB,CAAE,SAAQwD,SAAS,CAACzG,EAAG,MACrEyG,SAAS,CAACD,IAAI,IACb,iCAAgCC,SAAS,CAACzG,EAAE,CAACrB,IAAK,8DACpD,EAAE,IAAG;AACR"}
@@ -684,7 +684,11 @@ please create a new lane instead, which will include all components of this lane
684
684
  if (!currentLane) {
685
685
  throw new Error('markRemoveOnLane expects to get called when on a lane');
686
686
  }
687
- if (currentLane.isNew || removeCompsOpts.workspaceOnly) {
687
+ const {
688
+ workspaceOnly,
689
+ updateMain
690
+ } = removeCompsOpts;
691
+ if (!updateMain && (currentLane.isNew || workspaceOnly)) {
688
692
  const results = await this.remove.remove({
689
693
  componentsPattern,
690
694
  force: true
@@ -698,17 +702,17 @@ please create a new lane instead, which will include all components of this lane
698
702
  }
699
703
  const componentIds = await workspace.idsByPattern(componentsPattern);
700
704
  const laneBitIds = currentLane.toBitIds();
701
- const [laneCompIds, mainCompIds] = (0, _lodash().partition)(componentIds, id => laneBitIds.hasWithoutVersion(id._legacy));
705
+ const [idsToMarkRemove, idsToRemoveFromWs] = updateMain ? (0, _lodash().partition)(componentIds, id => id.hasVersion()) : (0, _lodash().partition)(componentIds, id => laneBitIds.hasWithoutVersion(id._legacy));
702
706
  const removeFromWorkspace = async () => {
703
- if (!mainCompIds.length) return [];
704
- const results = await this.remove.removeLocallyByIds(mainCompIds.map(id => id._legacy), {
707
+ if (!idsToRemoveFromWs.length) return [];
708
+ const results = await this.remove.removeLocallyByIds(idsToRemoveFromWs.map(id => id._legacy), {
705
709
  force: true
706
710
  });
707
711
  const ids = results.localResult.removedComponentIds;
708
712
  return workspace.resolveMultipleComponentIds(ids);
709
713
  };
710
714
  const removedFromWs = await removeFromWorkspace();
711
- const markedRemoved = await this.remove.markRemoveComps(laneCompIds);
715
+ const markedRemoved = await this.remove.markRemoveComps(idsToMarkRemove, updateMain);
712
716
  return {
713
717
  removedFromWs,
714
718
  markedRemoved
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_scope","_pMapSeries","_interopRequireDefault","_graphql","_express","_workspace","_getRemoteByName","_lanesModules","_laneId","_bitError","_logger","_mergeVersion","_importer","_component","_removeLanes","_models","_getDivergeData","_legacyBitId","_export","_bitId","_lodash","_componentCompare","_objects","_componentWriter","_remove","_merging","_checkout","_lanesEntities","_exceptions","_noCommonSnap","_lanes","_lane","_lanes2","_switch","_switchLanes","_createLane","_lanesCreate","_lanesDelete","_lanesRestore","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","LanesMain","constructor","workspace","scope","merging","componentAspect","logger","importer","exporter","componentCompare","componentWriter","remove","checkout","getLanes","name","remote","merged","showDefaultLane","notMerged","_this$workspace","showMergeData","Boolean","consumer","laneId","LaneId","from","undefined","remoteObj","getRemoteByName","lanes","listLanes","toString","DEFAULT_LANE","defaultLane","getLaneDataOfDefaultLane","legacyScope","getLanesData","filterSoftRemovedLaneComps","parseLaneId","idStr","parseLaneIdFromString","Promise","all","map","lane","id","isDefault","componentIds","compact","getLaneComponentIds","laneCompId","isComponentRemoved","err","ComponentNotFound","warn","_legacy","head","version","laneData","components","getCurrentLaneName","_this$getCurrentLaneI","getCurrentLaneId","getCurrentLaneNameOrAlias","currentLaneId","trackingData","getLocalTrackedLaneByRemoteName","getCurrentLane","loadLane","getDefaultLaneId","setCurrentLane","alias","exported","_this$workspace2","createLane","forkLaneNewScope","newLane","createLaneInScope","toLaneId","hash","throwForInvalidLaneName","currentLaneScope","BitError","defaultScope","laneObj","trackLaneData","localLane","remoteLane","remoteScope","trackLane","scopeJson","setLaneAsNew","onDestroy","results","localName","remoteName","beforeTrackData","getRemoteTrackedDataByLocalLane","beforeTrackDataCloned","afterTrackData","aliasLane","laneName","includes","LANE_REMOTE_DELIMITER","trackData","laneNameWithoutScope","split","removeTrackLane","changeScope","isNew","isValidScopeName","InvalidScopeName","remoteScopeBefore","newLaneId","saveLane","bitMap","rename","currentName","newName","existingAliasWithNewName","remoteIdStr","objects","remoteLanes","renameRefByNewLaneName","isEqual","isExported","isLaneExported","clonedLaneToExport","clone","exportErr","exportLane","error","message","exportMany","laneObject","ids","BitIds","idsWithFutureScope","allVersions","importLaneObject","persistIfNotExists","getSnapsDistance","componentId","sourceHead","targetHead","throws","Error","modelComponent","getModelComponent","getDivergeData","repo","Ref","getHeadOnMain","_modelComponent$head","fetchLaneWithItsComponents","debug","fetchLaneComponents","removeLanes","laneNames","opts","_this$workspace3","force","laneResults","restoreLane","laneHash","ref","objectsFromTrash","getFromTrash","laneIdFromTrash","existingWithSameId","restoreFromTrash","removeComps","componentsPattern","removeCompsOpts","OutsideWorkspaceError","currentLane","getCurrentLaneObject","workspaceOnly","localResult","removedComponentIds","compIds","resolveMultipleComponentIds","removedFromWs","markedRemoved","idsByPattern","laneBitIds","toBitIds","laneCompIds","mainCompIds","partition","hasWithoutVersion","removeFromWorkspace","removeLocallyByIds","markRemoveComps","switchLanes","merge","pattern","getAll","skipDependencyInstallation","mergeStrategy","mergeOptions","MergeOptions","join","switchProps","existingOnWorkspaceOnly","checkoutProps","skipNpmInstall","verbose","ignorePackageJson","ignoreDist","isLane","promptMergeOptions","writeConfig","reset","LaneSwitcher","switch","getDiff","values","diffOptions","laneDiffGenerator","LaneDiffGenerator","generate","getLaneComponentModels","host","getHost","laneComponentIds","getMany","laneComponents","bitIdsFromBitmap","getAllBitIdsFromAllLanes","filteredComponentIds","laneComponent","some","bitmapComponentId","isEqualWithoutVersion","legacyIdWithVersion","changeVersion","resolveComponentId","getLaneReadmeComponent","laneReadmeComponent","readmeComponent","laneReadmeComponentId","get","removeLaneReadme","currentLaneName","result","readmeComponentId","existingLaneConfig","getSpecificComponentConfig","LanesAspect","remoteLaneIdStr","readme","removeSpecificComponentConfig","addSpecificComponentConfig","setReadmeComponent","write","diffStatus","sourceLaneId","targetLaneId","options","_await$this$getLaneDa","_await$this$loadLane","sourceLaneComponents","main","targetLane","targetLaneIds","targetMainHeads","headOnMain","importObjectsFromMainIfExist","diffProps","_targetLaneIds$search","sourceVersionObj","load","isRemoved","headOnTargetLane","searchWithoutVersion","targetVersionObj","pMapSeries","componentDiffStatus","componentsStatus","_snapsDistance$snapsO","_snapsDistance$snapsO2","_snapsDistance$common","snapsDistance","noCommonSnap","NoCommonSnap","upToDate","isUpToDate","unrelated","changes","commonSnap","commonSnapBeforeDiverge","getChanges","ChangeType","NEW","compare","fields","code","c","status","NONE","changed","f","SOURCE_CODE","ASPECTS","depsFields","field","fieldName","DEPENDENCY","skipChanges","changeType","onSource","snapsOnSourceOnly","s","onTarget","snapsOnTargetOnly","common","recreateNewLaneIfDeleted","addLaneReadme","readmeComponentIdStr","readmeComponentBitId","listUpdatesFromForked","componentsList","_this$workspace4","isOnMain","forkedFromLaneId","forkedFrom","forkedFromLane","workspaceIds","getAllBitIds","duringMergeIds","listDuringMergeStateComponents","componentsFromModel","getModelComponents","compFromModelOnWorkspace","toBitId","remoteForkedLane","getRemoteLane","headOnForked","find","headOnLane","laneHeadLocal","divergeData","_this$workspace5","bitIds","scopeComponents","list","component","getIdsOfDefaultLane","bitId","isMerged","createRoutePath","deleteRoutePath","restoreRoutePath","provider","cli","graphql","loggerMain","express","createLogger","lanesMain","switchCmd","SwitchCmd","laneCmd","LaneCmd","commands","LaneListCmd","LaneShowCmd","LaneCreateCmd","LaneRemoveCmd","LaneChangeScopeCmd","LaneAliasCmd","LaneRenameCmd","LaneDiffCmd","LaneAddReadmeCmd","LaneRemoveReadmeCmd","LaneImportCmd","LaneRemoveCompCmd","register","registerOnStart","lanesSchema","LanesCreateRoute","LanesDeleteRoute","LanesRestoreRoute","exports","CLIAspect","ScopeAspect","WorkspaceAspect","GraphqlAspect","MergingAspect","ComponentAspect","LoggerAspect","ImporterAspect","ExportAspect","ExpressAspect","ComponentCompareAspect","ComponentWriterAspect","RemoveAspect","CheckoutAspect","MainRuntime","addRuntime","_default"],"sources":["lanes.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport pMapSeries from 'p-map-series';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { ExpressAspect, ExpressMain } from '@teambit/express';\nimport { OutsideWorkspaceError, Workspace, WorkspaceAspect } from '@teambit/workspace';\nimport getRemoteByName from '@teambit/legacy/dist/remotes/get-remote-by-name';\nimport { LaneDiffCmd, LaneDiffGenerator, LaneDiffResults } from '@teambit/lanes.modules.diff';\nimport { LaneData } from '@teambit/legacy/dist/scope/lanes/lanes';\nimport { LaneId, DEFAULT_LANE, LANE_REMOTE_DELIMITER } from '@teambit/lane-id';\nimport { BitError } from '@teambit/bit-error';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { DiffOptions } from '@teambit/legacy/dist/consumer/component-ops/components-diff';\nimport { MergeStrategy, MergeOptions } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { TrackLane } from '@teambit/legacy/dist/scope/scope-json';\nimport { ImporterAspect, ImporterMain } from '@teambit/importer';\nimport ComponentAspect, { Component, ComponentID, ComponentMain } from '@teambit/component';\nimport removeLanes from '@teambit/legacy/dist/consumer/lanes/remove-lanes';\nimport { Lane, Version } from '@teambit/legacy/dist/scope/models';\nimport { getDivergeData } from '@teambit/legacy/dist/scope/component-ops/get-diverge-data';\nimport { Scope as LegacyScope } from '@teambit/legacy/dist/scope';\nimport { BitId, InvalidScopeName, isValidScopeName } from '@teambit/legacy-bit-id';\nimport { ExportAspect, ExportMain } from '@teambit/export';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { compact, partition } from 'lodash';\nimport { ComponentCompareMain, ComponentCompareAspect } from '@teambit/component-compare';\nimport { Ref } from '@teambit/legacy/dist/scope/objects';\nimport ComponentWriterAspect, { ComponentWriterMain } from '@teambit/component-writer';\nimport { SnapsDistance } from '@teambit/legacy/dist/scope/component-ops/snaps-distance';\nimport RemoveAspect, { RemoveMain } from '@teambit/remove';\nimport { MergingMain, MergingAspect } from '@teambit/merging';\nimport CheckoutAspect, { CheckoutMain } from '@teambit/checkout';\nimport { ChangeType } from '@teambit/lanes.entities.lane-diff';\nimport { ComponentNotFound } from '@teambit/legacy/dist/scope/exceptions';\nimport ComponentsList, { DivergeDataPerId } from '@teambit/legacy/dist/consumer/component/components-list';\nimport { NoCommonSnap } from '@teambit/legacy/dist/scope/exceptions/no-common-snap';\nimport { LanesAspect } from './lanes.aspect';\nimport {\n LaneCmd,\n LaneCreateCmd,\n LaneImportCmd,\n LaneListCmd,\n LaneRemoveCmd,\n LaneShowCmd,\n LaneChangeScopeCmd,\n LaneAliasCmd,\n LaneRenameCmd,\n LaneAddReadmeCmd,\n LaneRemoveReadmeCmd,\n LaneRemoveCompCmd,\n RemoveCompsOpts,\n} from './lane.cmd';\nimport { lanesSchema } from './lanes.graphql';\nimport { SwitchCmd } from './switch.cmd';\nimport { LaneSwitcher } from './switch-lanes';\nimport { createLane, createLaneInScope, throwForInvalidLaneName } from './create-lane';\nimport { LanesCreateRoute } from './lanes.create.route';\nimport { LanesDeleteRoute } from './lanes.delete.route';\nimport { LanesRestoreRoute } from './lanes.restore.route';\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 alias?: string;\n merge?: MergeStrategy;\n getAll?: boolean;\n pattern?: string;\n skipDependencyInstallation?: boolean;\n verbose?: boolean;\n override?: boolean;\n};\n\nexport type LaneComponentDiffStatus = {\n componentId: ComponentID;\n sourceHead: string;\n targetHead?: string;\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\nexport type LaneDiffStatusOptions = {\n skipChanges?: boolean;\n};\n\nexport type LaneDiffStatus = {\n source: LaneId;\n target: LaneId;\n componentsStatus: LaneComponentDiffStatus[];\n};\n\nexport type MarkRemoveOnLaneResult = { removedFromWs: ComponentID[]; markedRemoved: ComponentID[] };\n\ntype CreateLaneResult = {\n laneId: LaneId;\n hash: string;\n alias?: string;\n};\n\nexport class LanesMain {\n constructor(\n private 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 ) {}\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\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 // no need to filter soft-removed here. it was filtered already in the remote\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 this.filterSoftRemovedLaneComps(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 private async filterSoftRemovedLaneComps(lanes: LaneData[]): Promise<LaneData[]> {\n return Promise.all(\n lanes.map(async (lane) => {\n if (lane.id.isDefault()) return lane;\n\n const componentIds = compact(\n await Promise.all(\n (\n await this.getLaneComponentIds(lane)\n ).map(async (laneCompId) => {\n try {\n if (await this.scope.isComponentRemoved(laneCompId)) return undefined;\n } catch (err) {\n // if (err instanceof ComponentNotFound)\n // throw new Error(\n // `component \"${laneCompId.toString()}\" from the lane \"${lane.id.toString()}\" not found`\n // );\n // throw err;\n if (err instanceof ComponentNotFound)\n this.logger.warn(\n `component \"${laneCompId.toString()}\" from the lane \"${lane.id.toString()}\" not found`\n );\n\n return undefined;\n }\n return { id: laneCompId._legacy, head: laneCompId.version as string };\n })\n )\n );\n\n const laneData: LaneData = {\n ...lane,\n components: componentIds,\n };\n return laneData;\n })\n );\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 | null> {\n const laneId = this.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) return null;\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 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();\n\n const results = {\n alias,\n laneId: laneObj.toLaneId(),\n hash: laneObj.hash().toString(),\n };\n return results;\n }\n\n async loadLane(id: LaneId): Promise<Lane | null> {\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();\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();\n\n return { laneId };\n }\n\n async changeScope(laneName: string, remoteScope: string): Promise<{ remoteScopeBefore: string }> {\n if (!this.workspace) {\n throw new BitError(`unable to change-scope of a lane outside of Bit workspace`);\n }\n const laneNameWithoutScope = laneName.includes(LANE_REMOTE_DELIMITER)\n ? laneName.split(LANE_REMOTE_DELIMITER)[1]\n : laneName;\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 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.scope = 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 this.workspace.consumer.bitMap.setCurrentLane(newLaneId, false);\n await this.workspace.consumer.onDestroy();\n\n return { remoteScopeBefore };\n }\n\n /**\n * change a lane-name and if possible, export the lane to the remote\n */\n async rename(currentName: string, newName: string): Promise<{ exported: boolean; exportErr?: Error }> {\n if (!this.workspace) {\n throw new BitError(`unable to rename a lane outside of Bit workspace`);\n }\n throwForInvalidLaneName(newName);\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 tracking data\n const afterTrackData = {\n localLane: newName,\n remoteLane: newName,\n remoteScope: lane.scope,\n };\n this.scope.legacyScope.lanes.trackLane(afterTrackData);\n this.scope.legacyScope.lanes.removeTrackLane(laneNameWithoutScope);\n\n // change the lane object\n lane.name = newName;\n await this.scope.legacyScope.lanes.saveLane(lane);\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 // export the lane with only the name-change\n const clonedLaneToExport = lane.clone();\n clonedLaneToExport.components = []; // otherwise, it'll export the changes done on the components.\n let exported = false;\n let exportErr: Error | undefined;\n try {\n await this.exportLane(clonedLaneToExport);\n exported = true;\n } catch (err: any) {\n this.logger.error(`unable to export ${lane.id.toString()}: ${err.message}`);\n exportErr = err;\n }\n\n await this.workspace.consumer.onDestroy();\n\n return { exported, exportErr };\n }\n\n async exportLane(lane: Lane) {\n await this.exporter.exportMany({\n scope: this.scope.legacyScope,\n laneObject: lane,\n ids: new BitIds(),\n idsWithFutureScope: new BitIds(),\n allVersions: false,\n });\n }\n\n async importLaneObject(laneId: LaneId, persistIfNotExists = true): Promise<Lane> {\n return this.importer.importLaneObject(laneId, persistIfNotExists);\n }\n\n /**\n * get the distance for a component between two lanes. for example, lane-b forked from lane-a and lane-b added some new snaps\n * @param componentId\n * @param sourceHead head on the source lane. leave empty if the source is main\n * @param targetHead head on the target lane. leave empty if the target is main\n * @returns\n */\n async getSnapsDistance(\n componentId: ComponentID,\n sourceHead?: string,\n targetHead?: string,\n throws?: boolean\n ): Promise<SnapsDistance> {\n if (!sourceHead && !targetHead)\n throw new Error(`getDivergeData got sourceHead and targetHead empty. at least one of them should be populated`);\n const modelComponent = await this.scope.legacyScope.getModelComponent(componentId._legacy);\n return getDivergeData({\n modelComponent,\n repo: this.scope.legacyScope.objects,\n sourceHead: sourceHead ? Ref.from(sourceHead) : modelComponent.head || null,\n targetHead: targetHead ? Ref.from(targetHead) : modelComponent.head || null,\n throws,\n });\n }\n\n /**\n * get the head hash (snap) of main. return undefined if the component exists only on a lane and was never merged to main\n */\n async getHeadOnMain(componentId: ComponentID): Promise<string | undefined> {\n const modelComponent = await this.scope.legacyScope.getModelComponent(componentId._legacy);\n return modelComponent.head?.toString();\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 if (!this.workspace) {\n throw new BitError('unable to fetch lanes outside of Bit workspace');\n }\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();\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 async removeComps(componentsPattern: string, removeCompsOpts: RemoveCompsOpts): Promise<MarkRemoveOnLaneResult> {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const currentLane = await workspace.getCurrentLaneObject();\n if (!currentLane) {\n throw new Error('markRemoveOnLane expects to get called when on a lane');\n }\n if (currentLane.isNew || removeCompsOpts.workspaceOnly) {\n const results = await this.remove.remove({\n componentsPattern,\n force: true,\n });\n const ids = results.localResult.removedComponentIds;\n const compIds = await workspace.resolveMultipleComponentIds(ids);\n return { removedFromWs: compIds, markedRemoved: [] };\n }\n\n const componentIds = await workspace.idsByPattern(componentsPattern);\n const laneBitIds = currentLane.toBitIds();\n const [laneCompIds, mainCompIds] = partition(componentIds, (id) => laneBitIds.hasWithoutVersion(id._legacy));\n\n const removeFromWorkspace = async () => {\n if (!mainCompIds.length) return [];\n const results = await this.remove.removeLocallyByIds(\n mainCompIds.map((id) => id._legacy),\n { force: true }\n );\n const ids = results.localResult.removedComponentIds;\n return workspace.resolveMultipleComponentIds(ids);\n };\n\n const removedFromWs = await removeFromWorkspace();\n const markedRemoved = await this.remove.markRemoveComps(laneCompIds);\n\n return { removedFromWs, markedRemoved };\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 { alias, merge, pattern, getAll = false, skipDependencyInstallation = false }: SwitchLaneOptions\n ) {\n if (!this.workspace) {\n throw new BitError(`unable to switch lanes outside of Bit workspace`);\n }\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: !getAll,\n pattern,\n alias,\n };\n const checkoutProps = {\n mergeStrategy,\n skipNpmInstall: skipDependencyInstallation,\n verbose: false, // not relevant in Harmony\n ignorePackageJson: true, // not relevant in Harmony\n ignoreDist: true, // not relevant in Harmony\n isLane: true,\n promptMergeOptions: false,\n writeConfig: false,\n reset: false,\n all: false,\n };\n return new LaneSwitcher(this.workspace, this.logger, switchProps, checkoutProps, this).switch();\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);\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 const bitIdsFromBitmap = workspace ? workspace.consumer.bitMap.getAllBitIdsFromAllLanes() : [];\n\n const filteredComponentIds = workspace\n ? laneComponents.filter((laneComponent) =>\n bitIdsFromBitmap.some((bitmapComponentId) => bitmapComponentId.isEqualWithoutVersion(laneComponent.id))\n )\n : laneComponents;\n\n const host = this.componentAspect.getHost();\n\n return Promise.all(\n filteredComponentIds.map((laneComponent) => {\n const legacyIdWithVersion = laneComponent.id.changeVersion(laneComponent.head);\n return host.resolveComponentId(legacyIdWithVersion);\n })\n );\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 = await host.resolveComponentId(\n laneReadmeComponent.id.changeVersion(laneReadmeComponent.head)\n );\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 = await this.workspace.resolveComponentId(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);\n await this.workspace.bitMap.write();\n\n return { result: true };\n }\n\n async diffStatus(\n sourceLaneId: LaneId,\n targetLaneId?: LaneId,\n options?: LaneDiffStatusOptions\n ): Promise<LaneDiffStatus> {\n const sourceLaneComponents = sourceLaneId.isDefault()\n ? (await this.getLaneDataOfDefaultLane())?.components.map((main) => ({ id: main.id, head: Ref.from(main.head) }))\n : (await this.loadLane(sourceLaneId))?.components;\n\n const targetLane = targetLaneId ? await this.loadLane(targetLaneId) : undefined;\n const targetLaneIds = targetLane?.toBitIds();\n const host = this.componentAspect.getHost();\n\n const targetMainHeads =\n !targetLaneId || targetLaneId?.isDefault()\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 await this.importer.importObjectsFromMainIfExist(targetMainHeads);\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 results = await pMapSeries(diffProps, async ({ componentId, sourceHead, targetHead }) =>\n this.componentDiffStatus(componentId, sourceHead, targetHead, options)\n );\n\n return {\n source: sourceLaneId,\n target: targetLaneId || this.getDefaultLaneId(),\n componentsStatus: results,\n };\n }\n\n async componentDiffStatus(\n componentId: ComponentID,\n sourceHead: string,\n targetHead?: string,\n options?: LaneDiffStatusOptions\n ): Promise<LaneComponentDiffStatus> {\n const snapsDistance = await this.getSnapsDistance(componentId, sourceHead, targetHead, false);\n\n if (snapsDistance?.err) {\n const noCommonSnap = snapsDistance.err instanceof NoCommonSnap;\n\n return {\n componentId,\n sourceHead,\n targetHead,\n upToDate: snapsDistance?.isUpToDate(),\n unrelated: noCommonSnap || undefined,\n changes: [],\n };\n }\n\n const commonSnap = snapsDistance?.commonSnapBeforeDiverge;\n\n const getChanges = async (): Promise<ChangeType[]> => {\n if (!commonSnap) return [ChangeType.NEW];\n\n const compare = await this.componentCompare.compare(\n componentId.changeVersion(commonSnap.hash).toString(),\n componentId.changeVersion(sourceHead).toString()\n );\n\n if (!compare.fields.length && (!compare.code.length || !compare.code.some((c) => c.status !== 'UNCHANGED'))) {\n return [ChangeType.NONE];\n }\n\n const changed: ChangeType[] = [];\n\n if (compare.code.some((f) => f.status !== 'UNCHANGED')) {\n changed.push(ChangeType.SOURCE_CODE);\n }\n\n if (compare.fields.length > 0) {\n changed.push(ChangeType.ASPECTS);\n }\n\n const depsFields = ['dependencies', 'devDependencies', 'extensionDependencies'];\n if (compare.fields.some((field) => depsFields.includes(field.fieldName))) {\n changed.push(ChangeType.DEPENDENCY);\n }\n\n return changed;\n };\n\n const changes = !options?.skipChanges ? await getChanges() : undefined;\n const changeType = changes ? changes[0] : undefined;\n\n return {\n componentId,\n changeType,\n changes,\n sourceHead,\n targetHead: commonSnap?.hash,\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 };\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 async addLaneReadme(readmeComponentIdStr: string, laneName?: string): Promise<{ result: boolean; message?: string }> {\n if (!this.workspace) {\n throw new BitError(`unable to track a lane readme component outside of Bit workspace`);\n }\n const readmeComponentId = await this.workspace.resolveComponentId(readmeComponentIdStr);\n\n const readmeComponentBitId = readmeComponentId._legacy;\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\n const lane: Lane | null | undefined = await scope.loadLane(laneId);\n\n if (!lane) {\n return { result: false, message: `cannot find lane ${laneName}` };\n }\n\n lane.setReadmeComponent(readmeComponentBitId);\n await scope.lanes.saveLane(lane);\n\n const existingLaneConfig =\n (await this.workspace.getSpecificComponentConfig(readmeComponentId, LanesAspect.id)) || {};\n\n const remoteLaneIdStr = lane.toLaneId().toString();\n\n if (existingLaneConfig.readme) {\n await this.workspace.addSpecificComponentConfig(readmeComponentId, LanesAspect.id, {\n ...existingLaneConfig,\n readme: {\n ...existingLaneConfig.readme,\n [remoteLaneIdStr]: true,\n },\n });\n } else {\n await this.workspace.addSpecificComponentConfig(readmeComponentId, LanesAspect.id, {\n ...existingLaneConfig,\n readme: {\n [remoteLaneIdStr]: true,\n },\n });\n }\n await this.workspace.bitMap.write();\n return { result: true };\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.toBitId()))\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.toBitId()));\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.toBitId()));\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.toBitId(), divergeData };\n })\n );\n\n return compact(results);\n }\n\n private async getLaneDataOfDefaultLane(): Promise<LaneData | null> {\n const consumer = this.workspace?.consumer;\n let bitIds: BitId[] = [];\n if (!consumer) {\n const scopeComponents = await this.scope.list();\n bitIds = scopeComponents.filter((component) => component.head).map((component) => component.id._legacy);\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 ];\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 ]: [\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 ]) {\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 );\n const switchCmd = new SwitchCmd(lanesMain);\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),\n new LaneAddReadmeCmd(lanesMain),\n new LaneRemoveReadmeCmd(lanesMain),\n new LaneImportCmd(switchCmd),\n new LaneRemoveCompCmd(workspace, lanesMain),\n ];\n cli.register(laneCmd, switchCmd);\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":";;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAE,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,SAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,WAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,UAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SA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sBAAY,EACZC,0BAAc,EACdC,sBAAY,EACZC,wBAAa,EACbC,0CAAsB,EACtBC,0BAAqB,EACrBC,iBAAY,EACZC,mBAAc,CACf;AAAA,IAAAnZ,gBAAA,GAAAC,OAAA,EAp5BUI,SAAS,aAq5BH+Y,kBAAW;AA6E9BtJ,oBAAW,CAACuJ,UAAU,CAAChZ,SAAS,CAAC;AAAC,IAAAiZ,QAAA,GAEnBjZ,SAAS;AAAAgY,OAAA,CAAApY,OAAA,GAAAqZ,QAAA"}
1
+ {"version":3,"names":["_cli","data","require","_scope","_pMapSeries","_interopRequireDefault","_graphql","_express","_workspace","_getRemoteByName","_lanesModules","_laneId","_bitError","_logger","_mergeVersion","_importer","_component","_removeLanes","_models","_getDivergeData","_legacyBitId","_export","_bitId","_lodash","_componentCompare","_objects","_componentWriter","_remove","_merging","_checkout","_lanesEntities","_exceptions","_noCommonSnap","_lanes","_lane","_lanes2","_switch","_switchLanes","_createLane","_lanesCreate","_lanesDelete","_lanesRestore","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","LanesMain","constructor","workspace","scope","merging","componentAspect","logger","importer","exporter","componentCompare","componentWriter","remove","checkout","getLanes","name","remote","merged","showDefaultLane","notMerged","_this$workspace","showMergeData","Boolean","consumer","laneId","LaneId","from","undefined","remoteObj","getRemoteByName","lanes","listLanes","toString","DEFAULT_LANE","defaultLane","getLaneDataOfDefaultLane","legacyScope","getLanesData","filterSoftRemovedLaneComps","parseLaneId","idStr","parseLaneIdFromString","Promise","all","map","lane","id","isDefault","componentIds","compact","getLaneComponentIds","laneCompId","isComponentRemoved","err","ComponentNotFound","warn","_legacy","head","version","laneData","components","getCurrentLaneName","_this$getCurrentLaneI","getCurrentLaneId","getCurrentLaneNameOrAlias","currentLaneId","trackingData","getLocalTrackedLaneByRemoteName","getCurrentLane","loadLane","getDefaultLaneId","setCurrentLane","alias","exported","_this$workspace2","createLane","forkLaneNewScope","newLane","createLaneInScope","toLaneId","hash","throwForInvalidLaneName","currentLaneScope","BitError","defaultScope","laneObj","trackLaneData","localLane","remoteLane","remoteScope","trackLane","scopeJson","setLaneAsNew","onDestroy","results","localName","remoteName","beforeTrackData","getRemoteTrackedDataByLocalLane","beforeTrackDataCloned","afterTrackData","aliasLane","laneName","includes","LANE_REMOTE_DELIMITER","trackData","laneNameWithoutScope","split","removeTrackLane","changeScope","isNew","isValidScopeName","InvalidScopeName","remoteScopeBefore","newLaneId","saveLane","bitMap","rename","currentName","newName","existingAliasWithNewName","remoteIdStr","objects","remoteLanes","renameRefByNewLaneName","isEqual","isExported","isLaneExported","clonedLaneToExport","clone","exportErr","exportLane","error","message","exportMany","laneObject","ids","BitIds","idsWithFutureScope","allVersions","importLaneObject","persistIfNotExists","getSnapsDistance","componentId","sourceHead","targetHead","throws","Error","modelComponent","getModelComponent","getDivergeData","repo","Ref","getHeadOnMain","_modelComponent$head","fetchLaneWithItsComponents","debug","fetchLaneComponents","removeLanes","laneNames","opts","_this$workspace3","force","laneResults","restoreLane","laneHash","ref","objectsFromTrash","getFromTrash","laneIdFromTrash","existingWithSameId","restoreFromTrash","removeComps","componentsPattern","removeCompsOpts","OutsideWorkspaceError","currentLane","getCurrentLaneObject","workspaceOnly","updateMain","localResult","removedComponentIds","compIds","resolveMultipleComponentIds","removedFromWs","markedRemoved","idsByPattern","laneBitIds","toBitIds","idsToMarkRemove","idsToRemoveFromWs","partition","hasVersion","hasWithoutVersion","removeFromWorkspace","removeLocallyByIds","markRemoveComps","switchLanes","merge","pattern","getAll","skipDependencyInstallation","mergeStrategy","mergeOptions","MergeOptions","join","switchProps","existingOnWorkspaceOnly","checkoutProps","skipNpmInstall","verbose","ignorePackageJson","ignoreDist","isLane","promptMergeOptions","writeConfig","reset","LaneSwitcher","switch","getDiff","values","diffOptions","laneDiffGenerator","LaneDiffGenerator","generate","getLaneComponentModels","host","getHost","laneComponentIds","getMany","laneComponents","bitIdsFromBitmap","getAllBitIdsFromAllLanes","filteredComponentIds","laneComponent","some","bitmapComponentId","isEqualWithoutVersion","legacyIdWithVersion","changeVersion","resolveComponentId","getLaneReadmeComponent","laneReadmeComponent","readmeComponent","laneReadmeComponentId","get","removeLaneReadme","currentLaneName","result","readmeComponentId","existingLaneConfig","getSpecificComponentConfig","LanesAspect","remoteLaneIdStr","readme","removeSpecificComponentConfig","addSpecificComponentConfig","setReadmeComponent","write","diffStatus","sourceLaneId","targetLaneId","options","_await$this$getLaneDa","_await$this$loadLane","sourceLaneComponents","main","targetLane","targetLaneIds","targetMainHeads","headOnMain","importObjectsFromMainIfExist","diffProps","_targetLaneIds$search","sourceVersionObj","load","isRemoved","headOnTargetLane","searchWithoutVersion","targetVersionObj","pMapSeries","componentDiffStatus","componentsStatus","_snapsDistance$snapsO","_snapsDistance$snapsO2","_snapsDistance$common","snapsDistance","noCommonSnap","NoCommonSnap","upToDate","isUpToDate","unrelated","changes","commonSnap","commonSnapBeforeDiverge","getChanges","ChangeType","NEW","compare","fields","code","c","status","NONE","changed","f","SOURCE_CODE","ASPECTS","depsFields","field","fieldName","DEPENDENCY","skipChanges","changeType","onSource","snapsOnSourceOnly","s","onTarget","snapsOnTargetOnly","common","recreateNewLaneIfDeleted","addLaneReadme","readmeComponentIdStr","readmeComponentBitId","listUpdatesFromForked","componentsList","_this$workspace4","isOnMain","forkedFromLaneId","forkedFrom","forkedFromLane","workspaceIds","getAllBitIds","duringMergeIds","listDuringMergeStateComponents","componentsFromModel","getModelComponents","compFromModelOnWorkspace","toBitId","remoteForkedLane","getRemoteLane","headOnForked","find","headOnLane","laneHeadLocal","divergeData","_this$workspace5","bitIds","scopeComponents","list","component","getIdsOfDefaultLane","bitId","isMerged","createRoutePath","deleteRoutePath","restoreRoutePath","provider","cli","graphql","loggerMain","express","createLogger","lanesMain","switchCmd","SwitchCmd","laneCmd","LaneCmd","commands","LaneListCmd","LaneShowCmd","LaneCreateCmd","LaneRemoveCmd","LaneChangeScopeCmd","LaneAliasCmd","LaneRenameCmd","LaneDiffCmd","LaneAddReadmeCmd","LaneRemoveReadmeCmd","LaneImportCmd","LaneRemoveCompCmd","register","registerOnStart","lanesSchema","LanesCreateRoute","LanesDeleteRoute","LanesRestoreRoute","exports","CLIAspect","ScopeAspect","WorkspaceAspect","GraphqlAspect","MergingAspect","ComponentAspect","LoggerAspect","ImporterAspect","ExportAspect","ExpressAspect","ComponentCompareAspect","ComponentWriterAspect","RemoveAspect","CheckoutAspect","MainRuntime","addRuntime","_default"],"sources":["lanes.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport pMapSeries from 'p-map-series';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { ExpressAspect, ExpressMain } from '@teambit/express';\nimport { OutsideWorkspaceError, Workspace, WorkspaceAspect } from '@teambit/workspace';\nimport getRemoteByName from '@teambit/legacy/dist/remotes/get-remote-by-name';\nimport { LaneDiffCmd, LaneDiffGenerator, LaneDiffResults } from '@teambit/lanes.modules.diff';\nimport { LaneData } from '@teambit/legacy/dist/scope/lanes/lanes';\nimport { LaneId, DEFAULT_LANE, LANE_REMOTE_DELIMITER } from '@teambit/lane-id';\nimport { BitError } from '@teambit/bit-error';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { DiffOptions } from '@teambit/legacy/dist/consumer/component-ops/components-diff';\nimport { MergeStrategy, MergeOptions } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { TrackLane } from '@teambit/legacy/dist/scope/scope-json';\nimport { ImporterAspect, ImporterMain } from '@teambit/importer';\nimport ComponentAspect, { Component, ComponentID, ComponentMain } from '@teambit/component';\nimport removeLanes from '@teambit/legacy/dist/consumer/lanes/remove-lanes';\nimport { Lane, Version } from '@teambit/legacy/dist/scope/models';\nimport { getDivergeData } from '@teambit/legacy/dist/scope/component-ops/get-diverge-data';\nimport { Scope as LegacyScope } from '@teambit/legacy/dist/scope';\nimport { BitId, InvalidScopeName, isValidScopeName } from '@teambit/legacy-bit-id';\nimport { ExportAspect, ExportMain } from '@teambit/export';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { compact, partition } from 'lodash';\nimport { ComponentCompareMain, ComponentCompareAspect } from '@teambit/component-compare';\nimport { Ref } from '@teambit/legacy/dist/scope/objects';\nimport ComponentWriterAspect, { ComponentWriterMain } from '@teambit/component-writer';\nimport { SnapsDistance } from '@teambit/legacy/dist/scope/component-ops/snaps-distance';\nimport RemoveAspect, { RemoveMain } from '@teambit/remove';\nimport { MergingMain, MergingAspect } from '@teambit/merging';\nimport CheckoutAspect, { CheckoutMain } from '@teambit/checkout';\nimport { ChangeType } from '@teambit/lanes.entities.lane-diff';\nimport { ComponentNotFound } from '@teambit/legacy/dist/scope/exceptions';\nimport ComponentsList, { DivergeDataPerId } from '@teambit/legacy/dist/consumer/component/components-list';\nimport { NoCommonSnap } from '@teambit/legacy/dist/scope/exceptions/no-common-snap';\nimport { LanesAspect } from './lanes.aspect';\nimport {\n LaneCmd,\n LaneCreateCmd,\n LaneImportCmd,\n LaneListCmd,\n LaneRemoveCmd,\n LaneShowCmd,\n LaneChangeScopeCmd,\n LaneAliasCmd,\n LaneRenameCmd,\n LaneAddReadmeCmd,\n LaneRemoveReadmeCmd,\n LaneRemoveCompCmd,\n RemoveCompsOpts,\n} from './lane.cmd';\nimport { lanesSchema } from './lanes.graphql';\nimport { SwitchCmd } from './switch.cmd';\nimport { LaneSwitcher } from './switch-lanes';\nimport { createLane, createLaneInScope, throwForInvalidLaneName } from './create-lane';\nimport { LanesCreateRoute } from './lanes.create.route';\nimport { LanesDeleteRoute } from './lanes.delete.route';\nimport { LanesRestoreRoute } from './lanes.restore.route';\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 alias?: string;\n merge?: MergeStrategy;\n getAll?: boolean;\n pattern?: string;\n skipDependencyInstallation?: boolean;\n verbose?: boolean;\n override?: boolean;\n};\n\nexport type LaneComponentDiffStatus = {\n componentId: ComponentID;\n sourceHead: string;\n targetHead?: string;\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\nexport type LaneDiffStatusOptions = {\n skipChanges?: boolean;\n};\n\nexport type LaneDiffStatus = {\n source: LaneId;\n target: LaneId;\n componentsStatus: LaneComponentDiffStatus[];\n};\n\nexport type MarkRemoveOnLaneResult = { removedFromWs: ComponentID[]; markedRemoved: ComponentID[] };\n\ntype CreateLaneResult = {\n laneId: LaneId;\n hash: string;\n alias?: string;\n};\n\nexport class LanesMain {\n constructor(\n private 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 ) {}\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\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 // no need to filter soft-removed here. it was filtered already in the remote\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 this.filterSoftRemovedLaneComps(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 private async filterSoftRemovedLaneComps(lanes: LaneData[]): Promise<LaneData[]> {\n return Promise.all(\n lanes.map(async (lane) => {\n if (lane.id.isDefault()) return lane;\n\n const componentIds = compact(\n await Promise.all(\n (\n await this.getLaneComponentIds(lane)\n ).map(async (laneCompId) => {\n try {\n if (await this.scope.isComponentRemoved(laneCompId)) return undefined;\n } catch (err) {\n // if (err instanceof ComponentNotFound)\n // throw new Error(\n // `component \"${laneCompId.toString()}\" from the lane \"${lane.id.toString()}\" not found`\n // );\n // throw err;\n if (err instanceof ComponentNotFound)\n this.logger.warn(\n `component \"${laneCompId.toString()}\" from the lane \"${lane.id.toString()}\" not found`\n );\n\n return undefined;\n }\n return { id: laneCompId._legacy, head: laneCompId.version as string };\n })\n )\n );\n\n const laneData: LaneData = {\n ...lane,\n components: componentIds,\n };\n return laneData;\n })\n );\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 | null> {\n const laneId = this.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) return null;\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 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();\n\n const results = {\n alias,\n laneId: laneObj.toLaneId(),\n hash: laneObj.hash().toString(),\n };\n return results;\n }\n\n async loadLane(id: LaneId): Promise<Lane | null> {\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();\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();\n\n return { laneId };\n }\n\n async changeScope(laneName: string, remoteScope: string): Promise<{ remoteScopeBefore: string }> {\n if (!this.workspace) {\n throw new BitError(`unable to change-scope of a lane outside of Bit workspace`);\n }\n const laneNameWithoutScope = laneName.includes(LANE_REMOTE_DELIMITER)\n ? laneName.split(LANE_REMOTE_DELIMITER)[1]\n : laneName;\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 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.scope = 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 this.workspace.consumer.bitMap.setCurrentLane(newLaneId, false);\n await this.workspace.consumer.onDestroy();\n\n return { remoteScopeBefore };\n }\n\n /**\n * change a lane-name and if possible, export the lane to the remote\n */\n async rename(currentName: string, newName: string): Promise<{ exported: boolean; exportErr?: Error }> {\n if (!this.workspace) {\n throw new BitError(`unable to rename a lane outside of Bit workspace`);\n }\n throwForInvalidLaneName(newName);\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 tracking data\n const afterTrackData = {\n localLane: newName,\n remoteLane: newName,\n remoteScope: lane.scope,\n };\n this.scope.legacyScope.lanes.trackLane(afterTrackData);\n this.scope.legacyScope.lanes.removeTrackLane(laneNameWithoutScope);\n\n // change the lane object\n lane.name = newName;\n await this.scope.legacyScope.lanes.saveLane(lane);\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 // export the lane with only the name-change\n const clonedLaneToExport = lane.clone();\n clonedLaneToExport.components = []; // otherwise, it'll export the changes done on the components.\n let exported = false;\n let exportErr: Error | undefined;\n try {\n await this.exportLane(clonedLaneToExport);\n exported = true;\n } catch (err: any) {\n this.logger.error(`unable to export ${lane.id.toString()}: ${err.message}`);\n exportErr = err;\n }\n\n await this.workspace.consumer.onDestroy();\n\n return { exported, exportErr };\n }\n\n async exportLane(lane: Lane) {\n await this.exporter.exportMany({\n scope: this.scope.legacyScope,\n laneObject: lane,\n ids: new BitIds(),\n idsWithFutureScope: new BitIds(),\n allVersions: false,\n });\n }\n\n async importLaneObject(laneId: LaneId, persistIfNotExists = true): Promise<Lane> {\n return this.importer.importLaneObject(laneId, persistIfNotExists);\n }\n\n /**\n * get the distance for a component between two lanes. for example, lane-b forked from lane-a and lane-b added some new snaps\n * @param componentId\n * @param sourceHead head on the source lane. leave empty if the source is main\n * @param targetHead head on the target lane. leave empty if the target is main\n * @returns\n */\n async getSnapsDistance(\n componentId: ComponentID,\n sourceHead?: string,\n targetHead?: string,\n throws?: boolean\n ): Promise<SnapsDistance> {\n if (!sourceHead && !targetHead)\n throw new Error(`getDivergeData got sourceHead and targetHead empty. at least one of them should be populated`);\n const modelComponent = await this.scope.legacyScope.getModelComponent(componentId._legacy);\n return getDivergeData({\n modelComponent,\n repo: this.scope.legacyScope.objects,\n sourceHead: sourceHead ? Ref.from(sourceHead) : modelComponent.head || null,\n targetHead: targetHead ? Ref.from(targetHead) : modelComponent.head || null,\n throws,\n });\n }\n\n /**\n * get the head hash (snap) of main. return undefined if the component exists only on a lane and was never merged to main\n */\n async getHeadOnMain(componentId: ComponentID): Promise<string | undefined> {\n const modelComponent = await this.scope.legacyScope.getModelComponent(componentId._legacy);\n return modelComponent.head?.toString();\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 if (!this.workspace) {\n throw new BitError('unable to fetch lanes outside of Bit workspace');\n }\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();\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 async removeComps(componentsPattern: string, removeCompsOpts: RemoveCompsOpts): Promise<MarkRemoveOnLaneResult> {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const currentLane = await workspace.getCurrentLaneObject();\n if (!currentLane) {\n throw new Error('markRemoveOnLane expects to get called when on a lane');\n }\n const { workspaceOnly, updateMain } = removeCompsOpts;\n if (!updateMain && (currentLane.isNew || workspaceOnly)) {\n const results = await this.remove.remove({\n componentsPattern,\n force: true,\n });\n const ids = results.localResult.removedComponentIds;\n const compIds = await workspace.resolveMultipleComponentIds(ids);\n return { removedFromWs: compIds, markedRemoved: [] };\n }\n\n const componentIds = await workspace.idsByPattern(componentsPattern);\n const laneBitIds = currentLane.toBitIds();\n const [idsToMarkRemove, idsToRemoveFromWs] = updateMain\n ? partition(componentIds, (id) => id.hasVersion())\n : partition(componentIds, (id) => laneBitIds.hasWithoutVersion(id._legacy));\n\n const removeFromWorkspace = async () => {\n if (!idsToRemoveFromWs.length) return [];\n const results = await this.remove.removeLocallyByIds(\n idsToRemoveFromWs.map((id) => id._legacy),\n { force: true }\n );\n const ids = results.localResult.removedComponentIds;\n return workspace.resolveMultipleComponentIds(ids);\n };\n\n const removedFromWs = await removeFromWorkspace();\n const markedRemoved = await this.remove.markRemoveComps(idsToMarkRemove, updateMain);\n\n return { removedFromWs, markedRemoved };\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 { alias, merge, pattern, getAll = false, skipDependencyInstallation = false }: SwitchLaneOptions\n ) {\n if (!this.workspace) {\n throw new BitError(`unable to switch lanes outside of Bit workspace`);\n }\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: !getAll,\n pattern,\n alias,\n };\n const checkoutProps = {\n mergeStrategy,\n skipNpmInstall: skipDependencyInstallation,\n verbose: false, // not relevant in Harmony\n ignorePackageJson: true, // not relevant in Harmony\n ignoreDist: true, // not relevant in Harmony\n isLane: true,\n promptMergeOptions: false,\n writeConfig: false,\n reset: false,\n all: false,\n };\n return new LaneSwitcher(this.workspace, this.logger, switchProps, checkoutProps, this).switch();\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);\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 const bitIdsFromBitmap = workspace ? workspace.consumer.bitMap.getAllBitIdsFromAllLanes() : [];\n\n const filteredComponentIds = workspace\n ? laneComponents.filter((laneComponent) =>\n bitIdsFromBitmap.some((bitmapComponentId) => bitmapComponentId.isEqualWithoutVersion(laneComponent.id))\n )\n : laneComponents;\n\n const host = this.componentAspect.getHost();\n\n return Promise.all(\n filteredComponentIds.map((laneComponent) => {\n const legacyIdWithVersion = laneComponent.id.changeVersion(laneComponent.head);\n return host.resolveComponentId(legacyIdWithVersion);\n })\n );\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 = await host.resolveComponentId(\n laneReadmeComponent.id.changeVersion(laneReadmeComponent.head)\n );\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 = await this.workspace.resolveComponentId(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);\n await this.workspace.bitMap.write();\n\n return { result: true };\n }\n\n async diffStatus(\n sourceLaneId: LaneId,\n targetLaneId?: LaneId,\n options?: LaneDiffStatusOptions\n ): Promise<LaneDiffStatus> {\n const sourceLaneComponents = sourceLaneId.isDefault()\n ? (await this.getLaneDataOfDefaultLane())?.components.map((main) => ({ id: main.id, head: Ref.from(main.head) }))\n : (await this.loadLane(sourceLaneId))?.components;\n\n const targetLane = targetLaneId ? await this.loadLane(targetLaneId) : undefined;\n const targetLaneIds = targetLane?.toBitIds();\n const host = this.componentAspect.getHost();\n\n const targetMainHeads =\n !targetLaneId || targetLaneId?.isDefault()\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 await this.importer.importObjectsFromMainIfExist(targetMainHeads);\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 results = await pMapSeries(diffProps, async ({ componentId, sourceHead, targetHead }) =>\n this.componentDiffStatus(componentId, sourceHead, targetHead, options)\n );\n\n return {\n source: sourceLaneId,\n target: targetLaneId || this.getDefaultLaneId(),\n componentsStatus: results,\n };\n }\n\n async componentDiffStatus(\n componentId: ComponentID,\n sourceHead: string,\n targetHead?: string,\n options?: LaneDiffStatusOptions\n ): Promise<LaneComponentDiffStatus> {\n const snapsDistance = await this.getSnapsDistance(componentId, sourceHead, targetHead, false);\n\n if (snapsDistance?.err) {\n const noCommonSnap = snapsDistance.err instanceof NoCommonSnap;\n\n return {\n componentId,\n sourceHead,\n targetHead,\n upToDate: snapsDistance?.isUpToDate(),\n unrelated: noCommonSnap || undefined,\n changes: [],\n };\n }\n\n const commonSnap = snapsDistance?.commonSnapBeforeDiverge;\n\n const getChanges = async (): Promise<ChangeType[]> => {\n if (!commonSnap) return [ChangeType.NEW];\n\n const compare = await this.componentCompare.compare(\n componentId.changeVersion(commonSnap.hash).toString(),\n componentId.changeVersion(sourceHead).toString()\n );\n\n if (!compare.fields.length && (!compare.code.length || !compare.code.some((c) => c.status !== 'UNCHANGED'))) {\n return [ChangeType.NONE];\n }\n\n const changed: ChangeType[] = [];\n\n if (compare.code.some((f) => f.status !== 'UNCHANGED')) {\n changed.push(ChangeType.SOURCE_CODE);\n }\n\n if (compare.fields.length > 0) {\n changed.push(ChangeType.ASPECTS);\n }\n\n const depsFields = ['dependencies', 'devDependencies', 'extensionDependencies'];\n if (compare.fields.some((field) => depsFields.includes(field.fieldName))) {\n changed.push(ChangeType.DEPENDENCY);\n }\n\n return changed;\n };\n\n const changes = !options?.skipChanges ? await getChanges() : undefined;\n const changeType = changes ? changes[0] : undefined;\n\n return {\n componentId,\n changeType,\n changes,\n sourceHead,\n targetHead: commonSnap?.hash,\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 };\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 async addLaneReadme(readmeComponentIdStr: string, laneName?: string): Promise<{ result: boolean; message?: string }> {\n if (!this.workspace) {\n throw new BitError(`unable to track a lane readme component outside of Bit workspace`);\n }\n const readmeComponentId = await this.workspace.resolveComponentId(readmeComponentIdStr);\n\n const readmeComponentBitId = readmeComponentId._legacy;\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\n const lane: Lane | null | undefined = await scope.loadLane(laneId);\n\n if (!lane) {\n return { result: false, message: `cannot find lane ${laneName}` };\n }\n\n lane.setReadmeComponent(readmeComponentBitId);\n await scope.lanes.saveLane(lane);\n\n const existingLaneConfig =\n (await this.workspace.getSpecificComponentConfig(readmeComponentId, LanesAspect.id)) || {};\n\n const remoteLaneIdStr = lane.toLaneId().toString();\n\n if (existingLaneConfig.readme) {\n await this.workspace.addSpecificComponentConfig(readmeComponentId, LanesAspect.id, {\n ...existingLaneConfig,\n readme: {\n ...existingLaneConfig.readme,\n [remoteLaneIdStr]: true,\n },\n });\n } else {\n await this.workspace.addSpecificComponentConfig(readmeComponentId, LanesAspect.id, {\n ...existingLaneConfig,\n readme: {\n [remoteLaneIdStr]: true,\n },\n });\n }\n await this.workspace.bitMap.write();\n return { result: true };\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.toBitId()))\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.toBitId()));\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.toBitId()));\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.toBitId(), divergeData };\n })\n );\n\n return compact(results);\n }\n\n private async getLaneDataOfDefaultLane(): Promise<LaneData | null> {\n const consumer = this.workspace?.consumer;\n let bitIds: BitId[] = [];\n if (!consumer) {\n const scopeComponents = await this.scope.list();\n bitIds = scopeComponents.filter((component) => component.head).map((component) => component.id._legacy);\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 ];\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 ]: [\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 ]) {\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 );\n const switchCmd = new SwitchCmd(lanesMain);\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),\n new LaneAddReadmeCmd(lanesMain),\n new LaneRemoveReadmeCmd(lanesMain),\n new LaneImportCmd(switchCmd),\n new LaneRemoveCompCmd(workspace, lanesMain),\n ];\n cli.register(laneCmd, switchCmd);\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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5BUI,SAAS,aAw5BHiZ,kBAAW;AA6E9BtJ,oBAAW,CAACuJ,UAAU,CAAClZ,SAAS,CAAC;AAAC,IAAAmZ,QAAA,GAEnBnZ,SAAS;AAAAkY,OAAA,CAAAtY,OAAA,GAAAuZ,QAAA"}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.700/dist/lanes.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.700/dist/lanes.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.702/dist/lanes.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.702/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": "0.0.700",
3
+ "version": "0.0.702",
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": "0.0.700"
9
+ "version": "0.0.702"
10
10
  },
11
11
  "dependencies": {
12
12
  "lodash": "4.17.21",
@@ -23,37 +23,37 @@
23
23
  "@teambit/scope.ui.scope-icon": "0.0.91",
24
24
  "@teambit/bit-error": "0.0.402",
25
25
  "@teambit/component-version": "0.0.409",
26
- "@teambit/lane-id": "0.0.269",
27
- "@teambit/scope": "0.0.1128",
28
- "@teambit/snapping": "0.0.443",
29
- "@teambit/workspace": "0.0.1128",
30
- "@teambit/lanes.ui.models.lanes-model": "0.0.169",
31
- "@teambit/cli": "0.0.754",
32
- "@teambit/express": "0.0.852",
33
- "@teambit/logger": "0.0.847",
34
- "@teambit/graphql": "0.0.1128",
35
- "@teambit/checkout": "0.0.297",
36
- "@teambit/component-compare": "0.0.376",
37
- "@teambit/component-writer": "0.0.164",
38
- "@teambit/component": "0.0.1128",
39
- "@teambit/export": "0.0.1128",
40
- "@teambit/importer": "0.0.557",
41
- "@teambit/lanes.entities.lane-diff": "0.0.114",
42
- "@teambit/lanes.modules.diff": "0.0.387",
43
- "@teambit/merging": "0.0.443",
44
- "@teambit/remove": "0.0.305",
45
- "@teambit/lanes.hooks.use-lanes": "0.0.216",
46
- "@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.178",
47
- "@teambit/lanes.ui.compare.lane-compare-page": "0.0.112",
48
- "@teambit/lanes.ui.compare.lane-compare": "0.0.130",
49
- "@teambit/lanes.ui.lane-overview": "0.0.171",
26
+ "@teambit/lane-id": "0.0.271",
27
+ "@teambit/scope": "0.0.1130",
28
+ "@teambit/snapping": "0.0.445",
29
+ "@teambit/workspace": "0.0.1130",
30
+ "@teambit/lanes.ui.models.lanes-model": "0.0.171",
31
+ "@teambit/cli": "0.0.756",
32
+ "@teambit/express": "0.0.854",
33
+ "@teambit/logger": "0.0.849",
34
+ "@teambit/graphql": "0.0.1130",
35
+ "@teambit/checkout": "0.0.299",
36
+ "@teambit/component-compare": "0.0.378",
37
+ "@teambit/component-writer": "0.0.166",
38
+ "@teambit/component": "0.0.1130",
39
+ "@teambit/export": "0.0.1130",
40
+ "@teambit/importer": "0.0.559",
41
+ "@teambit/lanes.entities.lane-diff": "0.0.116",
42
+ "@teambit/lanes.modules.diff": "0.0.389",
43
+ "@teambit/merging": "0.0.445",
44
+ "@teambit/remove": "0.0.307",
45
+ "@teambit/lanes.hooks.use-lanes": "0.0.218",
46
+ "@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.180",
47
+ "@teambit/lanes.ui.compare.lane-compare-page": "0.0.114",
48
+ "@teambit/lanes.ui.compare.lane-compare": "0.0.132",
49
+ "@teambit/lanes.ui.lane-overview": "0.0.173",
50
50
  "@teambit/lanes.ui.menus.lanes-overview-menu": "0.0.5",
51
- "@teambit/lanes.ui.menus.use-lanes-menu": "0.0.169",
52
- "@teambit/lanes.ui.navigation.lane-switcher": "0.0.173",
51
+ "@teambit/lanes.ui.menus.use-lanes-menu": "0.0.171",
52
+ "@teambit/lanes.ui.navigation.lane-switcher": "0.0.175",
53
53
  "@teambit/ui-foundation.ui.menu": "0.0.497",
54
54
  "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.501",
55
55
  "@teambit/ui-foundation.ui.react-router.use-query": "0.0.496",
56
- "@teambit/ui": "0.0.1128"
56
+ "@teambit/ui": "0.0.1130"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/lodash": "4.14.165",
@@ -65,13 +65,13 @@
65
65
  "@types/react-dom": "^17.0.5",
66
66
  "@types/jest": "^26.0.0",
67
67
  "@types/testing-library__jest-dom": "5.9.5",
68
- "@teambit/component.testing.mock-components": "0.0.116",
69
- "@teambit/harmony.testing.load-aspect": "0.0.115",
68
+ "@teambit/component.testing.mock-components": "0.0.118",
69
+ "@teambit/harmony.testing.load-aspect": "0.0.117",
70
70
  "@teambit/workspace.testing.mock-workspace": "0.0.14"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "react-router-dom": "^6.0.0",
74
- "@teambit/legacy": "1.0.536",
74
+ "@teambit/legacy": "1.0.539",
75
75
  "react": "^16.8.0 || ^17.0.0",
76
76
  "react-dom": "^16.8.0 || ^17.0.0"
77
77
  },