@teambit/lanes 0.0.157 → 0.0.161

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
@@ -265,7 +265,7 @@ class LaneCreateCmd {
265
265
  const result = await this.lanes.createLane(name, createLaneOptions);
266
266
  const remoteScopeOrDefaultScope = createLaneOptions.remoteScope ? `the remote scope ${_chalk().default.bold(createLaneOptions.remoteScope)}` : `the default-scope ${_chalk().default.bold(result.remoteScope)}. to change it, please run "bit lane track" command`;
267
267
 
268
- const title = _chalk().default.green(`successfully added a new lane ${_chalk().default.bold(result.localLane)}`);
268
+ const title = _chalk().default.green(`successfully added and checked out to a new lane ${_chalk().default.bold(result.localLane)}`);
269
269
 
270
270
  const remoteScopeOutput = `this lane will be exported to ${remoteScopeOrDefaultScope}`;
271
271
  return `${title}\n${remoteScopeOutput}`;
@@ -1 +1 @@
1
- {"version":3,"sources":["lane.cmd.ts"],"names":["LaneListCmd","constructor","lanes","workspace","scope","report","args","laneOptions","details","remote","merged","notMerged","getLanes","mergedLanes","filter","l","isMerged","length","chalk","green","map","m","name","join","unmergedLanes","currentLane","getCurrentLane","currentLaneStr","bold","laneDataOfCurrentLane","find","remoteOfCurrentLane","currentLaneComponents","outputComponents","components","outputRemoteLane","availableLanes","laneData","laneTitle","outputFooter","footer","outputCurrentLane","outputAvailableLanes","json","showDefaultLane","LaneShowCmd","onlyLane","title","LaneCreateCmd","createLaneOptions","result","createLane","remoteScopeOrDefaultScope","remoteScope","localLane","remoteScopeOutput","LaneTrackCmd","localName","remoteName","beforeTrackData","afterTrackData","trackLane","remoteScopeChanges","remoteNameChanges","remoteLane","LaneMergeCmd","ours","theirs","manual","build","existing","existingOnWorkspaceOnly","noSnap","message","snapMessage","BUILD_ON_CI","Boolean","mergeStrategy","BitError","results","mergeLane","LaneRemoveCmd","names","force","silent","removePromptResult","yn","shouldRemove","laneResults","removeLanes","LaneCmd","BASE_DOCS_DOMAI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ALQ,CAcoF;AAAA,oDAPrF,IAOqF;AAAA,qDANpF,IAMoF;AAAA,uDALlF,IAKkF;AAAA,sDAJnF,IAImF;AAAA,2DAH9E,IAG8E;AAAA,sDAFxE,EAEwE;AAAE;;AAEpF,QAANtF,MAAM,CAAC,CAACiB,IAAD,CAAD,EAAmBf,WAAnB,EAA8D;AACxE,WAAO,IAAIP,WAAJ,CAAgB,KAAKE,KAArB,EAA4B,KAAKC,SAAjC,EAA4C,KAAKC,KAAjD,EAAwDC,MAAxD,CAA+D,CAACiB,IAAD,CAA/D,EAAuEf,WAAvE,CAAP;AACD;;AAxBqC;;;;AA2BxC,SAAS0B,gBAAT,CAA0BC,UAA1B,EAAsE;AACpE,QAAM0D,eAAe,GAAI,iBAAgB1D,UAAU,CAACjB,MAAO,KAA3D;AACA,QAAM4E,aAAa,GAAG3D,UAAU,CAACd,GAAX,CAAgB0E,CAAD,IAAQ,OAAMA,CAAC,CAACC,EAAF,CAAKC,QAAL,EAAgB,MAAKF,CAAC,CAACG,IAAK,EAAzD,EAA4D1E,IAA5D,CAAiE,IAAjE,CAAtB;AACA,SAAOqE,eAAe,GAAGC,aAAzB;AACD;;AAED,SAAS1D,gBAAT,CAA0B6B,UAA1B,EAAyE;AACvE,MAAI,CAACA,UAAL,EAAiB,OAAO,EAAP;AACjB,SAAQ,qBAAoBA,UAAW,GAAvC;AACD","sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport chalk from 'chalk';\nimport { ScopeMain } from '@teambit/scope';\nimport { Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { BASE_DOCS_DOMAIN } from '@teambit/legacy/dist/constants';\nimport { LaneData } from '@teambit/legacy/dist/scope/lanes/lanes';\nimport { getMergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { mergeReport } from '@teambit/legacy/dist/cli/commands/public-cmds/merge-cmd';\nimport { BUILD_ON_CI, isFeatureEnabled } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { BitError } from '@teambit/bit-error';\nimport { removePrompt } from '@teambit/legacy/dist/prompts';\nimport { CreateLaneOptions, LanesMain } from './lanes.main.runtime';\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 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\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\n const lanes = await this.lanes.getLanes({\n remote,\n merged,\n notMerged,\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.getCurrentLane();\n let currentLaneStr = currentLane ? `current lane - ${chalk.bold(currentLane as string)}` : '';\n if (details) {\n const laneDataOfCurrentLane = lanes.find((l) => l.name === currentLane);\n const remoteOfCurrentLane = laneDataOfCurrentLane ? laneDataOfCurrentLane.remote : null;\n const currentLaneComponents = laneDataOfCurrentLane ? outputComponents(laneDataOfCurrentLane.components) : '';\n if (currentLaneStr) {\n currentLaneStr += `${outputRemoteLane(remoteOfCurrentLane)}\\n${currentLaneComponents}`;\n }\n }\n\n const availableLanes = lanes\n .filter((l) => l.name !== currentLane)\n // @ts-ignore\n .map((laneData) => {\n if (details) {\n const laneTitle = `> ${chalk.green(laneData.name)}${outputRemoteLane(laneData.remote)}\\n`;\n const components = outputComponents(laneData.components);\n return laneTitle + components;\n }\n return ` > ${chalk.green(laneData.name)} (${laneData.components.length} components)`;\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.getCurrentLane();\n return { lanes, currentLane };\n }\n}\n\nexport class LaneShowCmd implements Command {\n name = 'show <name>';\n description = `show lane details`;\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 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(name)}${outputRemoteLane(onlyLane.remote)}\\n`;\n return title + 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 <name>';\n description = `create and switch to a new lane`;\n alias = '';\n options = [\n [\n '',\n 'remote-scope <string>',\n 'remote scope where this lane will be exported to (can be changed later with \"bit lane track\")',\n ],\n [\n '',\n 'remote-name <string>',\n 'lane name on the remote, default to the local name (can be changed later with \"bit lane track\")',\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(result.remoteScope)}. to change it, please run \"bit lane track\" command`;\n const title = chalk.green(`successfully added a new lane ${chalk.bold(result.localLane)}`);\n const remoteScopeOutput = `this lane will be exported to ${remoteScopeOrDefaultScope}`;\n return `${title}\\n${remoteScopeOutput}`;\n }\n}\n\nexport class LaneTrackCmd implements Command {\n name = 'track <local-name> <remote-scope> [remote-name]';\n description = `change the remote scope or remote lane of the local 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, remoteName]: [string, string, string]): Promise<string> {\n const { beforeTrackData, afterTrackData } = await this.lanes.trackLane(localName, remoteScope, remoteName);\n const remoteScopeChanges =\n afterTrackData.remoteScope === beforeTrackData?.remoteScope\n ? `the remote-scope has not been changed`\n : `the remote-scope has been changed from ${chalk.bold(\n beforeTrackData?.remoteScope || '<n/a>'\n )} to ${chalk.bold(afterTrackData.remoteScope)}`;\n const remoteNameChanges =\n afterTrackData.remoteLane === beforeTrackData?.remoteLane\n ? `the remote-name has not been changed`\n : `the remote-name has been changed from ${chalk.bold(beforeTrackData?.remoteLane || '<n/a>')} to ${chalk.bold(\n afterTrackData.remoteLane\n )}`;\n\n return `${remoteScopeChanges}\\n${remoteNameChanges}`;\n }\n}\n\nexport class LaneMergeCmd implements Command {\n name = 'merge <lane>';\n description = `merge a local or a remote lane`;\n alias = '';\n options = [\n ['', 'remote <name>', 'remote scope name'],\n ['', 'ours', 'in case of a conflict, override the used version with the current modification'],\n ['', 'theirs', 'in case of a conflict, override the current modification with the specified version'],\n ['', 'manual', 'in case of a conflict, leave the files with a conflict state to resolve them manually later'],\n ['', 'existing', 'checkout only components in a lane that exist in the workspace'],\n ['', 'no-snap', 'do not auto snap in case the merge completed without conflicts'],\n ['', 'build', 'in case of snap during the merge, run the build-pipeline (similar to bit snap --build)'],\n ['m', 'message <message>', 'override the default message for the auto snap'],\n ] as CommandOptions;\n loader = true;\n private = true;\n migration = true;\n remoteOp = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report(\n [name]: [string],\n {\n ours = false,\n theirs = false,\n manual = false,\n remote: remoteName,\n build,\n existing: existingOnWorkspaceOnly = false,\n noSnap = false,\n message: snapMessage = '',\n }: {\n ours: boolean;\n theirs: boolean;\n manual: boolean;\n remote?: string;\n existing?: boolean;\n build?: boolean;\n noSnap: boolean;\n message: string;\n }\n ): Promise<string> {\n build = isFeatureEnabled(BUILD_ON_CI) ? Boolean(build) : true;\n const mergeStrategy = getMergeStrategy(ours, theirs, manual);\n if (noSnap && snapMessage) throw new BitError('unable to use \"noSnap\" and \"message\" flags together');\n\n const results = await this.lanes.mergeLane(name, {\n // @ts-ignore\n remoteName,\n build,\n // @ts-ignore\n mergeStrategy,\n existingOnWorkspaceOnly,\n noSnap,\n snapMessage,\n });\n return mergeReport(results);\n }\n}\n\nexport class LaneRemoveCmd implements Command {\n name = 'remove <lane...>';\n description = `remove lanes`;\n alias = '';\n options = [\n ['r', 'remote', 'remove a remote lane (in the lane arg, use remote/lane-id syntax)'],\n [\n 'f',\n 'force',\n 'removes the component from the scope, even if used as a dependency. WARNING: components that depend on this component will corrupt',\n ],\n ['s', 'silent', 'skip confirmation'],\n ] as CommandOptions;\n loader = true;\n private = 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 removePrompt();\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n if (!yn(removePromptResult.shouldRemove)) {\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 LaneCmd implements Command {\n name = 'lane [name]';\n shortDescription = 'show lanes details';\n description = `show lanes details\nhttps://${BASE_DOCS_DOMAIN}/docs/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 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\nfunction outputComponents(components: LaneData['components']): string {\n const componentsTitle = `\\tcomponents (${components.length})\\n`;\n const componentsStr = components.map((c) => `\\t ${c.id.toString()} - ${c.head}`).join('\\n');\n return componentsTitle + componentsStr;\n}\n\nfunction outputRemoteLane(remoteLane: string | null | undefined): string {\n if (!remoteLane) return '';\n return ` - (remote lane - ${remoteLane})`;\n}\n"]}
1
+ {"version":3,"sources":["lane.cmd.ts"],"names":["LaneListCmd","constructor","lanes","workspace","scope","report","args","laneOptions","details","remote","merged","notMerged","getLanes","mergedLanes","filter","l","isMerged","length","chalk","green","map","m","name","join","unmergedLanes","currentLane","getCurrentLane","currentLaneStr","bold","laneDataOfCurrentLane","find","remoteOfCurrentLane","currentLaneComponents","outputComponents","components","outputRemoteLane","availableLanes","laneData","laneTitle","outputFooter","footer","outputCurrentLane","outputAvailableLanes","json","showDefaultLane","LaneShowCmd","onlyLane","title","LaneCreateCmd","createLaneOptions","result","createLane","remoteScopeOrDefaultScope","remoteScope","localLane","remoteScopeOutput","LaneTrackCmd","localName","remoteName","beforeTrackData","afterTrackData","trackLane","remoteScopeChanges","remoteNameChanges","remoteLane","LaneMergeCmd","ours","theirs","manual","build","existing","existingOnWorkspaceOnly","noSnap","message","snapMessage","BUILD_ON_CI","Boolean","mergeStrategy","BitError","results","mergeLane","LaneRemoveCmd","names","force","silent","removePromptResult","yn","shouldRemove","laneResults","removeLanes","LaneCmd","BASE_DOCS_DOMAIN","componentsTitle","componentsStr","c","id","toString","head"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAIA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAXA;AAsBO,MAAMA,WAAN,CAAqC;AAiB1CC,EAAAA,WAAW,CAASC,KAAT,EAAmCC,SAAnC,EAAiEC,KAAjE,EAAmF;AAAA,SAA1EF,KAA0E,GAA1EA,KAA0E;AAAA,SAAhDC,SAAgD,GAAhDA,SAAgD;AAAA,SAAlBC,KAAkB,GAAlBA,KAAkB;AAAA,kDAhBvF,MAgBuF;AAAA,yDAf/E,YAe+E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zD,EAA4D1E,IAA5D,CAAiE,IAAjE,CAAtB;AACA,SAAOqE,eAAe,GAAGC,aAAzB;AACD;;AAED,SAAS1D,gBAAT,CAA0B6B,UAA1B,EAAyE;AACvE,MAAI,CAACA,UAAL,EAAiB,OAAO,EAAP;AACjB,SAAQ,qBAAoBA,UAAW,GAAvC;AACD","sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport chalk from 'chalk';\nimport { ScopeMain } from '@teambit/scope';\nimport { Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { BASE_DOCS_DOMAIN } from '@teambit/legacy/dist/constants';\nimport { LaneData } from '@teambit/legacy/dist/scope/lanes/lanes';\nimport { getMergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { mergeReport } from '@teambit/legacy/dist/cli/commands/public-cmds/merge-cmd';\nimport { BUILD_ON_CI, isFeatureEnabled } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { BitError } from '@teambit/bit-error';\nimport { removePrompt } from '@teambit/legacy/dist/prompts';\nimport { CreateLaneOptions, LanesMain } from './lanes.main.runtime';\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 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\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\n const lanes = await this.lanes.getLanes({\n remote,\n merged,\n notMerged,\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.getCurrentLane();\n let currentLaneStr = currentLane ? `current lane - ${chalk.bold(currentLane as string)}` : '';\n if (details) {\n const laneDataOfCurrentLane = lanes.find((l) => l.name === currentLane);\n const remoteOfCurrentLane = laneDataOfCurrentLane ? laneDataOfCurrentLane.remote : null;\n const currentLaneComponents = laneDataOfCurrentLane ? outputComponents(laneDataOfCurrentLane.components) : '';\n if (currentLaneStr) {\n currentLaneStr += `${outputRemoteLane(remoteOfCurrentLane)}\\n${currentLaneComponents}`;\n }\n }\n\n const availableLanes = lanes\n .filter((l) => l.name !== currentLane)\n // @ts-ignore\n .map((laneData) => {\n if (details) {\n const laneTitle = `> ${chalk.green(laneData.name)}${outputRemoteLane(laneData.remote)}\\n`;\n const components = outputComponents(laneData.components);\n return laneTitle + components;\n }\n return ` > ${chalk.green(laneData.name)} (${laneData.components.length} components)`;\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.getCurrentLane();\n return { lanes, currentLane };\n }\n}\n\nexport class LaneShowCmd implements Command {\n name = 'show <name>';\n description = `show lane details`;\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 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(name)}${outputRemoteLane(onlyLane.remote)}\\n`;\n return title + 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 <name>';\n description = `create and switch to a new lane`;\n alias = '';\n options = [\n [\n '',\n 'remote-scope <string>',\n 'remote scope where this lane will be exported to (can be changed later with \"bit lane track\")',\n ],\n [\n '',\n 'remote-name <string>',\n 'lane name on the remote, default to the local name (can be changed later with \"bit lane track\")',\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(result.remoteScope)}. to change it, please run \"bit lane track\" command`;\n const title = chalk.green(`successfully added and checked out to a new lane ${chalk.bold(result.localLane)}`);\n const remoteScopeOutput = `this lane will be exported to ${remoteScopeOrDefaultScope}`;\n return `${title}\\n${remoteScopeOutput}`;\n }\n}\n\nexport class LaneTrackCmd implements Command {\n name = 'track <local-name> <remote-scope> [remote-name]';\n description = `change the remote scope or remote lane of the local 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, remoteName]: [string, string, string]): Promise<string> {\n const { beforeTrackData, afterTrackData } = await this.lanes.trackLane(localName, remoteScope, remoteName);\n const remoteScopeChanges =\n afterTrackData.remoteScope === beforeTrackData?.remoteScope\n ? `the remote-scope has not been changed`\n : `the remote-scope has been changed from ${chalk.bold(\n beforeTrackData?.remoteScope || '<n/a>'\n )} to ${chalk.bold(afterTrackData.remoteScope)}`;\n const remoteNameChanges =\n afterTrackData.remoteLane === beforeTrackData?.remoteLane\n ? `the remote-name has not been changed`\n : `the remote-name has been changed from ${chalk.bold(beforeTrackData?.remoteLane || '<n/a>')} to ${chalk.bold(\n afterTrackData.remoteLane\n )}`;\n\n return `${remoteScopeChanges}\\n${remoteNameChanges}`;\n }\n}\n\nexport class LaneMergeCmd implements Command {\n name = 'merge <lane>';\n description = `merge a local or a remote lane`;\n alias = '';\n options = [\n ['', 'remote <name>', 'remote scope name'],\n ['', 'ours', 'in case of a conflict, override the used version with the current modification'],\n ['', 'theirs', 'in case of a conflict, override the current modification with the specified version'],\n ['', 'manual', 'in case of a conflict, leave the files with a conflict state to resolve them manually later'],\n ['', 'existing', 'checkout only components in a lane that exist in the workspace'],\n ['', 'no-snap', 'do not auto snap in case the merge completed without conflicts'],\n ['', 'build', 'in case of snap during the merge, run the build-pipeline (similar to bit snap --build)'],\n ['m', 'message <message>', 'override the default message for the auto snap'],\n ] as CommandOptions;\n loader = true;\n private = true;\n migration = true;\n remoteOp = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report(\n [name]: [string],\n {\n ours = false,\n theirs = false,\n manual = false,\n remote: remoteName,\n build,\n existing: existingOnWorkspaceOnly = false,\n noSnap = false,\n message: snapMessage = '',\n }: {\n ours: boolean;\n theirs: boolean;\n manual: boolean;\n remote?: string;\n existing?: boolean;\n build?: boolean;\n noSnap: boolean;\n message: string;\n }\n ): Promise<string> {\n build = isFeatureEnabled(BUILD_ON_CI) ? Boolean(build) : true;\n const mergeStrategy = getMergeStrategy(ours, theirs, manual);\n if (noSnap && snapMessage) throw new BitError('unable to use \"noSnap\" and \"message\" flags together');\n\n const results = await this.lanes.mergeLane(name, {\n // @ts-ignore\n remoteName,\n build,\n // @ts-ignore\n mergeStrategy,\n existingOnWorkspaceOnly,\n noSnap,\n snapMessage,\n });\n return mergeReport(results);\n }\n}\n\nexport class LaneRemoveCmd implements Command {\n name = 'remove <lane...>';\n description = `remove lanes`;\n alias = '';\n options = [\n ['r', 'remote', 'remove a remote lane (in the lane arg, use remote/lane-id syntax)'],\n [\n 'f',\n 'force',\n 'removes the component from the scope, even if used as a dependency. WARNING: components that depend on this component will corrupt',\n ],\n ['s', 'silent', 'skip confirmation'],\n ] as CommandOptions;\n loader = true;\n private = 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 removePrompt();\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n if (!yn(removePromptResult.shouldRemove)) {\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 LaneCmd implements Command {\n name = 'lane [name]';\n shortDescription = 'show lanes details';\n description = `show lanes details\nhttps://${BASE_DOCS_DOMAIN}/docs/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 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\nfunction outputComponents(components: LaneData['components']): string {\n const componentsTitle = `\\tcomponents (${components.length})\\n`;\n const componentsStr = components.map((c) => `\\t ${c.id.toString()} - ${c.head}`).join('\\n');\n return componentsTitle + componentsStr;\n}\n\nfunction outputRemoteLane(remoteLane: string | null | undefined): string {\n if (!remoteLane) return '';\n return ` - (remote lane - ${remoteLane})`;\n}\n"]}
@@ -50,7 +50,7 @@ Currently, if it imports with no-deps, it doesn't ask for parents, if it imports
50
50
  Lane data, for the most cases is a map of component-id:snap-head, in other words, it saves per component the head snap. There are 3 different places where we store such data for different purposes.
51
51
 
52
52
  - `lane-object` "Lane" is saved in the scope `.bit/objects` (.bit can be .git/bit locally), it has a unique hash and contains a map of components and their heads. This object exists on both local and remote scopes. Its main purpose is to sync lane-data between scopes. See `Lane` class (in scope/model) for the implementation details.
53
- - `workspace-lane` (component and their heads) is saved in `.bit/workspace/lanes/lane-name`. Remote scopes don't have this data. Its main purpose is to store data that exists only locally and does not exist on the remote. See `WorkspaceLane` class for the implementation details.
53
+ - `workspace-lane` (component and their versions) is saved in `.bit/workspace/lanes/lane-name`. Remote scopes don't have this data. Its main purpose is to store data that exists only locally and does not exist on the remote. See `WorkspaceLane` class for the implementation details. Without this, when a user is on a lane and check out to another snap, we can't save this checked out snap, because .bitmap has only main version and `Lane` object has only the heads.
54
54
  - `remote-lane` (component and their heads) is saved in `.bit/refs/remote/remote-name/lane-name`. These refs files are saved in both, local and remote scopes. Its main purpose is to keep track where the remote-heads are per lane. See `RemoteLanes` class for the implementation details.
55
55
 
56
56
  More places that stores lanes related data:
@@ -31,9 +31,9 @@ function _graphqlTag() {
31
31
  return data;
32
32
  }
33
33
 
34
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
34
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
35
35
 
36
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2().default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
36
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2().default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
37
37
 
38
38
  function lanesSchema(lanesMain) {
39
39
  return {
@@ -181,9 +181,9 @@ function _switch() {
181
181
  return data;
182
182
  }
183
183
 
184
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
184
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
185
185
 
186
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2().default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
186
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2().default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
187
187
 
188
188
  class LanesMain {
189
189
  constructor(workspace, scope) {
package/lanes.docs.md CHANGED
@@ -50,7 +50,7 @@ Currently, if it imports with no-deps, it doesn't ask for parents, if it imports
50
50
  Lane data, for the most cases is a map of component-id:snap-head, in other words, it saves per component the head snap. There are 3 different places where we store such data for different purposes.
51
51
 
52
52
  - `lane-object` "Lane" is saved in the scope `.bit/objects` (.bit can be .git/bit locally), it has a unique hash and contains a map of components and their heads. This object exists on both local and remote scopes. Its main purpose is to sync lane-data between scopes. See `Lane` class (in scope/model) for the implementation details.
53
- - `workspace-lane` (component and their heads) is saved in `.bit/workspace/lanes/lane-name`. Remote scopes don't have this data. Its main purpose is to store data that exists only locally and does not exist on the remote. See `WorkspaceLane` class for the implementation details.
53
+ - `workspace-lane` (component and their versions) is saved in `.bit/workspace/lanes/lane-name`. Remote scopes don't have this data. Its main purpose is to store data that exists only locally and does not exist on the remote. See `WorkspaceLane` class for the implementation details. Without this, when a user is on a lane and check out to another snap, we can't save this checked out snap, because .bitmap has only main version and `Lane` object has only the heads.
54
54
  - `remote-lane` (component and their heads) is saved in `.bit/refs/remote/remote-name/lane-name`. These refs files are saved in both, local and remote scopes. Its main purpose is to keep track where the remote-heads are per lane. See `RemoteLanes` class for the implementation details.
55
55
 
56
56
  More places that stores lanes related data:
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/lanes",
3
- "version": "0.0.157",
3
+ "version": "0.0.161",
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.157"
9
+ "version": "0.0.161"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -15,12 +15,12 @@
15
15
  "ramda": "0.27.1",
16
16
  "@babel/runtime": "7.12.18",
17
17
  "core-js": "^3.0.0",
18
- "@teambit/bit-error": "0.0.387",
19
- "@teambit/cli": "0.0.401",
20
- "@teambit/scope": "0.0.585",
21
- "@teambit/workspace": "0.0.585",
22
- "@teambit/graphql": "0.0.585",
23
- "@teambit/lanes.modules.diff": "0.0.94"
18
+ "@teambit/bit-error": "0.0.390",
19
+ "@teambit/cli": "0.0.404",
20
+ "@teambit/scope": "0.0.589",
21
+ "@teambit/workspace": "0.0.589",
22
+ "@teambit/graphql": "0.0.589",
23
+ "@teambit/lanes.modules.diff": "0.0.97"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/mocha": "5.2.7",
@@ -31,7 +31,7 @@
31
31
  "@types/node": "12.20.4"
32
32
  },
33
33
  "peerDependencies": {
34
- "@teambit/legacy": "1.0.187",
34
+ "@teambit/legacy": "1.0.190",
35
35
  "react-dom": "^16.8.0 || ^17.0.0",
36
36
  "react": "^16.8.0 || ^17.0.0"
37
37
  },
@@ -59,7 +59,7 @@
59
59
  "react": "-"
60
60
  },
61
61
  "peerDependencies": {
62
- "@teambit/legacy": "1.0.187",
62
+ "@teambit/legacy": "1.0.190",
63
63
  "react-dom": "^16.8.0 || ^17.0.0",
64
64
  "react": "^16.8.0 || ^17.0.0"
65
65
  }