@teambit/lanes 1.0.248 → 1.0.250
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/artifacts/__bit_junit.xml +11 -11
- package/artifacts/preview/teambit_lanes_lanes-preview.js +1 -1
- package/artifacts/schema.json +1007 -797
- package/dist/create-lane.js +10 -0
- package/dist/create-lane.js.map +1 -1
- package/dist/lane.cmd.d.ts +15 -0
- package/dist/lane.cmd.js +24 -1
- package/dist/lane.cmd.js.map +1 -1
- package/dist/lanes.main.runtime.d.ts +7 -3
- package/dist/lanes.main.runtime.js +22 -5
- package/dist/lanes.main.runtime.js.map +1 -1
- package/dist/{preview-1713756046303.js → preview-1713916866359.js} +2 -2
- package/package.json +17 -16
package/dist/create-lane.js
CHANGED
@@ -56,6 +56,13 @@ function _getCloudUser() {
|
|
56
56
|
};
|
57
57
|
return data;
|
58
58
|
}
|
59
|
+
function _legacyBitId() {
|
60
|
+
const data = require("@teambit/legacy-bit-id");
|
61
|
+
_legacyBitId = function () {
|
62
|
+
return data;
|
63
|
+
};
|
64
|
+
return data;
|
65
|
+
}
|
59
66
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
60
67
|
// import { ComponentIdList } from '@teambit/component-id';
|
61
68
|
|
@@ -68,6 +75,9 @@ async function createLane(workspace, laneName, scopeName, remoteLane) {
|
|
68
75
|
}
|
69
76
|
const bitCloudUser = await (0, _getCloudUser().getBitCloudUser)();
|
70
77
|
throwForInvalidLaneName(laneName);
|
78
|
+
if (!(0, _legacyBitId().isValidScopeName)(scopeName)) {
|
79
|
+
throw new (_legacyBitId().InvalidScopeName)(scopeName);
|
80
|
+
}
|
71
81
|
await throwForStagedComponents(consumer);
|
72
82
|
const getDataToPopulateLaneObjectIfNeeded = async () => {
|
73
83
|
if (remoteLane) return remoteLane.components;
|
package/dist/create-lane.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_bitError","data","require","_lane","_interopRequireDefault","_componentVersion","_componentsList","_objects","_lodash","_getCloudUser","obj","__esModule","default","MAX_LANE_NAME_LENGTH","createLane","workspace","laneName","scopeName","remoteLane","consumer","lanes","scope","listLanes","find","lane","name","BitError","bitCloudUser","getBitCloudUser","throwForInvalidLaneName","throwForStagedComponents","getDataToPopulateLaneObjectIfNeeded","components","currentLaneObject","getCurrentLaneObject","laneComponents","workspaceIds","bitMap","getAllBitIds","laneComponentWithBitmapHead","Promise","all","map","id","head","compId","changeVersion","toString","isRemoved","isComponentRemoved","bitmapHead","searchWithoutVersion","isSnap","version","Ref","from","compact","forkedFrom","getLaneOrigin","newLane","Lane","hash","log","create","dataToPopulate","setLaneComponents","laneHistoryMsg","saveLane","createLaneInScope","legacyScope","currentLaneId","laneId","undefined","isLaneExported","currentLane","isValidLaneName","componentList","ComponentsList","stagedComponents","listExportPendingComponentsIds","length","join","val","test"],"sources":["create-lane.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport { LaneId } from '@teambit/lane-id';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { ScopeMain } from '@teambit/scope';\n// import { ComponentIdList } from '@teambit/component-id';\nimport Lane, { LaneComponent } from '@teambit/legacy/dist/scope/models/lane';\nimport { isSnap } from '@teambit/component-version';\nimport ComponentsList from '@teambit/legacy/dist/consumer/component/components-list';\nimport { Ref } from '@teambit/legacy/dist/scope/objects';\nimport { Workspace } from '@teambit/workspace';\nimport { compact } from 'lodash';\nimport { getBitCloudUser } from '@teambit/legacy/dist/utils/bit/get-cloud-user';\n\nconst MAX_LANE_NAME_LENGTH = 800;\n\nexport async function createLane(\n workspace: Workspace,\n laneName: string,\n scopeName: string,\n remoteLane?: Lane\n): Promise<Lane> {\n const consumer = workspace.consumer;\n const lanes = await consumer.scope.listLanes();\n if (lanes.find((lane) => lane.name === laneName && lane.scope === scopeName)) {\n throw new BitError(\n `lane \"${scopeName}/${laneName}\" already exists, to switch to this lane, please use \"bit switch\" command`\n );\n }\n const bitCloudUser = await getBitCloudUser();\n throwForInvalidLaneName(laneName);\n await throwForStagedComponents(consumer);\n const getDataToPopulateLaneObjectIfNeeded = async (): Promise<LaneComponent[]> => {\n if (remoteLane) return remoteLane.components;\n // when branching from one lane to another, copy components from the origin lane\n // when branching from main, no need to copy anything\n const currentLaneObject = await consumer.getCurrentLaneObject();\n if (!currentLaneObject) return [];\n const laneComponents = currentLaneObject.components;\n const workspaceIds = consumer.bitMap.getAllBitIds();\n const laneComponentWithBitmapHead = await Promise.all(\n laneComponents.map(async ({ id, head }) => {\n const compId = id.changeVersion(head.toString());\n const isRemoved = await workspace.scope.isComponentRemoved(compId);\n if (isRemoved) return null;\n const bitmapHead = workspaceIds.searchWithoutVersion(id);\n if (bitmapHead && isSnap(bitmapHead.version)) {\n return { id, head: Ref.from(bitmapHead.version as string) };\n }\n return { id, head };\n })\n );\n return compact(laneComponentWithBitmapHead);\n };\n\n const forkedFrom = await getLaneOrigin(consumer);\n const newLane = remoteLane\n ? Lane.from({\n name: laneName,\n hash: remoteLane.hash().toString(),\n log: remoteLane.log,\n scope: remoteLane.scope,\n forkedFrom,\n })\n : Lane.create(laneName, scopeName, forkedFrom, bitCloudUser);\n const dataToPopulate = await getDataToPopulateLaneObjectIfNeeded();\n newLane.setLaneComponents(dataToPopulate);\n\n const laneHistoryMsg = remoteLane ? `fork lane \"${remoteLane.name}\"` : 'new lane';\n await consumer.scope.lanes.saveLane(newLane, { laneHistoryMsg });\n\n return newLane;\n}\n\nexport async function createLaneInScope(laneName: string, scope: ScopeMain): Promise<Lane> {\n const lanes = await scope.legacyScope.listLanes();\n if (lanes.find((lane) => lane.name === laneName)) {\n throw new BitError(`lane \"${laneName}\" already exists`);\n }\n throwForInvalidLaneName(laneName);\n const newLane = Lane.create(laneName, scope.name);\n await scope.legacyScope.lanes.saveLane(newLane, { laneHistoryMsg: 'new lane (created from scope)' });\n return newLane;\n}\n\nasync function getLaneOrigin(consumer: Consumer): Promise<LaneId | undefined> {\n const currentLaneId = consumer.bitMap.laneId;\n if (!currentLaneId) return undefined;\n if (consumer.bitMap.isLaneExported) {\n return currentLaneId;\n }\n // current lane is new.\n const currentLane = await consumer.getCurrentLaneObject();\n return currentLane?.forkedFrom;\n}\n\nexport function throwForInvalidLaneName(laneName: string) {\n if (!isValidLaneName(laneName)) {\n throw new BitError(\n `lane \"${laneName}\" has invalid characters. lane name can only contain alphanumeric, lowercase characters, and the following [\"-\", \"_\", \"$\", \"!\"]`\n );\n }\n}\n\nexport async function throwForStagedComponents(consumer: Consumer) {\n const componentList = new ComponentsList(consumer);\n const stagedComponents = await componentList.listExportPendingComponentsIds();\n if (stagedComponents.length) {\n throw new BitError(\n `unable to switch/create a new lane, please export or reset the following components first: ${stagedComponents.join(\n ', '\n )}`\n );\n }\n}\n\nfunction isValidLaneName(val: unknown): boolean {\n if (typeof val !== 'string') return false;\n if (val.length > MAX_LANE_NAME_LENGTH) return false;\n // @todo: should we allow slash? if so, we should probably replace the lane-delimiter with something else. (maybe \":\")\n return /^[$\\-_!a-z0-9]+$/.test(val);\n}\n"],"mappings":";;;;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,kBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,iBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,gBAAA;EAAA,MAAAL,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAI,eAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;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;EACA;EACA,MAAMI,WAAW,GAAG,MAAMvD,QAAQ,CAACe,oBAAoB,CAAC,CAAC;EACzD,OAAOwC,WAAW,EAAEjB,UAAU;AAChC;AAEO,SAAS5B,uBAAuBA,CAACb,QAAgB,EAAE;EACxD,IAAI,CAAC2D,eAAe,CAAC3D,QAAQ,CAAC,EAAE;IAC9B,MAAM,KAAIU,oBAAQ,EACf,SAAQV,QAAS,iIACpB,CAAC;EACH;AACF;AAEO,eAAec,wBAAwBA,CAACX,QAAkB,EAAE;EACjE,MAAMyD,aAAa,GAAG,KAAIC,yBAAc,EAAC1D,QAAQ,CAAC;EAClD,MAAM2D,gBAAgB,GAAG,MAAMF,aAAa,CAACG,8BAA8B,CAAC,CAAC;EAC7E,IAAID,gBAAgB,CAACE,MAAM,EAAE;IAC3B,MAAM,KAAItD,oBAAQ,EACf,8FAA6FoD,gBAAgB,CAACG,IAAI,CACjH,IACF,CAAE,EACJ,CAAC;EACH;AACF;AAEA,SAASN,eAAeA,CAACO,GAAY,EAAW;EAC9C,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE,OAAO,KAAK;EACzC,IAAIA,GAAG,CAACF,MAAM,GAAGnE,oBAAoB,EAAE,OAAO,KAAK;EACnD;EACA,OAAO,kBAAkB,CAACsE,IAAI,CAACD,GAAG,CAAC;AACrC","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_bitError","data","require","_lane","_interopRequireDefault","_componentVersion","_componentsList","_objects","_lodash","_getCloudUser","_legacyBitId","obj","__esModule","default","MAX_LANE_NAME_LENGTH","createLane","workspace","laneName","scopeName","remoteLane","consumer","lanes","scope","listLanes","find","lane","name","BitError","bitCloudUser","getBitCloudUser","throwForInvalidLaneName","isValidScopeName","InvalidScopeName","throwForStagedComponents","getDataToPopulateLaneObjectIfNeeded","components","currentLaneObject","getCurrentLaneObject","laneComponents","workspaceIds","bitMap","getAllBitIds","laneComponentWithBitmapHead","Promise","all","map","id","head","compId","changeVersion","toString","isRemoved","isComponentRemoved","bitmapHead","searchWithoutVersion","isSnap","version","Ref","from","compact","forkedFrom","getLaneOrigin","newLane","Lane","hash","log","create","dataToPopulate","setLaneComponents","laneHistoryMsg","saveLane","createLaneInScope","legacyScope","currentLaneId","laneId","undefined","isLaneExported","currentLane","isValidLaneName","componentList","ComponentsList","stagedComponents","listExportPendingComponentsIds","length","join","val","test"],"sources":["create-lane.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport { LaneId } from '@teambit/lane-id';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { ScopeMain } from '@teambit/scope';\n// import { ComponentIdList } from '@teambit/component-id';\nimport Lane, { LaneComponent } from '@teambit/legacy/dist/scope/models/lane';\nimport { isSnap } from '@teambit/component-version';\nimport ComponentsList from '@teambit/legacy/dist/consumer/component/components-list';\nimport { Ref } from '@teambit/legacy/dist/scope/objects';\nimport { Workspace } from '@teambit/workspace';\nimport { compact } from 'lodash';\nimport { getBitCloudUser } from '@teambit/legacy/dist/utils/bit/get-cloud-user';\nimport { InvalidScopeName, isValidScopeName } from '@teambit/legacy-bit-id';\n\nconst MAX_LANE_NAME_LENGTH = 800;\n\nexport async function createLane(\n workspace: Workspace,\n laneName: string,\n scopeName: string,\n remoteLane?: Lane\n): Promise<Lane> {\n const consumer = workspace.consumer;\n const lanes = await consumer.scope.listLanes();\n if (lanes.find((lane) => lane.name === laneName && lane.scope === scopeName)) {\n throw new BitError(\n `lane \"${scopeName}/${laneName}\" already exists, to switch to this lane, please use \"bit switch\" command`\n );\n }\n const bitCloudUser = await getBitCloudUser();\n throwForInvalidLaneName(laneName);\n if (!isValidScopeName(scopeName)) {\n throw new InvalidScopeName(scopeName);\n }\n await throwForStagedComponents(consumer);\n const getDataToPopulateLaneObjectIfNeeded = async (): Promise<LaneComponent[]> => {\n if (remoteLane) return remoteLane.components;\n // when branching from one lane to another, copy components from the origin lane\n // when branching from main, no need to copy anything\n const currentLaneObject = await consumer.getCurrentLaneObject();\n if (!currentLaneObject) return [];\n const laneComponents = currentLaneObject.components;\n const workspaceIds = consumer.bitMap.getAllBitIds();\n const laneComponentWithBitmapHead = await Promise.all(\n laneComponents.map(async ({ id, head }) => {\n const compId = id.changeVersion(head.toString());\n const isRemoved = await workspace.scope.isComponentRemoved(compId);\n if (isRemoved) return null;\n const bitmapHead = workspaceIds.searchWithoutVersion(id);\n if (bitmapHead && isSnap(bitmapHead.version)) {\n return { id, head: Ref.from(bitmapHead.version as string) };\n }\n return { id, head };\n })\n );\n return compact(laneComponentWithBitmapHead);\n };\n\n const forkedFrom = await getLaneOrigin(consumer);\n const newLane = remoteLane\n ? Lane.from({\n name: laneName,\n hash: remoteLane.hash().toString(),\n log: remoteLane.log,\n scope: remoteLane.scope,\n forkedFrom,\n })\n : Lane.create(laneName, scopeName, forkedFrom, bitCloudUser);\n const dataToPopulate = await getDataToPopulateLaneObjectIfNeeded();\n newLane.setLaneComponents(dataToPopulate);\n\n const laneHistoryMsg = remoteLane ? `fork lane \"${remoteLane.name}\"` : 'new lane';\n await consumer.scope.lanes.saveLane(newLane, { laneHistoryMsg });\n\n return newLane;\n}\n\nexport async function createLaneInScope(laneName: string, scope: ScopeMain): Promise<Lane> {\n const lanes = await scope.legacyScope.listLanes();\n if (lanes.find((lane) => lane.name === laneName)) {\n throw new BitError(`lane \"${laneName}\" already exists`);\n }\n throwForInvalidLaneName(laneName);\n const newLane = Lane.create(laneName, scope.name);\n await scope.legacyScope.lanes.saveLane(newLane, { laneHistoryMsg: 'new lane (created from scope)' });\n return newLane;\n}\n\nasync function getLaneOrigin(consumer: Consumer): Promise<LaneId | undefined> {\n const currentLaneId = consumer.bitMap.laneId;\n if (!currentLaneId) return undefined;\n if (consumer.bitMap.isLaneExported) {\n return currentLaneId;\n }\n // current lane is new.\n const currentLane = await consumer.getCurrentLaneObject();\n return currentLane?.forkedFrom;\n}\n\nexport function throwForInvalidLaneName(laneName: string) {\n if (!isValidLaneName(laneName)) {\n throw new BitError(\n `lane \"${laneName}\" has invalid characters. lane name can only contain alphanumeric, lowercase characters, and the following [\"-\", \"_\", \"$\", \"!\"]`\n );\n }\n}\n\nexport async function throwForStagedComponents(consumer: Consumer) {\n const componentList = new ComponentsList(consumer);\n const stagedComponents = await componentList.listExportPendingComponentsIds();\n if (stagedComponents.length) {\n throw new BitError(\n `unable to switch/create a new lane, please export or reset the following components first: ${stagedComponents.join(\n ', '\n )}`\n );\n }\n}\n\nfunction isValidLaneName(val: unknown): boolean {\n if (typeof val !== 'string') return false;\n if (val.length > MAX_LANE_NAME_LENGTH) return false;\n // @todo: should we allow slash? if so, we should probably replace the lane-delimiter with something else. (maybe \":\")\n return /^[$\\-_!a-z0-9]+$/.test(val);\n}\n"],"mappings":";;;;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,kBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,iBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,gBAAA;EAAA,MAAAL,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAI,eAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,QAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,OAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAA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;EACA,MAAMI,WAAW,GAAG,MAAMzD,QAAQ,CAACiB,oBAAoB,CAAC,CAAC;EACzD,OAAOwC,WAAW,EAAEjB,UAAU;AAChC;AAEO,SAAS9B,uBAAuBA,CAACb,QAAgB,EAAE;EACxD,IAAI,CAAC6D,eAAe,CAAC7D,QAAQ,CAAC,EAAE;IAC9B,MAAM,KAAIU,oBAAQ,EACf,SAAQV,QAAS,iIACpB,CAAC;EACH;AACF;AAEO,eAAegB,wBAAwBA,CAACb,QAAkB,EAAE;EACjE,MAAM2D,aAAa,GAAG,KAAIC,yBAAc,EAAC5D,QAAQ,CAAC;EAClD,MAAM6D,gBAAgB,GAAG,MAAMF,aAAa,CAACG,8BAA8B,CAAC,CAAC;EAC7E,IAAID,gBAAgB,CAACE,MAAM,EAAE;IAC3B,MAAM,KAAIxD,oBAAQ,EACf,8FAA6FsD,gBAAgB,CAACG,IAAI,CACjH,IACF,CAAE,EACJ,CAAC;EACH;AACF;AAEA,SAASN,eAAeA,CAACO,GAAY,EAAW;EAC9C,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE,OAAO,KAAK;EACzC,IAAIA,GAAG,CAACF,MAAM,GAAGrE,oBAAoB,EAAE,OAAO,KAAK;EACnD;EACA,OAAO,kBAAkB,CAACwE,IAAI,CAACD,GAAG,CAAC;AACrC","ignoreList":[]}
|
package/dist/lane.cmd.d.ts
CHANGED
@@ -160,6 +160,21 @@ export declare class LaneHistoryCmd implements Command {
|
|
160
160
|
id?: string;
|
161
161
|
}): Promise<string>;
|
162
162
|
}
|
163
|
+
export declare class LaneEjectCmd implements Command {
|
164
|
+
private lanes;
|
165
|
+
name: string;
|
166
|
+
description: string;
|
167
|
+
extendedDescription: string;
|
168
|
+
alias: string;
|
169
|
+
arguments: {
|
170
|
+
name: string;
|
171
|
+
description: string;
|
172
|
+
}[];
|
173
|
+
options: CommandOptions;
|
174
|
+
loader: boolean;
|
175
|
+
constructor(lanes: LanesMain);
|
176
|
+
report([pattern]: [string]): Promise<string>;
|
177
|
+
}
|
163
178
|
export declare class LaneChangeScopeCmd implements Command {
|
164
179
|
private lanes;
|
165
180
|
name: string;
|
package/dist/lane.cmd.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.LaneShowCmd = exports.LaneRevertCmd = exports.LaneRenameCmd = exports.LaneRemoveReadmeCmd = exports.LaneRemoveCompCmd = exports.LaneRemoveCmd = exports.LaneListCmd = exports.LaneImportCmd = exports.LaneHistoryCmd = exports.LaneFetchCmd = exports.LaneCreateCmd = exports.LaneCmd = exports.LaneCheckoutCmd = exports.LaneChangeScopeCmd = exports.LaneAliasCmd = exports.LaneAddReadmeCmd = exports.CatLaneHistoryCmd = void 0;
|
6
|
+
exports.LaneShowCmd = exports.LaneRevertCmd = exports.LaneRenameCmd = exports.LaneRemoveReadmeCmd = exports.LaneRemoveCompCmd = exports.LaneRemoveCmd = exports.LaneListCmd = exports.LaneImportCmd = exports.LaneHistoryCmd = exports.LaneFetchCmd = exports.LaneEjectCmd = exports.LaneCreateCmd = exports.LaneCmd = exports.LaneCheckoutCmd = exports.LaneChangeScopeCmd = exports.LaneAliasCmd = exports.LaneAddReadmeCmd = exports.CatLaneHistoryCmd = void 0;
|
7
7
|
function _chalk() {
|
8
8
|
const data = _interopRequireDefault(require("chalk"));
|
9
9
|
_chalk = function () {
|
@@ -360,6 +360,29 @@ class LaneHistoryCmd {
|
|
360
360
|
}
|
361
361
|
}
|
362
362
|
exports.LaneHistoryCmd = LaneHistoryCmd;
|
363
|
+
class LaneEjectCmd {
|
364
|
+
constructor(lanes) {
|
365
|
+
this.lanes = lanes;
|
366
|
+
_defineProperty(this, "name", 'eject <component-pattern>');
|
367
|
+
_defineProperty(this, "description", `delete a component from the lane and install it as a package from main`);
|
368
|
+
_defineProperty(this, "extendedDescription", `NOTE: unlike "bit eject" on main, this command doesn't only remove the component from the
|
369
|
+
workspace, but also mark it as deleted from the lane, so it won't be merged later on.`);
|
370
|
+
_defineProperty(this, "alias", '');
|
371
|
+
_defineProperty(this, "arguments", [{
|
372
|
+
name: 'component-pattern',
|
373
|
+
description: _constants().COMPONENT_PATTERN_HELP
|
374
|
+
}]);
|
375
|
+
_defineProperty(this, "options", []);
|
376
|
+
_defineProperty(this, "loader", true);
|
377
|
+
}
|
378
|
+
async report([pattern]) {
|
379
|
+
const results = await this.lanes.eject(pattern);
|
380
|
+
const title = _chalk().default.green('successfully ejected the following components');
|
381
|
+
const body = results.map(r => r.toString()).join('\n');
|
382
|
+
return `${title}\n${body}`;
|
383
|
+
}
|
384
|
+
}
|
385
|
+
exports.LaneEjectCmd = LaneEjectCmd;
|
363
386
|
class LaneChangeScopeCmd {
|
364
387
|
constructor(lanes) {
|
365
388
|
this.lanes = lanes;
|
package/dist/lane.cmd.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_yn","_laneId","_checkout","_workspace","_lanes","_bitError","_prompts","_constants","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","LaneListCmd","constructor","lanes","workspace","scope","report","args","laneOptions","details","remote","merged","notMerged","laneIdStr","laneId","alias","isDefault","name","toString","getLanes","showDefaultLane","mergedLanes","filter","l","isMerged","length","chalk","green","map","m","join","unmergedLanes","currentLane","getCurrentLaneId","getDefaultLaneId","laneDataOfCurrentLane","find","isEqual","id","undefined","currentAlias","currentLaneReadmeComponentStr","outputReadmeComponent","readmeComponent","currentLaneStr","currentLaneComponents","outputComponents","components","availableLanes","laneData","readmeComponentStr","laneTitle","bold","concat","outputFooter","footer","outputCurrentLane","outputAvailableLanes","json","lanesData","serializeLaneData","getCurrentLaneNameOrAlias","exports","LaneShowCmd","Error","getCurrentLaneName","DEFAULT_LANE","parseLaneId","onlyLane","title","author","log","username","email","date","Date","parseInt","toLocaleString","link","DEFAULT_CLOUD_DOMAIN","replace","LaneCreateCmd","description","createLaneOptions","OutsideWorkspaceError","getCurrentLane","remoteScope","result","createLane","remoteScopeOrDefaultScope","yellow","remoteScopeOutput","LaneAliasCmd","laneName","aliasLane","CatLaneHistoryCmd","laneHistory","getLaneHistory","JSON","stringify","toObject","LaneCheckoutCmd","historyId","opts","checkoutHistory","checkoutOutput","LaneRevertCmd","revertHistory","LaneHistoryCmd","BitError","importLaneHistory","history","getHistory","historyItem","message","items","keys","uuid","LaneChangeScopeCmd","remoteScopeBefore","localName","changeScope","LaneRenameCmd","newName","currentName","rename","LaneRemoveCmd","names","force","silent","removePromptResult","approveOperation","yn","shouldProceed","laneResults","removeLanes","LaneRemoveCompCmd","COMPONENT_PATTERN_HELP","LaneImportCmd","switchCmd","lane","skipDependencyInstallation","pattern","LaneFetchCmd","fetchCmd","all","getLaneIdStr","LaneCmd","LaneRemoveReadmeCmd","removeLaneReadme","red","LaneAddReadmeCmd","componentId","addLaneReadme","componentsTitle","componentsStr","c","head","component","fullName"],"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 { checkoutOutput } from '@teambit/checkout';\nimport { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { LaneData, serializeLaneData } from '@teambit/legacy/dist/scope/lanes/lanes';\nimport { BitError } from '@teambit/bit-error';\nimport { approveOperation } from '@teambit/legacy/dist/prompts';\nimport { COMPONENT_PATTERN_HELP, DEFAULT_CLOUD_DOMAIN } from '@teambit/legacy/dist/constants';\nimport { CreateLaneOptions, LanesMain } from './lanes.main.runtime';\nimport { SwitchCmd } from './switch.cmd';\nimport { FetchCmd } from '@teambit/importer';\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 or remote 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 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 = remote\n ? ''\n : `current lane - ${chalk.green.green(laneIdStr(currentLane, currentAlias))}${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)\n footer += `\\nswitch lanes using 'bit switch <name>'. create lanes using 'bit lane create <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 lanesData = await this.lanes.getLanes({\n remote,\n showDefaultLane: true,\n merged,\n notMerged,\n });\n const lanes = lanesData.map(serializeLaneData);\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 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 const link = `link: https://${DEFAULT_CLOUD_DOMAIN}/${laneId.scope.replace('.', '/')}/~lane/${laneId.name}\\n`;\n return title + author + date + link + 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 serializeLaneData(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\n constructor(private lanes: LanesMain) {}\n\n async report([name]: [string], createLaneOptions: CreateLaneOptions & { remoteScope?: string }): Promise<string> {\n if (!this.lanes.workspace) throw new OutsideWorkspaceError();\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 ? 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\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 CatLaneHistoryCmd implements Command {\n name = 'cat-lane-history <lane-name>';\n description = 'cat lane-history object by lane-name';\n private = true;\n alias = 'clh';\n options = [] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName]: [string]): Promise<string> {\n const laneId = await this.lanes.parseLaneId(laneName);\n const laneHistory = await this.lanes.getLaneHistory(laneId);\n return JSON.stringify(laneHistory.toObject(), null, 2);\n }\n}\n\nexport type LaneCheckoutOpts = { skipDependencyInstallation?: boolean };\n\nexport class LaneCheckoutCmd implements Command {\n name = 'checkout <history-id>';\n description = 'EXPERIMENTAL. checkout to a previous history of the current lane. see also \"bit lane revert\"';\n arguments = [\n { name: 'history-id', description: 'the history-id to checkout to. run \"bit lane history\" to list the ids' },\n ];\n alias = '';\n options = [\n ['x', 'skip-dependency-installation', 'do not install dependencies of the checked out components'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([historyId]: [string], opts: LaneCheckoutOpts): Promise<string> {\n const result = await this.lanes.checkoutHistory(historyId, opts);\n return checkoutOutput(result, {}, `successfully checked out according to history-id: ${historyId}`);\n }\n}\n\nexport class LaneRevertCmd implements Command {\n name = 'revert <history-id>';\n description = 'EXPERIMENTAL. revert to a previous history of the current lane. see also \"bit lane checkout\"';\n extendedDescription = `revert is similar to \"lane checkout\", but it keeps the versions and only change the files.\nchoose one or the other based on your needs.\nif you want to continue working on this lane and needs the changes from the history to be the head, then use \"lane revert\".\nif you want to fork the lane from a certain point in history, use \"lane checkout\" and create a new lane from it.`;\n arguments = [\n { name: 'history-id', description: 'the history-id to checkout to. run \"bit lane history\" to list the ids' },\n ];\n alias = '';\n options = [\n ['x', 'skip-dependency-installation', 'do not install dependencies of the checked out components'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([historyId]: [string], opts: LaneCheckoutOpts): Promise<string> {\n const result = await this.lanes.revertHistory(historyId, opts);\n return checkoutOutput(result, {}, `successfully reverted according to history-id: ${historyId}`);\n }\n}\n\nexport class LaneHistoryCmd implements Command {\n name = 'history [lane-name]';\n description = 'EXPERIMENTAL. show lane history, default to the current lane';\n alias = '';\n options = [['', 'id <string>', 'show a specific history item']] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName]: [string], { id }: { id?: string }): Promise<string> {\n const laneId = laneName ? await this.lanes.parseLaneId(laneName) : this.lanes.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) throw new BitError(`unable to show history of the default lane (main)`);\n await this.lanes.importLaneHistory(laneId);\n const laneHistory = await this.lanes.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n if (id) {\n const historyItem = history[id];\n if (!historyItem) throw new Error(`history id ${id} was not found`);\n const date = new Date(parseInt(historyItem.log.date)).toLocaleString();\n const message = historyItem.log.message;\n return `${id} ${date} ${historyItem.log.username} ${message}\\n\\n${historyItem.components.join('\\n')}`;\n }\n const items = Object.keys(history).map((uuid) => {\n const historyItem = history[uuid];\n const date = new Date(parseInt(historyItem.log.date)).toLocaleString();\n const message = historyItem.log.message;\n return `${uuid} ${date} ${historyItem.log.username} ${message}`;\n });\n return items.join('\\n');\n }\n}\n\nexport class LaneChangeScopeCmd implements Command {\n name = 'change-scope <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 = [\n [\n 'l',\n 'lane-name <lane-name>',\n 'the name of the lane to change its remote scope. if not specified, the current lane is used',\n ],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([remoteScope]: [string], { laneName }: { laneName?: string }): Promise<string> {\n const { remoteScopeBefore, localName } = await this.lanes.changeScope(remoteScope, laneName);\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 <new-name>';\n description = `EXPERIMENTAL. change the lane-name locally`;\n extendedDescription = 'the remote will be updated after the next \"bit export\" command';\n alias = '';\n options = [\n ['l', 'lane-name <lane-name>', 'the name of the lane to rename. if not specified, the current lane is used'],\n ] as CommandOptions;\n loader = true;\n constructor(private lanes: LanesMain) {}\n\n async report([newName]: [string], { laneName }: { laneName?: string }): Promise<string> {\n const { currentName } = await this.lanes.rename(newName, laneName);\n return `the lane ${chalk.bold(currentName)}'s name has been changed to ${chalk.bold(newName)}.`;\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\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 = `DEPRECATED. remove components when on a lane`;\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\n constructor(private workspace: Workspace, private lanes: LanesMain) {}\n\n async report(): Promise<string> {\n throw new BitError(`bit lane remove-comp has been removed. please use \"bit remove\" or \"bit delete\" instead`);\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\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], { skipDependencyInstallation, pattern });\n }\n}\n\nexport class LaneFetchCmd implements Command {\n name = 'fetch [lane-id]';\n description = `fetch component objects from lanes. if no lane-id is provided, it fetches from the current lane`;\n extendedDescription = `note, it does not save the remote lanes objects locally, only the refs`;\n alias = '';\n options = [['a', 'all', 'fetch all remote lanes']] as CommandOptions;\n loader = true;\n\n constructor(private fetchCmd: FetchCmd, private lanes: LanesMain) {}\n\n async report([laneId]: [string], { all }: { all?: boolean }): Promise<string> {\n if (all) return this.fetchCmd.report([[]], { lanes: true });\n const getLaneIdStr = () => {\n if (laneId) return laneId;\n const currentLane = this.lanes.getCurrentLaneId();\n if (!currentLane || currentLane.isDefault())\n throw new BitError('you are not checked out to any lane. please specify a lane-id to fetch or use --all flag');\n return currentLane.toString();\n };\n const lane = getLaneIdStr();\n return this.fetchCmd.report([[lane]], { lanes: true });\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 group = 'collaborate';\n remoteOp = true;\n skipWorkspace = true;\n helpUrl = 'reference/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 ||\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AAU,CAACnB,GAAG,CAAEgI,CAAC,IAAM,OAAMA,CAAC,CAACtH,EAAE,CAACpB,QAAQ,CAAC,CAAE,MAAK0I,CAAC,CAACC,IAAK,EAAC,CAAC,CAAC/H,IAAI,CAAC,IAAI,CAAC;EAC5F,OAAO4H,eAAe,GAAGC,aAAa;AACxC;AAEA,SAASjH,qBAAqBA,CAACoH,SAAsC,EAAU;EAC7E,IAAI,CAACA,SAAS,EAAE,OAAO,EAAE;EACzB,OAAQ,OAAO,GAAEpI,gBAAK,CAACgE,MAAM,CAAC,kBAAkB,CAAE,SAAQoE,SAAS,CAACxH,EAAG,MACrEwH,SAAS,CAACD,IAAI,IACb,iCAAgCC,SAAS,CAACxH,EAAE,CAACyH,QAAS,8DACxD,EAAE,IAAG;AACR","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_yn","_laneId","_checkout","_workspace","_lanes","_bitError","_prompts","_constants","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","LaneListCmd","constructor","lanes","workspace","scope","report","args","laneOptions","details","remote","merged","notMerged","laneIdStr","laneId","alias","isDefault","name","toString","getLanes","showDefaultLane","mergedLanes","filter","l","isMerged","length","chalk","green","map","m","join","unmergedLanes","currentLane","getCurrentLaneId","getDefaultLaneId","laneDataOfCurrentLane","find","isEqual","id","undefined","currentAlias","currentLaneReadmeComponentStr","outputReadmeComponent","readmeComponent","currentLaneStr","currentLaneComponents","outputComponents","components","availableLanes","laneData","readmeComponentStr","laneTitle","bold","concat","outputFooter","footer","outputCurrentLane","outputAvailableLanes","json","lanesData","serializeLaneData","getCurrentLaneNameOrAlias","exports","LaneShowCmd","Error","getCurrentLaneName","DEFAULT_LANE","parseLaneId","onlyLane","title","author","log","username","email","date","Date","parseInt","toLocaleString","link","DEFAULT_CLOUD_DOMAIN","replace","LaneCreateCmd","description","createLaneOptions","OutsideWorkspaceError","getCurrentLane","remoteScope","result","createLane","remoteScopeOrDefaultScope","yellow","remoteScopeOutput","LaneAliasCmd","laneName","aliasLane","CatLaneHistoryCmd","laneHistory","getLaneHistory","JSON","stringify","toObject","LaneCheckoutCmd","historyId","opts","checkoutHistory","checkoutOutput","LaneRevertCmd","revertHistory","LaneHistoryCmd","BitError","importLaneHistory","history","getHistory","historyItem","message","items","keys","uuid","LaneEjectCmd","COMPONENT_PATTERN_HELP","pattern","results","eject","body","LaneChangeScopeCmd","remoteScopeBefore","localName","changeScope","LaneRenameCmd","newName","currentName","rename","LaneRemoveCmd","names","force","silent","removePromptResult","approveOperation","yn","shouldProceed","laneResults","removeLanes","LaneRemoveCompCmd","LaneImportCmd","switchCmd","lane","skipDependencyInstallation","LaneFetchCmd","fetchCmd","all","getLaneIdStr","LaneCmd","LaneRemoveReadmeCmd","removeLaneReadme","red","LaneAddReadmeCmd","componentId","addLaneReadme","componentsTitle","componentsStr","c","head","component","fullName"],"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 { checkoutOutput } from '@teambit/checkout';\nimport { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { LaneData, serializeLaneData } from '@teambit/legacy/dist/scope/lanes/lanes';\nimport { BitError } from '@teambit/bit-error';\nimport { approveOperation } from '@teambit/legacy/dist/prompts';\nimport { COMPONENT_PATTERN_HELP, DEFAULT_CLOUD_DOMAIN } from '@teambit/legacy/dist/constants';\nimport { CreateLaneOptions, LanesMain } from './lanes.main.runtime';\nimport { SwitchCmd } from './switch.cmd';\nimport { FetchCmd } from '@teambit/importer';\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 or remote 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 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 = remote\n ? ''\n : `current lane - ${chalk.green.green(laneIdStr(currentLane, currentAlias))}${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)\n footer += `\\nswitch lanes using 'bit switch <name>'. create lanes using 'bit lane create <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 lanesData = await this.lanes.getLanes({\n remote,\n showDefaultLane: true,\n merged,\n notMerged,\n });\n const lanes = lanesData.map(serializeLaneData);\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 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 const link = `link: https://${DEFAULT_CLOUD_DOMAIN}/${laneId.scope.replace('.', '/')}/~lane/${laneId.name}\\n`;\n return title + author + date + link + 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 serializeLaneData(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\n constructor(private lanes: LanesMain) {}\n\n async report([name]: [string], createLaneOptions: CreateLaneOptions & { remoteScope?: string }): Promise<string> {\n if (!this.lanes.workspace) throw new OutsideWorkspaceError();\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 ? 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\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 CatLaneHistoryCmd implements Command {\n name = 'cat-lane-history <lane-name>';\n description = 'cat lane-history object by lane-name';\n private = true;\n alias = 'clh';\n options = [] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName]: [string]): Promise<string> {\n const laneId = await this.lanes.parseLaneId(laneName);\n const laneHistory = await this.lanes.getLaneHistory(laneId);\n return JSON.stringify(laneHistory.toObject(), null, 2);\n }\n}\n\nexport type LaneCheckoutOpts = { skipDependencyInstallation?: boolean };\n\nexport class LaneCheckoutCmd implements Command {\n name = 'checkout <history-id>';\n description = 'EXPERIMENTAL. checkout to a previous history of the current lane. see also \"bit lane revert\"';\n arguments = [\n { name: 'history-id', description: 'the history-id to checkout to. run \"bit lane history\" to list the ids' },\n ];\n alias = '';\n options = [\n ['x', 'skip-dependency-installation', 'do not install dependencies of the checked out components'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([historyId]: [string], opts: LaneCheckoutOpts): Promise<string> {\n const result = await this.lanes.checkoutHistory(historyId, opts);\n return checkoutOutput(result, {}, `successfully checked out according to history-id: ${historyId}`);\n }\n}\n\nexport class LaneRevertCmd implements Command {\n name = 'revert <history-id>';\n description = 'EXPERIMENTAL. revert to a previous history of the current lane. see also \"bit lane checkout\"';\n extendedDescription = `revert is similar to \"lane checkout\", but it keeps the versions and only change the files.\nchoose one or the other based on your needs.\nif you want to continue working on this lane and needs the changes from the history to be the head, then use \"lane revert\".\nif you want to fork the lane from a certain point in history, use \"lane checkout\" and create a new lane from it.`;\n arguments = [\n { name: 'history-id', description: 'the history-id to checkout to. run \"bit lane history\" to list the ids' },\n ];\n alias = '';\n options = [\n ['x', 'skip-dependency-installation', 'do not install dependencies of the checked out components'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([historyId]: [string], opts: LaneCheckoutOpts): Promise<string> {\n const result = await this.lanes.revertHistory(historyId, opts);\n return checkoutOutput(result, {}, `successfully reverted according to history-id: ${historyId}`);\n }\n}\n\nexport class LaneHistoryCmd implements Command {\n name = 'history [lane-name]';\n description = 'EXPERIMENTAL. show lane history, default to the current lane';\n alias = '';\n options = [['', 'id <string>', 'show a specific history item']] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([laneName]: [string], { id }: { id?: string }): Promise<string> {\n const laneId = laneName ? await this.lanes.parseLaneId(laneName) : this.lanes.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) throw new BitError(`unable to show history of the default lane (main)`);\n await this.lanes.importLaneHistory(laneId);\n const laneHistory = await this.lanes.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n if (id) {\n const historyItem = history[id];\n if (!historyItem) throw new Error(`history id ${id} was not found`);\n const date = new Date(parseInt(historyItem.log.date)).toLocaleString();\n const message = historyItem.log.message;\n return `${id} ${date} ${historyItem.log.username} ${message}\\n\\n${historyItem.components.join('\\n')}`;\n }\n const items = Object.keys(history).map((uuid) => {\n const historyItem = history[uuid];\n const date = new Date(parseInt(historyItem.log.date)).toLocaleString();\n const message = historyItem.log.message;\n return `${uuid} ${date} ${historyItem.log.username} ${message}`;\n });\n return items.join('\\n');\n }\n}\n\nexport class LaneEjectCmd implements Command {\n name = 'eject <component-pattern>';\n description = `delete a component from the lane and install it as a package from main`;\n extendedDescription = `NOTE: unlike \"bit eject\" on main, this command doesn't only remove the component from the\nworkspace, but also mark it as deleted from the lane, so it won't be merged later on.`;\n alias = '';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n options = [] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([pattern]: [string]) {\n const results = await this.lanes.eject(pattern);\n const title = chalk.green('successfully ejected the following components');\n const body = results.map((r) => r.toString()).join('\\n');\n return `${title}\\n${body}`;\n }\n}\n\nexport class LaneChangeScopeCmd implements Command {\n name = 'change-scope <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 = [\n [\n 'l',\n 'lane-name <lane-name>',\n 'the name of the lane to change its remote scope. if not specified, the current lane is used',\n ],\n ] as CommandOptions;\n loader = true;\n\n constructor(private lanes: LanesMain) {}\n\n async report([remoteScope]: [string], { laneName }: { laneName?: string }): Promise<string> {\n const { remoteScopeBefore, localName } = await this.lanes.changeScope(remoteScope, laneName);\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 <new-name>';\n description = `EXPERIMENTAL. change the lane-name locally`;\n extendedDescription = 'the remote will be updated after the next \"bit export\" command';\n alias = '';\n options = [\n ['l', 'lane-name <lane-name>', 'the name of the lane to rename. if not specified, the current lane is used'],\n ] as CommandOptions;\n loader = true;\n constructor(private lanes: LanesMain) {}\n\n async report([newName]: [string], { laneName }: { laneName?: string }): Promise<string> {\n const { currentName } = await this.lanes.rename(newName, laneName);\n return `the lane ${chalk.bold(currentName)}'s name has been changed to ${chalk.bold(newName)}.`;\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\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 = `DEPRECATED. remove components when on a lane`;\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\n constructor(private workspace: Workspace, private lanes: LanesMain) {}\n\n async report(): Promise<string> {\n throw new BitError(`bit lane remove-comp has been removed. please use \"bit remove\" or \"bit delete\" instead`);\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\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], { skipDependencyInstallation, pattern });\n }\n}\n\nexport class LaneFetchCmd implements Command {\n name = 'fetch [lane-id]';\n description = `fetch component objects from lanes. if no lane-id is provided, it fetches from the current lane`;\n extendedDescription = `note, it does not save the remote lanes objects locally, only the refs`;\n alias = '';\n options = [['a', 'all', 'fetch all remote lanes']] as CommandOptions;\n loader = true;\n\n constructor(private fetchCmd: FetchCmd, private lanes: LanesMain) {}\n\n async report([laneId]: [string], { all }: { all?: boolean }): Promise<string> {\n if (all) return this.fetchCmd.report([[]], { lanes: true });\n const getLaneIdStr = () => {\n if (laneId) return laneId;\n const currentLane = this.lanes.getCurrentLaneId();\n if (!currentLane || currentLane.isDefault())\n throw new BitError('you are not checked out to any lane. please specify a lane-id to fetch or use --all flag');\n return currentLane.toString();\n };\n const lane = getLaneIdStr();\n return this.fetchCmd.report([[lane]], { lanes: true });\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 group = 'collaborate';\n remoteOp = true;\n skipWorkspace = true;\n helpUrl = 'reference/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.fullName}\" 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,UAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,WAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,UAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,OAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,MAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EA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,CAAC,IAAM,OAAMA,CAAC,CAAC1H,EAAE,CAACpB,QAAQ,CAAC,CAAE,MAAK8I,CAAC,CAACC,IAAK,EAAC,CAAC,CAACnI,IAAI,CAAC,IAAI,CAAC;EAC5F,OAAOgI,eAAe,GAAGC,aAAa;AACxC;AAEA,SAASrH,qBAAqBA,CAACwH,SAAsC,EAAU;EAC7E,IAAI,CAACA,SAAS,EAAE,OAAO,EAAE;EACzB,OAAQ,OAAO,GAAExI,gBAAK,CAACgE,MAAM,CAAC,kBAAkB,CAAE,SAAQwE,SAAS,CAAC5H,EAAG,MACrE4H,SAAS,CAACD,IAAI,IACb,iCAAgCC,SAAS,CAAC5H,EAAE,CAAC6H,QAAS,8DACxD,EAAE,IAAG;AACR","ignoreList":[]}
|
@@ -23,6 +23,7 @@ import { CheckoutMain } from '@teambit/checkout';
|
|
23
23
|
import { ChangeType } from '@teambit/lanes.entities.lane-diff';
|
24
24
|
import ComponentsList, { DivergeDataPerId } from '@teambit/legacy/dist/consumer/component/components-list';
|
25
25
|
import { LaneCheckoutOpts } from './lane.cmd';
|
26
|
+
import { InstallMain } from '@teambit/install';
|
26
27
|
export { Lane };
|
27
28
|
export type SnapsDistanceObj = {
|
28
29
|
onSource: string[];
|
@@ -90,7 +91,8 @@ export declare class LanesMain {
|
|
90
91
|
readonly componentWriter: ComponentWriterMain;
|
91
92
|
private remove;
|
92
93
|
readonly checkout: CheckoutMain;
|
93
|
-
|
94
|
+
private install;
|
95
|
+
constructor(workspace: Workspace | undefined, scope: ScopeMain, merging: MergingMain, componentAspect: ComponentMain, logger: Logger, importer: ImporterMain, exporter: ExportMain, componentCompare: ComponentCompareMain, componentWriter: ComponentWriterMain, remove: RemoveMain, checkout: CheckoutMain, install: InstallMain);
|
94
96
|
/**
|
95
97
|
* return the lane data without the deleted components.
|
96
98
|
* the deleted components are filtered out in legacyScope.lanes.getLanesData()
|
@@ -138,6 +140,7 @@ export declare class LanesMain {
|
|
138
140
|
}>;
|
139
141
|
exportLane(lane: Lane): Promise<void>;
|
140
142
|
importLaneObject(laneId: LaneId, persistIfNotExists?: boolean, includeLaneHistory?: boolean): Promise<Lane>;
|
143
|
+
eject(pattern: string): Promise<ComponentID[]>;
|
141
144
|
/**
|
142
145
|
* get the head hash (snap) of main. return undefined if the component exists only on a lane and was never merged to main
|
143
146
|
*/
|
@@ -205,7 +208,7 @@ export declare class LanesMain {
|
|
205
208
|
static slots: never[];
|
206
209
|
static dependencies: import("@teambit/harmony").Aspect[];
|
207
210
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
208
|
-
static provider([cli, scope, workspace, graphql, merging, component, loggerMain, importer, exporter, express, componentCompare, componentWriter, remove, checkout,]: [
|
211
|
+
static provider([cli, scope, workspace, graphql, merging, component, loggerMain, importer, exporter, express, componentCompare, componentWriter, remove, checkout, install,]: [
|
209
212
|
CLIMain,
|
210
213
|
ScopeMain,
|
211
214
|
Workspace,
|
@@ -219,7 +222,8 @@ export declare class LanesMain {
|
|
219
222
|
ComponentCompareMain,
|
220
223
|
ComponentWriterMain,
|
221
224
|
RemoveMain,
|
222
|
-
CheckoutMain
|
225
|
+
CheckoutMain,
|
226
|
+
InstallMain
|
223
227
|
]): Promise<LanesMain>;
|
224
228
|
}
|
225
229
|
export default LanesMain;
|
@@ -297,6 +297,13 @@ function _lanesRestore() {
|
|
297
297
|
};
|
298
298
|
return data;
|
299
299
|
}
|
300
|
+
function _install() {
|
301
|
+
const data = _interopRequireDefault(require("@teambit/install"));
|
302
|
+
_install = function () {
|
303
|
+
return data;
|
304
|
+
};
|
305
|
+
return data;
|
306
|
+
}
|
300
307
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
301
308
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
302
309
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
@@ -304,7 +311,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
304
311
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
305
312
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
306
313
|
class LanesMain {
|
307
|
-
constructor(workspace, scope, merging, componentAspect, logger, importer, exporter, componentCompare, componentWriter, remove, checkout) {
|
314
|
+
constructor(workspace, scope, merging, componentAspect, logger, importer, exporter, componentCompare, componentWriter, remove, checkout, install) {
|
308
315
|
this.workspace = workspace;
|
309
316
|
this.scope = scope;
|
310
317
|
this.merging = merging;
|
@@ -316,6 +323,7 @@ class LanesMain {
|
|
316
323
|
this.componentWriter = componentWriter;
|
317
324
|
this.remove = remove;
|
318
325
|
this.checkout = checkout;
|
326
|
+
this.install = install;
|
319
327
|
}
|
320
328
|
|
321
329
|
/**
|
@@ -624,6 +632,15 @@ please create a new lane instead, which will include all components of this lane
|
|
624
632
|
async importLaneObject(laneId, persistIfNotExists = true, includeLaneHistory = false) {
|
625
633
|
return this.importer.importLaneObject(laneId, persistIfNotExists, includeLaneHistory);
|
626
634
|
}
|
635
|
+
async eject(pattern) {
|
636
|
+
if (!this.workspace) {
|
637
|
+
throw new (_bitError().BitError)(`unable to eject a component outside of Bit workspace`);
|
638
|
+
}
|
639
|
+
const deletedComps = await this.remove.deleteComps(pattern);
|
640
|
+
const packages = deletedComps.map(c => c.getPackageName());
|
641
|
+
await this.install.install(packages);
|
642
|
+
return deletedComps.map(c => c.id);
|
643
|
+
}
|
627
644
|
|
628
645
|
/**
|
629
646
|
* get the head hash (snap) of main. return undefined if the component exists only on a lane and was never merged to main
|
@@ -1121,13 +1138,13 @@ please create a new lane instead, which will include all components of this lane
|
|
1121
1138
|
get restoreRoutePath() {
|
1122
1139
|
return '/lanes/restore';
|
1123
1140
|
}
|
1124
|
-
static async provider([cli, scope, workspace, graphql, merging, component, loggerMain, importer, exporter, express, componentCompare, componentWriter, remove, checkout]) {
|
1141
|
+
static async provider([cli, scope, workspace, graphql, merging, component, loggerMain, importer, exporter, express, componentCompare, componentWriter, remove, checkout, install]) {
|
1125
1142
|
const logger = loggerMain.createLogger(_lanes().LanesAspect.id);
|
1126
|
-
const lanesMain = new LanesMain(workspace, scope, merging, component, logger, importer, exporter, componentCompare, componentWriter, remove, checkout);
|
1143
|
+
const lanesMain = new LanesMain(workspace, scope, merging, component, logger, importer, exporter, componentCompare, componentWriter, remove, checkout, install);
|
1127
1144
|
const switchCmd = new (_switch().SwitchCmd)(lanesMain);
|
1128
1145
|
const fetchCmd = new (_importer().FetchCmd)(importer);
|
1129
1146
|
const laneCmd = new (_lane().LaneCmd)(lanesMain, workspace, scope);
|
1130
|
-
laneCmd.commands = [new (_lane().LaneListCmd)(lanesMain, workspace, scope), switchCmd, new (_lane().LaneShowCmd)(lanesMain, workspace, scope), new (_lane().LaneCreateCmd)(lanesMain), new (_lane().LaneRemoveCmd)(lanesMain), new (_lane().LaneChangeScopeCmd)(lanesMain), new (_lane().LaneAliasCmd)(lanesMain), new (_lane().LaneRenameCmd)(lanesMain), new (_lanesModules().LaneDiffCmd)(workspace, scope, componentCompare), new (_lane().LaneAddReadmeCmd)(lanesMain), new (_lane().LaneRemoveReadmeCmd)(lanesMain), new (_lane().LaneImportCmd)(switchCmd), new (_lane().LaneRemoveCompCmd)(workspace, lanesMain), new (_lane().LaneFetchCmd)(fetchCmd, lanesMain)];
|
1147
|
+
laneCmd.commands = [new (_lane().LaneListCmd)(lanesMain, workspace, scope), switchCmd, new (_lane().LaneShowCmd)(lanesMain, workspace, scope), new (_lane().LaneCreateCmd)(lanesMain), new (_lane().LaneRemoveCmd)(lanesMain), new (_lane().LaneChangeScopeCmd)(lanesMain), new (_lane().LaneAliasCmd)(lanesMain), new (_lane().LaneRenameCmd)(lanesMain), new (_lanesModules().LaneDiffCmd)(workspace, scope, componentCompare), new (_lane().LaneAddReadmeCmd)(lanesMain), new (_lane().LaneRemoveReadmeCmd)(lanesMain), new (_lane().LaneImportCmd)(switchCmd), new (_lane().LaneRemoveCompCmd)(workspace, lanesMain), new (_lane().LaneFetchCmd)(fetchCmd, lanesMain), new (_lane().LaneEjectCmd)(lanesMain)];
|
1131
1148
|
if ((0, _featureToggle().isFeatureEnabled)(_featureToggle().SUPPORT_LANE_HISTORY)) {
|
1132
1149
|
laneCmd.commands.push(new (_lane().LaneHistoryCmd)(lanesMain));
|
1133
1150
|
laneCmd.commands.push(new (_lane().LaneCheckoutCmd)(lanesMain));
|
@@ -1144,7 +1161,7 @@ please create a new lane instead, which will include all components of this lane
|
|
1144
1161
|
}
|
1145
1162
|
exports.LanesMain = LanesMain;
|
1146
1163
|
_defineProperty(LanesMain, "slots", []);
|
1147
|
-
_defineProperty(LanesMain, "dependencies", [_cli().CLIAspect, _scope().ScopeAspect, _workspace().WorkspaceAspect, _graphql().GraphqlAspect, _merging().MergingAspect, _component().ComponentAspect, _logger().LoggerAspect, _importer().ImporterAspect, _export().ExportAspect, _express().ExpressAspect, _componentCompare().ComponentCompareAspect, _componentWriter().ComponentWriterAspect, _remove().RemoveAspect, _checkout().CheckoutAspect]);
|
1164
|
+
_defineProperty(LanesMain, "dependencies", [_cli().CLIAspect, _scope().ScopeAspect, _workspace().WorkspaceAspect, _graphql().GraphqlAspect, _merging().MergingAspect, _component().ComponentAspect, _logger().LoggerAspect, _importer().ImporterAspect, _export().ExportAspect, _express().ExpressAspect, _componentCompare().ComponentCompareAspect, _componentWriter().ComponentWriterAspect, _remove().RemoveAspect, _checkout().CheckoutAspect, _install().default]);
|
1148
1165
|
_defineProperty(LanesMain, "runtime", _cli().MainRuntime);
|
1149
1166
|
_lanes().LanesAspect.addRuntime(LanesMain);
|
1150
1167
|
var _default = exports.default = LanesMain;
|