@teambit/lanes 0.0.567 → 0.0.570
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 +1 -1
- package/dist/lane.cmd.js.map +1 -1
- package/dist/lanes.docs.mdx +2 -7
- package/dist/{preview-1677176115060.js → preview-1677431903896.js} +2 -2
- package/dist/switch.cmd.js +1 -1
- package/dist/switch.cmd.js.map +1 -1
- package/lanes.docs.mdx +2 -7
- package/package-tar/teambit-lanes-0.0.570.tgz +0 -0
- package/package.json +30 -30
- package/package-tar/teambit-lanes-0.0.567.tgz +0 -0
package/dist/lane.cmd.js
CHANGED
@@ -331,7 +331,7 @@ class LaneImportCmd {
|
|
331
331
|
description: 'the remote lane name'
|
332
332
|
}]);
|
333
333
|
(0, _defineProperty2().default)(this, "alias", '');
|
334
|
-
(0, _defineProperty2().default)(this, "options", [['', 'skip-dependency-installation', 'do not install packages of the imported components']]);
|
334
|
+
(0, _defineProperty2().default)(this, "options", [['x', 'skip-dependency-installation', 'do not install packages of the imported components']]);
|
335
335
|
(0, _defineProperty2().default)(this, "loader", true);
|
336
336
|
(0, _defineProperty2().default)(this, "private", true);
|
337
337
|
(0, _defineProperty2().default)(this, "migration", true);
|
package/dist/lane.cmd.js.map
CHANGED
@@ -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","onlyLane","title","author","log","username","email","date","Date","parseInt","toLocaleString","LaneCreateCmd","description","createLaneOptions","result","createLane","remoteScopeOrDefaultScope","remoteScope","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","LaneImportCmd","switchCmd","lane","skipDependencyInstallation","getAll","LaneCmd","LaneRemoveReadmeCmd","removeLaneReadme","red","LaneAddReadmeCmd","componentId","addLaneReadme","componentsTitle","componentsStr","c","head","component","yellow"],"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 { 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 { 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 private = 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 <string>', 'show remote lanes'],\n ] as CommandOptions;\n loader = true;\n private = 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 const lanes = await this.lanes.getLanes({\n name,\n remote,\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 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 '',\n 'remote-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 [\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 private = true;\n migration = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([name]: [string], createLaneOptions: CreateLaneOptions): Promise<string> {\n const result = await this.lanes.createLane(name, createLaneOptions);\n const remoteScopeOrDefaultScope = createLaneOptions.remoteScope\n ? `the remote scope ${chalk.bold(createLaneOptions.remoteScope)}`\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 );\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 private = 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 private = 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 private = true;\n migration = true;\n\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 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 ['', 'skip-dependency-installation', 'do not install packages of the imported components'],\n ] as CommandOptions;\n loader = true;\n private = true;\n migration = true;\n\n constructor(private switchCmd: SwitchCmd) {}\n\n async report(\n [lane]: [string],\n { skipDependencyInstallation = false }: { skipDependencyInstallation: boolean }\n ): Promise<string> {\n return this.switchCmd.report([lane], { getAll: true, skipDependencyInstallation });\n }\n}\n\nexport class LaneCmd implements Command {\n name = 'lane [lane-name]';\n description = 'manage 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 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 private = true;\n migration = true;\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 private = 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 private = 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;AAIA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AATA;;AAqBO,MAAMA,WAAW,CAAoB;EAiB1CC,WAAW,CAASC,KAAgB,EAAUC,SAAoB,EAAUC,KAAgB,EAAE;IAAA,KAA1EF,KAAgB,GAAhBA,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,IAAM,OAAMA,CAAC,CAACnF,EAAE,CAACpB,QAAQ,EAAG,MAAKuG,CAAC,CAACC,IAAK,EAAC,CAAC,CAAC5F,IAAI,CAAC,IAAI,CAAC;EAC5F,OAAOyF,eAAe,GAAGC,aAAa;AACxC;AAEA,SAAS9E,qBAAqB,CAACiF,SAAsC,EAAU;EAC7E,IAAI,CAACA,SAAS,EAAE,OAAO,EAAE;EACzB,OAAQ,OAAO,GAAEjG,gBAAK,CAACkG,MAAM,CAAC,kBAAkB,CAAE,SAAQD,SAAS,CAACrF,EAAG,MACrEqF,SAAS,CAACD,IAAI,IACb,iCAAgCC,SAAS,CAACrF,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","onlyLane","title","author","log","username","email","date","Date","parseInt","toLocaleString","LaneCreateCmd","description","createLaneOptions","result","createLane","remoteScopeOrDefaultScope","remoteScope","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","LaneImportCmd","switchCmd","lane","skipDependencyInstallation","getAll","LaneCmd","LaneRemoveReadmeCmd","removeLaneReadme","red","LaneAddReadmeCmd","componentId","addLaneReadme","componentsTitle","componentsStr","c","head","component","yellow"],"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 { 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 { 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 private = 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 <string>', 'show remote lanes'],\n ] as CommandOptions;\n loader = true;\n private = 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 const lanes = await this.lanes.getLanes({\n name,\n remote,\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 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 '',\n 'remote-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 [\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 private = true;\n migration = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([name]: [string], createLaneOptions: CreateLaneOptions): Promise<string> {\n const result = await this.lanes.createLane(name, createLaneOptions);\n const remoteScopeOrDefaultScope = createLaneOptions.remoteScope\n ? `the remote scope ${chalk.bold(createLaneOptions.remoteScope)}`\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 );\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 private = 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 private = 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 private = true;\n migration = true;\n\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 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 ] as CommandOptions;\n loader = true;\n private = true;\n migration = true;\n\n constructor(private switchCmd: SwitchCmd) {}\n\n async report(\n [lane]: [string],\n { skipDependencyInstallation = false }: { skipDependencyInstallation: boolean }\n ): Promise<string> {\n return this.switchCmd.report([lane], { getAll: true, skipDependencyInstallation });\n }\n}\n\nexport class LaneCmd implements Command {\n name = 'lane [lane-name]';\n description = 'manage 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 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 private = true;\n migration = true;\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 private = 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 private = 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;AAIA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AATA;;AAqBO,MAAMA,WAAW,CAAoB;EAiB1CC,WAAW,CAASC,KAAgB,EAAUC,SAAoB,EAAUC,KAAgB,EAAE;IAAA,KAA1EF,KAAgB,GAAhBA,KAAgB;IAAA,KAAUC,SAAoB,GAApBA,SAAoB;IAAA,KAAUC,KAAgB,GAAhBA,KAAgB;IAAA,8CAhBrF,MAAM;IAAA,qDACE,YAAW;IAAA,+CAClB,EAAE;IAAA,iDACA,CACR,CAAC,GAAG,EAAE,SAAS,EAAE,+DAA+D,CAAC,EACjF,CAAC,GAAG,EAAE,MAAM,EAAE,qCAAqC,CAAC,EACpD,CAAC,GAAG,EAAE,4BAA4B,EAAE,mBAAmB,CAAC,EACxD,CAAC,EAAE,EAAE,QAAQ,EAAE,mBAAmB,CAAC,EACnC,CAAC,EAAE,EAA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ACb,iCAAgCC,SAAS,CAACrF,EAAE,CAACrB,IAAK,8DACpD,EAAE,IAAG;AACR"}
|
package/dist/lanes.docs.mdx
CHANGED
@@ -36,11 +36,6 @@ The `LaneId` _always_ has these two props.
|
|
36
36
|
|
37
37
|
Currently, if it imports with no-deps, it doesn't ask for parents, if it imports with deps it imports with all parents. It is originated from src/api/scope/lib/fetch.ts: `const collectParents = !noDependencies;`. We need to make a decision here.
|
38
38
|
|
39
|
-
### Model changes
|
40
|
-
|
41
|
-
- `Version.parents`. This is added only if the lanes feature is enabled. (it doesn't change the hash).
|
42
|
-
- `Component.head` This is added only if the lanes feature is enabled. (it doesn't change the hash).
|
43
|
-
|
44
39
|
### Hash
|
45
40
|
|
46
41
|
- Snap's hash is generated by a UUID and then converted into sha1. `sha1(v4())`.
|
@@ -62,7 +57,7 @@ More places that stores lanes related data:
|
|
62
57
|
|
63
58
|
Summary of when/what lanes data is saved per command:
|
64
59
|
|
65
|
-
- `bit lane create`: creates a new lane-object and creates a new lane record in scope.json.
|
60
|
+
- `bit lane create`: creates a new lane-object and creates a new lane record in scope.json and .bitmap.
|
66
61
|
- `bit snap`: adds an entry to the lane-object.
|
67
62
|
- `bit export`: pushes the lane-object to the remote. On the remote, the lane-object is created or updated/merged.
|
68
63
|
- `bit switch --remote`: 1) creates/updates lane-object in the scope. 2) creates/updates remote-lane. the remote-lane is updated also for main.
|
@@ -115,7 +110,7 @@ To make this process easier, there are some tools that can help. keep reading.
|
|
115
110
|
#### source code merges/conflicts
|
116
111
|
|
117
112
|
To find out when a change was introduced to a file or when a file was added/removed, run `bit log-file <file-path>`.
|
118
|
-
It might be helpful to create a new
|
113
|
+
It might be helpful to create a new temporary workspace, import the other lane and run the same there.
|
119
114
|
This way, you get the full picture from both lanes when a change was introduced, and you can see whether it happened before and after the split from the base-snap.
|
120
115
|
Obviously, `bit log <comp-id> --one-line` is helpful here to see the distance from each lane from the base-snap.
|
121
116
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.570/dist/lanes.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.570/dist/lanes.docs.mdx';
|
3
3
|
|
4
4
|
export const compositions = [compositions_0];
|
5
5
|
export const overview = [overview_0];
|
package/dist/switch.cmd.js
CHANGED
@@ -35,7 +35,7 @@ class SwitchCmd {
|
|
35
35
|
(0, _defineProperty2().default)(this, "description", `switch to the specified lane`);
|
36
36
|
(0, _defineProperty2().default)(this, "private", true);
|
37
37
|
(0, _defineProperty2().default)(this, "alias", '');
|
38
|
-
(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'], ['', 'skip-dependency-installation', 'do not install packages of the imported components'], ['j', 'json', 'return the output as JSON']]);
|
38
|
+
(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'], ['j', 'json', 'return the output as JSON']]);
|
39
39
|
(0, _defineProperty2().default)(this, "loader", true);
|
40
40
|
}
|
41
41
|
async report([lane], {
|
package/dist/switch.cmd.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["SwitchCmd","constructor","lanes","report","lane","alias","merge","getAll","skipDependencyInstallation","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>';\n description = `switch to the specified lane`;\n private = true;\n alias = '';\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 ['', 'skip-dependency-installation', 'do not install packages of the imported components'],\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 json = false,\n }: {\n alias?: string;\n merge?: MergeStrategy;\n getAll?: boolean;\n skipDependencyInstallation?: boolean;\n override?: boolean;\n json?: boolean;\n }\n ) {\n const { components, failedComponents, installationError, compilationError } = await this.lanes.switchLanes(lane, {\n alias,\n merge,\n getAll,\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;EAsBxCC,WAAW,CAASC,KAAgB,EAAE;IAAA,KAAlBA,KAAgB,GAAhBA,KAAgB;IAAA,8CArB7B,eAAe;IAAA,qDACP,8BAA6B;IAAA,iDAClC,IAAI;IAAA,+CACN,EAAE;IAAA,iDACA,CACR,CACE,GAAG,EACH,gBAAgB,EAChB,uGAAuG,CACxG,EACD,CACE,GAAG,EACH,kBAAkB,EAClB,mGAAmG,CACpG,EACD,CAAC,GAAG,EAAE,SAAS,EAAE,mFAAmF,CAAC,EACrG,CAAC,
|
1
|
+
{"version":3,"names":["SwitchCmd","constructor","lanes","report","lane","alias","merge","getAll","skipDependencyInstallation","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>';\n description = `switch to the specified lane`;\n private = true;\n alias = '';\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 ['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 json = false,\n }: {\n alias?: string;\n merge?: MergeStrategy;\n getAll?: boolean;\n skipDependencyInstallation?: boolean;\n override?: boolean;\n json?: boolean;\n }\n ) {\n const { components, failedComponents, installationError, compilationError } = await this.lanes.switchLanes(lane, {\n alias,\n merge,\n getAll,\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;EAsBxCC,WAAW,CAASC,KAAgB,EAAE;IAAA,KAAlBA,KAAgB,GAAhBA,KAAgB;IAAA,8CArB7B,eAAe;IAAA,qDACP,8BAA6B;IAAA,iDAClC,IAAI;IAAA,+CACN,EAAE;IAAA,iDACA,CACR,CACE,GAAG,EACH,gBAAgB,EAChB,uGAAuG,CACxG,EACD,CACE,GAAG,EACH,kBAAkB,EAClB,mGAAmG,CACpG,EACD,CAAC,GAAG,EAAE,SAAS,EAAE,mFAAmF,CAAC,EACrG,CAAC,GAAG,EAAE,8BAA8B,EAAE,oDAAoD,CAAC,EAC3F,CAAC,GAAG,EAAE,MAAM,EAAE,2BAA2B,CAAC,CAC3C;IAAA,gDACQ,IAAI;EAE0B;EAEvC,MAAMC,MAAM,CACV,CAACC,IAAI,CAAW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C;MAC7F,IAAItB,UAAU,CAACQ,MAAM,KAAK,CAAC,EAAE;QAC3B,MAAMgB,SAAS,GAAGxB,UAAU,CAAC,CAAC,CAAC;QAC/B,MAAMyB,aAAa,GAAGD,SAAS,CAACP,EAAE,CAACS,sBAAsB,EAAE;QAC3D,MAAMjB,KAAK,GAAI,yBAAwBM,gBAAK,CAACC,IAAI,CAACS,aAAa,CAAE,eAAcV,gBAAK,CAACC,IAAI,CACvFQ,SAAS,CAACP,EAAE,CAACU,OAAO,CACpB,IAAG;QACL,OAAQ,GAAElB,KAAM,IAAG,IAAAmB,6BAAkB,EAAC5B,UAAU,EAAE,KAAK,CAAE,GAAEsB,YAAa,EAAC;MAC3E;MACA,MAAMb,KAAK,GAAI,oEAAmEf,IAAK,MAAK;MAC5F,MAAMmC,aAAa,GAAG,IAAAD,6BAAkB,EAAC5B,UAAU,EAAE,IAAI,EAAE,KAAK,CAAC;MACjE,OAAOS,KAAK,GAAGoB,aAAa,GAAGP,YAAY;IAC7C,CAAC;IACD,MAAMQ,YAAY,GAAGvB,gBAAgB,EAAE;IACvC,MAAMwB,aAAa,GAAGV,mBAAmB,EAAE;IAC3C,OACES,YAAY,GACZC,aAAa,GACb,IAAAC,kCAAuB,EAAC9B,iBAAiB,CAAC,GAC1C,IAAA+B,iCAAsB,EAAC9B,gBAAgB,CAAC;EAE5C;AACF;AAAC"}
|
package/lanes.docs.mdx
CHANGED
@@ -36,11 +36,6 @@ The `LaneId` _always_ has these two props.
|
|
36
36
|
|
37
37
|
Currently, if it imports with no-deps, it doesn't ask for parents, if it imports with deps it imports with all parents. It is originated from src/api/scope/lib/fetch.ts: `const collectParents = !noDependencies;`. We need to make a decision here.
|
38
38
|
|
39
|
-
### Model changes
|
40
|
-
|
41
|
-
- `Version.parents`. This is added only if the lanes feature is enabled. (it doesn't change the hash).
|
42
|
-
- `Component.head` This is added only if the lanes feature is enabled. (it doesn't change the hash).
|
43
|
-
|
44
39
|
### Hash
|
45
40
|
|
46
41
|
- Snap's hash is generated by a UUID and then converted into sha1. `sha1(v4())`.
|
@@ -62,7 +57,7 @@ More places that stores lanes related data:
|
|
62
57
|
|
63
58
|
Summary of when/what lanes data is saved per command:
|
64
59
|
|
65
|
-
- `bit lane create`: creates a new lane-object and creates a new lane record in scope.json.
|
60
|
+
- `bit lane create`: creates a new lane-object and creates a new lane record in scope.json and .bitmap.
|
66
61
|
- `bit snap`: adds an entry to the lane-object.
|
67
62
|
- `bit export`: pushes the lane-object to the remote. On the remote, the lane-object is created or updated/merged.
|
68
63
|
- `bit switch --remote`: 1) creates/updates lane-object in the scope. 2) creates/updates remote-lane. the remote-lane is updated also for main.
|
@@ -115,7 +110,7 @@ To make this process easier, there are some tools that can help. keep reading.
|
|
115
110
|
#### source code merges/conflicts
|
116
111
|
|
117
112
|
To find out when a change was introduced to a file or when a file was added/removed, run `bit log-file <file-path>`.
|
118
|
-
It might be helpful to create a new
|
113
|
+
It might be helpful to create a new temporary workspace, import the other lane and run the same there.
|
119
114
|
This way, you get the full picture from both lanes when a change was introduced, and you can see whether it happened before and after the split from the base-snap.
|
120
115
|
Obviously, `bit log <comp-id> --one-line` is helpful here to see the distance from each lane from the base-snap.
|
121
116
|
|
Binary file
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/lanes",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.570",
|
4
4
|
"homepage": "https://bit.dev/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.
|
9
|
+
"version": "0.0.570"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -19,35 +19,35 @@
|
|
19
19
|
"@teambit/harmony": "0.4.6",
|
20
20
|
"@teambit/bit-error": "0.0.402",
|
21
21
|
"@teambit/component-version": "0.0.408",
|
22
|
-
"@teambit/lane-id": "0.0.
|
23
|
-
"@teambit/scope": "0.0.
|
24
|
-
"@teambit/lanes.ui.models.lanes-model": "0.0.
|
25
|
-
"@teambit/cli": "0.0.
|
26
|
-
"@teambit/workspace": "0.0.
|
27
|
-
"@teambit/express": "0.0.
|
28
|
-
"@teambit/logger": "0.0.
|
29
|
-
"@teambit/graphql": "0.0.
|
30
|
-
"@teambit/component-compare": "0.0.
|
31
|
-
"@teambit/component-writer": "0.0.
|
32
|
-
"@teambit/component": "0.0.
|
33
|
-
"@teambit/export": "0.0.
|
34
|
-
"@teambit/importer": "0.0.
|
35
|
-
"@teambit/lanes.entities.lane-diff": "0.0.
|
36
|
-
"@teambit/lanes.modules.diff": "0.0.
|
22
|
+
"@teambit/lane-id": "0.0.186",
|
23
|
+
"@teambit/scope": "0.0.998",
|
24
|
+
"@teambit/lanes.ui.models.lanes-model": "0.0.94",
|
25
|
+
"@teambit/cli": "0.0.669",
|
26
|
+
"@teambit/workspace": "0.0.998",
|
27
|
+
"@teambit/express": "0.0.767",
|
28
|
+
"@teambit/logger": "0.0.762",
|
29
|
+
"@teambit/graphql": "0.0.998",
|
30
|
+
"@teambit/component-compare": "0.0.246",
|
31
|
+
"@teambit/component-writer": "0.0.34",
|
32
|
+
"@teambit/component": "0.0.998",
|
33
|
+
"@teambit/export": "0.0.998",
|
34
|
+
"@teambit/importer": "0.0.427",
|
35
|
+
"@teambit/lanes.entities.lane-diff": "0.0.31",
|
36
|
+
"@teambit/lanes.modules.diff": "0.0.304",
|
37
37
|
"@teambit/legacy-bit-id": "0.0.423",
|
38
|
-
"@teambit/merging": "0.0.
|
38
|
+
"@teambit/merging": "0.0.313",
|
39
39
|
"@teambit/design.ui.pages.not-found": "0.0.366",
|
40
|
-
"@teambit/lanes.hooks.use-lanes": "0.0.
|
41
|
-
"@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.
|
42
|
-
"@teambit/lanes.ui.compare.lane-compare-page": "0.0.
|
43
|
-
"@teambit/lanes.ui.compare.lane-compare": "0.0.
|
44
|
-
"@teambit/lanes.ui.lane-overview": "0.0.
|
40
|
+
"@teambit/lanes.hooks.use-lanes": "0.0.132",
|
41
|
+
"@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.94",
|
42
|
+
"@teambit/lanes.ui.compare.lane-compare-page": "0.0.34",
|
43
|
+
"@teambit/lanes.ui.compare.lane-compare": "0.0.50",
|
44
|
+
"@teambit/lanes.ui.lane-overview": "0.0.95",
|
45
45
|
"@teambit/lanes.ui.menus.lanes-overview-menu": "0.0.5",
|
46
|
-
"@teambit/lanes.ui.menus.use-lanes-menu": "0.0.
|
47
|
-
"@teambit/lanes.ui.navigation.lane-switcher": "0.0.
|
46
|
+
"@teambit/lanes.ui.menus.use-lanes-menu": "0.0.94",
|
47
|
+
"@teambit/lanes.ui.navigation.lane-switcher": "0.0.94",
|
48
48
|
"@teambit/ui-foundation.ui.menu": "0.0.497",
|
49
49
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.501",
|
50
|
-
"@teambit/ui": "0.0.
|
50
|
+
"@teambit/ui": "0.0.998"
|
51
51
|
},
|
52
52
|
"devDependencies": {
|
53
53
|
"@types/react": "^17.0.8",
|
@@ -59,14 +59,14 @@
|
|
59
59
|
"@types/react-dom": "^17.0.5",
|
60
60
|
"@types/jest": "^26.0.0",
|
61
61
|
"@types/testing-library__jest-dom": "5.9.5",
|
62
|
-
"@teambit/component.testing.mock-components": "0.0.
|
63
|
-
"@teambit/harmony.testing.load-aspect": "0.0.
|
64
|
-
"@teambit/snapping": "0.0.
|
62
|
+
"@teambit/component.testing.mock-components": "0.0.33",
|
63
|
+
"@teambit/harmony.testing.load-aspect": "0.0.32",
|
64
|
+
"@teambit/snapping": "0.0.313",
|
65
65
|
"@teambit/workspace.testing.mock-workspace": "0.0.14"
|
66
66
|
},
|
67
67
|
"peerDependencies": {
|
68
68
|
"react-router-dom": "^6.0.0",
|
69
|
-
"@teambit/legacy": "1.0.
|
69
|
+
"@teambit/legacy": "1.0.451",
|
70
70
|
"react": "^16.8.0 || ^17.0.0",
|
71
71
|
"react-dom": "^16.8.0 || ^17.0.0"
|
72
72
|
},
|
Binary file
|