@teambit/lanes 0.0.470 → 0.0.473
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/create-lane.d.ts +2 -0
- package/dist/create-lane.js +11 -0
- package/dist/create-lane.js.map +1 -1
- package/dist/lanes.graphql.js +28 -1
- package/dist/lanes.graphql.js.map +1 -1
- package/dist/lanes.main.runtime.d.ts +10 -1
- package/dist/lanes.main.runtime.js +79 -10
- package/dist/lanes.main.runtime.js.map +1 -1
- package/dist/lanes.spec.js +71 -36
- package/dist/lanes.spec.js.map +1 -1
- package/dist/lanes.ui.runtime.d.ts +1 -1
- package/package-tar/teambit-lanes-0.0.473.tgz +0 -0
- package/package.json +24 -23
- package/{preview-1668310914843.js → preview-1668655447623.js} +2 -2
- package/package-tar/teambit-lanes-0.0.470.tgz +0 -0
package/dist/create-lane.d.ts
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
import { Consumer } from '@teambit/legacy/dist/consumer';
|
2
|
+
import { ScopeMain } from '@teambit/scope';
|
2
3
|
import Lane from '@teambit/legacy/dist/scope/models/lane';
|
3
4
|
export declare function createLane(consumer: Consumer, laneName: string, scopeName: string, remoteLane?: Lane): Promise<Lane>;
|
5
|
+
export declare function createLaneInScope(laneName: string, scope: ScopeMain): Promise<Lane>;
|
4
6
|
export declare function throwForInvalidLaneName(laneName: string): void;
|
package/dist/create-lane.js
CHANGED
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
7
7
|
});
|
8
8
|
exports.createLane = createLane;
|
9
|
+
exports.createLaneInScope = createLaneInScope;
|
9
10
|
exports.throwForInvalidLaneName = throwForInvalidLaneName;
|
10
11
|
function _bitError() {
|
11
12
|
const data = require("@teambit/bit-error");
|
@@ -49,6 +50,16 @@ async function createLane(consumer, laneName, scopeName, remoteLane) {
|
|
49
50
|
await consumer.scope.lanes.saveLane(newLane);
|
50
51
|
return newLane;
|
51
52
|
}
|
53
|
+
async function createLaneInScope(laneName, scope) {
|
54
|
+
const lanes = await scope.legacyScope.listLanes();
|
55
|
+
if (lanes.find(lane => lane.name === laneName)) {
|
56
|
+
throw new (_bitError().BitError)(`lane "${laneName}" already exists`);
|
57
|
+
}
|
58
|
+
throwForInvalidLaneName(laneName);
|
59
|
+
const newLane = _lane().default.create(laneName, scope.name);
|
60
|
+
await scope.legacyScope.lanes.saveLane(newLane);
|
61
|
+
return newLane;
|
62
|
+
}
|
52
63
|
async function getLaneOrigin(consumer) {
|
53
64
|
const currentLaneId = consumer.bitMap.laneId;
|
54
65
|
if (!currentLaneId) return undefined;
|
package/dist/create-lane.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["createLane","consumer","laneName","scopeName","remoteLane","lanes","scope","listLanes","find","lane","name","BitError","throwForInvalidLaneName","getDataToPopulateLaneObjectIfNeeded","components","currentLaneObject","getCurrentLaneObject","forkedFrom","getLaneOrigin","newLane","Lane","from","hash","toString","log","create","dataToPopulate","setLaneComponents","saveLane","currentLaneId","bitMap","laneId","undefined","isLaneExported","currentLane","isValidLaneName","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';\n// import { BitIds } from '@teambit/legacy/dist/bit-id';\nimport Lane, { LaneComponent } from '@teambit/legacy/dist/scope/models/lane';\n\nexport async function createLane(\n consumer: Consumer,\n laneName: string,\n scopeName: string,\n remoteLane?: Lane\n): Promise<Lane> {\n const lanes = await consumer.scope.listLanes();\n if (lanes.find((lane) => lane.name === laneName)) {\n throw new BitError(`lane \"${laneName}\" already exists, to switch to this lane, please use \"bit switch\" command`);\n }\n throwForInvalidLaneName(laneName);\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 return currentLaneObject ? currentLaneObject.components : [];\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);\n const dataToPopulate = await getDataToPopulateLaneObjectIfNeeded();\n newLane.setLaneComponents(dataToPopulate);\n\n await consumer.scope.lanes.saveLane(newLane);\n\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\nfunction isValidLaneName(val: unknown): boolean {\n if (typeof val !== 'string') 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":"
|
1
|
+
{"version":3,"names":["createLane","consumer","laneName","scopeName","remoteLane","lanes","scope","listLanes","find","lane","name","BitError","throwForInvalidLaneName","getDataToPopulateLaneObjectIfNeeded","components","currentLaneObject","getCurrentLaneObject","forkedFrom","getLaneOrigin","newLane","Lane","from","hash","toString","log","create","dataToPopulate","setLaneComponents","saveLane","createLaneInScope","legacyScope","currentLaneId","bitMap","laneId","undefined","isLaneExported","currentLane","isValidLaneName","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 { BitIds } from '@teambit/legacy/dist/bit-id';\nimport Lane, { LaneComponent } from '@teambit/legacy/dist/scope/models/lane';\n\nexport async function createLane(\n consumer: Consumer,\n laneName: string,\n scopeName: string,\n remoteLane?: Lane\n): Promise<Lane> {\n const lanes = await consumer.scope.listLanes();\n if (lanes.find((lane) => lane.name === laneName)) {\n throw new BitError(`lane \"${laneName}\" already exists, to switch to this lane, please use \"bit switch\" command`);\n }\n throwForInvalidLaneName(laneName);\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 return currentLaneObject ? currentLaneObject.components : [];\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);\n const dataToPopulate = await getDataToPopulateLaneObjectIfNeeded();\n newLane.setLaneComponents(dataToPopulate);\n\n await consumer.scope.lanes.saveLane(newLane);\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);\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\nfunction isValidLaneName(val: unknown): boolean {\n if (typeof val !== 'string') 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;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AADA;;AAGO,eAAeA,UAAU,CAC9BC,QAAkB,EAClBC,QAAgB,EAChBC,SAAiB,EACjBC,UAAiB,EACF;EACf,MAAMC,KAAK,GAAG,MAAMJ,QAAQ,CAACK,KAAK,CAACC,SAAS,EAAE;EAC9C,IAAIF,KAAK,CAACG,IAAI,CAAEC,IAAI,IAAKA,IAAI,CAACC,IAAI,KAAKR,QAAQ,CAAC,EAAE;IAChD,MAAM,KAAIS,oBAAQ,EAAE,SAAQT,QAAS,2EAA0E,CAAC;EAClH;EACAU,uBAAuB,CAACV,QAAQ,CAAC;EACjC,MAAMW,mCAAmC,GAAG,YAAsC;IAChF,IAAIT,UAAU,EAAE,OAAOA,UAAU,CAACU,UAAU;IAC5C;IACA;IACA,MAAMC,iBAAiB,GAAG,MAAMd,QAAQ,CAACe,oBAAoB,EAAE;IAC/D,OAAOD,iBAAiB,GAAGA,iBAAiB,CAACD,UAAU,GAAG,EAAE;EAC9D,CAAC;EAED,MAAMG,UAAU,GAAG,MAAMC,aAAa,CAACjB,QAAQ,CAAC;EAChD,MAAMkB,OAAO,GAAGf,UAAU,GACtBgB,eAAI,CAACC,IAAI,CAAC;IACRX,IAAI,EAAER,QAAQ;IACdoB,IAAI,EAAElB,UAAU,CAACkB,IAAI,EAAE,CAACC,QAAQ,EAAE;IAClCC,GAAG,EAAEpB,UAAU,CAACoB,GAAG;IACnBlB,KA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CAACV,QAAgB,EAAE;EACxD,IAAI,CAACmC,eAAe,CAACnC,QAAQ,CAAC,EAAE;IAC9B,MAAM,KAAIS,oBAAQ,EACf,SAAQT,QAAS,iIAAgI,CACnJ;EACH;AACF;AAEA,SAASmC,eAAe,CAACC,GAAY,EAAW;EAC9C,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE,OAAO,KAAK;EACzC;EACA,OAAO,kBAAkB,CAACC,IAAI,CAACD,GAAG,CAAC;AACrC"}
|
package/dist/lanes.graphql.js
CHANGED
@@ -89,6 +89,17 @@ function lanesSchema(lanesMainRuntime) {
|
|
89
89
|
current: Lane
|
90
90
|
}
|
91
91
|
|
92
|
+
type Mutation {
|
93
|
+
"""
|
94
|
+
create lane
|
95
|
+
"""
|
96
|
+
createLane(name: String!): LaneId!
|
97
|
+
"""
|
98
|
+
delete lanes
|
99
|
+
"""
|
100
|
+
deleteLanes(names: [String!]!): [String!]!
|
101
|
+
}
|
102
|
+
|
92
103
|
type Query {
|
93
104
|
lanes: Lanes
|
94
105
|
}
|
@@ -140,7 +151,10 @@ function lanesSchema(lanesMainRuntime) {
|
|
140
151
|
},
|
141
152
|
Lane: {
|
142
153
|
id: lane => lane.id.toObject(),
|
143
|
-
laneComponentIds: async lane =>
|
154
|
+
laneComponentIds: async lane => {
|
155
|
+
const componentIds = await lanesMainRuntime.getLaneComponentIds(lane);
|
156
|
+
return componentIds.map(componentId => componentId.toObject());
|
157
|
+
},
|
144
158
|
components: async lane => {
|
145
159
|
const laneComponents = await lanesMainRuntime.getLaneComponentModels(lane);
|
146
160
|
return laneComponents;
|
@@ -152,6 +166,19 @@ function lanesSchema(lanesMainRuntime) {
|
|
152
166
|
},
|
153
167
|
Query: {
|
154
168
|
lanes: () => lanesMainRuntime
|
169
|
+
},
|
170
|
+
Mutation: {
|
171
|
+
createLane: async (_, {
|
172
|
+
name
|
173
|
+
}) => {
|
174
|
+
const result = await lanesMainRuntime.createLane(name);
|
175
|
+
return _laneId().LaneId.from(result.localLane, result.remoteScope);
|
176
|
+
},
|
177
|
+
deleteLanes: async (_, {
|
178
|
+
names
|
179
|
+
}) => {
|
180
|
+
return lanesMainRuntime.removeLanes(names);
|
181
|
+
}
|
155
182
|
}
|
156
183
|
}
|
157
184
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["lanesSchema","lanesMainRuntime","typeDefs","gql","resolvers","Lanes","id","list","lanesMain","ids","limit","offset","lanes","length","getLanes","showDefaultLane","flatten","Promise","all","map","name","LaneId","parse","slice","current","currentLaneName","getCurrentLaneName","undefined","currentLane","diff","from","to","options","getDiffResults","getDiff","compsWithDiff","item","toString","Lane","lane","toObject","laneComponentIds","getLaneComponentIds","components","laneComponents","getLaneComponentModels","readmeComponent","laneReadmeComponent","getLaneReadmeComponent","Query"],"sources":["lanes.graphql.ts"],"sourcesContent":["import { Schema } from '@teambit/graphql';\nimport { LaneId } from '@teambit/lane-id';\nimport { LaneData } from '@teambit/legacy/dist/scope/lanes/lanes';\nimport gql from 'graphql-tag';\nimport { flatten, slice } from 'lodash';\n\nimport { LanesMain } from './lanes.main.runtime';\n\nexport function lanesSchema(lanesMainRuntime: LanesMain): Schema {\n return {\n typeDefs: gql`\n type FileDiff {\n filePath: String!\n diffOutput: String\n }\n\n type FieldsDiff {\n fieldName: String!\n diffOutput: String\n }\n\n type DiffResults {\n id: String\n hasDiff: Boolean\n filesDiff: [FileDiff]\n fieldsDiff: [FieldsDiff]\n }\n\n type GetDiffResult {\n newComps: [String]\n compsWithNoChanges: [String]\n toLaneName: String\n compsWithDiff: [DiffResults]\n }\n\n input DiffOptions {\n color: Boolean\n }\n\n type LaneId {\n name: String!\n scope: String!\n }\n\n type Lane {\n id: LaneId!\n hash: String\n laneComponentIds: [ComponentID!]!\n components(offset: Int, limit: Int): [Component!]!\n readmeComponent: Component\n }\n\n # Lane API\n type Lanes {\n id: String!\n list(ids: [String!], offset: Int, limit: Int): [Lane!]!\n diff(from: String!, to: String!, options: DiffOptions): GetDiffResult\n current: Lane\n }\n\n type Query {\n lanes: Lanes\n }\n `,\n resolvers: {\n Lanes: {\n // need this for Apollo InMemory Caching\n id: () => 'lanes',\n list: async (\n lanesMain: LanesMain,\n { ids, limit, offset }: { ids?: string[]; offset?: number; limit?: number }\n ) => {\n let lanes: LaneData[] = [];\n\n if (!ids || ids.length === 0) {\n lanes = await lanesMain.getLanes({ showDefaultLane: true });\n } else {\n lanes = flatten(await Promise.all(ids.map((id) => lanesMain.getLanes({ name: LaneId.parse(id).name }))));\n }\n\n if (limit || offset) {\n lanes = slice(lanes, offset, limit && limit + (offset || 0));\n }\n\n return lanes;\n },\n current: async (lanesMain: LanesMain) => {\n const currentLaneName = lanesMain.getCurrentLaneName();\n if (!currentLaneName) return undefined;\n const [currentLane] = await lanesMain.getLanes({ name: currentLaneName });\n return currentLane;\n },\n diff: async (\n lanesMain: LanesMain,\n { from, to, options }: { to: string; from: string; options: { color?: boolean } }\n ) => {\n const getDiffResults = await lanesMain.getDiff([from, to], options);\n return {\n ...getDiffResults,\n compsWithDiff: getDiffResults.compsWithDiff.map((item) => ({ ...item, id: item.id.toString() })),\n };\n },\n },\n Lane: {\n id: (lane: LaneData) => lane.id.toObject(),\n laneComponentIds: async (lane: LaneData) => lanesMainRuntime.getLaneComponentIds(lane),\n components: async (lane: LaneData) => {\n const laneComponents = await lanesMainRuntime.getLaneComponentModels(lane);\n return laneComponents;\n },\n readmeComponent: async (lane: LaneData) => {\n const laneReadmeComponent = await lanesMainRuntime.getLaneReadmeComponent(lane);\n return laneReadmeComponent;\n },\n },\n Query: {\n lanes: () => lanesMainRuntime,\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAwC;AAAA;AAIjC,SAASA,WAAW,CAACC,gBAA2B,EAAU;EAC/D,OAAO;IAC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AE,OAAOE,SAAS;UACtC,MAAM,CAACC,WAAW,CAAC,GAAG,MAAMpB,SAAS,CAACM,QAAQ,CAAC;YAAEM,IAAI,EAAEK;UAAgB,CAAC,CAAC;UACzE,OAAOG,WAAW;QACpB,CAAC;QACDC,IAAI,EAAE,OACJrB,SAAoB,EACpB;UAAEsB,IAAI;UAAEC,EAAE;UAAEC;QAAoE,CAAC,KAC9E;UACH,MAAMC,cAAc,GAAG,MAAMzB,SAAS,CAAC0B,OAAO,CAAC,CAACJ,IAAI,EAAEC,EAAE,CAAC,EAAEC,OAAO,CAAC;UACnE,uCACKC,cAAc;YACjBE,aAAa,EAAEF,cAAc,CAACE,aAAa,CAAChB,GAAG,CAAEiB,IAAI,oCAAWA,IAAI;cAAE9B,EAAE,EAAE8B,IAAI,CAAC9B,EAAE,CAAC+B,QAAQ;YAAE,EAAG;UAAC;QAEpG;MACF,CAAC;MACDC,IAAI,EAAE;QACJhC,EAAE,EAAGiC,IAAc,IAAKA,IAAI,CAACjC,EAAE,CAACkC,QAAQ,EAAE;QAC1CC,gBAAgB,EAAE,MAAOF,IAAc,
|
1
|
+
{"version":3,"names":["lanesSchema","lanesMainRuntime","typeDefs","gql","resolvers","Lanes","id","list","lanesMain","ids","limit","offset","lanes","length","getLanes","showDefaultLane","flatten","Promise","all","map","name","LaneId","parse","slice","current","currentLaneName","getCurrentLaneName","undefined","currentLane","diff","from","to","options","getDiffResults","getDiff","compsWithDiff","item","toString","Lane","lane","toObject","laneComponentIds","componentIds","getLaneComponentIds","componentId","components","laneComponents","getLaneComponentModels","readmeComponent","laneReadmeComponent","getLaneReadmeComponent","Query","Mutation","createLane","_","result","localLane","remoteScope","deleteLanes","names","removeLanes"],"sources":["lanes.graphql.ts"],"sourcesContent":["import { Schema } from '@teambit/graphql';\nimport { LaneId } from '@teambit/lane-id';\nimport { LaneData } from '@teambit/legacy/dist/scope/lanes/lanes';\nimport gql from 'graphql-tag';\nimport { flatten, slice } from 'lodash';\n\nimport { LanesMain } from './lanes.main.runtime';\n\nexport function lanesSchema(lanesMainRuntime: LanesMain): Schema {\n return {\n typeDefs: gql`\n type FileDiff {\n filePath: String!\n diffOutput: String\n }\n\n type FieldsDiff {\n fieldName: String!\n diffOutput: String\n }\n\n type DiffResults {\n id: String\n hasDiff: Boolean\n filesDiff: [FileDiff]\n fieldsDiff: [FieldsDiff]\n }\n\n type GetDiffResult {\n newComps: [String]\n compsWithNoChanges: [String]\n toLaneName: String\n compsWithDiff: [DiffResults]\n }\n\n input DiffOptions {\n color: Boolean\n }\n\n type LaneId {\n name: String!\n scope: String!\n }\n\n type Lane {\n id: LaneId!\n hash: String\n laneComponentIds: [ComponentID!]!\n components(offset: Int, limit: Int): [Component!]!\n readmeComponent: Component\n }\n\n # Lane API\n type Lanes {\n id: String!\n list(ids: [String!], offset: Int, limit: Int): [Lane!]!\n diff(from: String!, to: String!, options: DiffOptions): GetDiffResult\n current: Lane\n }\n\n type Mutation {\n \"\"\"\n create lane\n \"\"\"\n createLane(name: String!): LaneId!\n \"\"\"\n delete lanes\n \"\"\"\n deleteLanes(names: [String!]!): [String!]!\n }\n\n type Query {\n lanes: Lanes\n }\n `,\n resolvers: {\n Lanes: {\n // need this for Apollo InMemory Caching\n id: () => 'lanes',\n list: async (\n lanesMain: LanesMain,\n { ids, limit, offset }: { ids?: string[]; offset?: number; limit?: number }\n ) => {\n let lanes: LaneData[] = [];\n\n if (!ids || ids.length === 0) {\n lanes = await lanesMain.getLanes({ showDefaultLane: true });\n } else {\n lanes = flatten(await Promise.all(ids.map((id) => lanesMain.getLanes({ name: LaneId.parse(id).name }))));\n }\n\n if (limit || offset) {\n lanes = slice(lanes, offset, limit && limit + (offset || 0));\n }\n\n return lanes;\n },\n current: async (lanesMain: LanesMain) => {\n const currentLaneName = lanesMain.getCurrentLaneName();\n if (!currentLaneName) return undefined;\n const [currentLane] = await lanesMain.getLanes({ name: currentLaneName });\n return currentLane;\n },\n diff: async (\n lanesMain: LanesMain,\n { from, to, options }: { to: string; from: string; options: { color?: boolean } }\n ) => {\n const getDiffResults = await lanesMain.getDiff([from, to], options);\n return {\n ...getDiffResults,\n compsWithDiff: getDiffResults.compsWithDiff.map((item) => ({ ...item, id: item.id.toString() })),\n };\n },\n },\n Lane: {\n id: (lane: LaneData) => lane.id.toObject(),\n laneComponentIds: async (lane: LaneData) => {\n const componentIds = await lanesMainRuntime.getLaneComponentIds(lane);\n return componentIds.map((componentId) => componentId.toObject());\n },\n components: async (lane: LaneData) => {\n const laneComponents = await lanesMainRuntime.getLaneComponentModels(lane);\n return laneComponents;\n },\n readmeComponent: async (lane: LaneData) => {\n const laneReadmeComponent = await lanesMainRuntime.getLaneReadmeComponent(lane);\n return laneReadmeComponent;\n },\n },\n Query: {\n lanes: () => lanesMainRuntime,\n },\n Mutation: {\n createLane: async (_, { name }: { name: string }) => {\n const result = await lanesMainRuntime.createLane(name);\n return LaneId.from(result.localLane, result.remoteScope);\n },\n deleteLanes: async (_, { names }: { names: string[] }) => {\n return lanesMainRuntime.removeLanes(names);\n },\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAwC;AAAA;AAIjC,SAASA,WAAW,CAACC,gBAA2B,EAAU;EAC/D,OAAO;IACLC,QAAQ,EAAE,IAAAC,qBAAG,CAAC;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;IAC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QAA2B,CAAC,KAAK;UACxD,OAAO1D,gBAAgB,CAAC2D,WAAW,CAACD,KAAK,CAAC;QAC5C;MACF;IACF;EACF,CAAC;AACH"}
|
@@ -51,9 +51,14 @@ export declare class LanesMain {
|
|
51
51
|
getCurrentLaneName(): string | null;
|
52
52
|
getCurrentLaneNameOrAlias(): string | null;
|
53
53
|
getCurrentLaneId(): LaneId | null;
|
54
|
+
/**
|
55
|
+
* get the currently checked out lane object, if on main - return null.
|
56
|
+
*/
|
57
|
+
getCurrentLane(): Promise<Lane | null>;
|
54
58
|
getDefaultLaneId(): LaneId;
|
55
59
|
setCurrentLane(laneId: LaneId, alias?: string, exported?: boolean): void;
|
56
60
|
createLane(name: string, { remoteScope, alias }?: CreateLaneOptions): Promise<TrackLane>;
|
61
|
+
loadLane(id: LaneId): Promise<Lane | null>;
|
57
62
|
trackLane(localName: string, remoteScope: string, remoteName?: string): Promise<{
|
58
63
|
beforeTrackData?: TrackLane;
|
59
64
|
afterTrackData: TrackLane;
|
@@ -86,7 +91,7 @@ export declare class LanesMain {
|
|
86
91
|
* this method doesn't change anything in the workspace.
|
87
92
|
*/
|
88
93
|
fetchLaneWithItsComponents(laneId: LaneId): Promise<Lane>;
|
89
|
-
removeLanes(laneNames: string[],
|
94
|
+
removeLanes(laneNames: string[], opts?: {
|
90
95
|
remote: boolean;
|
91
96
|
force: boolean;
|
92
97
|
}): Promise<string[]>;
|
@@ -97,6 +102,10 @@ export declare class LanesMain {
|
|
97
102
|
* flag is true.
|
98
103
|
*/
|
99
104
|
switchLanes(laneName: string, { alias, merge, getAll, skipDependencyInstallation }: SwitchLaneOptions): Promise<import("@teambit/legacy/dist/consumer/versions-ops/merge-version").ApplyVersionResults>;
|
105
|
+
/**
|
106
|
+
* check whether the given lane is up-to-date against "checkAgainst", if this param is null, it checks it against main.
|
107
|
+
*/
|
108
|
+
isLaneUpToDate(laneToCheck: Lane, checkAgainst?: Lane): Promise<boolean>;
|
100
109
|
/**
|
101
110
|
* the values array may include zero to two values and will be processed as following:
|
102
111
|
* [] => diff between the current lane and default lane. (only inside workspace).
|
@@ -133,6 +133,13 @@ function _laneNotFound() {
|
|
133
133
|
};
|
134
134
|
return data;
|
135
135
|
}
|
136
|
+
function _getDivergeData() {
|
137
|
+
const data = require("@teambit/legacy/dist/scope/component-ops/get-diverge-data");
|
138
|
+
_getDivergeData = function () {
|
139
|
+
return data;
|
140
|
+
};
|
141
|
+
return data;
|
142
|
+
}
|
136
143
|
function _scopeComponentsImporter() {
|
137
144
|
const data = _interopRequireDefault(require("@teambit/legacy/dist/scope/component-ops/scope-components-importer"));
|
138
145
|
_scopeComponentsImporter = function () {
|
@@ -255,6 +262,15 @@ class LanesMain {
|
|
255
262
|
if (!this.workspace) return null;
|
256
263
|
return this.workspace.consumer.getCurrentLaneId();
|
257
264
|
}
|
265
|
+
|
266
|
+
/**
|
267
|
+
* get the currently checked out lane object, if on main - return null.
|
268
|
+
*/
|
269
|
+
async getCurrentLane() {
|
270
|
+
const laneId = this.getCurrentLaneId();
|
271
|
+
if (!laneId || laneId.isDefault()) return null;
|
272
|
+
return this.loadLane(laneId);
|
273
|
+
}
|
258
274
|
getDefaultLaneId() {
|
259
275
|
return _laneId().LaneId.from(_laneId().DEFAULT_LANE, this.scope.name);
|
260
276
|
}
|
@@ -267,7 +283,12 @@ class LanesMain {
|
|
267
283
|
alias
|
268
284
|
} = {}) {
|
269
285
|
if (!this.workspace) {
|
270
|
-
|
286
|
+
const newLane = await (0, _createLane().createLaneInScope)(name, this.scope);
|
287
|
+
return {
|
288
|
+
localLane: newLane.name,
|
289
|
+
remoteLane: newLane.name,
|
290
|
+
remoteScope: this.scope.name
|
291
|
+
};
|
271
292
|
}
|
272
293
|
if (alias) {
|
273
294
|
(0, _createLane().throwForInvalidLaneName)(alias);
|
@@ -286,12 +307,15 @@ class LanesMain {
|
|
286
307
|
await this.workspace.consumer.onDestroy();
|
287
308
|
return trackLaneData;
|
288
309
|
}
|
310
|
+
async loadLane(id) {
|
311
|
+
return this.scope.legacyScope.lanes.loadLane(id);
|
312
|
+
}
|
289
313
|
async trackLane(localName, remoteScope, remoteName) {
|
290
314
|
if (!this.workspace) {
|
291
315
|
throw new (_bitError().BitError)(`unable to track a lane outside of Bit workspace`);
|
292
316
|
}
|
293
317
|
const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(localName);
|
294
|
-
const lane = await this.
|
318
|
+
const lane = await this.loadLane(laneId);
|
295
319
|
if (!lane) {
|
296
320
|
throw new (_bitError().BitError)(`unable to find a local lane "${localName}"`);
|
297
321
|
}
|
@@ -320,7 +344,7 @@ class LanesMain {
|
|
320
344
|
throw new (_bitError().BitError)(`an alias cannot be the same as the lane name`);
|
321
345
|
}
|
322
346
|
const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(laneName);
|
323
|
-
const lane = await this.
|
347
|
+
const lane = await this.loadLane(laneId);
|
324
348
|
if (!lane) {
|
325
349
|
throw new (_bitError().BitError)(`unable to find a local lane "${laneName}"`);
|
326
350
|
}
|
@@ -343,7 +367,7 @@ class LanesMain {
|
|
343
367
|
}
|
344
368
|
const laneNameWithoutScope = laneName.includes(_laneId().LANE_REMOTE_DELIMITER) ? laneName.split(_laneId().LANE_REMOTE_DELIMITER)[1] : laneName;
|
345
369
|
const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(laneName);
|
346
|
-
const lane = await this.
|
370
|
+
const lane = await this.loadLane(laneId);
|
347
371
|
if (!lane) {
|
348
372
|
throw new (_bitError().BitError)(`unable to find a local lane "${laneName}"`);
|
349
373
|
}
|
@@ -379,7 +403,7 @@ class LanesMain {
|
|
379
403
|
}
|
380
404
|
const laneNameWithoutScope = currentName.includes(_laneId().LANE_REMOTE_DELIMITER) ? currentName.split(_laneId().LANE_REMOTE_DELIMITER)[1] : currentName;
|
381
405
|
const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(currentName);
|
382
|
-
const lane = await this.
|
406
|
+
const lane = await this.loadLane(laneId);
|
383
407
|
if (!lane) {
|
384
408
|
throw new (_bitError().BitError)(`unable to find a local lane "${currentName}"`);
|
385
409
|
}
|
@@ -488,12 +512,13 @@ class LanesMain {
|
|
488
512
|
this.logger.debug(`fetching lane ${laneId.toString()} done, fetched ${importedIds.length} components`);
|
489
513
|
return lane;
|
490
514
|
}
|
491
|
-
async removeLanes(laneNames, {
|
492
|
-
remote,
|
493
|
-
force
|
494
|
-
}) {
|
515
|
+
async removeLanes(laneNames, opts) {
|
495
516
|
var _this$workspace3;
|
496
|
-
|
517
|
+
if (!this.workspace && !(opts !== null && opts !== void 0 && opts.remote)) {
|
518
|
+
await this.scope.legacyScope.lanes.removeLanes(this.scope.legacyScope, laneNames, true);
|
519
|
+
return laneNames;
|
520
|
+
}
|
521
|
+
const results = await (0, _removeLanes().default)((_this$workspace3 = this.workspace) === null || _this$workspace3 === void 0 ? void 0 : _this$workspace3.consumer, laneNames, !!(opts !== null && opts !== void 0 && opts.remote), !!(opts !== null && opts !== void 0 && opts.force));
|
497
522
|
if (this.workspace) await this.workspace.consumer.onDestroy();
|
498
523
|
return results.laneResults;
|
499
524
|
}
|
@@ -547,6 +572,50 @@ class LanesMain {
|
|
547
572
|
return new (_switchLanes().LaneSwitcher)(this.workspace, this.logger, switchProps, checkoutProps, this).switch();
|
548
573
|
}
|
549
574
|
|
575
|
+
/**
|
576
|
+
* check whether the given lane is up-to-date against "checkAgainst", if this param is null, it checks it against main.
|
577
|
+
*/
|
578
|
+
async isLaneUpToDate(laneToCheck, checkAgainst) {
|
579
|
+
const upToDateIds = [];
|
580
|
+
const notUpToDateIds = [];
|
581
|
+
const getHashOnAnotherLane = async id => {
|
582
|
+
if (checkAgainst) {
|
583
|
+
const idOnLane = checkAgainst.getComponent(id);
|
584
|
+
return idOnLane === null || idOnLane === void 0 ? void 0 : idOnLane.head;
|
585
|
+
}
|
586
|
+
const modelComp = await this.scope.legacyScope.getModelComponent(id);
|
587
|
+
return modelComp.head;
|
588
|
+
};
|
589
|
+
await Promise.all(laneToCheck.components.map(async comp => {
|
590
|
+
const refOnOtherLane = await getHashOnAnotherLane(comp.id);
|
591
|
+
if (!refOnOtherLane) {
|
592
|
+
upToDateIds.push(comp.id);
|
593
|
+
return;
|
594
|
+
}
|
595
|
+
if (comp.head.isEqual(refOnOtherLane)) {
|
596
|
+
upToDateIds.push(comp.id);
|
597
|
+
return;
|
598
|
+
}
|
599
|
+
const modelComponent = await this.scope.legacyScope.getModelComponent(comp.id);
|
600
|
+
const divergeData = await (0, _getDivergeData().getDivergeData)({
|
601
|
+
repo: this.scope.legacyScope.objects,
|
602
|
+
modelComponent,
|
603
|
+
remoteHead: refOnOtherLane,
|
604
|
+
checkedOutLocalHead: comp.head
|
605
|
+
});
|
606
|
+
if (divergeData.isRemoteAhead() || divergeData.isDiverged()) {
|
607
|
+
notUpToDateIds.push(comp.id);
|
608
|
+
return;
|
609
|
+
}
|
610
|
+
if (!divergeData.isLocalAhead()) {
|
611
|
+
throw new Error(`invalid state - component ${comp.id.toString()} is not diverged, not local-ahead and not-remote-ahead.`);
|
612
|
+
}
|
613
|
+
upToDateIds.push(comp.id);
|
614
|
+
}));
|
615
|
+
const isUpToDate = !notUpToDateIds.length;
|
616
|
+
return isUpToDate;
|
617
|
+
}
|
618
|
+
|
550
619
|
/**
|
551
620
|
* the values array may include zero to two values and will be processed as following:
|
552
621
|
* [] => diff between the current lane and default lane. (only inside workspace).
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["LanesMain","constructor","workspace","scope","merging","componentAspect","logger","importer","exporter","getLanes","name","remote","merged","showDefaultLane","notMerged","showMergeData","Boolean","consumer","remoteObj","getRemoteByName","lanes","listLanes","DEFAULT_LANE","defaultLane","getLaneDataOfDefaultLane","legacyScope","getLanesData","push","getCurrentLaneName","getCurrentLaneId","getCurrentLaneNameOrAlias","currentLaneId","trackingData","getLocalTrackedLaneByRemoteName","getDefaultLaneId","LaneId","from","setCurrentLane","laneId","alias","exported","createLane","remoteScope","BitError","throwForInvalidLaneName","defaultScope","trackLaneData","localLane","remoteLane","trackLane","scopeJson","setLaneAsNew","onDestroy","localName","remoteName","parseLaneIdFromString","lane","loadLane","beforeTrackData","getRemoteTrackedDataByLocalLane","beforeTrackDataCloned","undefined","afterTrackData","aliasLane","laneName","includes","LANE_REMOTE_DELIMITER","trackData","laneNameWithoutScope","split","removeTrackLane","changeScope","remoteScopeBefore","newLaneId","saveLane","bitMap","rename","currentName","newName","existingAliasWithNewName","remoteIdStr","objects","remoteLanes","renameRefByNewLaneName","currentLaneName","isExported","isLaneExported","clonedLaneToExport","clone","components","exportErr","exportLane","err","error","id","toString","message","exportMany","laneObject","ids","BitIds","idsWithFutureScope","allVersions","importLaneObject","persistIfNotExists","scopeComponentImporter","ScopeComponentsImporter","getInstance","results","importLanes","LaneNotFound","exists","fetchLaneWithItsComponents","debug","Error","importOptions","objectsOnly","verbose","writeConfig","override","installNpmPackages","laneIds","importedIds","importWithOptions","length","removeLanes","laneNames","force","laneResults","switchLanes","merge","getAll","skipDependencyInstallation","mergeStrategy","mergeOptions","Object","keys","MergeOptions","join","switchProps","existingOnWorkspaceOnly","checkoutProps","skipNpmInstall","ignorePackageJson","ignoreDist","isLane","promptMergeOptions","reset","all","LaneSwitcher","switch","getDiff","values","diffOptions","pattern","laneDiffGenerator","LaneDiffGenerator","generate","getLaneComponentModels","host","getHost","laneComponentIds","getLaneComponentIds","getMany","laneComponents","bitIdsFromBitmap","getAllBitIdsFromAllLanes","filteredComponentIds","filter","laneComponent","some","bitmapComponentId","isEqualWithoutVersion","Promise","map","legacyIdWithVersion","changeVersion","head","resolveComponentId","getLaneReadmeComponent","laneReadmeComponent","readmeComponent","laneReadmeComponentId","get","removeLaneReadme","result","readmeComponentId","existingLaneConfig","getSpecificComponentConfig","LanesAspect","remoteLaneIdStr","toLaneId","readme","removeSpecificComponentConfig","addSpecificComponentConfig","setReadmeComponent","write","addLaneReadme","readmeComponentIdStr","readmeComponentBitId","_legacy","bitIds","scopeComponents","list","component","getIdsOfDefaultLane","bitId","version","isMerged","hash","provider","cli","graphql","community","loggerMain","createLogger","lanesMain","switchCmd","SwitchCmd","laneCmd","LaneCmd","getDocsDomain","commands","LaneListCmd","LaneShowCmd","LaneCreateCmd","LaneRemoveCmd","LaneChangeScopeCmd","LaneAliasCmd","LaneRenameCmd","LaneDiffCmd","LaneAddReadmeCmd","LaneRemoveReadmeCmd","LaneImportCmd","register","lanesSchema","CLIAspect","ScopeAspect","WorkspaceAspect","GraphqlAspect","CommunityAspect","MergingAspect","ComponentAspect","LoggerAspect","ImporterAspect","ExportAspect","MainRuntime","addRuntime"],"sources":["lanes.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { Workspace, WorkspaceAspect } from '@teambit/workspace';\nimport getRemoteByName from '@teambit/legacy/dist/remotes/get-remote-by-name';\nimport { LaneDiffCmd, LaneDiffGenerator, LaneDiffResults } from '@teambit/lanes.modules.diff';\nimport { LaneData } from '@teambit/legacy/dist/scope/lanes/lanes';\nimport { LaneId, DEFAULT_LANE, LANE_REMOTE_DELIMITER } from '@teambit/lane-id';\nimport { BitError } from '@teambit/bit-error';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { DiffOptions } from '@teambit/legacy/dist/consumer/component-ops/components-diff';\nimport { MergeStrategy, MergeOptions } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { TrackLane } from '@teambit/legacy/dist/scope/scope-json';\nimport { ImporterAspect, ImporterMain, ImportOptions } from '@teambit/importer';\nimport { CommunityAspect } from '@teambit/community';\nimport type { CommunityMain } from '@teambit/community';\nimport ComponentAspect, { Component, ComponentID, ComponentMain } from '@teambit/component';\nimport removeLanes from '@teambit/legacy/dist/consumer/lanes/remove-lanes';\nimport { Lane } from '@teambit/legacy/dist/scope/models';\nimport { LaneNotFound } from '@teambit/legacy/dist/api/scope/lib/exceptions/lane-not-found';\nimport ScopeComponentsImporter from '@teambit/legacy/dist/scope/component-ops/scope-components-importer';\nimport { Scope as LegacyScope } from '@teambit/legacy/dist/scope';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { ExportAspect, ExportMain } from '@teambit/export';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { MergingMain, MergingAspect } from '@teambit/merging';\nimport { LanesAspect } from './lanes.aspect';\nimport {\n LaneCmd,\n LaneCreateCmd,\n LaneImportCmd,\n LaneListCmd,\n LaneRemoveCmd,\n LaneShowCmd,\n LaneChangeScopeCmd,\n LaneAliasCmd,\n LaneRenameCmd,\n LaneAddReadmeCmd,\n LaneRemoveReadmeCmd,\n} from './lane.cmd';\nimport { lanesSchema } from './lanes.graphql';\nimport { SwitchCmd } from './switch.cmd';\nimport { LaneSwitcher } from './switch-lanes';\nimport { createLane, throwForInvalidLaneName } from './create-lane';\n\nexport { Lane };\n\nexport type LaneResults = {\n lanes: LaneData[];\n currentLane?: string | null;\n};\n\nexport type CreateLaneOptions = {\n remoteScope?: string; // default to the defaultScope in workspace.jsonc\n alias?: string; // default to the remote name\n};\n\nexport type SwitchLaneOptions = {\n alias?: string;\n merge?: MergeStrategy;\n getAll?: boolean;\n skipDependencyInstallation?: boolean;\n verbose?: boolean;\n override?: boolean;\n};\n\nexport class LanesMain {\n constructor(\n private workspace: Workspace | undefined,\n private scope: ScopeMain,\n private merging: MergingMain,\n private componentAspect: ComponentMain,\n public logger: Logger,\n private importer: ImporterMain,\n private exporter: ExportMain\n ) {}\n\n async getLanes({\n name,\n remote,\n merged,\n showDefaultLane,\n notMerged,\n }: {\n name?: string;\n remote?: string;\n merged?: boolean;\n showDefaultLane?: boolean;\n notMerged?: boolean;\n }): Promise<LaneData[]> {\n const showMergeData = Boolean(merged || notMerged);\n const consumer = this.workspace?.consumer;\n if (remote) {\n const remoteObj = await getRemoteByName(remote, consumer);\n const lanes = await remoteObj.listLanes(name, showMergeData);\n return lanes;\n }\n\n if (name === DEFAULT_LANE) {\n const defaultLane = await this.getLaneDataOfDefaultLane();\n return defaultLane ? [defaultLane] : [];\n }\n\n const lanes = await this.scope.legacyScope.lanes.getLanesData(this.scope.legacyScope, name, showMergeData);\n\n if (showDefaultLane) {\n const defaultLane = await this.getLaneDataOfDefaultLane();\n if (defaultLane) lanes.push(defaultLane);\n }\n\n return lanes;\n }\n\n getCurrentLaneName(): string | null {\n return this.getCurrentLaneId()?.name || null;\n }\n\n getCurrentLaneNameOrAlias(): string | null {\n const currentLaneId = this.getCurrentLaneId();\n if (!currentLaneId) return null;\n const trackingData = this.scope.legacyScope.lanes.getLocalTrackedLaneByRemoteName(\n currentLaneId.name,\n currentLaneId.scope\n );\n return trackingData || currentLaneId.name;\n }\n\n getCurrentLaneId(): LaneId | null {\n if (!this.workspace) return null;\n return this.workspace.consumer.getCurrentLaneId();\n }\n\n getDefaultLaneId(): LaneId {\n return LaneId.from(DEFAULT_LANE, this.scope.name);\n }\n\n setCurrentLane(laneId: LaneId, alias?: string, exported?: boolean) {\n this.workspace?.consumer.setCurrentLane(laneId, exported);\n }\n\n async createLane(name: string, { remoteScope, alias }: CreateLaneOptions = {}): Promise<TrackLane> {\n if (!this.workspace) {\n throw new BitError(`unable to create a lane outside of Bit workspace`);\n }\n if (alias) {\n throwForInvalidLaneName(alias);\n }\n const scope = remoteScope || this.workspace.defaultScope;\n await createLane(this.workspace.consumer, name, scope);\n const laneId = LaneId.from(name, scope);\n this.setCurrentLane(laneId, alias, false);\n const trackLaneData = {\n localLane: alias || name,\n remoteLane: name,\n remoteScope: scope,\n };\n this.scope.legacyScope.lanes.trackLane(trackLaneData);\n this.scope.legacyScope.scopeJson.setLaneAsNew(name);\n await this.workspace.consumer.onDestroy();\n\n return trackLaneData;\n }\n\n async trackLane(\n localName: string,\n remoteScope: string,\n remoteName?: string\n ): Promise<{ beforeTrackData?: TrackLane; afterTrackData: TrackLane }> {\n if (!this.workspace) {\n throw new BitError(`unable to track a lane outside of Bit workspace`);\n }\n const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(localName);\n const lane = await this.scope.legacyScope.lanes.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${localName}\"`);\n }\n const beforeTrackData = this.scope.legacyScope.lanes.getRemoteTrackedDataByLocalLane(localName);\n const beforeTrackDataCloned = beforeTrackData ? { ...beforeTrackData } : undefined;\n const afterTrackData = {\n localLane: localName,\n remoteLane: remoteName || beforeTrackData?.remoteLane || localName,\n remoteScope,\n };\n this.scope.legacyScope.lanes.trackLane(afterTrackData);\n await this.workspace.consumer.onDestroy();\n\n return { beforeTrackData: beforeTrackDataCloned, afterTrackData };\n }\n\n async aliasLane(laneName: string, alias: string): Promise<{ laneId: LaneId }> {\n if (!this.workspace) {\n throw new BitError(`unable to alias a lane outside of Bit workspace`);\n }\n if (alias.includes(LANE_REMOTE_DELIMITER)) {\n throw new BitError(`an alias cannot include a delimiter \"${LANE_REMOTE_DELIMITER}\"`);\n }\n if (alias === laneName) {\n throw new BitError(`an alias cannot be the same as the lane name`);\n }\n const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(laneName);\n const lane = await this.scope.legacyScope.lanes.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${laneName}\"`);\n }\n const trackData = {\n localLane: alias,\n remoteLane: laneId.name,\n remoteScope: laneId.scope,\n };\n const laneNameWithoutScope = laneName.includes(LANE_REMOTE_DELIMITER)\n ? laneName.split(LANE_REMOTE_DELIMITER)[1]\n : laneName;\n this.scope.legacyScope.lanes.removeTrackLane(laneNameWithoutScope);\n this.scope.legacyScope.lanes.trackLane(trackData);\n await this.workspace.consumer.onDestroy();\n\n return { laneId };\n }\n\n async changeScope(laneName: string, remoteScope: string): Promise<{ remoteScopeBefore: string }> {\n if (!this.workspace) {\n throw new BitError(`unable to change-scope of a lane outside of Bit workspace`);\n }\n const laneNameWithoutScope = laneName.includes(LANE_REMOTE_DELIMITER)\n ? laneName.split(LANE_REMOTE_DELIMITER)[1]\n : laneName;\n const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(laneName);\n const lane = await this.scope.legacyScope.lanes.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${laneName}\"`);\n }\n const remoteScopeBefore = lane.scope;\n lane.scope = remoteScope;\n const newLaneId = LaneId.from(laneId.name, remoteScope);\n const trackData = {\n localLane: laneNameWithoutScope,\n remoteLane: laneId.name,\n remoteScope,\n };\n this.scope.legacyScope.lanes.trackLane(trackData);\n await this.scope.legacyScope.lanes.saveLane(lane);\n this.workspace.consumer.bitMap.setCurrentLane(newLaneId, false);\n await this.workspace.consumer.onDestroy();\n\n return { remoteScopeBefore };\n }\n\n /**\n * change a lane-name and if possible, export the lane to the remote\n */\n async rename(currentName: string, newName: string): Promise<{ exported: boolean; exportErr?: Error }> {\n if (!this.workspace) {\n throw new BitError(`unable to rename a lane outside of Bit workspace`);\n }\n throwForInvalidLaneName(newName);\n const existingAliasWithNewName = this.scope.legacyScope.lanes.getRemoteTrackedDataByLocalLane(newName);\n if (existingAliasWithNewName) {\n const remoteIdStr = `${existingAliasWithNewName.remoteLane}/${existingAliasWithNewName.remoteScope}`;\n throw new BitError(`unable to rename to ${newName}. this name is already used to track: ${remoteIdStr}`);\n }\n const laneNameWithoutScope = currentName.includes(LANE_REMOTE_DELIMITER)\n ? currentName.split(LANE_REMOTE_DELIMITER)[1]\n : currentName;\n const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(currentName);\n const lane = await this.scope.legacyScope.lanes.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${currentName}\"`);\n }\n\n // rename the ref file\n await this.scope.legacyScope.objects.remoteLanes.renameRefByNewLaneName(laneNameWithoutScope, newName, lane.scope);\n\n // change tracking data\n const afterTrackData = {\n localLane: newName,\n remoteLane: newName,\n remoteScope: lane.scope,\n };\n this.scope.legacyScope.lanes.trackLane(afterTrackData);\n this.scope.legacyScope.lanes.removeTrackLane(laneNameWithoutScope);\n\n // change the lane object\n lane.name = newName;\n await this.scope.legacyScope.lanes.saveLane(lane);\n\n // change current-lane if needed\n const currentLaneName = this.getCurrentLaneName();\n if (currentLaneName === laneNameWithoutScope) {\n const newLaneId = LaneId.from(newName, lane.scope);\n const isExported = this.workspace.consumer.bitMap.isLaneExported;\n this.setCurrentLane(newLaneId, undefined, isExported);\n }\n\n // export the lane with only the name-change\n const clonedLaneToExport = lane.clone();\n clonedLaneToExport.components = []; // otherwise, it'll export the changes done on the components.\n let exported = false;\n let exportErr: Error | undefined;\n try {\n await this.exportLane(clonedLaneToExport);\n exported = true;\n } catch (err: any) {\n this.logger.error(`unable to export ${lane.id.toString()}: ${err.message}`);\n exportErr = err;\n }\n\n await this.workspace.consumer.onDestroy();\n\n return { exported, exportErr };\n }\n\n async exportLane(lane: Lane) {\n await this.exporter.exportMany({\n scope: this.scope.legacyScope,\n laneObject: lane,\n ids: new BitIds(),\n idsWithFutureScope: new BitIds(),\n allVersions: false,\n });\n }\n\n /**\n * get a Lane object from the remote.\n * `persistIfNotExists` saves the object in the local scope only if the lane is not there yet.\n * otherwise, it needs some merging mechanism, which is done differently whether it's export or import.\n * see `sources.mergeLane()` for export and `import-components._saveLaneDataIfNeeded()` for import.\n * in this case, because we only bring the lane object and not the components, it's not easy to do the merge.\n */\n async importLaneObject(laneId: LaneId, persistIfNotExists = true): Promise<Lane> {\n const legacyScope = this.scope.legacyScope;\n const scopeComponentImporter = ScopeComponentsImporter.getInstance(legacyScope);\n const results = await scopeComponentImporter.importLanes([laneId]);\n const laneObject = results[0];\n if (!laneObject) throw new LaneNotFound(laneId.scope, laneId.name);\n\n if (persistIfNotExists) {\n const exists = await legacyScope.loadLane(laneId);\n if (!exists) {\n await legacyScope.lanes.saveLane(laneObject);\n }\n }\n\n return laneObject;\n }\n\n /**\n * fetch the lane object and its components from the remote.\n * save the objects to the local scope.\n * this method doesn't change anything in the workspace.\n */\n async fetchLaneWithItsComponents(laneId: LaneId): Promise<Lane> {\n this.logger.debug(`fetching lane ${laneId.toString()}`);\n if (!this.workspace) {\n throw new BitError('unable to fetch lanes outside of Bit workspace');\n }\n const lane = await this.importLaneObject(laneId);\n if (!lane) throw new Error(`unable to import lane ${laneId.toString()} from the remote`);\n const importOptions: ImportOptions = {\n ids: [],\n objectsOnly: true,\n verbose: false,\n writeConfig: false,\n override: false,\n installNpmPackages: false,\n lanes: { laneIds: [laneId], lanes: [lane] },\n };\n const { importedIds } = await this.importer.importWithOptions(importOptions);\n this.logger.debug(`fetching lane ${laneId.toString()} done, fetched ${importedIds.length} components`);\n return lane;\n }\n\n async removeLanes(laneNames: string[], { remote, force }: { remote: boolean; force: boolean }): Promise<string[]> {\n const results = await removeLanes(this.workspace?.consumer, laneNames, remote, force);\n if (this.workspace) await this.workspace.consumer.onDestroy();\n\n return results.laneResults;\n }\n\n /**\n * switch to a different local or remote lane.\n * switching to a remote lane also imports and writes the components of that remote lane.\n * by default, only the components existing on the workspace will be imported from that lane, unless the \"getAll\"\n * flag is true.\n */\n async switchLanes(\n laneName: string,\n { alias, merge, getAll = false, skipDependencyInstallation = false }: SwitchLaneOptions\n ) {\n if (!this.workspace) {\n throw new BitError(`unable to switch lanes outside of Bit workspace`);\n }\n let mergeStrategy;\n if (merge && typeof merge === 'string') {\n const mergeOptions = Object.keys(MergeOptions);\n if (!mergeOptions.includes(merge)) {\n throw new BitError(`merge must be one of the following: ${mergeOptions.join(', ')}`);\n }\n mergeStrategy = merge;\n }\n if (alias) {\n throwForInvalidLaneName(alias);\n }\n\n const switchProps = {\n laneName,\n existingOnWorkspaceOnly: !getAll,\n alias,\n };\n const checkoutProps = {\n mergeStrategy,\n skipNpmInstall: skipDependencyInstallation,\n verbose: false, // not relevant in Harmony\n ignorePackageJson: true, // not relevant in Harmony\n ignoreDist: true, // not relevant in Harmony\n isLane: true,\n promptMergeOptions: false,\n writeConfig: false,\n reset: false,\n all: false,\n };\n return new LaneSwitcher(this.workspace, this.logger, switchProps, checkoutProps, this).switch();\n }\n\n /**\n * the values array may include zero to two values and will be processed as following:\n * [] => diff between the current lane and default lane. (only inside workspace).\n * [to] => diff between the current lane (or default-lane when in scope) and \"to\" lane.\n * [from, to] => diff between \"from\" lane and \"to\" lane.\n */\n public async getDiff(values: string[], diffOptions: DiffOptions = {}, pattern?: string): Promise<LaneDiffResults> {\n const laneDiffGenerator = new LaneDiffGenerator(this.workspace, this.scope);\n return laneDiffGenerator.generate(values, diffOptions, pattern);\n }\n\n async getLaneComponentModels(lane: LaneData): Promise<Component[]> {\n const host = this.componentAspect.getHost();\n const laneComponentIds = await this.getLaneComponentIds(lane);\n const components = await host.getMany(laneComponentIds);\n return components;\n }\n\n async getLaneComponentIds(lane: LaneData): Promise<ComponentID[]> {\n if (!lane) return [];\n\n const laneComponents = lane.components;\n const workspace = this.workspace;\n const bitIdsFromBitmap = workspace ? workspace.consumer.bitMap.getAllBitIdsFromAllLanes() : [];\n\n const filteredComponentIds = workspace\n ? laneComponents.filter((laneComponent) =>\n bitIdsFromBitmap.some((bitmapComponentId) => bitmapComponentId.isEqualWithoutVersion(laneComponent.id))\n )\n : laneComponents;\n\n const host = this.componentAspect.getHost();\n\n return Promise.all(\n filteredComponentIds.map((laneComponent) => {\n const legacyIdWithVersion = laneComponent.id.changeVersion(laneComponent.head);\n return host.resolveComponentId(legacyIdWithVersion);\n })\n );\n }\n\n async getLaneReadmeComponent(lane: LaneData): Promise<Component | undefined> {\n if (!lane) return undefined;\n const laneReadmeComponent = lane.readmeComponent;\n if (!laneReadmeComponent) return undefined;\n const host = this.componentAspect.getHost();\n const laneReadmeComponentId = await host.resolveComponentId(\n laneReadmeComponent.id.changeVersion(laneReadmeComponent.head)\n );\n const readmeComponent = await host.get(laneReadmeComponentId);\n return readmeComponent;\n }\n\n async removeLaneReadme(laneName?: string): Promise<{ result: boolean; message?: string }> {\n if (!this.workspace) {\n throw new BitError('unable to remove the lane readme component outside of Bit workspace');\n }\n const currentLaneName = this.getCurrentLaneName();\n\n if (!laneName && !currentLaneName) {\n return {\n result: false,\n message: 'unable to remove the lane readme component. Either pass a laneName or switch to a lane',\n };\n }\n\n const scope: LegacyScope = this.workspace.scope.legacyScope;\n const laneId: LaneId = laneName\n ? await scope.lanes.parseLaneIdFromString(laneName)\n : (this.getCurrentLaneId() as LaneId);\n const lane: Lane | null | undefined = await scope.loadLane(laneId);\n\n if (!lane?.readmeComponent) {\n throw new BitError(`there is no readme component added to the lane ${laneName || currentLaneName}`);\n }\n\n const readmeComponentId = await this.workspace.resolveComponentId(lane.readmeComponent.id);\n const existingLaneConfig =\n (await this.workspace.getSpecificComponentConfig(readmeComponentId, LanesAspect.id)) || {};\n\n const remoteLaneIdStr = lane.toLaneId().toString();\n\n if (existingLaneConfig.readme) {\n delete existingLaneConfig.readme[remoteLaneIdStr];\n await this.workspace.removeSpecificComponentConfig(readmeComponentId, LanesAspect.id, false);\n await this.workspace.addSpecificComponentConfig(readmeComponentId, LanesAspect.id, existingLaneConfig);\n }\n\n lane.setReadmeComponent(undefined);\n await scope.lanes.saveLane(lane);\n await this.workspace.bitMap.write();\n\n return { result: true };\n }\n\n async addLaneReadme(readmeComponentIdStr: string, laneName?: string): Promise<{ result: boolean; message?: string }> {\n if (!this.workspace) {\n throw new BitError(`unable to track a lane readme component outside of Bit workspace`);\n }\n const readmeComponentId = await this.workspace.resolveComponentId(readmeComponentIdStr);\n\n const readmeComponentBitId = readmeComponentId._legacy;\n const scope: LegacyScope = this.workspace.scope.legacyScope;\n const laneId: LaneId = laneName\n ? await scope.lanes.parseLaneIdFromString(laneName)\n : (this.getCurrentLaneId() as LaneId);\n\n const lane: Lane | null | undefined = await scope.loadLane(laneId);\n\n if (!lane) {\n return { result: false, message: `cannot find lane ${laneName}` };\n }\n\n lane.setReadmeComponent(readmeComponentBitId);\n await scope.lanes.saveLane(lane);\n\n const existingLaneConfig =\n (await this.workspace.getSpecificComponentConfig(readmeComponentId, LanesAspect.id)) || {};\n\n const remoteLaneIdStr = lane.toLaneId().toString();\n\n if (existingLaneConfig.readme) {\n await this.workspace.addSpecificComponentConfig(readmeComponentId, LanesAspect.id, {\n ...existingLaneConfig,\n readme: {\n ...existingLaneConfig.readme,\n [remoteLaneIdStr]: true,\n },\n });\n } else {\n await this.workspace.addSpecificComponentConfig(readmeComponentId, LanesAspect.id, {\n ...existingLaneConfig,\n readme: {\n [remoteLaneIdStr]: true,\n },\n });\n }\n await this.workspace.bitMap.write();\n return { result: true };\n }\n\n private async getLaneDataOfDefaultLane(): Promise<LaneData | null> {\n const consumer = this.workspace?.consumer;\n let bitIds: BitId[] = [];\n if (!consumer) {\n const scopeComponents = await this.scope.list();\n bitIds = scopeComponents.filter((component) => component.head).map((component) => component.id._legacy);\n } else {\n bitIds = await consumer.getIdsOfDefaultLane();\n }\n\n return {\n name: DEFAULT_LANE,\n remote: null,\n id: this.getDefaultLaneId(),\n components: bitIds.map((bitId) => ({ id: bitId, head: bitId.version as string })),\n isMerged: null,\n hash: '',\n };\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n ScopeAspect,\n WorkspaceAspect,\n GraphqlAspect,\n CommunityAspect,\n MergingAspect,\n ComponentAspect,\n LoggerAspect,\n ImporterAspect,\n ExportAspect,\n ];\n static runtime = MainRuntime;\n static async provider([\n cli,\n scope,\n workspace,\n graphql,\n community,\n merging,\n component,\n loggerMain,\n importer,\n exporter,\n ]: [\n CLIMain,\n ScopeMain,\n Workspace,\n GraphqlMain,\n CommunityMain,\n MergingMain,\n ComponentMain,\n LoggerMain,\n ImporterMain,\n ExportMain\n ]) {\n const logger = loggerMain.createLogger(LanesAspect.id);\n const lanesMain = new LanesMain(workspace, scope, merging, component, logger, importer, exporter);\n const switchCmd = new SwitchCmd(lanesMain);\n const laneCmd = new LaneCmd(lanesMain, workspace, scope, community.getDocsDomain());\n laneCmd.commands = [\n new LaneListCmd(lanesMain, workspace, scope),\n switchCmd,\n new LaneShowCmd(lanesMain, workspace, scope),\n new LaneCreateCmd(lanesMain),\n new LaneRemoveCmd(lanesMain),\n new LaneChangeScopeCmd(lanesMain),\n new LaneAliasCmd(lanesMain),\n new LaneRenameCmd(lanesMain),\n new LaneDiffCmd(workspace, scope),\n new LaneAddReadmeCmd(lanesMain),\n new LaneRemoveReadmeCmd(lanesMain),\n new LaneImportCmd(switchCmd),\n ];\n cli.register(laneCmd, switchCmd);\n graphql.register(lanesSchema(lanesMain));\n return lanesMain;\n }\n}\n\nLanesAspect.addRuntime(LanesMain);\n\nexport default LanesMain;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IA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,KAAIC,mBAAW,EAACP,SAAS,EAAEtN,SAAS,EAAEC,KAAK,CAAC,EAC5CsN,SAAS,EACT,KAAIO,mBAAW,EAACR,SAAS,EAAEtN,SAAS,EAAEC,KAAK,CAAC,EAC5C,KAAI8N,qBAAa,EAACT,SAAS,CAAC,EAC5B,KAAIU,qBAAa,EAACV,SAAS,CAAC,EAC5B,KAAIW,0BAAkB,EAACX,SAAS,CAAC,EACjC,KAAIY,oBAAY,EAACZ,SAAS,CAAC,EAC3B,KAAIa,qBAAa,EAACb,SAAS,CAAC,EAC5B,KAAIc,2BAAW,EAACpO,SAAS,EAAEC,KAAK,CAAC,EACjC,KAAIoO,wBAAgB,EAACf,SAAS,CAAC,EAC/B,KAAIgB,2BAAmB,EAAChB,SAAS,CAAC,EAClC,KAAIiB,qBAAa,EAAChB,SAAS,CAAC,CAC7B;IACDN,GAAG,CAACuB,QAAQ,CAACf,OAAO,EAAEF,SAAS,CAAC;IAChCL,OAAO,CAACsB,QAAQ,CAAC,IAAAC,qBAAW,EAACnB,SAAS,CAAC,CAAC;IACxC,OAAOA,SAAS;EAClB;AACF;AAAC;AAAA,gCAjkBYxN,SAAS,WAsgBL,EAAE;AAAA,gCAtgBNA,SAAS,kBAugBE,CACpB4O,gBAAS,EACTC,oBAAW,EACXC,4BAAe,EACfC,wBAAa,EACbC,4BAAe,EACfC,wBAAa,EACbC,oBAAe,EACfC,sBAAY,EACZC,0BAAc,EACdC,sBAAY,CACb;AAAA,gCAlhBUrP,SAAS,aAmhBHsP,kBAAW;AAgD9BzD,oBAAW,CAAC0D,UAAU,CAACvP,SAAS,CAAC;AAAC,eAEnBA,SAAS;AAAA"}
|
1
|
+
{"version":3,"names":["LanesMain","constructor","workspace","scope","merging","componentAspect","logger","importer","exporter","getLanes","name","remote","merged","showDefaultLane","notMerged","showMergeData","Boolean","consumer","remoteObj","getRemoteByName","lanes","listLanes","DEFAULT_LANE","defaultLane","getLaneDataOfDefaultLane","legacyScope","getLanesData","push","getCurrentLaneName","getCurrentLaneId","getCurrentLaneNameOrAlias","currentLaneId","trackingData","getLocalTrackedLaneByRemoteName","getCurrentLane","laneId","isDefault","loadLane","getDefaultLaneId","LaneId","from","setCurrentLane","alias","exported","createLane","remoteScope","newLane","createLaneInScope","localLane","remoteLane","throwForInvalidLaneName","defaultScope","trackLaneData","trackLane","scopeJson","setLaneAsNew","onDestroy","id","localName","remoteName","BitError","parseLaneIdFromString","lane","beforeTrackData","getRemoteTrackedDataByLocalLane","beforeTrackDataCloned","undefined","afterTrackData","aliasLane","laneName","includes","LANE_REMOTE_DELIMITER","trackData","laneNameWithoutScope","split","removeTrackLane","changeScope","remoteScopeBefore","newLaneId","saveLane","bitMap","rename","currentName","newName","existingAliasWithNewName","remoteIdStr","objects","remoteLanes","renameRefByNewLaneName","currentLaneName","isExported","isLaneExported","clonedLaneToExport","clone","components","exportErr","exportLane","err","error","toString","message","exportMany","laneObject","ids","BitIds","idsWithFutureScope","allVersions","importLaneObject","persistIfNotExists","scopeComponentImporter","ScopeComponentsImporter","getInstance","results","importLanes","LaneNotFound","exists","fetchLaneWithItsComponents","debug","Error","importOptions","objectsOnly","verbose","writeConfig","override","installNpmPackages","laneIds","importedIds","importWithOptions","length","removeLanes","laneNames","opts","force","laneResults","switchLanes","merge","getAll","skipDependencyInstallation","mergeStrategy","mergeOptions","Object","keys","MergeOptions","join","switchProps","existingOnWorkspaceOnly","checkoutProps","skipNpmInstall","ignorePackageJson","ignoreDist","isLane","promptMergeOptions","reset","all","LaneSwitcher","switch","isLaneUpToDate","laneToCheck","checkAgainst","upToDateIds","notUpToDateIds","getHashOnAnotherLane","idOnLane","getComponent","head","modelComp","getModelComponent","Promise","map","comp","refOnOtherLane","isEqual","modelComponent","divergeData","getDivergeData","repo","remoteHead","checkedOutLocalHead","isRemoteAhead","isDiverged","isLocalAhead","isUpToDate","getDiff","values","diffOptions","pattern","laneDiffGenerator","LaneDiffGenerator","generate","getLaneComponentModels","host","getHost","laneComponentIds","getLaneComponentIds","getMany","laneComponents","bitIdsFromBitmap","getAllBitIdsFromAllLanes","filteredComponentIds","filter","laneComponent","some","bitmapComponentId","isEqualWithoutVersion","legacyIdWithVersion","changeVersion","resolveComponentId","getLaneReadmeComponent","laneReadmeComponent","readmeComponent","laneReadmeComponentId","get","removeLaneReadme","result","readmeComponentId","existingLaneConfig","getSpecificComponentConfig","LanesAspect","remoteLaneIdStr","toLaneId","readme","removeSpecificComponentConfig","addSpecificComponentConfig","setReadmeComponent","write","addLaneReadme","readmeComponentIdStr","readmeComponentBitId","_legacy","bitIds","scopeComponents","list","component","getIdsOfDefaultLane","bitId","version","isMerged","hash","provider","cli","graphql","community","loggerMain","createLogger","lanesMain","switchCmd","SwitchCmd","laneCmd","LaneCmd","getDocsDomain","commands","LaneListCmd","LaneShowCmd","LaneCreateCmd","LaneRemoveCmd","LaneChangeScopeCmd","LaneAliasCmd","LaneRenameCmd","LaneDiffCmd","LaneAddReadmeCmd","LaneRemoveReadmeCmd","LaneImportCmd","register","lanesSchema","CLIAspect","ScopeAspect","WorkspaceAspect","GraphqlAspect","CommunityAspect","MergingAspect","ComponentAspect","LoggerAspect","ImporterAspect","ExportAspect","MainRuntime","addRuntime"],"sources":["lanes.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { Workspace, WorkspaceAspect } from '@teambit/workspace';\nimport getRemoteByName from '@teambit/legacy/dist/remotes/get-remote-by-name';\nimport { LaneDiffCmd, LaneDiffGenerator, LaneDiffResults } from '@teambit/lanes.modules.diff';\nimport { LaneData } from '@teambit/legacy/dist/scope/lanes/lanes';\nimport { LaneId, DEFAULT_LANE, LANE_REMOTE_DELIMITER } from '@teambit/lane-id';\nimport { BitError } from '@teambit/bit-error';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { DiffOptions } from '@teambit/legacy/dist/consumer/component-ops/components-diff';\nimport { MergeStrategy, MergeOptions } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { TrackLane } from '@teambit/legacy/dist/scope/scope-json';\nimport { ImporterAspect, ImporterMain, ImportOptions } from '@teambit/importer';\nimport { CommunityAspect } from '@teambit/community';\nimport type { CommunityMain } from '@teambit/community';\nimport ComponentAspect, { Component, ComponentID, ComponentMain } from '@teambit/component';\nimport removeLanes from '@teambit/legacy/dist/consumer/lanes/remove-lanes';\nimport { Lane } from '@teambit/legacy/dist/scope/models';\nimport { LaneNotFound } from '@teambit/legacy/dist/api/scope/lib/exceptions/lane-not-found';\nimport { getDivergeData } from '@teambit/legacy/dist/scope/component-ops/get-diverge-data';\nimport ScopeComponentsImporter from '@teambit/legacy/dist/scope/component-ops/scope-components-importer';\nimport { Scope as LegacyScope } from '@teambit/legacy/dist/scope';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { ExportAspect, ExportMain } from '@teambit/export';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { Ref } from '@teambit/legacy/dist/scope/objects';\nimport { MergingMain, MergingAspect } from '@teambit/merging';\nimport { LanesAspect } from './lanes.aspect';\nimport {\n LaneCmd,\n LaneCreateCmd,\n LaneImportCmd,\n LaneListCmd,\n LaneRemoveCmd,\n LaneShowCmd,\n LaneChangeScopeCmd,\n LaneAliasCmd,\n LaneRenameCmd,\n LaneAddReadmeCmd,\n LaneRemoveReadmeCmd,\n} from './lane.cmd';\nimport { lanesSchema } from './lanes.graphql';\nimport { SwitchCmd } from './switch.cmd';\nimport { LaneSwitcher } from './switch-lanes';\nimport { createLane, createLaneInScope, throwForInvalidLaneName } from './create-lane';\n\nexport { Lane };\n\nexport type LaneResults = {\n lanes: LaneData[];\n currentLane?: string | null;\n};\n\nexport type CreateLaneOptions = {\n remoteScope?: string; // default to the defaultScope in workspace.jsonc\n alias?: string; // default to the remote name\n};\n\nexport type SwitchLaneOptions = {\n alias?: string;\n merge?: MergeStrategy;\n getAll?: boolean;\n skipDependencyInstallation?: boolean;\n verbose?: boolean;\n override?: boolean;\n};\n\nexport class LanesMain {\n constructor(\n private workspace: Workspace | undefined,\n private scope: ScopeMain,\n private merging: MergingMain,\n private componentAspect: ComponentMain,\n public logger: Logger,\n private importer: ImporterMain,\n private exporter: ExportMain\n ) {}\n\n async getLanes({\n name,\n remote,\n merged,\n showDefaultLane,\n notMerged,\n }: {\n name?: string;\n remote?: string;\n merged?: boolean;\n showDefaultLane?: boolean;\n notMerged?: boolean;\n }): Promise<LaneData[]> {\n const showMergeData = Boolean(merged || notMerged);\n const consumer = this.workspace?.consumer;\n if (remote) {\n const remoteObj = await getRemoteByName(remote, consumer);\n const lanes = await remoteObj.listLanes(name, showMergeData);\n return lanes;\n }\n\n if (name === DEFAULT_LANE) {\n const defaultLane = await this.getLaneDataOfDefaultLane();\n return defaultLane ? [defaultLane] : [];\n }\n\n const lanes = await this.scope.legacyScope.lanes.getLanesData(this.scope.legacyScope, name, showMergeData);\n\n if (showDefaultLane) {\n const defaultLane = await this.getLaneDataOfDefaultLane();\n if (defaultLane) lanes.push(defaultLane);\n }\n\n return lanes;\n }\n\n getCurrentLaneName(): string | null {\n return this.getCurrentLaneId()?.name || null;\n }\n\n getCurrentLaneNameOrAlias(): string | null {\n const currentLaneId = this.getCurrentLaneId();\n if (!currentLaneId) return null;\n const trackingData = this.scope.legacyScope.lanes.getLocalTrackedLaneByRemoteName(\n currentLaneId.name,\n currentLaneId.scope\n );\n return trackingData || currentLaneId.name;\n }\n\n getCurrentLaneId(): LaneId | null {\n if (!this.workspace) return null;\n return this.workspace.consumer.getCurrentLaneId();\n }\n\n /**\n * get the currently checked out lane object, if on main - return null.\n */\n async getCurrentLane(): Promise<Lane | null> {\n const laneId = this.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) return null;\n return this.loadLane(laneId);\n }\n\n getDefaultLaneId(): LaneId {\n return LaneId.from(DEFAULT_LANE, this.scope.name);\n }\n\n setCurrentLane(laneId: LaneId, alias?: string, exported?: boolean) {\n this.workspace?.consumer.setCurrentLane(laneId, exported);\n }\n\n async createLane(name: string, { remoteScope, alias }: CreateLaneOptions = {}): Promise<TrackLane> {\n if (!this.workspace) {\n const newLane = await createLaneInScope(name, this.scope);\n return {\n localLane: newLane.name,\n remoteLane: newLane.name,\n remoteScope: this.scope.name,\n };\n }\n if (alias) {\n throwForInvalidLaneName(alias);\n }\n const scope = remoteScope || this.workspace.defaultScope;\n await createLane(this.workspace.consumer, name, scope);\n const laneId = LaneId.from(name, scope);\n this.setCurrentLane(laneId, alias, false);\n const trackLaneData = {\n localLane: alias || name,\n remoteLane: name,\n remoteScope: scope,\n };\n this.scope.legacyScope.lanes.trackLane(trackLaneData);\n this.scope.legacyScope.scopeJson.setLaneAsNew(name);\n await this.workspace.consumer.onDestroy();\n\n return trackLaneData;\n }\n\n async loadLane(id: LaneId): Promise<Lane | null> {\n return this.scope.legacyScope.lanes.loadLane(id);\n }\n\n async trackLane(\n localName: string,\n remoteScope: string,\n remoteName?: string\n ): Promise<{ beforeTrackData?: TrackLane; afterTrackData: TrackLane }> {\n if (!this.workspace) {\n throw new BitError(`unable to track a lane outside of Bit workspace`);\n }\n const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(localName);\n const lane = await this.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${localName}\"`);\n }\n const beforeTrackData = this.scope.legacyScope.lanes.getRemoteTrackedDataByLocalLane(localName);\n const beforeTrackDataCloned = beforeTrackData ? { ...beforeTrackData } : undefined;\n const afterTrackData = {\n localLane: localName,\n remoteLane: remoteName || beforeTrackData?.remoteLane || localName,\n remoteScope,\n };\n this.scope.legacyScope.lanes.trackLane(afterTrackData);\n await this.workspace.consumer.onDestroy();\n\n return { beforeTrackData: beforeTrackDataCloned, afterTrackData };\n }\n\n async aliasLane(laneName: string, alias: string): Promise<{ laneId: LaneId }> {\n if (!this.workspace) {\n throw new BitError(`unable to alias a lane outside of Bit workspace`);\n }\n if (alias.includes(LANE_REMOTE_DELIMITER)) {\n throw new BitError(`an alias cannot include a delimiter \"${LANE_REMOTE_DELIMITER}\"`);\n }\n if (alias === laneName) {\n throw new BitError(`an alias cannot be the same as the lane name`);\n }\n const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(laneName);\n const lane = await this.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${laneName}\"`);\n }\n const trackData = {\n localLane: alias,\n remoteLane: laneId.name,\n remoteScope: laneId.scope,\n };\n const laneNameWithoutScope = laneName.includes(LANE_REMOTE_DELIMITER)\n ? laneName.split(LANE_REMOTE_DELIMITER)[1]\n : laneName;\n this.scope.legacyScope.lanes.removeTrackLane(laneNameWithoutScope);\n this.scope.legacyScope.lanes.trackLane(trackData);\n await this.workspace.consumer.onDestroy();\n\n return { laneId };\n }\n\n async changeScope(laneName: string, remoteScope: string): Promise<{ remoteScopeBefore: string }> {\n if (!this.workspace) {\n throw new BitError(`unable to change-scope of a lane outside of Bit workspace`);\n }\n const laneNameWithoutScope = laneName.includes(LANE_REMOTE_DELIMITER)\n ? laneName.split(LANE_REMOTE_DELIMITER)[1]\n : laneName;\n const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(laneName);\n const lane = await this.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${laneName}\"`);\n }\n const remoteScopeBefore = lane.scope;\n lane.scope = remoteScope;\n const newLaneId = LaneId.from(laneId.name, remoteScope);\n const trackData = {\n localLane: laneNameWithoutScope,\n remoteLane: laneId.name,\n remoteScope,\n };\n this.scope.legacyScope.lanes.trackLane(trackData);\n await this.scope.legacyScope.lanes.saveLane(lane);\n this.workspace.consumer.bitMap.setCurrentLane(newLaneId, false);\n await this.workspace.consumer.onDestroy();\n\n return { remoteScopeBefore };\n }\n\n /**\n * change a lane-name and if possible, export the lane to the remote\n */\n async rename(currentName: string, newName: string): Promise<{ exported: boolean; exportErr?: Error }> {\n if (!this.workspace) {\n throw new BitError(`unable to rename a lane outside of Bit workspace`);\n }\n throwForInvalidLaneName(newName);\n const existingAliasWithNewName = this.scope.legacyScope.lanes.getRemoteTrackedDataByLocalLane(newName);\n if (existingAliasWithNewName) {\n const remoteIdStr = `${existingAliasWithNewName.remoteLane}/${existingAliasWithNewName.remoteScope}`;\n throw new BitError(`unable to rename to ${newName}. this name is already used to track: ${remoteIdStr}`);\n }\n const laneNameWithoutScope = currentName.includes(LANE_REMOTE_DELIMITER)\n ? currentName.split(LANE_REMOTE_DELIMITER)[1]\n : currentName;\n const laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(currentName);\n const lane = await this.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${currentName}\"`);\n }\n\n // rename the ref file\n await this.scope.legacyScope.objects.remoteLanes.renameRefByNewLaneName(laneNameWithoutScope, newName, lane.scope);\n\n // change tracking data\n const afterTrackData = {\n localLane: newName,\n remoteLane: newName,\n remoteScope: lane.scope,\n };\n this.scope.legacyScope.lanes.trackLane(afterTrackData);\n this.scope.legacyScope.lanes.removeTrackLane(laneNameWithoutScope);\n\n // change the lane object\n lane.name = newName;\n await this.scope.legacyScope.lanes.saveLane(lane);\n\n // change current-lane if needed\n const currentLaneName = this.getCurrentLaneName();\n if (currentLaneName === laneNameWithoutScope) {\n const newLaneId = LaneId.from(newName, lane.scope);\n const isExported = this.workspace.consumer.bitMap.isLaneExported;\n this.setCurrentLane(newLaneId, undefined, isExported);\n }\n\n // export the lane with only the name-change\n const clonedLaneToExport = lane.clone();\n clonedLaneToExport.components = []; // otherwise, it'll export the changes done on the components.\n let exported = false;\n let exportErr: Error | undefined;\n try {\n await this.exportLane(clonedLaneToExport);\n exported = true;\n } catch (err: any) {\n this.logger.error(`unable to export ${lane.id.toString()}: ${err.message}`);\n exportErr = err;\n }\n\n await this.workspace.consumer.onDestroy();\n\n return { exported, exportErr };\n }\n\n async exportLane(lane: Lane) {\n await this.exporter.exportMany({\n scope: this.scope.legacyScope,\n laneObject: lane,\n ids: new BitIds(),\n idsWithFutureScope: new BitIds(),\n allVersions: false,\n });\n }\n\n /**\n * get a Lane object from the remote.\n * `persistIfNotExists` saves the object in the local scope only if the lane is not there yet.\n * otherwise, it needs some merging mechanism, which is done differently whether it's export or import.\n * see `sources.mergeLane()` for export and `import-components._saveLaneDataIfNeeded()` for import.\n * in this case, because we only bring the lane object and not the components, it's not easy to do the merge.\n */\n async importLaneObject(laneId: LaneId, persistIfNotExists = true): Promise<Lane> {\n const legacyScope = this.scope.legacyScope;\n const scopeComponentImporter = ScopeComponentsImporter.getInstance(legacyScope);\n const results = await scopeComponentImporter.importLanes([laneId]);\n const laneObject = results[0];\n if (!laneObject) throw new LaneNotFound(laneId.scope, laneId.name);\n\n if (persistIfNotExists) {\n const exists = await legacyScope.loadLane(laneId);\n if (!exists) {\n await legacyScope.lanes.saveLane(laneObject);\n }\n }\n\n return laneObject;\n }\n\n /**\n * fetch the lane object and its components from the remote.\n * save the objects to the local scope.\n * this method doesn't change anything in the workspace.\n */\n async fetchLaneWithItsComponents(laneId: LaneId): Promise<Lane> {\n this.logger.debug(`fetching lane ${laneId.toString()}`);\n if (!this.workspace) {\n throw new BitError('unable to fetch lanes outside of Bit workspace');\n }\n const lane = await this.importLaneObject(laneId);\n if (!lane) throw new Error(`unable to import lane ${laneId.toString()} from the remote`);\n const importOptions: ImportOptions = {\n ids: [],\n objectsOnly: true,\n verbose: false,\n writeConfig: false,\n override: false,\n installNpmPackages: false,\n lanes: { laneIds: [laneId], lanes: [lane] },\n };\n const { importedIds } = await this.importer.importWithOptions(importOptions);\n this.logger.debug(`fetching lane ${laneId.toString()} done, fetched ${importedIds.length} components`);\n return lane;\n }\n\n async removeLanes(laneNames: string[], opts?: { remote: boolean; force: boolean }): Promise<string[]> {\n if (!this.workspace && !opts?.remote) {\n await this.scope.legacyScope.lanes.removeLanes(this.scope.legacyScope, laneNames, true);\n return laneNames;\n }\n const results = await removeLanes(this.workspace?.consumer, laneNames, !!opts?.remote, !!opts?.force);\n if (this.workspace) await this.workspace.consumer.onDestroy();\n\n return results.laneResults;\n }\n\n /**\n * switch to a different local or remote lane.\n * switching to a remote lane also imports and writes the components of that remote lane.\n * by default, only the components existing on the workspace will be imported from that lane, unless the \"getAll\"\n * flag is true.\n */\n async switchLanes(\n laneName: string,\n { alias, merge, getAll = false, skipDependencyInstallation = false }: SwitchLaneOptions\n ) {\n if (!this.workspace) {\n throw new BitError(`unable to switch lanes outside of Bit workspace`);\n }\n let mergeStrategy;\n if (merge && typeof merge === 'string') {\n const mergeOptions = Object.keys(MergeOptions);\n if (!mergeOptions.includes(merge)) {\n throw new BitError(`merge must be one of the following: ${mergeOptions.join(', ')}`);\n }\n mergeStrategy = merge;\n }\n if (alias) {\n throwForInvalidLaneName(alias);\n }\n\n const switchProps = {\n laneName,\n existingOnWorkspaceOnly: !getAll,\n alias,\n };\n const checkoutProps = {\n mergeStrategy,\n skipNpmInstall: skipDependencyInstallation,\n verbose: false, // not relevant in Harmony\n ignorePackageJson: true, // not relevant in Harmony\n ignoreDist: true, // not relevant in Harmony\n isLane: true,\n promptMergeOptions: false,\n writeConfig: false,\n reset: false,\n all: false,\n };\n return new LaneSwitcher(this.workspace, this.logger, switchProps, checkoutProps, this).switch();\n }\n\n /**\n * check whether the given lane is up-to-date against \"checkAgainst\", if this param is null, it checks it against main.\n */\n async isLaneUpToDate(laneToCheck: Lane, checkAgainst?: Lane): Promise<boolean> {\n const upToDateIds: BitId[] = [];\n const notUpToDateIds: BitId[] = [];\n const getHashOnAnotherLane = async (id: BitId): Promise<Ref | undefined> => {\n if (checkAgainst) {\n const idOnLane = checkAgainst.getComponent(id);\n return idOnLane?.head;\n }\n const modelComp = await this.scope.legacyScope.getModelComponent(id);\n return modelComp.head;\n };\n await Promise.all(\n laneToCheck.components.map(async (comp) => {\n const refOnOtherLane = await getHashOnAnotherLane(comp.id);\n if (!refOnOtherLane) {\n upToDateIds.push(comp.id);\n return;\n }\n if (comp.head.isEqual(refOnOtherLane)) {\n upToDateIds.push(comp.id);\n return;\n }\n const modelComponent = await this.scope.legacyScope.getModelComponent(comp.id);\n const divergeData = await getDivergeData({\n repo: this.scope.legacyScope.objects,\n modelComponent,\n remoteHead: refOnOtherLane,\n checkedOutLocalHead: comp.head,\n });\n if (divergeData.isRemoteAhead() || divergeData.isDiverged()) {\n notUpToDateIds.push(comp.id);\n return;\n }\n if (!divergeData.isLocalAhead()) {\n throw new Error(\n `invalid state - component ${comp.id.toString()} is not diverged, not local-ahead and not-remote-ahead.`\n );\n }\n upToDateIds.push(comp.id);\n })\n );\n\n const isUpToDate = !notUpToDateIds.length;\n\n return isUpToDate;\n }\n\n /**\n * the values array may include zero to two values and will be processed as following:\n * [] => diff between the current lane and default lane. (only inside workspace).\n * [to] => diff between the current lane (or default-lane when in scope) and \"to\" lane.\n * [from, to] => diff between \"from\" lane and \"to\" lane.\n */\n public async getDiff(values: string[], diffOptions: DiffOptions = {}, pattern?: string): Promise<LaneDiffResults> {\n const laneDiffGenerator = new LaneDiffGenerator(this.workspace, this.scope);\n return laneDiffGenerator.generate(values, diffOptions, pattern);\n }\n\n async getLaneComponentModels(lane: LaneData): Promise<Component[]> {\n const host = this.componentAspect.getHost();\n const laneComponentIds = await this.getLaneComponentIds(lane);\n const components = await host.getMany(laneComponentIds);\n return components;\n }\n\n async getLaneComponentIds(lane: LaneData): Promise<ComponentID[]> {\n if (!lane) return [];\n\n const laneComponents = lane.components;\n const workspace = this.workspace;\n const bitIdsFromBitmap = workspace ? workspace.consumer.bitMap.getAllBitIdsFromAllLanes() : [];\n\n const filteredComponentIds = workspace\n ? laneComponents.filter((laneComponent) =>\n bitIdsFromBitmap.some((bitmapComponentId) => bitmapComponentId.isEqualWithoutVersion(laneComponent.id))\n )\n : laneComponents;\n\n const host = this.componentAspect.getHost();\n\n return Promise.all(\n filteredComponentIds.map((laneComponent) => {\n const legacyIdWithVersion = laneComponent.id.changeVersion(laneComponent.head);\n return host.resolveComponentId(legacyIdWithVersion);\n })\n );\n }\n\n async getLaneReadmeComponent(lane: LaneData): Promise<Component | undefined> {\n if (!lane) return undefined;\n const laneReadmeComponent = lane.readmeComponent;\n if (!laneReadmeComponent) return undefined;\n const host = this.componentAspect.getHost();\n const laneReadmeComponentId = await host.resolveComponentId(\n laneReadmeComponent.id.changeVersion(laneReadmeComponent.head)\n );\n const readmeComponent = await host.get(laneReadmeComponentId);\n return readmeComponent;\n }\n\n async removeLaneReadme(laneName?: string): Promise<{ result: boolean; message?: string }> {\n if (!this.workspace) {\n throw new BitError('unable to remove the lane readme component outside of Bit workspace');\n }\n const currentLaneName = this.getCurrentLaneName();\n\n if (!laneName && !currentLaneName) {\n return {\n result: false,\n message: 'unable to remove the lane readme component. Either pass a laneName or switch to a lane',\n };\n }\n\n const scope: LegacyScope = this.workspace.scope.legacyScope;\n const laneId: LaneId = laneName\n ? await scope.lanes.parseLaneIdFromString(laneName)\n : (this.getCurrentLaneId() as LaneId);\n const lane: Lane | null | undefined = await scope.loadLane(laneId);\n\n if (!lane?.readmeComponent) {\n throw new BitError(`there is no readme component added to the lane ${laneName || currentLaneName}`);\n }\n\n const readmeComponentId = await this.workspace.resolveComponentId(lane.readmeComponent.id);\n const existingLaneConfig =\n (await this.workspace.getSpecificComponentConfig(readmeComponentId, LanesAspect.id)) || {};\n\n const remoteLaneIdStr = lane.toLaneId().toString();\n\n if (existingLaneConfig.readme) {\n delete existingLaneConfig.readme[remoteLaneIdStr];\n await this.workspace.removeSpecificComponentConfig(readmeComponentId, LanesAspect.id, false);\n await this.workspace.addSpecificComponentConfig(readmeComponentId, LanesAspect.id, existingLaneConfig);\n }\n\n lane.setReadmeComponent(undefined);\n await scope.lanes.saveLane(lane);\n await this.workspace.bitMap.write();\n\n return { result: true };\n }\n\n async addLaneReadme(readmeComponentIdStr: string, laneName?: string): Promise<{ result: boolean; message?: string }> {\n if (!this.workspace) {\n throw new BitError(`unable to track a lane readme component outside of Bit workspace`);\n }\n const readmeComponentId = await this.workspace.resolveComponentId(readmeComponentIdStr);\n\n const readmeComponentBitId = readmeComponentId._legacy;\n const scope: LegacyScope = this.workspace.scope.legacyScope;\n const laneId: LaneId = laneName\n ? await scope.lanes.parseLaneIdFromString(laneName)\n : (this.getCurrentLaneId() as LaneId);\n\n const lane: Lane | null | undefined = await scope.loadLane(laneId);\n\n if (!lane) {\n return { result: false, message: `cannot find lane ${laneName}` };\n }\n\n lane.setReadmeComponent(readmeComponentBitId);\n await scope.lanes.saveLane(lane);\n\n const existingLaneConfig =\n (await this.workspace.getSpecificComponentConfig(readmeComponentId, LanesAspect.id)) || {};\n\n const remoteLaneIdStr = lane.toLaneId().toString();\n\n if (existingLaneConfig.readme) {\n await this.workspace.addSpecificComponentConfig(readmeComponentId, LanesAspect.id, {\n ...existingLaneConfig,\n readme: {\n ...existingLaneConfig.readme,\n [remoteLaneIdStr]: true,\n },\n });\n } else {\n await this.workspace.addSpecificComponentConfig(readmeComponentId, LanesAspect.id, {\n ...existingLaneConfig,\n readme: {\n [remoteLaneIdStr]: true,\n },\n });\n }\n await this.workspace.bitMap.write();\n return { result: true };\n }\n\n private async getLaneDataOfDefaultLane(): Promise<LaneData | null> {\n const consumer = this.workspace?.consumer;\n let bitIds: BitId[] = [];\n if (!consumer) {\n const scopeComponents = await this.scope.list();\n bitIds = scopeComponents.filter((component) => component.head).map((component) => component.id._legacy);\n } else {\n bitIds = await consumer.getIdsOfDefaultLane();\n }\n\n return {\n name: DEFAULT_LANE,\n remote: null,\n id: this.getDefaultLaneId(),\n components: bitIds.map((bitId) => ({ id: bitId, head: bitId.version as string })),\n isMerged: null,\n hash: '',\n };\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n ScopeAspect,\n WorkspaceAspect,\n GraphqlAspect,\n CommunityAspect,\n MergingAspect,\n ComponentAspect,\n LoggerAspect,\n ImporterAspect,\n ExportAspect,\n ];\n static runtime = MainRuntime;\n static async provider([\n cli,\n scope,\n workspace,\n graphql,\n community,\n merging,\n component,\n loggerMain,\n importer,\n exporter,\n ]: [\n CLIMain,\n ScopeMain,\n Workspace,\n GraphqlMain,\n CommunityMain,\n MergingMain,\n ComponentMain,\n LoggerMain,\n ImporterMain,\n ExportMain\n ]) {\n const logger = loggerMain.createLogger(LanesAspect.id);\n const lanesMain = new LanesMain(workspace, scope, merging, component, logger, importer, exporter);\n const switchCmd = new SwitchCmd(lanesMain);\n const laneCmd = new LaneCmd(lanesMain, workspace, scope, community.getDocsDomain());\n laneCmd.commands = [\n new LaneListCmd(lanesMain, workspace, scope),\n switchCmd,\n new LaneShowCmd(lanesMain, workspace, scope),\n new LaneCreateCmd(lanesMain),\n new LaneRemoveCmd(lanesMain),\n new LaneChangeScopeCmd(lanesMain),\n new LaneAliasCmd(lanesMain),\n new LaneRenameCmd(lanesMain),\n new LaneDiffCmd(workspace, scope),\n new LaneAddReadmeCmd(lanesMain),\n new LaneRemoveReadmeCmd(lanesMain),\n new LaneImportCmd(switchCmd),\n ];\n cli.register(laneCmd, switchCmd);\n graphql.register(lanesSchema(lanesMain));\n return lanesMain;\n }\n}\n\nLanesAspect.addRuntime(LanesMain);\n\nexport default LanesMain;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;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Ae,EACfC,wBAAa,EACbC,4BAAe,EACfC,wBAAa,EACbC,oBAAe,EACfC,sBAAY,EACZC,0BAAc,EACdC,sBAAY,CACb;AAAA,gCA1lBUjR,SAAS,aA2lBHkR,kBAAW;AAgD9BzD,oBAAW,CAAC0D,UAAU,CAACnR,SAAS,CAAC;AAAC,eAEnBA,SAAS;AAAA"}
|
package/dist/lanes.spec.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
3
4
|
require("core-js/modules/es.promise.js");
|
4
5
|
function _chai() {
|
5
6
|
const data = require("chai");
|
@@ -15,6 +16,13 @@ function _harmonyTesting() {
|
|
15
16
|
};
|
16
17
|
return data;
|
17
18
|
}
|
19
|
+
function _snapping() {
|
20
|
+
const data = _interopRequireDefault(require("@teambit/snapping"));
|
21
|
+
_snapping = function () {
|
22
|
+
return data;
|
23
|
+
};
|
24
|
+
return data;
|
25
|
+
}
|
18
26
|
function _workspaceTesting() {
|
19
27
|
const data = require("@teambit/workspace.testing.mock-workspace");
|
20
28
|
_workspaceTesting = function () {
|
@@ -36,51 +44,78 @@ function _lanes() {
|
|
36
44
|
};
|
37
45
|
return data;
|
38
46
|
}
|
39
|
-
// describe('LanesAspect', function () {
|
40
|
-
// let lanes: LanesMain;
|
41
|
-
// let workspaceData: WorkspaceData;
|
42
|
-
// beforeAll(async () => {
|
43
|
-
// workspaceData = mockWorkspace();
|
44
|
-
// const { workspacePath } = workspaceData;
|
45
|
-
// await mockComponents(workspacePath);
|
46
|
-
// lanes = await loadAspect(LanesAspect, workspacePath);
|
47
|
-
// await lanes.createLane('stage');
|
48
|
-
// });
|
49
|
-
// afterAll(async () => {
|
50
|
-
// await destroyWorkspace(workspaceData);
|
51
|
-
// });
|
52
|
-
// describe('getLanes()', () => {
|
53
|
-
// it('should list all lanes', async () => {
|
54
|
-
// const currentLanes = await lanes.getLanes({});
|
55
|
-
// expect(currentLanes).toBeDefined();
|
56
|
-
// expect(currentLanes[0].name).toEqual('stage');
|
57
|
-
// });
|
58
|
-
// });
|
59
|
-
// });
|
60
|
-
|
61
47
|
describe('LanesAspect', function () {
|
62
48
|
this.timeout(0);
|
63
|
-
let lanes;
|
64
|
-
let workspaceData;
|
65
|
-
before(async () => {
|
66
|
-
workspaceData = (0, _workspaceTesting().mockWorkspace)();
|
67
|
-
const {
|
68
|
-
workspacePath
|
69
|
-
} = workspaceData;
|
70
|
-
await (0, _componentTesting().mockComponents)(workspacePath);
|
71
|
-
lanes = await (0, _harmonyTesting().loadAspect)(_lanes().LanesAspect, workspacePath);
|
72
|
-
await lanes.createLane('stage');
|
73
|
-
});
|
74
|
-
after(async () => {
|
75
|
-
await (0, _workspaceTesting().destroyWorkspace)(workspaceData);
|
76
|
-
});
|
77
49
|
describe('getLanes()', () => {
|
50
|
+
let lanes;
|
51
|
+
let workspaceData;
|
52
|
+
before(async () => {
|
53
|
+
workspaceData = (0, _workspaceTesting().mockWorkspace)();
|
54
|
+
const {
|
55
|
+
workspacePath
|
56
|
+
} = workspaceData;
|
57
|
+
await (0, _componentTesting().mockComponents)(workspacePath);
|
58
|
+
lanes = await (0, _harmonyTesting().loadAspect)(_lanes().LanesAspect, workspacePath);
|
59
|
+
await lanes.createLane('stage');
|
60
|
+
});
|
61
|
+
after(async () => {
|
62
|
+
await (0, _workspaceTesting().destroyWorkspace)(workspaceData);
|
63
|
+
});
|
78
64
|
it('should list all lanes', async () => {
|
79
65
|
const currentLanes = await lanes.getLanes({});
|
80
66
|
(0, _chai().expect)(currentLanes).to.have.lengthOf(1);
|
81
67
|
(0, _chai().expect)(currentLanes[0].name).to.equal('stage');
|
82
68
|
});
|
83
69
|
});
|
70
|
+
describe('isLaneUpToDate', () => {
|
71
|
+
let lanes;
|
72
|
+
let snapping;
|
73
|
+
let workspaceData;
|
74
|
+
before(async () => {
|
75
|
+
workspaceData = (0, _workspaceTesting().mockWorkspace)();
|
76
|
+
const {
|
77
|
+
workspacePath
|
78
|
+
} = workspaceData;
|
79
|
+
await (0, _componentTesting().mockComponents)(workspacePath);
|
80
|
+
snapping = await (0, _harmonyTesting().loadAspect)(_snapping().default, workspacePath);
|
81
|
+
await snapping.tag({
|
82
|
+
ids: ['comp1'],
|
83
|
+
build: false
|
84
|
+
});
|
85
|
+
lanes = await (0, _harmonyTesting().loadAspect)(_lanes().LanesAspect, workspacePath);
|
86
|
+
await lanes.createLane('stage');
|
87
|
+
const result = await snapping.snap({
|
88
|
+
pattern: 'comp1',
|
89
|
+
build: false,
|
90
|
+
unmodified: true
|
91
|
+
});
|
92
|
+
// intermediate step, make sure it is snapped
|
93
|
+
(0, _chai().expect)(result === null || result === void 0 ? void 0 : result.snappedComponents.length).to.equal(1);
|
94
|
+
});
|
95
|
+
after(async () => {
|
96
|
+
await (0, _workspaceTesting().destroyWorkspace)(workspaceData);
|
97
|
+
});
|
98
|
+
it('should return that the lane is up to date when the lane is ahead of main', async () => {
|
99
|
+
const currentLane = await lanes.getCurrentLane();
|
100
|
+
if (!currentLane) throw new Error('unable to get the current lane');
|
101
|
+
const isUpToDate = await lanes.isLaneUpToDate(currentLane);
|
102
|
+
(0, _chai().expect)(isUpToDate).to.be.true;
|
103
|
+
});
|
104
|
+
it('should return that the lane is not up to date when main is ahead', async () => {
|
105
|
+
const currentLane = await lanes.getCurrentLane();
|
106
|
+
if (!currentLane) throw new Error('unable to get the current lane');
|
107
|
+
await lanes.switchLanes('main', {
|
108
|
+
skipDependencyInstallation: true
|
109
|
+
});
|
110
|
+
await snapping.snap({
|
111
|
+
pattern: 'comp1',
|
112
|
+
build: false,
|
113
|
+
unmodified: true
|
114
|
+
});
|
115
|
+
const isUpToDate = await lanes.isLaneUpToDate(currentLane);
|
116
|
+
(0, _chai().expect)(isUpToDate).to.be.false;
|
117
|
+
});
|
118
|
+
});
|
84
119
|
});
|
85
120
|
|
86
121
|
//# sourceMappingURL=lanes.spec.js.map
|
package/dist/lanes.spec.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["describe","timeout","lanes","workspaceData","before","mockWorkspace","workspacePath","mockComponents","loadAspect","LanesAspect","createLane","after","destroyWorkspace","it","currentLanes","getLanes","expect","to","have","lengthOf","name","equal"],"sources":["lanes.spec.ts"],"sourcesContent":["import { expect } from 'chai';\nimport { loadAspect } from '@teambit/harmony.testing.load-aspect';\nimport { mockWorkspace, destroyWorkspace, WorkspaceData } from '@teambit/workspace.testing.mock-workspace';\nimport { mockComponents } from '@teambit/component.testing.mock-components';\nimport { LanesAspect } from './lanes.aspect';\nimport { LanesMain } from './lanes.main.runtime';\n\
|
1
|
+
{"version":3,"names":["describe","timeout","lanes","workspaceData","before","mockWorkspace","workspacePath","mockComponents","loadAspect","LanesAspect","createLane","after","destroyWorkspace","it","currentLanes","getLanes","expect","to","have","lengthOf","name","equal","snapping","SnappingAspect","tag","ids","build","result","snap","pattern","unmodified","snappedComponents","length","currentLane","getCurrentLane","Error","isUpToDate","isLaneUpToDate","be","true","switchLanes","skipDependencyInstallation","false"],"sources":["lanes.spec.ts"],"sourcesContent":["import { expect } from 'chai';\nimport { loadAspect } from '@teambit/harmony.testing.load-aspect';\nimport SnappingAspect, { SnappingMain } from '@teambit/snapping';\nimport { mockWorkspace, destroyWorkspace, WorkspaceData } from '@teambit/workspace.testing.mock-workspace';\nimport { mockComponents } from '@teambit/component.testing.mock-components';\nimport { LanesAspect } from './lanes.aspect';\nimport { LanesMain } from './lanes.main.runtime';\n\ndescribe('LanesAspect', function () {\n this.timeout(0);\n\n describe('getLanes()', () => {\n let lanes: LanesMain;\n let workspaceData: WorkspaceData;\n before(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n lanes = await loadAspect(LanesAspect, workspacePath);\n await lanes.createLane('stage');\n });\n after(async () => {\n await destroyWorkspace(workspaceData);\n });\n it('should list all lanes', async () => {\n const currentLanes = await lanes.getLanes({});\n expect(currentLanes).to.have.lengthOf(1);\n expect(currentLanes[0].name).to.equal('stage');\n });\n });\n\n describe('isLaneUpToDate', () => {\n let lanes: LanesMain;\n let snapping: SnappingMain;\n let workspaceData: WorkspaceData;\n before(async () => {\n workspaceData = mockWorkspace();\n const { workspacePath } = workspaceData;\n await mockComponents(workspacePath);\n snapping = await loadAspect(SnappingAspect, workspacePath);\n await snapping.tag({ ids: ['comp1'], build: false });\n lanes = await loadAspect(LanesAspect, workspacePath);\n await lanes.createLane('stage');\n const result = await snapping.snap({ pattern: 'comp1', build: false, unmodified: true });\n // intermediate step, make sure it is snapped\n expect(result?.snappedComponents.length).to.equal(1);\n });\n after(async () => {\n await destroyWorkspace(workspaceData);\n });\n it('should return that the lane is up to date when the lane is ahead of main', async () => {\n const currentLane = await lanes.getCurrentLane();\n if (!currentLane) throw new Error('unable to get the current lane');\n const isUpToDate = await lanes.isLaneUpToDate(currentLane);\n expect(isUpToDate).to.be.true;\n });\n it('should return that the lane is not up to date when main is ahead', async () => {\n const currentLane = await lanes.getCurrentLane();\n if (!currentLane) throw new Error('unable to get the current lane');\n await lanes.switchLanes('main', { skipDependencyInstallation: true });\n await snapping.snap({ pattern: 'comp1', build: false, unmodified: true });\n const isUpToDate = await lanes.isLaneUpToDate(currentLane);\n expect(isUpToDate).to.be.false;\n });\n });\n});\n"],"mappings":";;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGAA,QAAQ,CAAC,aAAa,EAAE,YAAY;EAClC,IAAI,CAACC,OAAO,CAAC,CAAC,CAAC;EAEfD,QAAQ,CAAC,YAAY,EAAE,MAAM;IAC3B,IAAIE,KAAgB;IACpB,IAAIC,aAA4B;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AAMlC,KAAK,CAACmC,cAAc,CAACJ,WAAW,CAAC;MAC1D,IAAAjB,cAAM,EAACoB,UAAU,CAAC,CAACnB,EAAE,CAACqB,EAAE,CAACI,KAAK;IAChC,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
@@ -25,7 +25,7 @@ export declare class LanesUI {
|
|
25
25
|
private scope?;
|
26
26
|
static dependencies: import("@teambit/harmony").Aspect[];
|
27
27
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
28
|
-
static slots: (((registerFn: () => string) => import("@teambit/harmony").SlotRegistry<RouteProps>) | ((registerFn: () => string) => import("@teambit/harmony").SlotRegistry<
|
28
|
+
static slots: (((registerFn: () => string) => import("@teambit/harmony").SlotRegistry<RouteProps>) | ((registerFn: () => string) => import("@teambit/harmony").SlotRegistry<LaneOverviewLineSlot>) | ((registerFn: () => string) => import("@teambit/harmony").SlotRegistry<NavigationSlot>))[];
|
29
29
|
constructor(componentUi: ComponentUI, routeSlot: RouteSlot, navSlot: LanesOrderedNavigationSlot, menuWidgetSlot: MenuWidgetSlot,
|
30
30
|
/**
|
31
31
|
* overview line slot to add new lines beneath the overview section
|
Binary file
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/lanes",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.473",
|
4
4
|
"homepage": "https://bit.dev/teambit/lanes/lanes",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.lanes",
|
8
8
|
"name": "lanes",
|
9
|
-
"version": "0.0.
|
9
|
+
"version": "0.0.473"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -18,31 +18,31 @@
|
|
18
18
|
"core-js": "^3.0.0",
|
19
19
|
"@teambit/harmony": "0.3.3",
|
20
20
|
"@teambit/bit-error": "0.0.402",
|
21
|
-
"@teambit/lane-id": "0.0.
|
22
|
-
"@teambit/
|
23
|
-
"@teambit/
|
24
|
-
"@teambit/
|
25
|
-
"@teambit/workspace": "0.0.
|
26
|
-
"@teambit/graphql": "0.0.
|
27
|
-
"@teambit/community": "0.0.
|
28
|
-
"@teambit/component": "0.0.
|
29
|
-
"@teambit/export": "0.0.
|
30
|
-
"@teambit/importer": "0.0.
|
31
|
-
"@teambit/lanes.modules.diff": "0.0.
|
21
|
+
"@teambit/lane-id": "0.0.119",
|
22
|
+
"@teambit/scope": "0.0.901",
|
23
|
+
"@teambit/lanes.ui.models.lanes-model": "0.0.26",
|
24
|
+
"@teambit/cli": "0.0.601",
|
25
|
+
"@teambit/workspace": "0.0.901",
|
26
|
+
"@teambit/graphql": "0.0.901",
|
27
|
+
"@teambit/community": "0.0.149",
|
28
|
+
"@teambit/component": "0.0.901",
|
29
|
+
"@teambit/export": "0.0.901",
|
30
|
+
"@teambit/importer": "0.0.330",
|
31
|
+
"@teambit/lanes.modules.diff": "0.0.237",
|
32
32
|
"@teambit/legacy-bit-id": "0.0.421",
|
33
|
-
"@teambit/logger": "0.0.
|
34
|
-
"@teambit/merging": "0.0.
|
33
|
+
"@teambit/logger": "0.0.694",
|
34
|
+
"@teambit/merging": "0.0.216",
|
35
35
|
"@teambit/design.ui.pages.not-found": "0.0.364",
|
36
|
-
"@teambit/lanes.hooks.use-lanes": "0.0.
|
37
|
-
"@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.
|
38
|
-
"@teambit/lanes.ui.lane-overview": "0.0.
|
36
|
+
"@teambit/lanes.hooks.use-lanes": "0.0.64",
|
37
|
+
"@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.26",
|
38
|
+
"@teambit/lanes.ui.lane-overview": "0.0.26",
|
39
39
|
"@teambit/lanes.ui.menus.lanes-overview-menu": "0.0.2",
|
40
|
-
"@teambit/lanes.ui.menus.use-lanes-menu": "0.0.
|
41
|
-
"@teambit/lanes.ui.navigation.lane-switcher": "0.0.
|
42
|
-
"@teambit/sidebar": "0.0.
|
40
|
+
"@teambit/lanes.ui.menus.use-lanes-menu": "0.0.26",
|
41
|
+
"@teambit/lanes.ui.navigation.lane-switcher": "0.0.26",
|
42
|
+
"@teambit/sidebar": "0.0.901",
|
43
43
|
"@teambit/ui-foundation.ui.menu": "0.0.494",
|
44
44
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.497",
|
45
|
-
"@teambit/ui": "0.0.
|
45
|
+
"@teambit/ui": "0.0.901"
|
46
46
|
},
|
47
47
|
"devDependencies": {
|
48
48
|
"@types/react": "^17.0.8",
|
@@ -56,11 +56,12 @@
|
|
56
56
|
"@types/node": "12.20.4",
|
57
57
|
"@teambit/component.testing.mock-components": "0.0.16",
|
58
58
|
"@teambit/harmony.testing.load-aspect": "0.0.15",
|
59
|
+
"@teambit/snapping": "0.0.216",
|
59
60
|
"@teambit/workspace.testing.mock-workspace": "0.0.14"
|
60
61
|
},
|
61
62
|
"peerDependencies": {
|
62
63
|
"react-router-dom": "^6.0.0",
|
63
|
-
"@teambit/legacy": "1.0.
|
64
|
+
"@teambit/legacy": "1.0.385",
|
64
65
|
"react-dom": "^16.8.0 || ^17.0.0",
|
65
66
|
"react": "^16.8.0 || ^17.0.0"
|
66
67
|
},
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.473/dist/lanes.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.lanes_lanes@0.0.473/dist/lanes.docs.mdx';
|
3
3
|
|
4
4
|
export const compositions = [compositions_0];
|
5
5
|
export const overview = [overview_0];
|
Binary file
|