@teambit/lanes 0.0.705 → 0.0.706

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.
@@ -80,6 +80,7 @@ export declare class LaneChangeScopeCmd implements Command {
80
80
  private lanes;
81
81
  name: string;
82
82
  description: string;
83
+ extendedDescription: string;
83
84
  alias: string;
84
85
  options: CommandOptions;
85
86
  loader: boolean;
package/dist/lane.cmd.js CHANGED
@@ -71,9 +71,9 @@ class LaneListCmd {
71
71
  this.workspace = workspace;
72
72
  this.scope = scope;
73
73
  (0, _defineProperty2().default)(this, "name", 'list');
74
- (0, _defineProperty2().default)(this, "description", `list lanes`);
74
+ (0, _defineProperty2().default)(this, "description", `list local lanes`);
75
75
  (0, _defineProperty2().default)(this, "alias", '');
76
- (0, _defineProperty2().default)(this, "options", [['d', 'details', 'show more details on the state of each component in each lane'], ['j', 'json', 'show lanes details in a json format'], ['r', 'remote <remote-scope-name>', 'show remote lanes'], ['', 'merged', 'show merged lanes'], ['', 'not-merged', 'show lanes that are not merged']]);
76
+ (0, _defineProperty2().default)(this, "options", [['d', 'details', 'show more details on the state of each component in each lane'], ['j', 'json', "show lanes' details in a json format"], ['r', 'remote <remote-scope-name>', 'show all remote lanes from the specified scope'], ['', 'merged', 'list only merged lanes'], ['', 'not-merged', "list only lanes that haven't been merged"]]);
77
77
  (0, _defineProperty2().default)(this, "loader", true);
78
78
  (0, _defineProperty2().default)(this, "migration", true);
79
79
  (0, _defineProperty2().default)(this, "remoteOp", true);
@@ -133,7 +133,7 @@ class LaneListCmd {
133
133
  if (details) {
134
134
  footer += 'You can use --merged and --not-merged to see which of the lanes is fully merged.';
135
135
  } else {
136
- footer += "to get more info on all lanes in workspace use 'bit lane list --details' or 'bit lane show <lane-name>' for a specific lane.";
136
+ footer += "to get more info on all lanes in local scope use 'bit lane list --details', or 'bit lane show <lane-name>' for a specific lane.";
137
137
  }
138
138
  if (!remote && this.workspace) footer += `\nswitch lanes using 'bit switch <name>'.`;
139
139
  return footer;
@@ -175,7 +175,7 @@ class LaneShowCmd {
175
175
  (0, _defineProperty2().default)(this, "name", 'show [lane-name]');
176
176
  (0, _defineProperty2().default)(this, "description", `show lane details. if no lane specified, show the current lane`);
177
177
  (0, _defineProperty2().default)(this, "alias", '');
178
- (0, _defineProperty2().default)(this, "options", [['j', 'json', 'show the lane details in json format'], ['r', 'remote', 'show the lane from remote']]);
178
+ (0, _defineProperty2().default)(this, "options", [['j', 'json', 'show the lane details in json format'], ['r', 'remote', 'show details of the remote head of the provided lane']]);
179
179
  (0, _defineProperty2().default)(this, "loader", true);
180
180
  (0, _defineProperty2().default)(this, "migration", true);
181
181
  (0, _defineProperty2().default)(this, "remoteOp", true);
@@ -186,12 +186,12 @@ class LaneShowCmd {
186
186
  const {
187
187
  remote
188
188
  } = laneOptions;
189
- if (!name) {
190
- name = this.lanes.getCurrentLaneName() || _laneId().DEFAULT_LANE;
191
- }
192
189
  if (!name && remote) {
193
190
  throw new Error('remote flag is not supported without lane name');
194
191
  }
192
+ if (!name) {
193
+ name = this.lanes.getCurrentLaneName() || _laneId().DEFAULT_LANE;
194
+ }
195
195
  const laneId = await this.lanes.parseLaneId(name);
196
196
  const lanes = await this.lanes.getLanes({
197
197
  name: laneId.name,
@@ -225,9 +225,9 @@ class LaneCreateCmd {
225
225
  }]);
226
226
  (0, _defineProperty2().default)(this, "description", `creates a new lane and switches to it`);
227
227
  (0, _defineProperty2().default)(this, "extendedDescription", `a lane created from main (default-lane) is empty until components are snapped.
228
- a lane created from another lane has all the components of the original lane.`);
228
+ a lane created from another lane contains all the components of the original lane.`);
229
229
  (0, _defineProperty2().default)(this, "alias", '');
230
- (0, _defineProperty2().default)(this, "options", [['s', 'scope <scope-name>', 'remote scope where this lane will be exported to, default to the defaultScope (can be changed later with "bit lane change-scope")'], ['', 'remote-scope <scope-name>', 'DEPRECATED. use --scope'], ['', 'alias <name>', 'a local alias to refer to this lane, defaults to the `<lane-name>` (can be added later with "bit lane alias")'], ['', 'fork-lane-new-scope', 'allow forking a lane into a different scope than the original lane']]);
230
+ (0, _defineProperty2().default)(this, "options", [['s', 'scope <scope-name>', 'remote scope to which this lane will be exported, default to the workspace.json\'s defaultScope (can be changed up to first export of the lane with "bit lane change-scope")'], ['', 'remote-scope <scope-name>', 'DEPRECATED. use --scope'], ['', 'alias <name>', 'a local alias to refer to this lane, defaults to the `<lane-name>` (can be added later with "bit lane alias")'], ['', 'fork-lane-new-scope', 'create the new lane in a different scope than its parent lane (if created from another lane)']]);
231
231
  (0, _defineProperty2().default)(this, "loader", true);
232
232
  (0, _defineProperty2().default)(this, "migration", true);
233
233
  }
@@ -235,8 +235,8 @@ a lane created from another lane has all the components of the original lane.`);
235
235
  const currentLane = await this.lanes.getCurrentLane();
236
236
  if (createLaneOptions.remoteScope) createLaneOptions.scope = createLaneOptions.remoteScope;
237
237
  const result = await this.lanes.createLane(name, createLaneOptions);
238
- const remoteScopeOrDefaultScope = createLaneOptions.scope ? `the remote scope ${_chalk().default.bold(createLaneOptions.scope)}` : `the default-scope ${_chalk().default.bold(result.laneId.scope)}. to change it, please run "bit lane change-scope" command`;
239
- const title = _chalk().default.green(`successfully added and checked out to a new lane ${_chalk().default.bold(result.alias || result.laneId.name)}
238
+ const remoteScopeOrDefaultScope = createLaneOptions.scope ? `the remote scope ${_chalk().default.bold(createLaneOptions.scope)}` : `the default-scope ${_chalk().default.bold(result.laneId.scope)}. you can change the lane's scope, before it is exported, with the "bit lane change-scope" command`;
239
+ const title = _chalk().default.green(`successfully added and checked out to the new lane ${_chalk().default.bold(result.alias || result.laneId.name)}
240
240
  ${currentLane !== null ? _chalk().default.yellow(`\nnote - your new lane will be based on lane ${currentLane.name}`) : ''}
241
241
  `);
242
242
  const remoteScopeOutput = `this lane will be exported to ${remoteScopeOrDefaultScope}`;
@@ -249,8 +249,8 @@ class LaneAliasCmd {
249
249
  this.lanes = lanes;
250
250
  (0, _defineProperty2().default)(this, "name", 'alias <lane-name> <alias>');
251
251
  (0, _defineProperty2().default)(this, "description", 'adds an alias to a lane');
252
- (0, _defineProperty2().default)(this, "extendedDescription", `an alias is a name that can be used to refer to a lane. it is saved locally and never reach the remote.
253
- it is useful when having multiple lanes with the same name, but with different remote scopes.`);
252
+ (0, _defineProperty2().default)(this, "extendedDescription", `an alias is a name that can be used locally to refer to a lane. it is saved locally and never reaches the remote.
253
+ it is useful e.g. when having multiple lanes with the same name, but with different remote scopes.`);
254
254
  (0, _defineProperty2().default)(this, "alias", '');
255
255
  (0, _defineProperty2().default)(this, "options", []);
256
256
  (0, _defineProperty2().default)(this, "loader", true);
@@ -260,7 +260,7 @@ it is useful when having multiple lanes with the same name, but with different r
260
260
  const {
261
261
  laneId
262
262
  } = await this.lanes.aliasLane(laneName, alias);
263
- return `successfully added the alias ${_chalk().default.bold(alias)} to the lane ${_chalk().default.bold(laneId.toString())}`;
263
+ return `successfully added the alias ${_chalk().default.bold(alias)} for lane ${_chalk().default.bold(laneId.toString())}`;
264
264
  }
265
265
  }
266
266
  exports.LaneAliasCmd = LaneAliasCmd;
@@ -269,6 +269,7 @@ class LaneChangeScopeCmd {
269
269
  this.lanes = lanes;
270
270
  (0, _defineProperty2().default)(this, "name", 'change-scope <lane-name> <remote-scope-name>');
271
271
  (0, _defineProperty2().default)(this, "description", `changes the remote scope of a lane`);
272
+ (0, _defineProperty2().default)(this, "extendedDescription", 'NOTE: available only before the lane is exported to the remote');
272
273
  (0, _defineProperty2().default)(this, "alias", '');
273
274
  (0, _defineProperty2().default)(this, "options", []);
274
275
  (0, _defineProperty2().default)(this, "loader", true);
@@ -297,8 +298,8 @@ class LaneRenameCmd {
297
298
  exported,
298
299
  exportErr
299
300
  } = await this.lanes.rename(currentName, newName);
300
- const exportedStr = exported ? `and have been exported successfully to the remote` : `however if failed to export the renamed lane to the remote, due to an error: ${(exportErr === null || exportErr === void 0 ? void 0 : exportErr.message) || 'unknown'}`;
301
- return `the lane ${_chalk().default.bold(currentName)} has been changed to ${_chalk().default.bold(newName)}, ${exportedStr}`;
301
+ const exportedStr = exported ? `and have been exported successfully to the remote` : `however failed exporting the renamed lane to the remote, due to an error: ${(exportErr === null || exportErr === void 0 ? void 0 : exportErr.message) || 'unknown'}`;
302
+ return `the lane ${_chalk().default.bold(currentName)}'s name has been changed to ${_chalk().default.bold(newName)}, ${exportedStr}`;
302
303
  }
303
304
  }
304
305
  exports.LaneRenameCmd = LaneRenameCmd;
@@ -310,10 +311,10 @@ class LaneRemoveCmd {
310
311
  name: 'lanes...',
311
312
  description: 'A list of lane names, separated by spaces'
312
313
  }]);
313
- (0, _defineProperty2().default)(this, "description", `remove lanes`);
314
+ (0, _defineProperty2().default)(this, "description", `remove or delete lanes`);
314
315
  (0, _defineProperty2().default)(this, "group", 'collaborate');
315
316
  (0, _defineProperty2().default)(this, "alias", '');
316
- (0, _defineProperty2().default)(this, "options", [['r', 'remote', 'remove a remote lane (in the lane arg, use remote/lane-id syntax)'], ['f', 'force', 'removes the lane even when the lane was not merged yet'], ['s', 'silent', 'skip confirmation']]);
317
+ (0, _defineProperty2().default)(this, "options", [['r', 'remote', 'delete a remote lane. use remote/lane-id syntax e.g. bit lane remove owner.org/my-lane --remote. Delete is immediate, no export required'], ['f', 'force', 'removes/deletes the lane even when the lane is not yet merged to main'], ['s', 'silent', 'skip confirmation']]);
317
318
  (0, _defineProperty2().default)(this, "loader", true);
318
319
  (0, _defineProperty2().default)(this, "migration", true);
319
320
  }
