@teambit/lanes 0.0.663 → 0.0.664

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
@@ -395,7 +395,7 @@ class LaneImportCmd {
395
395
  description: 'the remote lane name'
396
396
  }]);
397
397
  (0, _defineProperty2().default)(this, "alias", '');
398
- (0, _defineProperty2().default)(this, "options", [['x', 'skip-dependency-installation', 'do not install packages of the imported components'], ['p', 'pattern <component-pattern>', 'EXPERIMENTAL. switch only the specified component-pattern. works only when the workspace is empty']]);
398
+ (0, _defineProperty2().default)(this, "options", [['x', 'skip-dependency-installation', 'do not install packages of the imported components'], ['p', 'pattern <component-pattern>', 'switch only the specified component-pattern. works only when the workspace is empty']]);
399
399
  (0, _defineProperty2().default)(this, "loader", true);
400
400
  (0, _defineProperty2().default)(this, "migration", true);
401
401
  }
@@ -1 +1 @@
1
- {"version":3,"names":["LaneListCmd","constructor","lanes","workspace","scope","report","args","laneOptions","details","remote","merged","notMerged","laneIdStr","laneId","alias","isDefault","name","toString","getLanes","showDefaultLane","mergedLanes","filter","l","isMerged","length","chalk","green","map","m","join","unmergedLanes","currentLane","getCurrentLaneId","getDefaultLaneId","laneDataOfCurrentLane","find","isEqual","id","undefined","currentAlias","currentLaneReadmeComponentStr","outputReadmeComponent","readmeComponent","currentLaneStr","currentLaneComponents","outputComponents","components","availableLanes","laneData","readmeComponentStr","laneTitle","bold","concat","outputFooter","footer","outputCurrentLane","outputAvailableLanes","json","getCurrentLaneNameOrAlias","LaneShowCmd","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 ] 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 'EXPERIMENTAL. 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;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA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O0G,eAAe,GAAGC,aAAa;AACxC;AAEA,SAAS/F,qBAAqB,CAACkG,SAAsC,EAAU;EAC7E,IAAI,CAACA,SAAS,EAAE,OAAO,EAAE;EACzB,OAAQ,OAAO,GAAElH,gBAAK,CAACyD,MAAM,CAAC,kBAAkB,CAAE,SAAQyD,SAAS,CAACtG,EAAG,MACrEsG,SAAS,CAACD,IAAI,IACb,iCAAgCC,SAAS,CAACtG,EAAE,CAACrB,IAAK,8DACpD,EAAE,IAAG;AACR"}
1
+ {"version":3,"names":["LaneListCmd","constructor","lanes","workspace","scope","report","args","laneOptions","details","remote","merged","notMerged","laneIdStr","laneId","alias","isDefault","name","toString","getLanes","showDefaultLane","mergedLanes","filter","l","isMerged","length","chalk","green","map","m","join","unmergedLanes","currentLane","getCurrentLaneId","getDefaultLaneId","laneDataOfCurrentLane","find","isEqual","id","undefined","currentAlias","currentLaneReadmeComponentStr","outputReadmeComponent","readmeComponent","currentLaneStr","currentLaneComponents","outputComponents","components","availableLanes","laneData","readmeComponentStr","laneTitle","bold","concat","outputFooter","footer","outputCurrentLane","outputAvailableLanes","json","getCurrentLaneNameOrAlias","LaneShowCmd","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 ] 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;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAVA;;AAsBO,MAAMA,WAAW,CAAoB;EAgB1CC,WAAW,CAASC,KAAgB,EAAUC,SAAoB,EAAUC,KAAgB,EAAE;IAAA,KAA1EF,KAAgB,GAAhBA,KAAgB;IAAA,KAAUC,S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E,CAACrB,IAAK,8DACpD,EAAE,IAAG;AACR"}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.663/dist/lanes.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.663/dist/lanes.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.664/dist/lanes.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.664/dist/lanes.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -39,7 +39,7 @@ class SwitchCmd {
39
39
  name: 'lane',
40
40
  description: 'lane-name or lane-id (if not exists locally) to switch to'
41
41
  }]);