@@ -326,7 +327,7 @@ class LaneRemoveCmd {
326
327
  const removePromptResult = await (0, _prompts().approveOperation)();
327
328
  // @ts-ignore
328
329
  if (!(0, _yn().default)(removePromptResult.shouldProceed)) {
329
- throw new (_bitError().BitError)('the operation has been canceled');
330
+ throw new (_bitError().BitError)('the operation has been cancelled');
330
331
  }
331
332
  }
332
333
  const laneResults = await this.lanes.removeLanes(names, {
@@ -347,13 +348,14 @@ class LaneRemoveCompCmd {
347
348
  description: _constants().COMPONENT_PATTERN_HELP
348
349
  }]);
349
350
  (0, _defineProperty2().default)(this, "description", `remove components when on a lane`);
350
- (0, _defineProperty2().default)(this, "extendedDescription", `in case the components are part of the lane and the lane is exported, it marks the components as removed,
351
- and then after snap+export, the remote-lane gets updated as well. upon lane-merge, these components are skipped.
351
+ (0, _defineProperty2().default)(this, "extendedDescription", `in case the components are part of the lane and the lane is exported, it marks the components as
352
+ removed from the lane, and then after snap+export, the remote-lane gets updated as well.
353
+ upon lane-merge, these removed components are skipped and any changes for removed components won't be merged to main.
352
354
 
353
- in case the components are not part of the lane or the lane is new, it simply removes the components from the workspace`);
355
+ in case the components are not yet part of the lane or the lane is new, it simply removes the components from the workspace`);
354
356
  (0, _defineProperty2().default)(this, "group", 'collaborate');
355
357
  (0, _defineProperty2().default)(this, "alias", 'rc');
356
- (0, _defineProperty2().default)(this, "options", [['', 'workspace-only', 'do not mark the components as removed. instead, remove them from the workspace only'], ['', 'update-main', 'EXPERIMENTAL. mark as removed on main after merging this lane into main']]);
358
+ (0, _defineProperty2().default)(this, "options", [['', 'workspace-only', 'do not mark the components as removed from the lane. instead, remove them from the workspace only'], ['', 'update-main', 'EXPERIMENTAL. remove, i.e. delete, component/s on the main lane after merging this lane into main']]);
357
359
  (0, _defineProperty2().default)(this, "loader", true);
358
360
  (0, _defineProperty2().default)(this, "migration", true);
359
361
  }