42
- (0, _defineProperty2().default)(this, "options", [['n', 'alias <string>', 'relevant when the specified lane is a remote late. name a local lane differently than the remote lane'], ['m', 'merge [strategy]', 'merge local changes with the checked out version. strategy should be "theirs", "ours" or "manual"'], ['a', 'get-all', 'checkout all components in a lane include ones that do not exist in the workspace'], ['x', 'skip-dependency-installation', 'do not install packages of the imported components'], ['p', 'pattern <component-pattern>', 'EXPERIMENTAL. switch only the specified component-pattern. works only when the workspace is empty'], ['j', 'json', 'return the output as JSON']]);
42
+ (0, _defineProperty2().default)(this, "options", [['n', 'alias <string>', 'relevant when the specified lane is a remote late. name a local lane differently than the remote lane'], ['m', 'merge [strategy]', 'merge local changes with the checked out version. strategy should be "theirs", "ours" or "manual"'], ['a', 'get-all', 'checkout all components in a lane include ones that do not exist in the workspace'], ['x', 'skip-dependency-installation', 'do not install packages of the imported components'], ['p', 'pattern <component-pattern>', 'switch only the specified component-pattern. works only when the workspace is empty'], ['j', 'json', 'return the output as JSON']]);
43
43
  (0, _defineProperty2().default)(this, "loader", true);
44
44
  }
45
45
  async report([lane], {
@@ -1 +1 @@
1
- {"version":3,"names":["SwitchCmd","constructor","lanes","name","description","report","lane","alias","merge","getAll","skipDependencyInstallation","pattern","json","components","failedComponents","installationError","compilationError","switchLanes","JSON","stringify","getFailureOutput","length","title","body","map","failedComponent","color","unchangedLegitimately","chalk","bold","id","toString","failureMessage","join","getSuccessfulOutput","laneSwitched","green","component","componentName","toStringWithoutVersion","version","applyVersionReport","componentsStr","failedOutput","successOutput","installationErrorOutput","compilationErrorOutput"],"sources":["switch.cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { applyVersionReport, installationErrorOutput, compilationErrorOutput } from '@teambit/merging';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { MergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { LanesMain } from './lanes.main.runtime';\n\nexport class SwitchCmd implements Command {\n name = 'switch <lane> [pattern]';\n description = `switch to the specified lane`;\n private = true;\n alias = '';\n arguments = [\n {\n name: 'lane',\n description: 'lane-name or lane-id (if not exists locally) to switch to',\n },\n ];\n options = [\n [\n 'n',\n 'alias <string>',\n 'relevant when the specified lane is a remote late. name a local lane differently than the remote lane',\n ],\n [\n 'm',\n 'merge [strategy]',\n 'merge local changes with the checked out version. strategy should be \"theirs\", \"ours\" or \"manual\"',\n ],\n ['a', 'get-all', 'checkout all components in a lane include ones that do not exist in the workspace'],\n ['x', 'skip-dependency-installation', 'do not install packages of the imported components'],\n [\n 'p',\n 'pattern <component-pattern>',\n 'EXPERIMENTAL. switch only the specified component-pattern. works only when the workspace is empty',\n ],\n ['j', 'json', 'return the output as JSON'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report(\n [lane]: [string],\n {\n alias,\n merge,\n getAll = false,\n skipDependencyInstallation = false,\n pattern,\n json = false,\n }: {\n alias?: string;\n merge?: MergeStrategy;\n getAll?: boolean;\n skipDependencyInstallation?: boolean;\n override?: boolean;\n pattern?: string;\n json?: boolean;\n }\n ) {\n const { components, failedComponents, installationError, compilationError } = await this.lanes.switchLanes(lane, {\n alias,\n merge,\n getAll,\n pattern,\n skipDependencyInstallation,\n });\n if (json) {\n return JSON.stringify({ components, failedComponents }, null, 4);\n }\n const getFailureOutput = () => {\n if (!failedComponents || !failedComponents.length) return '';\n const title = 'the switch has been canceled on the following component(s)';\n const body = failedComponents\n .map((failedComponent) => {\n const color = failedComponent.unchangedLegitimately ? 'white' : 'red';\n return `${chalk.bold(failedComponent.id.toString())} - ${chalk[color](failedComponent.failureMessage)}`;\n })\n .join('\\n');\n return `${title}\\n${body}\\n\\n`;\n };\n const getSuccessfulOutput = () => {\n const laneSwitched = chalk.green(`\\nsuccessfully set \"${chalk.bold(lane)}\" as the active lane`);\n if (!components || !components.length) return `No component had been changed.${laneSwitched}`;\n if (components.length === 1) {\n const component = components[0];\n const componentName = component.id.toStringWithoutVersion();\n const title = `successfully switched ${chalk.bold(componentName)} to version ${chalk.bold(\n component.id.version as string\n )}\\n`;\n return `${title} ${applyVersionReport(components, false)}${laneSwitched}`;\n }\n const title = `successfully switched the following components to the version of ${lane}\\n\\n`;\n const componentsStr = applyVersionReport(components, true, false);\n return title + componentsStr + laneSwitched;\n };\n const failedOutput = getFailureOutput();\n const successOutput = getSuccessfulOutput();\n return (\n failedOutput +\n successOutput +\n installationErrorOutput(installationError) +\n compilationErrorOutput(compilationError)\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKO,MAAMA,SAAS,CAAoB;EAiCxCC,WAAW,CAASC,KAAgB,EAAE;IAAA,KAAlBA,KAAgB,GAAhBA,KAAgB;IAAA,8CAhC7B,yBAAyB;IAAA,qDACjB,8BAA6B;IAAA,iDAClC,IAAI;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,YAAY,GACZC,aAAa,GACb,IAAAC,kCAAuB,EAAC9B,iBAAiB,CAAC,GAC1C,IAAA+B,iCAAsB,EAAC9B,gBAAgB,CAAC;EAE5C;AACF;AAAC"}
1
+ {"version":3,"names":["SwitchCmd","constructor","lanes","name","description","report","lane","alias","merge","getAll","skipDependencyInstallation","pattern","json","components","failedComponents","installationError","compilationError","switchLanes","JSON","stringify","getFailureOutput","length","title","body","map","failedComponent","color","unchangedLegitimately","chalk","bold","id","toString","failureMessage","join","getSuccessfulOutput","laneSwitched","green","component","componentName","toStringWithoutVersion","version","applyVersionReport","componentsStr","failedOutput","successOutput","installationErrorOutput","compilationErrorOutput"],"sources":["switch.cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { applyVersionReport, installationErrorOutput, compilationErrorOutput } from '@teambit/merging';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { MergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { LanesMain } from './lanes.main.runtime';\n\nexport class SwitchCmd implements Command {\n name = 'switch <lane> [pattern]';\n description = `switch to the specified lane`;\n private = true;\n alias = '';\n arguments = [\n {\n name: 'lane',\n description: 'lane-name or lane-id (if not exists locally) to switch to',\n },\n ];\n options = [\n [\n 'n',\n 'alias <string>',\n 'relevant when the specified lane is a remote late. name a local lane differently than the remote lane',\n ],\n [\n 'm',\n 'merge [strategy]',\n 'merge local changes with the checked out version. strategy should be \"theirs\", \"ours\" or \"manual\"',\n ],\n ['a', 'get-all', 'checkout all components in a lane include ones that do not exist in the workspace'],\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 ['j', 'json', 'return the output as JSON'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report(\n [lane]: [string],\n {\n alias,\n merge,\n getAll = false,\n skipDependencyInstallation = false,\n pattern,\n json = false,\n }: {\n alias?: string;\n merge?: MergeStrategy;\n getAll?: boolean;\n skipDependencyInstallation?: boolean;\n override?: boolean;\n pattern?: string;\n json?: boolean;\n }\n ) {\n const { components, failedComponents, installationError, compilationError } = await this.lanes.switchLanes(lane, {\n alias,\n merge,\n getAll,\n pattern,\n skipDependencyInstallation,\n });\n if (json) {\n return JSON.stringify({ components, failedComponents }, null, 4);\n }\n const getFailureOutput = () => {\n if (!failedComponents || !failedComponents.length) return '';\n const title = 'the switch has been canceled on the following component(s)';\n const body = failedComponents\n .map((failedComponent) => {\n const color = failedComponent.unchangedLegitimately ? 'white' : 'red';\n return `${chalk.bold(failedComponent.id.toString())} - ${chalk[color](failedComponent.failureMessage)}`;\n })\n .join('\\n');\n return `${title}\\n${body}\\n\\n`;\n };\n const getSuccessfulOutput = () => {\n const laneSwitched = chalk.green(`\\nsuccessfully set \"${chalk.bold(lane)}\" as the active lane`);\n if (!components || !components.length) return `No component had been changed.${laneSwitched}`;\n if (components.length === 1) {\n const component = components[0];\n const componentName = component.id.toStringWithoutVersion();\n const title = `successfully switched ${chalk.bold(componentName)} to version ${chalk.bold(\n component.id.version as string\n )}\\n`;\n return `${title} ${applyVersionReport(components, false)}${laneSwitched}`;\n }\n const title = `successfully switched the following components to the version of ${lane}\\n\\n`;\n const componentsStr = applyVersionReport(components, true, false);\n return title + componentsStr + laneSwitched;\n };\n const failedOutput = getFailureOutput();\n const successOutput = getSuccessfulOutput();\n return (\n failedOutput +\n successOutput +\n installationErrorOutput(installationError) +\n compilationErrorOutput(compilationError)\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKO,MAAMA,SAAS,CAAoB;EAiCxCC,WAAW,CAASC,KAAgB,EAAE;IAAA,KAAlBA,KAAgB,GAAhBA,KAAgB;IAAA,8CAhC7B,yBAAyB;IAAA,qDACjB,8BAA6B;IAAA,iDAClC,IAAI;IAAA,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,GACZC,aAAa,GACb,IAAAC,kCAAuB,EAAC9B,iBAAiB,CAAC,GAC1C,IAAA+B,iCAAsB,EAAC9B,gBAAgB,CAAC;EAE5C;AACF;AAAC"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/lanes",
3
- "version": "0.0.663",
3
+ "version": "0.0.664",
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.663"
9
+ "version": "0.0.664"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -22,37 +22,37 @@
22
22
  "@teambit/scope.ui.scope-icon": "0.0.91",
23
23
  "@teambit/bit-error": "0.0.402",
24
24
  "@teambit/component-version": "0.0.409",
25
- "@teambit/lane-id": "0.0.249",
26
- "@teambit/scope": "0.0.1091",
27
- "@teambit/snapping": "0.0.406",
28
- "@teambit/lanes.ui.models.lanes-model": "0.0.149",
29
- "@teambit/cli": "0.0.732",
30
- "@teambit/workspace": "0.0.1091",
31
- "@teambit/express": "0.0.830",
32
- "@teambit/logger": "0.0.825",
33
- "@teambit/graphql": "0.0.1091",
34
- "@teambit/component-compare": "0.0.339",
35
- "@teambit/component-writer": "0.0.127",
36
- "@teambit/component": "0.0.1091",
37
- "@teambit/export": "0.0.1091",
38
- "@teambit/importer": "0.0.520",
39
- "@teambit/lanes.entities.lane-diff": "0.0.94",
40
- "@teambit/lanes.modules.diff": "0.0.367",
41
- "@teambit/merging": "0.0.406",
42
- "@teambit/remove": "0.0.268",
43
- "@teambit/lanes.hooks.use-lanes": "0.0.196",
44
- "@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.158",
45
- "@teambit/lanes.ui.compare.lane-compare-page": "0.0.90",
46
- "@teambit/lanes.ui.compare.lane-compare": "0.0.107",
47
- "@teambit/lanes.ui.lane-overview": "0.0.150",
25
+ "@teambit/lane-id": "0.0.250",
26
+ "@teambit/scope": "0.0.1092",
27
+ "@teambit/snapping": "0.0.407",
28
+ "@teambit/lanes.ui.models.lanes-model": "0.0.150",
29
+ "@teambit/cli": "0.0.733",
30
+ "@teambit/workspace": "0.0.1092",
31
+ "@teambit/express": "0.0.831",
32
+ "@teambit/logger": "0.0.826",
33
+ "@teambit/graphql": "0.0.1092",
34
+ "@teambit/component-compare": "0.0.340",
35
+ "@teambit/component-writer": "0.0.128",
36
+ "@teambit/component": "0.0.1092",
37
+ "@teambit/export": "0.0.1092",
38
+ "@teambit/importer": "0.0.521",
39
+ "@teambit/lanes.entities.lane-diff": "0.0.95",
40
+ "@teambit/lanes.modules.diff": "0.0.368",
41
+ "@teambit/merging": "0.0.407",
42
+ "@teambit/remove": "0.0.269",
43
+ "@teambit/lanes.hooks.use-lanes": "0.0.197",
44
+ "@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.159",
45
+ "@teambit/lanes.ui.compare.lane-compare-page": "0.0.91",
46
+ "@teambit/lanes.ui.compare.lane-compare": "0.0.108",
47
+ "@teambit/lanes.ui.lane-overview": "0.0.151",
48
48
  "@teambit/lanes.ui.menus.lanes-overview-menu": "0.0.5",
49
- "@teambit/lanes.ui.menus.use-lanes-menu": "0.0.149",
50
- "@teambit/lanes.ui.navigation.lane-switcher": "0.0.151",
49
+ "@teambit/lanes.ui.menus.use-lanes-menu": "0.0.150",
50
+ "@teambit/lanes.ui.navigation.lane-switcher": "0.0.152",
51
51
  "@teambit/ui-foundation.ui.menu": "0.0.497",
52
52
  "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.501",
53
53
  "@teambit/ui-foundation.ui.react-router.use-query": "0.0.496",
54
- "@teambit/ui": "0.0.1091",
55
- "@teambit/checkout": "0.0.260"
54
+ "@teambit/ui": "0.0.1092",
55
+ "@teambit/checkout": "0.0.261"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/react": "^17.0.8",
@@ -64,13 +64,13 @@
64
64
  "@types/react-dom": "^17.0.5",
65
65
  "@types/jest": "^26.0.0",
66
66
  "@types/testing-library__jest-dom": "5.9.5",
67
- "@teambit/component.testing.mock-components": "0.0.96",
68
- "@teambit/harmony.testing.load-aspect": "0.0.95",
67
+ "@teambit/component.testing.mock-components": "0.0.97",
68
+ "@teambit/harmony.testing.load-aspect": "0.0.96",
69
69
  "@teambit/workspace.testing.mock-workspace": "0.0.14"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "react-router-dom": "^6.0.0",
73
- "@teambit/legacy": "1.0.513",
73
+ "@teambit/legacy": "1.0.514",
74
74
  "react": "^16.8.0 || ^17.0.0",
75
75
  "react-dom": "^16.8.0 || ^17.0.0"
76
76
  },