@@ -388,13 +390,13 @@ class LaneImportCmd {
388
390
  constructor(switchCmd) {
389
391
  this.switchCmd = switchCmd;
390
392
  (0, _defineProperty2().default)(this, "name", 'import <lane>');
391
- (0, _defineProperty2().default)(this, "description", `import a remote lane to your workspace`);
393
+ (0, _defineProperty2().default)(this, "description", `import a remote lane to your workspace and switch to that lane`);
392
394
  (0, _defineProperty2().default)(this, "arguments", [{
393
395
  name: 'lane',
394
396
  description: 'the remote lane name'
395
397
  }]);
396
398
  (0, _defineProperty2().default)(this, "alias", '');
397
- (0, _defineProperty2().default)(this, "options", [['x', 'skip-dependency-installation', 'do not install packages of the imported components'], ['p', 'pattern <component-pattern>', 'switch only the specified component-pattern. works only when the workspace is empty']]);
399
+ (0, _defineProperty2().default)(this, "options", [['x', 'skip-dependency-installation', 'do not install dependencies of the imported components'], ['p', 'pattern <component-pattern>', 'import only components from the lane that fit the specified component-pattern to the workspace. works only when the workspace is empty']]);
398
400
  (0, _defineProperty2().default)(this, "loader", true);
399
401
  (0, _defineProperty2().default)(this, "migration", true);
400
402
  }
@@ -415,10 +417,10 @@ class LaneCmd {
415
417
  this.lanes = lanes;
416
418
  this.workspace = workspace;
417
419
  this.scope = scope;
418
- (0, _defineProperty2().default)(this, "name", 'lane [lane-name]');
419
- (0, _defineProperty2().default)(this, "description", 'manage lanes');
420
+ (0, _defineProperty2().default)(this, "name", 'lane [sub-command]');
421
+ (0, _defineProperty2().default)(this, "description", 'manage lanes - if no sub-command is used, runs "bit lane list"');
420
422
  (0, _defineProperty2().default)(this, "alias", 'l');
421
- (0, _defineProperty2().default)(this, "options", [['d', 'details', 'show more details on the state of each component in each lane'], ['j', 'json', 'show lanes details in json format'], ['r', 'remote <string>', 'show remote lanes'], ['', 'merged', 'show merged lanes'], ['', 'not-merged', 'show not merged lanes']]);
423
+ (0, _defineProperty2().default)(this, "options", [['d', 'details', 'show more details on the state of each component in each lane'], ['j', 'json', 'show lanes details in json format'], ['r', 'remote <remote-scope-name>', 'show all remote lanes from the specified scope'], ['', 'merged', 'list only merged lanes'], ['', 'not-merged', "list only lanes that haven't been merged"]]);
422
424
  (0, _defineProperty2().default)(this, "loader", true);
423
425
  (0, _defineProperty2().default)(this, "migration", true);
424
426
  (0, _defineProperty2().default)(this, "group", 'collaborate');
@@ -457,7 +459,7 @@ class LaneAddReadmeCmd {
457
459
  constructor(lanes) {
458
460
  this.lanes = lanes;
459
461
  (0, _defineProperty2().default)(this, "name", 'add-readme <component-name> [lane-name]');
460
- (0, _defineProperty2().default)(this, "description", 'EXPERIMENTAL. adds a readme component to a lane');
462
+ (0, _defineProperty2().default)(this, "description", 'EXPERIMENTAL. sets an existing component as the readme of a lane');
461
463
  (0, _defineProperty2().default)(this, "arguments", [{
462
464
  name: 'component-id',
463
465
  description: "the component name or id of the component to use as the lane's readme"
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_yn","_laneId","_workspace","_bitError","_prompts","_constants","LaneListCmd","constructor","lanes","workspace","scope","_defineProperty2","default","report","args","laneOptions","details","remote","merged","notMerged","laneIdStr","laneId","alias","isDefault","name","toString","getLanes","showDefaultLane","mergedLanes","filter","l","isMerged","length","chalk","green","map","m","join","unmergedLanes","currentLane","getCurrentLaneId","getDefaultLaneId","laneDataOfCurrentLane","find","isEqual","id","undefined","currentAlias","currentLaneReadmeComponentStr","outputReadmeComponent","readmeComponent","currentLaneStr","currentLaneComponents","outputComponents","components","availableLanes","laneData","readmeComponentStr","laneTitle","bold","concat","outputFooter","footer","outputCurrentLane","outputAvailableLanes","json","getCurrentLaneNameOrAlias","exports","LaneShowCmd","_onlyLane$log","_onlyLane$log2","_onlyLane$log3","getCurrentLaneName","DEFAULT_LANE","Error","parseLaneId","onlyLane","title","author","log","username","email","date","Date","parseInt","toLocaleString","LaneCreateCmd","description","createLaneOptions","getCurrentLane","remoteScope","result","createLane","remoteScopeOrDefaultScope","yellow","remoteScopeOutput","LaneAliasCmd","laneName","aliasLane","LaneChangeScopeCmd","localName","remoteScopeBefore","changeScope","LaneRenameCmd","currentName","newName","exported","exportErr","rename","exportedStr","message","LaneRemoveCmd","names","force","silent","removePromptResult","approveOperation","yn","shouldProceed","BitError","laneResults","removeLanes","LaneRemoveCompCmd","COMPONENT_PATTERN_HELP","componentsPattern","removeCompsOpts","OutsideWorkspaceError","isOnMain","removedFromWs","markedRemoved","removeComps","getMarkedRemovedStr","getRemovedFromWsStr","LaneImportCmd","switchCmd","lane","skipDependencyInstallation","pattern","getAll","LaneCmd","LaneRemoveReadmeCmd","removeLaneReadme","red","LaneAddReadmeCmd","componentId","addLaneReadme","componentsTitle","componentsStr","c","head","component"],"sources":["lane.cmd.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport chalk from 'chalk';\nimport yn from 'yn';\nimport { ScopeMain } from '@teambit/scope';\nimport { DEFAULT_LANE, LaneId } from '@teambit/lane-id';\nimport { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { LaneData } from '@teambit/legacy/dist/scope/lanes/lanes';\nimport { BitError } from '@teambit/bit-error';\nimport { approveOperation } from '@teambit/legacy/dist/prompts';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { CreateLaneOptions, LanesMain } from './lanes.main.runtime';\nimport { SwitchCmd } from './switch.cmd';\n\ntype LaneOptions = {\n details?: boolean;\n remote?: string;\n merged?: boolean;\n notMerged?: boolean;\n json?: boolean;\n};\n\nexport class LaneListCmd implements Command {\n name = 'list';\n description = `list lanes`;\n alias = '';\n options = [\n ['d', 'details', 'show more details on the state of each component in each lane'],\n ['j', 'json', 'show lanes details in a json format'],\n ['r', 'remote <remote-scope-name>', 'show remote lanes'],\n ['', 'merged', 'show merged lanes'],\n ['', 'not-merged', 'show lanes that are not merged'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n skipWorkspace = true;\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report(args, laneOptions: LaneOptions): Promise<string> {\n const { details, remote, merged, notMerged } = laneOptions;\n const laneIdStr = (laneId: LaneId, alias?: string | null) => {\n if (laneId.isDefault()) return laneId.name;\n if (alias) return `${laneId.toString()} (${alias})`;\n return laneId.toString();\n };\n const lanes = await this.lanes.getLanes({\n remote,\n merged,\n notMerged,\n showDefaultLane: true,\n });\n if (merged) {\n const mergedLanes = lanes.filter((l) => l.isMerged);\n if (!mergedLanes.length) return chalk.green('None of the lanes is merged');\n return chalk.green(mergedLanes.map((m) => m.name).join('\\n'));\n }\n if (notMerged) {\n const unmergedLanes = lanes.filter((l) => !l.isMerged);\n if (!unmergedLanes.length) return chalk.green('All lanes are merged');\n return chalk.green(unmergedLanes.map((m) => m.name).join('\\n'));\n }\n const currentLane = this.lanes.getCurrentLaneId() || this.lanes.getDefaultLaneId();\n const laneDataOfCurrentLane = currentLane ? lanes.find((l) => currentLane.isEqual(l.id)) : undefined;\n const currentAlias = laneDataOfCurrentLane ? laneDataOfCurrentLane.alias : undefined;\n const currentLaneReadmeComponentStr = outputReadmeComponent(laneDataOfCurrentLane?.readmeComponent);\n let currentLaneStr = `current lane - ${chalk.green.green(laneIdStr(currentLane, currentAlias))}`;\n currentLaneStr += currentLaneReadmeComponentStr;\n\n if (details) {\n const currentLaneComponents = laneDataOfCurrentLane ? outputComponents(laneDataOfCurrentLane.components) : '';\n if (currentLaneStr) {\n currentLaneStr += `\\n${currentLaneComponents}`;\n }\n }\n\n const availableLanes = lanes\n .filter((l) => !currentLane.isEqual(l.id))\n .map((laneData) => {\n const readmeComponentStr = outputReadmeComponent(laneData.readmeComponent);\n if (details) {\n const laneTitle = `> ${chalk.bold(laneIdStr(laneData.id, laneData.alias))}\\n`;\n const components = outputComponents(laneData.components);\n return laneTitle + readmeComponentStr.concat('\\n') + components;\n }\n return ` > ${chalk.green(laneIdStr(laneData.id, laneData.alias))} (${\n laneData.components.length\n } components)${readmeComponentStr}`;\n })\n .join('\\n');\n\n const outputFooter = () => {\n let footer = '\\n';\n if (details) {\n footer += 'You can use --merged and --not-merged to see which of the lanes is fully merged.';\n } else {\n footer +=\n \"to get more info on all lanes in workspace use 'bit lane list --details' or 'bit lane show <lane-name>' for a specific lane.\";\n }\n if (!remote && this.workspace) footer += `\\nswitch lanes using 'bit switch <name>'.`;\n\n return footer;\n };\n\n return outputCurrentLane() + outputAvailableLanes() + outputFooter();\n\n function outputCurrentLane() {\n return currentLaneStr ? `${currentLaneStr}\\n` : '';\n }\n\n function outputAvailableLanes() {\n if (!availableLanes) return '';\n return remote ? `${availableLanes}\\n` : `\\nAvailable lanes:\\n${availableLanes}\\n`;\n }\n }\n async json(args, laneOptions: LaneOptions) {\n const { remote, merged = false, notMerged = false } = laneOptions;\n\n const lanes = await this.lanes.getLanes({\n remote,\n showDefaultLane: true,\n merged,\n notMerged,\n });\n const currentLane = this.lanes.getCurrentLaneNameOrAlias();\n return { lanes, currentLane };\n }\n}\n\nexport class LaneShowCmd implements Command {\n name = 'show [lane-name]';\n description = `show lane details. if no lane specified, show the current lane`;\n alias = '';\n options = [\n ['j', 'json', 'show the lane details in json format'],\n ['r', 'remote', 'show the lane from remote'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n skipWorkspace = true;\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report([name]: [string], laneOptions: LaneOptions): Promise<string> {\n const { remote } = laneOptions;\n\n if (!name) {\n name = this.lanes.getCurrentLaneName() || DEFAULT_LANE;\n }\n\n if (!name && remote) {\n throw new Error('remote flag is not supported without lane name');\n }\n\n const laneId = await this.lanes.parseLaneId(name);\n\n const lanes = await this.lanes.getLanes({\n name: laneId.name,\n remote: remote ? laneId.scope : undefined,\n });\n\n const onlyLane = lanes[0];\n const title = `showing information for ${chalk.bold(onlyLane.id.toString())}\\n`;\n const author = `author: ${onlyLane.log?.username || 'N/A'} <${onlyLane.log?.email || 'N/A'}>\\n`;\n const date = onlyLane.log?.date\n ? `created: ${new Date(parseInt(onlyLane.log.date)).toLocaleString()}\\n`\n : undefined;\n return title + author + date + outputComponents(onlyLane.components);\n }\n\n async json([name]: [string], laneOptions: LaneOptions) {\n const { remote } = laneOptions;\n\n const lanes = await this.lanes.getLanes({\n name,\n remote,\n });\n\n return lanes[0];\n }\n}\n\nexport class LaneCreateCmd implements Command {\n name = 'create <lane-name>';\n arguments = [\n {\n name: 'lane-name',\n description: 'the name for the new lane',\n },\n ];\n description = `creates a new lane and switches to it`;\n extendedDescription = `a lane created from main (default-lane) is empty until components are snapped.\na lane created from another lane has all the components of the original lane.`;\n alias = '';\n options = [\n [\n 's',\n 'scope <scope-name>',\n 'remote scope where this lane will be exported to, default to the defaultScope (can be changed later with \"bit lane change-scope\")',\n ],\n ['', 'remote-scope <scope-name>', 'DEPRECATED. use --scope'],\n [\n '',\n 'alias <name>',\n 'a local alias to refer to this lane, defaults to the `<lane-name>` (can be added later with \"bit lane alias\")',\n ],\n ['', 'fork-lane-new-scope', 'allow forking a lane into a different scope than the original lane'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([name]: [string], createLaneOptions: CreateLaneOptions & { remoteScope?: string }): Promise<string> {\n const currentLane = await this.lanes.getCurrentLane();\n if (createLaneOptions.remoteScope) createLaneOptions.scope = createLaneOptions.remoteScope;\n const result = await this.lanes.createLane(name, createLaneOptions);\n const remoteScopeOrDefaultScope = createLaneOptions.scope\n ? `the remote scope ${chalk.bold(createLaneOptions.scope)}`\n : `the default-scope ${chalk.bold(\n result.laneId.scope\n )}. to change it, please run \"bit lane change-scope\" command`;\n const title = chalk.green(\n `successfully added and checked out to a new lane ${chalk.bold(result.alias || result.laneId.name)}\n ${currentLane !== null ? chalk.yellow(`\\nnote - your new lane will be based on lane ${currentLane.name}`) : ''}\n `\n );\n const remoteScopeOutput = `this lane will be exported to ${remoteScopeOrDefaultScope}`;\n return `${title}\\n${remoteScopeOutput}`;\n }\n}\n\nexport class LaneAliasCmd implements Command {\n name = 'alias <lane-name> <alias>';\n description = 'adds an alias to a lane';\n extendedDescription = `an alias is a name that can be used to refer to a lane. it is saved locally and never reach the remote.\nit is useful when having multiple lanes with the same name, but with different remote scopes.`;\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName, alias]: [string, string, string]): Promise<string> {\n const { laneId } = await this.lanes.aliasLane(laneName, alias);\n return `successfully added the alias ${chalk.bold(alias)} to the lane ${chalk.bold(laneId.toString())}`;\n }\n}\n\nexport class LaneChangeScopeCmd implements Command {\n name = 'change-scope <lane-name> <remote-scope-name>';\n description = `changes the remote scope of a lane`;\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([localName, remoteScope]: [string, string]): Promise<string> {\n const { remoteScopeBefore } = await this.lanes.changeScope(localName, remoteScope);\n return `the remote-scope of ${chalk.bold(localName)} has been changed from ${chalk.bold(\n remoteScopeBefore\n )} to ${chalk.bold(remoteScope)}`;\n }\n}\n\nexport class LaneRenameCmd implements Command {\n name = 'rename <current-name> <new-name>';\n description = `EXPERIMENTAL. change the lane-name locally and on the remote (if exported)`;\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = true;\n constructor(private lanes: LanesMain) {}\n\n async report([currentName, newName]: [string, string]): Promise<string> {\n const { exported, exportErr } = await this.lanes.rename(currentName, newName);\n const exportedStr = exported\n ? `and have been exported successfully to the remote`\n : `however if failed to export the renamed lane to the remote, due to an error: ${\n exportErr?.message || 'unknown'\n }`;\n return `the lane ${chalk.bold(currentName)} has been changed to ${chalk.bold(newName)}, ${exportedStr}`;\n }\n}\n\nexport class LaneRemoveCmd implements Command {\n name = 'remove <lanes...>';\n arguments = [{ name: 'lanes...', description: 'A list of lane names, separated by spaces' }];\n description = `remove lanes`;\n group = 'collaborate';\n alias = '';\n options = [\n ['r', 'remote', 'remove a remote lane (in the lane arg, use remote/lane-id syntax)'],\n ['f', 'force', 'removes the lane even when the lane was not merged yet'],\n ['s', 'silent', 'skip confirmation'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report(\n [names]: [string[]],\n {\n remote = false,\n force = false,\n silent = false,\n }: {\n remote: boolean;\n force: boolean;\n silent: boolean;\n }\n ): Promise<string> {\n if (!silent) {\n const removePromptResult = await approveOperation();\n // @ts-ignore\n if (!yn(removePromptResult.shouldProceed)) {\n throw new BitError('the operation has been canceled');\n }\n }\n const laneResults = await this.lanes.removeLanes(names, { remote, force });\n return chalk.green(`successfully removed the following lane(s): ${chalk.bold(laneResults.join(', '))}`);\n }\n}\n\nexport type RemoveCompsOpts = { workspaceOnly?: boolean; updateMain?: boolean };\n\nexport class LaneRemoveCompCmd implements Command {\n name = 'remove-comp <component-pattern>';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n description = `remove components when on a lane`;\n extendedDescription = `in case the components are part of the lane and the lane is exported, it marks the components as removed,\nand then after snap+export, the remote-lane gets updated as well. upon lane-merge, these components are skipped.\n\nin case the components are not part of the lane or the lane is new, it simply removes the components from the workspace`;\n group = 'collaborate';\n alias = 'rc';\n options = [\n ['', 'workspace-only', 'do not mark the components as removed. instead, remove them from the workspace only'],\n ['', 'update-main', 'EXPERIMENTAL. mark as removed on main after merging this lane into main'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private workspace: Workspace, private lanes: LanesMain) {}\n\n async report([componentsPattern]: [string], removeCompsOpts: RemoveCompsOpts): Promise<string> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n if (this.workspace.isOnMain()) {\n throw new Error(`error: you're checked out to main, please use \"bit remove\" instead`);\n }\n const { removedFromWs, markedRemoved } = await this.lanes.removeComps(componentsPattern, removeCompsOpts);\n const getMarkedRemovedStr = () => {\n if (!markedRemoved.length) return '';\n return `${chalk.green('successfully marked the following components as removed:')}\n${markedRemoved.join('\\n')}\n\n${chalk.bold('to update the remote, please snap and then export. to revert, please use \"bit recover\"')}\n`;\n };\n const getRemovedFromWsStr = () => {\n if (!removedFromWs.length) return '';\n return `\\n${chalk.green('successfully removed the following components from the workspace:')}\n(either: these components were not part of the lane, so there was no need to mark them as removed or --workspace-only was used)\n${removedFromWs.join('\\n')}`;\n };\n return getMarkedRemovedStr() + getRemovedFromWsStr();\n }\n}\n\nexport class LaneImportCmd implements Command {\n name = 'import <lane>';\n description = `import a remote lane to your workspace`;\n arguments = [{ name: 'lane', description: 'the remote lane name' }];\n alias = '';\n options = [\n ['x', 'skip-dependency-installation', 'do not install packages of the imported components'],\n [\n 'p',\n 'pattern <component-pattern>',\n 'switch only the specified component-pattern. works only when the workspace is empty',\n ],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private switchCmd: SwitchCmd) {}\n\n async report(\n [lane]: [string],\n { skipDependencyInstallation = false, pattern }: { skipDependencyInstallation: boolean; pattern?: string }\n ): Promise<string> {\n return this.switchCmd.report([lane], { getAll: true, skipDependencyInstallation, pattern });\n }\n}\n\nexport class LaneCmd implements Command {\n name = 'lane [lane-name]';\n description = 'manage lanes';\n alias = 'l';\n options = [\n ['d', 'details', 'show more details on the state of each component in each lane'],\n ['j', 'json', 'show lanes details in json format'],\n ['r', 'remote <string>', 'show remote lanes'],\n ['', 'merged', 'show merged lanes'],\n ['', 'not-merged', 'show not merged lanes'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n group = 'collaborate';\n remoteOp = true;\n skipWorkspace = true;\n helpUrl = 'docs/components/lanes';\n commands: Command[] = [];\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report([name]: [string], laneOptions: LaneOptions): Promise<string> {\n return new LaneListCmd(this.lanes, this.workspace, this.scope).report([name], laneOptions);\n }\n}\n\nexport class LaneRemoveReadmeCmd implements Command {\n name = 'remove-readme [laneName]';\n description = 'EXPERIMENTAL. remove lane readme component';\n options = [] as CommandOptions;\n loader = true;\n skipWorkspace = false;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName]: [string]): Promise<string> {\n const { result, message } = await this.lanes.removeLaneReadme(laneName);\n\n if (result) {\n return chalk.green(\n `the readme component has been successfully removed from the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n }\n\n return chalk.red(`${message}\\n`);\n }\n}\n\nexport class LaneAddReadmeCmd implements Command {\n name = 'add-readme <component-name> [lane-name]';\n description = 'EXPERIMENTAL. adds a readme component to a lane';\n arguments = [\n { name: 'component-id', description: \"the component name or id of the component to use as the lane's readme\" },\n { name: 'lane-name', description: 'the lane to attach the readme to (defaults to the current lane)' },\n ];\n options = [] as CommandOptions;\n loader = true;\n skipWorkspace = false;\n\n constructor(private lanes: LanesMain) {}\n\n async report([componentId, laneName]: [string, string]): Promise<string> {\n const { result, message } = await this.lanes.addLaneReadme(componentId, laneName);\n\n if (result)\n return chalk.green(\n `the component ${componentId} has been successfully added as the readme component for the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n\n return chalk.red(\n `${message || ''}\\nthe component ${componentId} could not be added as a readme component for the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n }\n}\n\nfunction outputComponents(components: LaneData['components']): string {\n const componentsTitle = `\\t${chalk.bold(`components (${components.length})`)}\\n`;\n const componentsStr = components.map((c) => `\\t ${c.id.toString()} - ${c.head}`).join('\\n');\n return componentsTitle + componentsStr;\n}\n\nfunction outputReadmeComponent(component: LaneData['readmeComponent']): string {\n if (!component) return '';\n return `\\n\\t${`${chalk.yellow('readme component')}\\n\\t ${component.id} - ${\n component.head ||\n `(unsnapped)\\n\\t(\"use bit snap ${component.id.name}\" to snap the readme component on the lane before exporting)`\n }`}\\n`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,IAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAM,UA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D,IAAI,IACb,iCAAgCC,SAAS,CAACzG,EAAE,CAACrB,IAAK,8DACpD,EAAE,IAAG;AACR"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_yn","_laneId","_workspace","_bitError","_prompts","_constants","LaneListCmd","constructor","lanes","workspace","scope","_defineProperty2","default","report","args","laneOptions","details","remote","merged","notMerged","laneIdStr","laneId","alias","isDefault","name","toString","getLanes","showDefaultLane","mergedLanes","filter","l","isMerged","length","chalk","green","map","m","join","unmergedLanes","currentLane","getCurrentLaneId","getDefaultLaneId","laneDataOfCurrentLane","find","isEqual","id","undefined","currentAlias","currentLaneReadmeComponentStr","outputReadmeComponent","readmeComponent","currentLaneStr","currentLaneComponents","outputComponents","components","availableLanes","laneData","readmeComponentStr","laneTitle","bold","concat","outputFooter","footer","outputCurrentLane","outputAvailableLanes","json","getCurrentLaneNameOrAlias","exports","LaneShowCmd","_onlyLane$log","_onlyLane$log2","_onlyLane$log3","Error","getCurrentLaneName","DEFAULT_LANE","parseLaneId","onlyLane","title","author","log","username","email","date","Date","parseInt","toLocaleString","LaneCreateCmd","description","createLaneOptions","getCurrentLane","remoteScope","result","createLane","remoteScopeOrDefaultScope","yellow","remoteScopeOutput","LaneAliasCmd","laneName","aliasLane","LaneChangeScopeCmd","localName","remoteScopeBefore","changeScope","LaneRenameCmd","currentName","newName","exported","exportErr","rename","exportedStr","message","LaneRemoveCmd","names","force","silent","removePromptResult","approveOperation","yn","shouldProceed","BitError","laneResults","removeLanes","LaneRemoveCompCmd","COMPONENT_PATTERN_HELP","componentsPattern","removeCompsOpts","OutsideWorkspaceError","isOnMain","removedFromWs","markedRemoved","removeComps","getMarkedRemovedStr","getRemovedFromWsStr","LaneImportCmd","switchCmd","lane","skipDependencyInstallation","pattern","getAll","LaneCmd","LaneRemoveReadmeCmd","removeLaneReadme","red","LaneAddReadmeCmd","componentId","addLaneReadme","componentsTitle","componentsStr","c","head","component"],"sources":["lane.cmd.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport chalk from 'chalk';\nimport yn from 'yn';\nimport { ScopeMain } from '@teambit/scope';\nimport { DEFAULT_LANE, LaneId } from '@teambit/lane-id';\nimport { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { LaneData } from '@teambit/legacy/dist/scope/lanes/lanes';\nimport { BitError } from '@teambit/bit-error';\nimport { approveOperation } from '@teambit/legacy/dist/prompts';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { CreateLaneOptions, LanesMain } from './lanes.main.runtime';\nimport { SwitchCmd } from './switch.cmd';\n\ntype LaneOptions = {\n details?: boolean;\n remote?: string;\n merged?: boolean;\n notMerged?: boolean;\n json?: boolean;\n};\n\nexport class LaneListCmd implements Command {\n name = 'list';\n description = `list local lanes`;\n alias = '';\n options = [\n ['d', 'details', 'show more details on the state of each component in each lane'],\n ['j', 'json', \"show lanes' details in a json format\"],\n ['r', 'remote <remote-scope-name>', 'show all remote lanes from the specified scope'],\n ['', 'merged', 'list only merged lanes'],\n ['', 'not-merged', \"list only lanes that haven't been merged\"],\n ] as CommandOptions;\n loader = true;\n 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 local scope use 'bit lane list --details', or 'bit lane show <lane-name>' for a specific lane.\";\n }\n if (!remote && this.workspace) footer += `\\nswitch lanes using 'bit switch <name>'.`;\n\n return footer;\n };\n\n return outputCurrentLane() + outputAvailableLanes() + outputFooter();\n\n function outputCurrentLane() {\n return currentLaneStr ? `${currentLaneStr}\\n` : '';\n }\n\n function outputAvailableLanes() {\n if (!availableLanes) return '';\n return remote ? `${availableLanes}\\n` : `\\nAvailable lanes:\\n${availableLanes}\\n`;\n }\n }\n async json(args, laneOptions: LaneOptions) {\n const { remote, merged = false, notMerged = false } = laneOptions;\n\n const lanes = await this.lanes.getLanes({\n remote,\n showDefaultLane: true,\n merged,\n notMerged,\n });\n const currentLane = this.lanes.getCurrentLaneNameOrAlias();\n return { lanes, currentLane };\n }\n}\n\nexport class LaneShowCmd implements Command {\n name = 'show [lane-name]';\n description = `show lane details. if no lane specified, show the current lane`;\n alias = '';\n options = [\n ['j', 'json', 'show the lane details in json format'],\n ['r', 'remote', 'show details of the remote head of the provided lane'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n skipWorkspace = true;\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report([name]: [string], laneOptions: LaneOptions): Promise<string> {\n const { remote } = laneOptions;\n\n if (!name && remote) {\n throw new Error('remote flag is not supported without lane name');\n }\n if (!name) {\n name = this.lanes.getCurrentLaneName() || DEFAULT_LANE;\n }\n\n const laneId = await this.lanes.parseLaneId(name);\n\n const lanes = await this.lanes.getLanes({\n name: laneId.name,\n remote: remote ? laneId.scope : undefined,\n });\n\n const onlyLane = lanes[0];\n const title = `showing information for ${chalk.bold(onlyLane.id.toString())}\\n`;\n const author = `author: ${onlyLane.log?.username || 'N/A'} <${onlyLane.log?.email || 'N/A'}>\\n`;\n const date = onlyLane.log?.date\n ? `created: ${new Date(parseInt(onlyLane.log.date)).toLocaleString()}\\n`\n : undefined;\n return title + author + date + outputComponents(onlyLane.components);\n }\n\n async json([name]: [string], laneOptions: LaneOptions) {\n const { remote } = laneOptions;\n\n const lanes = await this.lanes.getLanes({\n name,\n remote,\n });\n\n return lanes[0];\n }\n}\n\nexport class LaneCreateCmd implements Command {\n name = 'create <lane-name>';\n arguments = [\n {\n name: 'lane-name',\n description: 'the name for the new lane',\n },\n ];\n description = `creates a new lane and switches to it`;\n extendedDescription = `a lane created from main (default-lane) is empty until components are snapped.\na lane created from another lane contains all the components of the original lane.`;\n alias = '';\n options = [\n [\n 's',\n 'scope <scope-name>',\n 'remote scope to which this lane will be exported, default to the workspace.json\\'s defaultScope (can be changed up to first export of the lane with \"bit lane change-scope\")',\n ],\n ['', 'remote-scope <scope-name>', 'DEPRECATED. use --scope'],\n [\n '',\n 'alias <name>',\n 'a local alias to refer to this lane, defaults to the `<lane-name>` (can be added later with \"bit lane alias\")',\n ],\n [\n '',\n 'fork-lane-new-scope',\n 'create the new lane in a different scope than its parent lane (if created from another lane)',\n ],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([name]: [string], createLaneOptions: CreateLaneOptions & { remoteScope?: string }): Promise<string> {\n const currentLane = await this.lanes.getCurrentLane();\n if (createLaneOptions.remoteScope) createLaneOptions.scope = createLaneOptions.remoteScope;\n const result = await this.lanes.createLane(name, createLaneOptions);\n const remoteScopeOrDefaultScope = createLaneOptions.scope\n ? `the remote scope ${chalk.bold(createLaneOptions.scope)}`\n : `the default-scope ${chalk.bold(\n result.laneId.scope\n )}. you can change the lane's scope, before it is exported, with the \"bit lane change-scope\" command`;\n const title = chalk.green(\n `successfully added and checked out to the new lane ${chalk.bold(result.alias || result.laneId.name)}\n ${currentLane !== null ? chalk.yellow(`\\nnote - your new lane will be based on lane ${currentLane.name}`) : ''}\n `\n );\n const remoteScopeOutput = `this lane will be exported to ${remoteScopeOrDefaultScope}`;\n return `${title}\\n${remoteScopeOutput}`;\n }\n}\n\nexport class LaneAliasCmd implements Command {\n name = 'alias <lane-name> <alias>';\n description = 'adds an alias to a lane';\n extendedDescription = `an alias is a name that can be used locally to refer to a lane. it is saved locally and never reaches the remote.\nit is useful e.g. when having multiple lanes with the same name, but with different remote scopes.`;\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n 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)} for 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 extendedDescription = 'NOTE: available only before the lane is exported to the remote';\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([localName, remoteScope]: [string, string]): Promise<string> {\n const { remoteScopeBefore } = await this.lanes.changeScope(localName, remoteScope);\n return `the remote-scope of ${chalk.bold(localName)} has been changed from ${chalk.bold(\n remoteScopeBefore\n )} to ${chalk.bold(remoteScope)}`;\n }\n}\n\nexport class LaneRenameCmd implements Command {\n name = 'rename <current-name> <new-name>';\n description = `EXPERIMENTAL. change the lane-name locally and on the remote (if exported)`;\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = true;\n constructor(private lanes: LanesMain) {}\n\n async report([currentName, newName]: [string, string]): Promise<string> {\n const { exported, exportErr } = await this.lanes.rename(currentName, newName);\n const exportedStr = exported\n ? `and have been exported successfully to the remote`\n : `however failed exporting the renamed lane to the remote, due to an error: ${exportErr?.message || 'unknown'}`;\n return `the lane ${chalk.bold(currentName)}'s name 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 or delete lanes`;\n group = 'collaborate';\n alias = '';\n options = [\n [\n 'r',\n 'remote',\n 'delete a remote lane. use remote/lane-id syntax e.g. bit lane remove owner.org/my-lane --remote. Delete is immediate, no export required',\n ],\n ['f', 'force', 'removes/deletes the lane even when the lane is not yet merged to main'],\n ['s', 'silent', 'skip confirmation'],\n ] as CommandOptions;\n loader = true;\n 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 cancelled');\n }\n }\n const laneResults = await this.lanes.removeLanes(names, { remote, force });\n return chalk.green(`successfully removed the following lane(s): ${chalk.bold(laneResults.join(', '))}`);\n }\n}\n\nexport type RemoveCompsOpts = { workspaceOnly?: boolean; updateMain?: boolean };\n\nexport class LaneRemoveCompCmd implements Command {\n name = 'remove-comp <component-pattern>';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n description = `remove components when on a lane`;\n extendedDescription = `in case the components are part of the lane and the lane is exported, it marks the components as\nremoved from the lane, and then after snap+export, the remote-lane gets updated as well.\nupon lane-merge, these removed components are skipped and any changes for removed components won't be merged to main.\n\nin case the components are not yet part of the lane or the lane is new, it simply removes the components from the workspace`;\n group = 'collaborate';\n alias = 'rc';\n options = [\n [\n '',\n 'workspace-only',\n 'do not mark the components as removed from the lane. instead, remove them from the workspace only',\n ],\n [\n '',\n 'update-main',\n 'EXPERIMENTAL. remove, i.e. delete, component/s on the main lane after merging this lane into main',\n ],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private workspace: Workspace, private lanes: LanesMain) {}\n\n async report([componentsPattern]: [string], removeCompsOpts: RemoveCompsOpts): Promise<string> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n if (this.workspace.isOnMain()) {\n throw new Error(`error: you're checked out to main, please use \"bit remove\" instead`);\n }\n const { removedFromWs, markedRemoved } = await this.lanes.removeComps(componentsPattern, removeCompsOpts);\n const getMarkedRemovedStr = () => {\n if (!markedRemoved.length) return '';\n return `${chalk.green('successfully marked the following components as removed:')}\n${markedRemoved.join('\\n')}\n\n${chalk.bold('to update the remote, please snap and then export. to revert, please use \"bit recover\"')}\n`;\n };\n const getRemovedFromWsStr = () => {\n if (!removedFromWs.length) return '';\n return `\\n${chalk.green('successfully removed the following components from the workspace:')}\n(either: these components were not part of the lane, so there was no need to mark them as removed or --workspace-only was used)\n${removedFromWs.join('\\n')}`;\n };\n return getMarkedRemovedStr() + getRemovedFromWsStr();\n }\n}\n\nexport class LaneImportCmd implements Command {\n name = 'import <lane>';\n description = `import a remote lane to your workspace and switch to that lane`;\n arguments = [{ name: 'lane', description: 'the remote lane name' }];\n alias = '';\n options = [\n ['x', 'skip-dependency-installation', 'do not install dependencies of the imported components'],\n [\n 'p',\n 'pattern <component-pattern>',\n 'import only components from the lane that fit the specified component-pattern to the workspace. works only when the workspace is empty',\n ],\n ] as CommandOptions;\n loader = true;\n migration = true;\n\n constructor(private switchCmd: SwitchCmd) {}\n\n async report(\n [lane]: [string],\n { skipDependencyInstallation = false, pattern }: { skipDependencyInstallation: boolean; pattern?: string }\n ): Promise<string> {\n return this.switchCmd.report([lane], { getAll: true, skipDependencyInstallation, pattern });\n }\n}\n\nexport class LaneCmd implements Command {\n name = 'lane [sub-command]';\n description = 'manage lanes - if no sub-command is used, runs \"bit lane list\"';\n alias = 'l';\n options = [\n ['d', 'details', 'show more details on the state of each component in each lane'],\n ['j', 'json', 'show lanes details in json format'],\n ['r', 'remote <remote-scope-name>', 'show all remote lanes from the specified scope'],\n ['', 'merged', 'list only merged lanes'],\n ['', 'not-merged', \"list only lanes that haven't been merged\"],\n ] as CommandOptions;\n loader = true;\n migration = true;\n group = 'collaborate';\n remoteOp = true;\n skipWorkspace = true;\n helpUrl = 'docs/components/lanes';\n commands: Command[] = [];\n\n constructor(private lanes: LanesMain, private workspace: Workspace, private scope: ScopeMain) {}\n\n async report([name]: [string], laneOptions: LaneOptions): Promise<string> {\n return new LaneListCmd(this.lanes, this.workspace, this.scope).report([name], laneOptions);\n }\n}\n\nexport class LaneRemoveReadmeCmd implements Command {\n name = 'remove-readme [laneName]';\n description = 'EXPERIMENTAL. remove lane readme component';\n options = [] as CommandOptions;\n loader = true;\n skipWorkspace = false;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName]: [string]): Promise<string> {\n const { result, message } = await this.lanes.removeLaneReadme(laneName);\n\n if (result) {\n return chalk.green(\n `the readme component has been successfully removed from the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n }\n\n return chalk.red(`${message}\\n`);\n }\n}\n\nexport class LaneAddReadmeCmd implements Command {\n name = 'add-readme <component-name> [lane-name]';\n description = 'EXPERIMENTAL. sets an existing component as the readme of a lane';\n arguments = [\n { name: 'component-id', description: \"the component name or id of the component to use as the lane's readme\" },\n { name: 'lane-name', description: 'the lane to attach the readme to (defaults to the current lane)' },\n ];\n options = [] as CommandOptions;\n loader = true;\n skipWorkspace = false;\n\n constructor(private lanes: LanesMain) {}\n\n async report([componentId, laneName]: [string, string]): Promise<string> {\n const { result, message } = await this.lanes.addLaneReadme(componentId, laneName);\n\n if (result)\n return chalk.green(\n `the component ${componentId} has been successfully added as the readme component for the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n\n return chalk.red(\n `${message || ''}\\nthe component ${componentId} could not be added as a readme component for the lane ${\n laneName || this.lanes.getCurrentLaneName()\n }`\n );\n }\n}\n\nfunction outputComponents(components: LaneData['components']): string {\n const componentsTitle = `\\t${chalk.bold(`components (${components.length})`)}\\n`;\n const componentsStr = components.map((c) => `\\t ${c.id.toString()} - ${c.head}`).join('\\n');\n return componentsTitle + componentsStr;\n}\n\nfunction outputReadmeComponent(component: LaneData['readmeComponent']): string {\n if (!component) return '';\n return `\\n\\t${`${chalk.yellow('readme component')}\\n\\t ${component.id} - ${\n component.head ||\n `(unsnapped)\\n\\t(\"use bit snap ${component.id.name}\" to snap the readme component on the lane before exporting)`\n }`}\\n`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,IAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA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AAM,OAAMA,CAAC,CAACvG,EAAE,CAACpB,QAAQ,CAAC,CAAE,MAAK2H,CAAC,CAACC,IAAK,EAAC,CAAC,CAAChH,IAAI,CAAC,IAAI,CAAC;EAC5F,OAAO6G,eAAe,GAAGC,aAAa;AACxC;AAEA,SAASlG,qBAAqBA,CAACqG,SAAsC,EAAU;EAC7E,IAAI,CAACA,SAAS,EAAE,OAAO,EAAE;EACzB,OAAQ,OAAO,GAAErH,gBAAK,CAAC6D,MAAM,CAAC,kBAAkB,CAAE,SAAQwD,SAAS,CAACzG,EAAG,MACrEyG,SAAS,CAACD,IAAI,IACb,iCAAgCC,SAAS,CAACzG,EAAE,CAACrB,IAAK,8DACpD,EAAE,IAAG;AACR"}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.705/dist/lanes.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.705/dist/lanes.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.706/dist/lanes.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.706/dist/lanes.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -28,19 +28,27 @@ function _merging() {
28
28
  };
29
29
  return data;
30
30
  }
31
+ function _constants() {
32
+ const data = require("@teambit/legacy/dist/constants");
33
+ _constants = function () {
34
+ return data;
35
+ };
36
+ return data;
37
+ }
31
38
  class SwitchCmd {
32
39
  constructor(lanes) {
33
40
  this.lanes = lanes;
34
- (0, _defineProperty2().default)(this, "name", 'switch <lane> [pattern]');
41
+ (0, _defineProperty2().default)(this, "name", 'switch <lane>');
35
42
  (0, _defineProperty2().default)(this, "description", `switch to the specified lane`);
36
43
  (0, _defineProperty2().default)(this, "extendedDescription", ``);
37
44
  (0, _defineProperty2().default)(this, "private", true);
38
45
  (0, _defineProperty2().default)(this, "alias", '');
39
46
  (0, _defineProperty2().default)(this, "arguments", [{
40
47
  name: 'lane',
41
- description: 'lane-name or lane-id (if not exists locally) to switch to'
48
+ description: 'lane-name or lane-id (if lane is not local) to switch to'
42
49
  }]);
43
- (0, _defineProperty2().default)(this, "options", [['n', 'alias <string>', 'relevant when the specified lane is a remote late. name a local lane differently than the remote lane'], ['m', 'merge [strategy]', 'merge local changes with the checked out version. strategy should be "theirs", "ours" or "manual"'], ['a', 'get-all', 'checkout all components in a lane include ones that do not exist in the workspace'], ['x', 'skip-dependency-installation', 'do not install packages of the imported components'], ['p', 'pattern <component-pattern>', 'switch only the specified component-pattern. works only when the workspace is empty'], ['j', 'json', 'return the output as JSON']]);
50
+ (0, _defineProperty2().default)(this, "options", [['n', 'alias <string>', "relevant when the specified lane is a remote lane. create a local alias for the lane (doesnt affect the lane's name on the remote"], ['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, including those not currently in the workspace'], ['x', 'skip-dependency-installation', 'do not install dependencies of the imported components'], ['p', 'pattern <component-pattern>', `switch only the lane components matching the specified component-pattern. only works when the workspace is empty\n
51
+ ${_constants().COMPONENT_PATTERN_HELP}`], ['j', 'json', 'return the output as JSON']]);
44
52
  (0, _defineProperty2().default)(this, "loader", true);
45
53
  }
46
54
  async report([lane], {
@@ -71,7 +79,7 @@ class SwitchCmd {
71
79
  }
72
80
  const getFailureOutput = () => {
73
81
  if (!failedComponents || !failedComponents.length) return '';
74
- const title = 'the switch has been canceled on the following component(s)';
82
+ const title = 'the switch has been canceled for the following component(s)';
75
83
  const body = failedComponents.map(failedComponent => {
76
84
  const color = failedComponent.unchangedLegitimately ? 'white' : 'red';
77
85
  return `${_chalk().default.bold(failedComponent.id.toString())} - ${_chalk().default[color](failedComponent.failureMessage)}`;
@@ -80,14 +88,14 @@ class SwitchCmd {
80
88
  };
81
89
  const getSuccessfulOutput = () => {
82
90
  const laneSwitched = _chalk().default.green(`\nsuccessfully set "${_chalk().default.bold(lane)}" as the active lane`);
83
- if (!components || !components.length) return `No component had been changed.${laneSwitched}`;
91
+ if (!components || !components.length) return `No components have been changed.${laneSwitched}`;
84
92
  if (components.length === 1) {
85
93
  const component = components[0];
86
94
  const componentName = component.id.toStringWithoutVersion();
87
95
  const title = `successfully switched ${_chalk().default.bold(componentName)} to version ${_chalk().default.bold(component.id.version)}\n`;
88
96
  return `${title} ${(0, _merging().applyVersionReport)(components, false)}${laneSwitched}`;
89
97
  }
90
- const title = `successfully switched the following components to the version of ${lane}\n\n`;
98
+ const title = `successfully switched the following components to the head of lane ${lane}\n\n`;
91
99
  const componentsStr = (0, _merging().applyVersionReport)(components, true, false);
92
100
  return title + componentsStr + laneSwitched;
93
101
  };
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_merging","SwitchCmd","constructor","lanes","_defineProperty2","default","name","description","report","lane","alias","merge","getAll","skipDependencyInstallation","pattern","json","components","failedComponents","installationError","compilationError","switchLanes","JSON","stringify","getFailureOutput","length","title","body","map","failedComponent","color","unchangedLegitimately","chalk","bold","id","toString","failureMessage","join","getSuccessfulOutput","laneSwitched","green","component","componentName","toStringWithoutVersion","version","applyVersionReport","componentsStr","failedOutput","successOutput","installationErrorOutput","compilationErrorOutput","exports"],"sources":["switch.cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { applyVersionReport, installationErrorOutput, compilationErrorOutput } from '@teambit/merging';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { MergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { LanesMain } from './lanes.main.runtime';\n\nexport class SwitchCmd implements Command {\n name = 'switch <lane> [pattern]';\n description = `switch to the specified lane`;\n extendedDescription = ``;\n private = true;\n alias = '';\n arguments = [\n {\n name: 'lane',\n description: 'lane-name or lane-id (if not exists locally) to switch to',\n },\n ];\n options = [\n [\n 'n',\n 'alias <string>',\n 'relevant when the specified lane is a remote late. name a local lane differently than the remote lane',\n ],\n [\n 'm',\n 'merge [strategy]',\n 'merge local changes with the checked out version. strategy should be \"theirs\", \"ours\" or \"manual\"',\n ],\n ['a', 'get-all', 'checkout all components in a lane include ones that do not exist in the workspace'],\n ['x', 'skip-dependency-installation', 'do not install packages of the imported components'],\n [\n 'p',\n 'pattern <component-pattern>',\n 'switch only the specified component-pattern. works only when the workspace is empty',\n ],\n ['j', 'json', 'return the output as JSON'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report(\n [lane]: [string],\n {\n alias,\n merge,\n getAll = false,\n skipDependencyInstallation = false,\n pattern,\n json = false,\n }: {\n alias?: string;\n merge?: MergeStrategy;\n getAll?: boolean;\n skipDependencyInstallation?: boolean;\n override?: boolean;\n pattern?: string;\n json?: boolean;\n }\n ) {\n const { components, failedComponents, installationError, compilationError } = await this.lanes.switchLanes(lane, {\n alias,\n merge,\n getAll,\n pattern,\n skipDependencyInstallation,\n });\n if (json) {\n return JSON.stringify({ components, failedComponents }, null, 4);\n }\n const getFailureOutput = () => {\n if (!failedComponents || !failedComponents.length) return '';\n const title = 'the switch has been canceled on the following component(s)';\n const body = failedComponents\n .map((failedComponent) => {\n const color = failedComponent.unchangedLegitimately ? 'white' : 'red';\n return `${chalk.bold(failedComponent.id.toString())} - ${chalk[color](failedComponent.failureMessage)}`;\n })\n .join('\\n');\n return `${title}\\n${body}\\n\\n`;\n };\n const getSuccessfulOutput = () => {\n const laneSwitched = chalk.green(`\\nsuccessfully set \"${chalk.bold(lane)}\" as the active lane`);\n if (!components || !components.length) return `No component had been changed.${laneSwitched}`;\n if (components.length === 1) {\n const component = components[0];\n const componentName = component.id.toStringWithoutVersion();\n const title = `successfully switched ${chalk.bold(componentName)} to version ${chalk.bold(\n component.id.version as string\n )}\\n`;\n return `${title} ${applyVersionReport(components, false)}${laneSwitched}`;\n }\n const title = `successfully switched the following components to the version of ${lane}\\n\\n`;\n const componentsStr = applyVersionReport(components, true, false);\n return title + componentsStr + laneSwitched;\n };\n const failedOutput = getFailureOutput();\n const successOutput = getSuccessfulOutput();\n return (\n failedOutput +\n successOutput +\n installationErrorOutput(installationError) +\n compilationErrorOutput(compilationError)\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKO,MAAMI,SAAS,CAAoB;EAkCxCC,WAAWA,CAASC,KAAgB,EAAE;IAAA,KAAlBA,KAAgB,GAAhBA,KAAgB;IAAA,IAAAC,gBAAA,GAAAC,OAAA,gBAjC7B,yBAAyB;IAAA,IAAAD,gBAAA,GAAAC,OAAA,uBACjB,8BAA6B;IAAA,IAAAD,gBAAA,GAAAC,OAAA,+BACrB,EAAC;IAAA,IAAAD,gBAAA,GAAAC,OAAA,mBACd,IAAI;IAAA,IAAAD,gBAAA,GAAAC,OAAA,iBACN,EAAE;IAAA,IAAAD,gBAAA,GAAAC,OAAA,qBACE,CACV;MACEC,IAAI,EAAE,MAAM;MACZC,WAAW,EAAE;IACf,CAAC,CACF;IAAA,IAAAH,gBAAA,GAAAC,OAAA,mBACS,CACR,CACE,GAAG,EACH,gBAAgB,EAChB,uGAAuG,CACxG,EACD,CACE,GAAG,EACH,kBAAkB,EAClB,mGAAmG,CACpG,EACD,CAAC,GAAG,EAAE,SAAS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"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_merging","_constants","SwitchCmd","constructor","lanes","_defineProperty2","default","name","description","COMPONENT_PATTERN_HELP","report","lane","alias","merge","getAll","skipDependencyInstallation","pattern","json","components","failedComponents","installationError","compilationError","switchLanes","JSON","stringify","getFailureOutput","length","title","body","map","failedComponent","color","unchangedLegitimately","chalk","bold","id","toString","failureMessage","join","getSuccessfulOutput","laneSwitched","green","component","componentName","toStringWithoutVersion","version","applyVersionReport","componentsStr","failedOutput","successOutput","installationErrorOutput","compilationErrorOutput","exports"],"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 { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { LanesMain } from './lanes.main.runtime';\n\nexport class SwitchCmd implements Command {\n name = 'switch <lane>';\n description = `switch to the specified lane`;\n extendedDescription = ``;\n private = true;\n alias = '';\n arguments = [\n {\n name: 'lane',\n description: 'lane-name or lane-id (if lane is not local) to switch to',\n },\n ];\n options = [\n [\n 'n',\n 'alias <string>',\n \"relevant when the specified lane is a remote lane. create a local alias for the lane (doesnt affect the lane's name on the remote\",\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, including those not currently in the workspace'],\n ['x', 'skip-dependency-installation', 'do not install dependencies of the imported components'],\n [\n 'p',\n 'pattern <component-pattern>',\n `switch only the lane components matching the specified component-pattern. only works when the workspace is empty\\n\n${COMPONENT_PATTERN_HELP}`,\n ],\n ['j', 'json', 'return the output as JSON'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report(\n [lane]: [string],\n {\n alias,\n merge,\n getAll = false,\n skipDependencyInstallation = false,\n pattern,\n json = false,\n }: {\n alias?: string;\n merge?: MergeStrategy;\n getAll?: boolean;\n skipDependencyInstallation?: boolean;\n override?: boolean;\n pattern?: string;\n json?: boolean;\n }\n ) {\n const { components, failedComponents, installationError, compilationError } = await this.lanes.switchLanes(lane, {\n alias,\n merge,\n getAll,\n pattern,\n skipDependencyInstallation,\n });\n if (json) {\n return JSON.stringify({ components, failedComponents }, null, 4);\n }\n const getFailureOutput = () => {\n if (!failedComponents || !failedComponents.length) return '';\n const title = 'the switch has been canceled for 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 components have 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 head of lane ${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,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,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xB,UAAU,CAAC,CAAC,CAAC;QAC/B,MAAMyB,aAAa,GAAGD,SAAS,CAACP,EAAE,CAACS,sBAAsB,CAAC,CAAC;QAC3D,MAAMjB,KAAK,GAAI,yBAAwBM,gBAAK,CAACC,IAAI,CAACS,aAAa,CAAE,eAAcV,gBAAK,CAACC,IAAI,CACvFQ,SAAS,CAACP,EAAE,CAACU,OACf,CAAE,IAAG;QACL,OAAQ,GAAElB,KAAM,IAAG,IAAAmB,6BAAkB,EAAC5B,UAAU,EAAE,KAAK,CAAE,GAAEsB,YAAa,EAAC;MAC3E;MACA,MAAMb,KAAK,GAAI,sEAAqEhB,IAAK,MAAK;MAC9F,MAAMoC,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,CAAC,CAAC;IACvC,MAAMwB,aAAa,GAAGV,mBAAmB,CAAC,CAAC;IAC3C,OACES,YAAY,GACZC,aAAa,GACb,IAAAC,kCAAuB,EAAC9B,iBAAiB,CAAC,GAC1C,IAAA+B,iCAAsB,EAAC9B,gBAAgB,CAAC;EAE5C;AACF;AAAC+B,OAAA,CAAAlD,SAAA,GAAAA,SAAA"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/lanes",
3
- "version": "0.0.705",
3
+ "version": "0.0.706",
4
4
  "homepage": "https://bit.cloud/teambit/lanes/lanes",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.lanes",
8
8
  "name": "lanes",
9
- "version": "0.0.705"
9
+ "version": "0.0.706"
10
10
  },
11
11
  "dependencies": {
12
12
  "lodash": "4.17.21",
@@ -23,37 +23,37 @@
23
23
  "@teambit/scope.ui.scope-icon": "0.0.91",
24
24
  "@teambit/bit-error": "0.0.402",
25
25
  "@teambit/component-version": "1.0.0",
26
- "@teambit/lane-id": "0.0.274",
27
- "@teambit/scope": "0.0.1133",
28
- "@teambit/snapping": "0.0.448",
29
- "@teambit/workspace": "0.0.1133",
30
- "@teambit/lanes.ui.models.lanes-model": "0.0.174",
31
- "@teambit/cli": "0.0.759",
32
- "@teambit/express": "0.0.857",
33
- "@teambit/logger": "0.0.852",
34
- "@teambit/graphql": "0.0.1133",
35
- "@teambit/checkout": "0.0.302",
36
- "@teambit/component-compare": "0.0.381",
37
- "@teambit/component-writer": "0.0.169",
38
- "@teambit/component": "0.0.1133",
39
- "@teambit/export": "0.0.1133",
40
- "@teambit/importer": "0.0.562",
41
- "@teambit/lanes.entities.lane-diff": "0.0.119",
42
- "@teambit/lanes.modules.diff": "0.0.392",
43
- "@teambit/merging": "0.0.448",
44
- "@teambit/remove": "0.0.310",
45
- "@teambit/lanes.hooks.use-lanes": "0.0.221",
46
- "@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.183",
47
- "@teambit/lanes.ui.compare.lane-compare-page": "0.0.117",
48
- "@teambit/lanes.ui.compare.lane-compare": "0.0.135",
49
- "@teambit/lanes.ui.lane-overview": "0.0.176",
26
+ "@teambit/lane-id": "0.0.275",
27
+ "@teambit/scope": "0.0.1134",
28
+ "@teambit/snapping": "0.0.449",
29
+ "@teambit/workspace": "0.0.1134",
30
+ "@teambit/lanes.ui.models.lanes-model": "0.0.175",
31
+ "@teambit/cli": "0.0.760",
32
+ "@teambit/express": "0.0.858",
33
+ "@teambit/logger": "0.0.853",
34
+ "@teambit/graphql": "0.0.1134",
35
+ "@teambit/checkout": "0.0.303",
36
+ "@teambit/component-compare": "0.0.382",
37
+ "@teambit/component-writer": "0.0.170",
38
+ "@teambit/component": "0.0.1134",
39
+ "@teambit/export": "0.0.1134",
40
+ "@teambit/importer": "0.0.563",
41
+ "@teambit/lanes.entities.lane-diff": "0.0.120",
42
+ "@teambit/lanes.modules.diff": "0.0.393",
43
+ "@teambit/merging": "0.0.449",
44
+ "@teambit/remove": "0.0.311",
45
+ "@teambit/lanes.hooks.use-lanes": "0.0.222",
46
+ "@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.184",
47
+ "@teambit/lanes.ui.compare.lane-compare-page": "0.0.118",
48
+ "@teambit/lanes.ui.compare.lane-compare": "0.0.136",
49
+ "@teambit/lanes.ui.lane-overview": "0.0.177",
50
50
  "@teambit/lanes.ui.menus.lanes-overview-menu": "0.0.5",
51
- "@teambit/lanes.ui.menus.use-lanes-menu": "0.0.174",
52
- "@teambit/lanes.ui.navigation.lane-switcher": "0.0.178",
51
+ "@teambit/lanes.ui.menus.use-lanes-menu": "0.0.175",
52
+ "@teambit/lanes.ui.navigation.lane-switcher": "0.0.179",
53
53
  "@teambit/ui-foundation.ui.menu": "0.0.497",
54
54
  "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.501",
55
55
  "@teambit/ui-foundation.ui.react-router.use-query": "0.0.496",
56
- "@teambit/ui": "0.0.1133"
56
+ "@teambit/ui": "0.0.1134"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/lodash": "4.14.165",
@@ -65,13 +65,13 @@
65
65
  "@types/react-dom": "^17.0.5",
66
66
  "@types/jest": "^26.0.0",
67
67
  "@types/testing-library__jest-dom": "5.9.5",
68
- "@teambit/component.testing.mock-components": "0.0.121",
69
- "@teambit/harmony.testing.load-aspect": "0.0.120",
68
+ "@teambit/component.testing.mock-components": "0.0.122",
69
+ "@teambit/harmony.testing.load-aspect": "0.0.121",
70
70
  "@teambit/workspace.testing.mock-workspace": "0.0.14"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "react-router-dom": "^6.0.0",
74
- "@teambit/legacy": "1.0.542",
74
+ "@teambit/legacy": "1.0.544",
75
75
  "react": "^16.8.0 || ^17.0.0",
76
76
  "react-dom": "^16.8.0 || ^17.0.0"
77
77
  },