@teambit/lanes 1.0.511 → 1.0.512
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/__bit_junit.xml +13 -13
- package/artifacts/preview/teambit_lanes_lanes-preview.js +1 -1
- package/dist/lane.cmd.d.ts +2 -2
- package/dist/lanes.main.runtime.d.ts +1 -1
- package/dist/lanes.main.runtime.js +7 -7
- package/dist/lanes.main.runtime.js.map +1 -1
- package/dist/{preview-1736711473672.js → preview-1736824735631.js} +2 -2
- package/dist/switch-lanes.d.ts +1 -1
- package/dist/switch-lanes.js.map +1 -1
- package/package.json +40 -40
@@ -1,27 +1,27 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<testsuites tests="18" failures="0" errors="0" skipped="2">
|
3
|
-
<testsuite name="teambit.lanes/lanes@1.0.
|
4
|
-
<testcase classname="dist/lanes.spec.js" name="should list all lanes" time="0.
|
5
|
-
<testcase classname="dist/lanes.spec.js" name="should return that the lane is up to date when the lane is ahead of main" time="0.
|
6
|
-
<testcase classname="dist/lanes.spec.js" name="should return that the lane is not up to date when main is ahead" time="2.
|
7
|
-
<testcase classname="dist/lanes.spec.js" name="should return that the lane is up to date when the lane is ahead of main" time="0.
|
8
|
-
<testcase classname="dist/lanes.spec.js" name="should return that the lane is not up to date when main is ahead" time="
|
9
|
-
<testcase classname="dist/lanes.spec.js" name="should restore the deleted lane"/>
|
3
|
+
<testsuite name="teambit.lanes/lanes@1.0.512" tests="18" failures="0" errors="0" skipped="2">
|
4
|
+
<testcase classname="dist/lanes.spec.js" name="should list all lanes" time="0.003"/>
|
5
|
+
<testcase classname="dist/lanes.spec.js" name="should return that the lane is up to date when the lane is ahead of main" time="0.014"/>
|
6
|
+
<testcase classname="dist/lanes.spec.js" name="should return that the lane is not up to date when main is ahead" time="2.138"/>
|
7
|
+
<testcase classname="dist/lanes.spec.js" name="should return that the lane is up to date when the lane is ahead of main" time="0.697"/>
|
8
|
+
<testcase classname="dist/lanes.spec.js" name="should return that the lane is not up to date when main is ahead" time="1.383"/>
|
9
|
+
<testcase classname="dist/lanes.spec.js" name="should restore the deleted lane" time="0.001"/>
|
10
10
|
<testcase classname="dist/lanes.spec.js" name="should not throw"/>
|
11
|
-
<testcase classname="dist/lanes.spec.js" name="should throw when restoring the lane" time="0.
|
12
|
-
<testcase classname="dist/lanes.spec.js" name="should create lane history object when creating a new lane" time="0.
|
11
|
+
<testcase classname="dist/lanes.spec.js" name="should throw when restoring the lane" time="0.003"/>
|
12
|
+
<testcase classname="dist/lanes.spec.js" name="should create lane history object when creating a new lane" time="0.001"/>
|
13
13
|
<testcase classname="dist/lanes.spec.js" name="should add a record to LaneHistory when snapping" time="0.001"/>
|
14
14
|
<testcase classname="dist/lanes.spec.js" name="should export successfully"/>
|
15
15
|
<testcase classname="dist/lanes.spec.js" name="should not add a record to the lane-history" time="0.001"/>
|
16
|
-
<testcase classname="dist/lanes.spec.js" name="should be able to checkout to a previous state of the lane" time="
|
17
|
-
<testcase classname="dist/lanes.spec.js" name="should be able to revert to a previous history id" time="
|
18
|
-
<testcase classname="dist/lanes.spec.js" name="should not throw when creating the second lane" time="0.
|
16
|
+
<testcase classname="dist/lanes.spec.js" name="should be able to checkout to a previous state of the lane" time="2.275"/>
|
17
|
+
<testcase classname="dist/lanes.spec.js" name="should be able to revert to a previous history id" time="6.267"/>
|
18
|
+
<testcase classname="dist/lanes.spec.js" name="should not throw when creating the second lane" time="0.139"/>
|
19
19
|
<testcase classname="dist/lanes.spec.js" name="should save the deleted data into the lane object">
|
20
20
|
<skipped/>
|
21
21
|
</testcase>
|
22
22
|
<testcase classname="dist/lanes.spec.js" name="should save the deleted data into lane history">
|
23
23
|
<skipped/>
|
24
24
|
</testcase>
|
25
|
-
<testcase classname="dist/lanes.spec.js" name="the components should be available on main"
|
25
|
+
<testcase classname="dist/lanes.spec.js" name="the components should be available on main"/>
|
26
26
|
</testsuite>
|
27
27
|
</testsuites>
|
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.lanes/lanes-preview"]=t():e["teambit.lanes/lanes-preview"]=t()}(self,(()=>(()=>{"use strict";var e={2050:(e,t,n)=>{var a={id:"teambit.lanes/lanes@1.0.511",homepage:"https://bit.cloud/teambit/lanes/lanes",exported:!0};function o(){const e=i(n(1594));return o=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,o.__bit_component=a,i.__bit_component=a;const r=()=>o().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},o().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/lanes.svg"}));r.__bit_component=a,t.Logo=r},1594:e=>{e.exports=React}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};n.r(a),n.d(a,{compositions:()=>c,compositions_metadata:()=>f,overview:()=>u});var o={};n.r(o),n.d(o,{default:()=>h});var i=n(2050);n(1594);const r=MdxJsReact,l=TeambitMdxUiMdxScopeContext;var s=["components"];function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},m.apply(null,arguments)}var d={},p="wrapper";function h(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,s);return(0,r.mdx)(p,m({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(l.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,r.mdx)("p",null,"See more details about these two features here: ",(0,r.mdx)("a",{parentName:"p",href:"https://github.com/teambit/bit/issues/1986"},"Lanes"),". ",(0,r.mdx)("a",{parentName:"p",href:"https://github.com/teambit/bit/issues/1985"},"Snaps"),"."),(0,r.mdx)("p",null,"The following describes the final implementation, which differs from the specification above."),(0,r.mdx)("h2",null,"Synopsis"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"- create a snap: `bit snap` (synopsis similar to the `bit tag`)\n- create a new lane: `bit lane create <name>`\n- list lanes: `bit lane list`\n- switch between lanes: `bit switch <name>`\n- merge lanes: `bit lane merge`\n- show lane details: `bit lane show <name>`\n- diff between lanes: `bit lane diff <values>`\n- track local lane to a remote lane: `bit switch --as`\n- remove a lane: `bit lane remove <name>`.\n- fetch lane objects (without the components): `bit fetch --lanes`\n- import a lane: `bit lane import`\n- export current lane: `bit export`\n- (internal) cat lane object: `bit cat-lane <name>`\n")),(0,r.mdx)("h2",null,"Important points"),(0,r.mdx)("h3",null,"Lane ID"),(0,r.mdx)("p",null,"The Lane id consists of the lane name and the scope. If this is a new lane, the scope is the defaultScope.\nThe ",(0,r.mdx)("inlineCode",{parentName:"p"},"LaneId")," ",(0,r.mdx)("em",{parentName:"p"},"always")," has these two props."),(0,r.mdx)("h3",null,"Performance consideration"),(0,r.mdx)("p",null,"Currently, if it imports with no-deps, it doesn't ask for parents, if it imports with deps it imports with all parents. It is originated from src/api/scope/lib/fetch.ts: ",(0,r.mdx)("inlineCode",{parentName:"p"},"const collectParents = !noDependencies;"),". We need to make a decision here."),(0,r.mdx)("h3",null,"Hash"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Snap's hash is generated by a UUID and then converted into sha1. ",(0,r.mdx)("inlineCode",{parentName:"li"},"sha1(v4())"),"."),(0,r.mdx)("li",{parentName:"ul"},"Lane's hash is generated by a UUID and then converted into sha1. ",(0,r.mdx)("inlineCode",{parentName:"li"},"sha1(v4())"),"."),(0,r.mdx)("li",{parentName:"ul"},"Tag's hash stays the same. Generated by the ",(0,r.mdx)("inlineCode",{parentName:"li"},"Version.id()"),"."),(0,r.mdx)("li",{parentName:"ul"},"Lane's hash doesn't get changed even if the lane has been renamed or its scope changed.")),(0,r.mdx)("h3",null,"Lane Data"),(0,r.mdx)("p",null,"Lane data, for the most cases is a map of component-id:snap-head, in other words, it saves per component the head snap. There are 3 different places where we store such data for different purposes."),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"lane-object"),' "Lane" is saved in the scope ',(0,r.mdx)("inlineCode",{parentName:"li"},".bit/objects")," (.bit can be .git/bit locally), it has a unique hash and contains a map of components and their heads. This object exists on both local and remote scopes. Its main purpose is to sync lane-data between scopes. See ",(0,r.mdx)("inlineCode",{parentName:"li"},"Lane")," class (in scope/model) for the implementation details."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"remote-lane")," (component and their heads) is saved in ",(0,r.mdx)("inlineCode",{parentName:"li"},".bit/refs/remote/remote-name/lane-name"),". These refs files are saved in both, local and remote scopes. Its main purpose is to keep track where the remote-heads are per lane. See ",(0,r.mdx)("inlineCode",{parentName:"li"},"RemoteLanes")," class for the implementation details.")),(0,r.mdx)("p",null,"More places that stores lanes related data:"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"the currently checked out lane is saved in the scope.json file. (e.g. ",(0,r.mdx)("inlineCode",{parentName:"li"},'{ lanes: { current: "lane-a", tracking: "remote/lane-a" } }'),")."),(0,r.mdx)("li",{parentName:"ul"},"When switching to a remote lane, the .bitmap is updated as well with the remote-name, so then, when cloning the project, it's possible to fetch the remote lane data.")),(0,r.mdx)("p",null,"Summary of when/what lanes data is saved per command:"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit lane create"),": creates a new lane-object and creates a new lane record in scope.json and .bitmap."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit snap"),": adds an entry to the lane-object."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit export"),": pushes the lane-object to the remote. On the remote, the lane-object is created or updated/merged."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit switch --remote"),": 1) creates/updates lane-object in the scope. 2) creates/updates remote-lane. the remote-lane is updated also for main."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit fetch")," or ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit import --objects"),": creates/updates remote-lane. the remote-lane is updated also for main. It doesn't update/merge the lane object.")),(0,r.mdx)("h3",null,"Merge during import"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"When the remote is ahead, it's easy, just update the head to the remote-head."),(0,r.mdx)("li",{parentName:"ul"},"When the local and remote have diverged, it's more complex. We need to create a snap-merge that has two parents, one point to the local head and one point to the remote head."),(0,r.mdx)("li",{parentName:"ul"},"On ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit import --objects")," (or ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit fetch"),") we don't merge. The remote head is saved in the .bit/refs/remote dir. Then, ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit status")," shows that these components are merge-pending."),(0,r.mdx)("li",{parentName:"ul"},"On ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit import <id>")," we do the merge."),(0,r.mdx)("li",{parentName:"ul"},"in case the merge wasn't done and the user is trying to export, the remote blocks is as it finds out that its head doesn't exist on the incoming component."),(0,r.mdx)("li",{parentName:"ul"},"in case the snap-merge failed due to a conflict, it saves the conflict and heads data into ",(0,r.mdx)("inlineCode",{parentName:"li"},".bit/unmerged.json")," file.")),(0,r.mdx)("h3",null,"Merge components"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"to merge an entire lane, use ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit lane merge"),"."),(0,r.mdx)("li",{parentName:"ul"},"to get updates from a remote lane, run ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit import"),", and then ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit checkout head"),". alternatively, run ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit merge <component-id>")," in one command."),(0,r.mdx)("li",{parentName:"ul"},"to merge an individual component from a lane to main, run ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit lane merge <lane> --pattern <component-id>")," when on main.")),(0,r.mdx)("h3",null,"Useful APIs"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"bit-map ",(0,r.mdx)("inlineCode",{parentName:"li"},"getAllIdsAvailableOnLane()")," filters the currently checked out lane.")),(0,r.mdx)("h3",null,"Remove component from a lane"),(0,r.mdx)("p",null,"Locally, to remove a component from a lane, use ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit remove")," command. It will remove the component from the local lane-object.\nThis change won't affect the remote scope, even after exporting the lane.\nThis is becuase on the remote, the merge-lane process doesn't remove anything, only adds/changes components to the lane object.\nRemember that by default when importing a lane, only the components on the workspace are part of the lane, so the same lane-object, locally can have less components than the remote and obviously in this case we don't want to remove them from the remote on export."),(0,r.mdx)("p",null,"To mark a component as removed on the lane, use ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit remove --delete"),", which will modify the component, mark it as removed, then, on the next snap+export, the remote will be updated.\nOnce a component is marked as removed, it won't be merged during ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit lane merge"),", and won't be imported during ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit lane import"),"."),(0,r.mdx)("h3",null,"Debug issues during merge"),(0,r.mdx)("p",null,"The merge operation performs 3-way merge to minimize the number of conflicts.\nIt searches the common parent of the current-snap and the other-snap. This parent-snap or base-snap is common to these two lanes.\nFor most case, it works as follows:\nIf the base and current has the same data but the other has different data, it means, the other made a change.\nIn which case, no need for conflicts, just bring the data from the other to the local.\nOn the other hand, if the base the other has the same data but the current has different data, then, the current made a change. No need to do anything.\nOnly when the current and the other, both are different, and both are different than the base, there is a conflict."),(0,r.mdx)("p",null,'In case of merging lanes, and it\'s unclear why/how some changes were introduced or marked conflicted, go to the log to find out what is the base-snap and the other-snap.\nThe log message starts with "merging snaps details", and it lists per component-id the base-snap, current-snap and other-snap.\nFrom here, you can investigate the data of each one of the snaps by running ',(0,r.mdx)("inlineCode",{parentName:"p"},"bit cat-object -p <snap>"),".\nTo make this process easier, there are some tools that can help. keep reading."),(0,r.mdx)("h4",null,"source code merges/conflicts"),(0,r.mdx)("p",null,"To find out when a change was introduced to a file or when a file was added/removed, run ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit log-file <file-path>"),".\nIt might be helpful to create a new temporary workspace, import the other lane and run the same there.\nThis way, you get the full picture from both lanes when a change was introduced, and you can see whether it happened before and after the split from the base-snap.\nObviously, ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit log <comp-id> --one-line")," is helpful here to see the distance from each lane from the base-snap."),(0,r.mdx)("h4",null,"dependencies merges/conflicts"),(0,r.mdx)("p",null,"Similar to file-changes, you can run ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit deps blame"),' to understhand when a dependency was introduced/deleted/changed from a component.\nHere again, it\'ll be helpful to import to a new workspace the other lane and run the same there.\nAlso, becuase the dependencies merge is pretty complex, during the merge lots of valuable info is printed to the log.\nHowever, to avoid the extra noise it is not logged as "debug" but as "trace". Before you run the merge, you can add ',(0,r.mdx)("inlineCode",{parentName:"p"},"--log=trace")," to see these messages on the screen.")))}h.isMDXComponent=!0;const c=[i],u=[o],f={compositions:[{displayName:"Logo",identifier:"Logo"}]};return a})()));
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.lanes/lanes-preview"]=t():e["teambit.lanes/lanes-preview"]=t()}(self,(()=>(()=>{"use strict";var e={2085:(e,t,n)=>{var a={id:"teambit.lanes/lanes@1.0.512",homepage:"https://bit.cloud/teambit/lanes/lanes",exported:!0};function o(){const e=i(n(1594));return o=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,o.__bit_component=a,i.__bit_component=a;const r=()=>o().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},o().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/lanes.svg"}));r.__bit_component=a,t.Logo=r},1594:e=>{e.exports=React}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};n.r(a),n.d(a,{compositions:()=>c,compositions_metadata:()=>f,overview:()=>u});var o={};n.r(o),n.d(o,{default:()=>h});var i=n(2085);n(1594);const r=MdxJsReact,l=TeambitMdxUiMdxScopeContext;var s=["components"];function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},m.apply(null,arguments)}var d={},p="wrapper";function h(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,s);return(0,r.mdx)(p,m({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(l.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,r.mdx)("p",null,"See more details about these two features here: ",(0,r.mdx)("a",{parentName:"p",href:"https://github.com/teambit/bit/issues/1986"},"Lanes"),". ",(0,r.mdx)("a",{parentName:"p",href:"https://github.com/teambit/bit/issues/1985"},"Snaps"),"."),(0,r.mdx)("p",null,"The following describes the final implementation, which differs from the specification above."),(0,r.mdx)("h2",null,"Synopsis"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},"- create a snap: `bit snap` (synopsis similar to the `bit tag`)\n- create a new lane: `bit lane create <name>`\n- list lanes: `bit lane list`\n- switch between lanes: `bit switch <name>`\n- merge lanes: `bit lane merge`\n- show lane details: `bit lane show <name>`\n- diff between lanes: `bit lane diff <values>`\n- track local lane to a remote lane: `bit switch --as`\n- remove a lane: `bit lane remove <name>`.\n- fetch lane objects (without the components): `bit fetch --lanes`\n- import a lane: `bit lane import`\n- export current lane: `bit export`\n- (internal) cat lane object: `bit cat-lane <name>`\n")),(0,r.mdx)("h2",null,"Important points"),(0,r.mdx)("h3",null,"Lane ID"),(0,r.mdx)("p",null,"The Lane id consists of the lane name and the scope. If this is a new lane, the scope is the defaultScope.\nThe ",(0,r.mdx)("inlineCode",{parentName:"p"},"LaneId")," ",(0,r.mdx)("em",{parentName:"p"},"always")," has these two props."),(0,r.mdx)("h3",null,"Performance consideration"),(0,r.mdx)("p",null,"Currently, if it imports with no-deps, it doesn't ask for parents, if it imports with deps it imports with all parents. It is originated from src/api/scope/lib/fetch.ts: ",(0,r.mdx)("inlineCode",{parentName:"p"},"const collectParents = !noDependencies;"),". We need to make a decision here."),(0,r.mdx)("h3",null,"Hash"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Snap's hash is generated by a UUID and then converted into sha1. ",(0,r.mdx)("inlineCode",{parentName:"li"},"sha1(v4())"),"."),(0,r.mdx)("li",{parentName:"ul"},"Lane's hash is generated by a UUID and then converted into sha1. ",(0,r.mdx)("inlineCode",{parentName:"li"},"sha1(v4())"),"."),(0,r.mdx)("li",{parentName:"ul"},"Tag's hash stays the same. Generated by the ",(0,r.mdx)("inlineCode",{parentName:"li"},"Version.id()"),"."),(0,r.mdx)("li",{parentName:"ul"},"Lane's hash doesn't get changed even if the lane has been renamed or its scope changed.")),(0,r.mdx)("h3",null,"Lane Data"),(0,r.mdx)("p",null,"Lane data, for the most cases is a map of component-id:snap-head, in other words, it saves per component the head snap. There are 3 different places where we store such data for different purposes."),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"lane-object"),' "Lane" is saved in the scope ',(0,r.mdx)("inlineCode",{parentName:"li"},".bit/objects")," (.bit can be .git/bit locally), it has a unique hash and contains a map of components and their heads. This object exists on both local and remote scopes. Its main purpose is to sync lane-data between scopes. See ",(0,r.mdx)("inlineCode",{parentName:"li"},"Lane")," class (in scope/model) for the implementation details."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"remote-lane")," (component and their heads) is saved in ",(0,r.mdx)("inlineCode",{parentName:"li"},".bit/refs/remote/remote-name/lane-name"),". These refs files are saved in both, local and remote scopes. Its main purpose is to keep track where the remote-heads are per lane. See ",(0,r.mdx)("inlineCode",{parentName:"li"},"RemoteLanes")," class for the implementation details.")),(0,r.mdx)("p",null,"More places that stores lanes related data:"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"the currently checked out lane is saved in the scope.json file. (e.g. ",(0,r.mdx)("inlineCode",{parentName:"li"},'{ lanes: { current: "lane-a", tracking: "remote/lane-a" } }'),")."),(0,r.mdx)("li",{parentName:"ul"},"When switching to a remote lane, the .bitmap is updated as well with the remote-name, so then, when cloning the project, it's possible to fetch the remote lane data.")),(0,r.mdx)("p",null,"Summary of when/what lanes data is saved per command:"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit lane create"),": creates a new lane-object and creates a new lane record in scope.json and .bitmap."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit snap"),": adds an entry to the lane-object."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit export"),": pushes the lane-object to the remote. On the remote, the lane-object is created or updated/merged."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit switch --remote"),": 1) creates/updates lane-object in the scope. 2) creates/updates remote-lane. the remote-lane is updated also for main."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"bit fetch")," or ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit import --objects"),": creates/updates remote-lane. the remote-lane is updated also for main. It doesn't update/merge the lane object.")),(0,r.mdx)("h3",null,"Merge during import"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"When the remote is ahead, it's easy, just update the head to the remote-head."),(0,r.mdx)("li",{parentName:"ul"},"When the local and remote have diverged, it's more complex. We need to create a snap-merge that has two parents, one point to the local head and one point to the remote head."),(0,r.mdx)("li",{parentName:"ul"},"On ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit import --objects")," (or ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit fetch"),") we don't merge. The remote head is saved in the .bit/refs/remote dir. Then, ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit status")," shows that these components are merge-pending."),(0,r.mdx)("li",{parentName:"ul"},"On ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit import <id>")," we do the merge."),(0,r.mdx)("li",{parentName:"ul"},"in case the merge wasn't done and the user is trying to export, the remote blocks is as it finds out that its head doesn't exist on the incoming component."),(0,r.mdx)("li",{parentName:"ul"},"in case the snap-merge failed due to a conflict, it saves the conflict and heads data into ",(0,r.mdx)("inlineCode",{parentName:"li"},".bit/unmerged.json")," file.")),(0,r.mdx)("h3",null,"Merge components"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"to merge an entire lane, use ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit lane merge"),"."),(0,r.mdx)("li",{parentName:"ul"},"to get updates from a remote lane, run ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit import"),", and then ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit checkout head"),". alternatively, run ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit merge <component-id>")," in one command."),(0,r.mdx)("li",{parentName:"ul"},"to merge an individual component from a lane to main, run ",(0,r.mdx)("inlineCode",{parentName:"li"},"bit lane merge <lane> --pattern <component-id>")," when on main.")),(0,r.mdx)("h3",null,"Useful APIs"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"bit-map ",(0,r.mdx)("inlineCode",{parentName:"li"},"getAllIdsAvailableOnLane()")," filters the currently checked out lane.")),(0,r.mdx)("h3",null,"Remove component from a lane"),(0,r.mdx)("p",null,"Locally, to remove a component from a lane, use ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit remove")," command. It will remove the component from the local lane-object.\nThis change won't affect the remote scope, even after exporting the lane.\nThis is becuase on the remote, the merge-lane process doesn't remove anything, only adds/changes components to the lane object.\nRemember that by default when importing a lane, only the components on the workspace are part of the lane, so the same lane-object, locally can have less components than the remote and obviously in this case we don't want to remove them from the remote on export."),(0,r.mdx)("p",null,"To mark a component as removed on the lane, use ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit remove --delete"),", which will modify the component, mark it as removed, then, on the next snap+export, the remote will be updated.\nOnce a component is marked as removed, it won't be merged during ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit lane merge"),", and won't be imported during ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit lane import"),"."),(0,r.mdx)("h3",null,"Debug issues during merge"),(0,r.mdx)("p",null,"The merge operation performs 3-way merge to minimize the number of conflicts.\nIt searches the common parent of the current-snap and the other-snap. This parent-snap or base-snap is common to these two lanes.\nFor most case, it works as follows:\nIf the base and current has the same data but the other has different data, it means, the other made a change.\nIn which case, no need for conflicts, just bring the data from the other to the local.\nOn the other hand, if the base the other has the same data but the current has different data, then, the current made a change. No need to do anything.\nOnly when the current and the other, both are different, and both are different than the base, there is a conflict."),(0,r.mdx)("p",null,'In case of merging lanes, and it\'s unclear why/how some changes were introduced or marked conflicted, go to the log to find out what is the base-snap and the other-snap.\nThe log message starts with "merging snaps details", and it lists per component-id the base-snap, current-snap and other-snap.\nFrom here, you can investigate the data of each one of the snaps by running ',(0,r.mdx)("inlineCode",{parentName:"p"},"bit cat-object -p <snap>"),".\nTo make this process easier, there are some tools that can help. keep reading."),(0,r.mdx)("h4",null,"source code merges/conflicts"),(0,r.mdx)("p",null,"To find out when a change was introduced to a file or when a file was added/removed, run ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit log-file <file-path>"),".\nIt might be helpful to create a new temporary workspace, import the other lane and run the same there.\nThis way, you get the full picture from both lanes when a change was introduced, and you can see whether it happened before and after the split from the base-snap.\nObviously, ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit log <comp-id> --one-line")," is helpful here to see the distance from each lane from the base-snap."),(0,r.mdx)("h4",null,"dependencies merges/conflicts"),(0,r.mdx)("p",null,"Similar to file-changes, you can run ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit deps blame"),' to understhand when a dependency was introduced/deleted/changed from a component.\nHere again, it\'ll be helpful to import to a new workspace the other lane and run the same there.\nAlso, becuase the dependencies merge is pretty complex, during the merge lots of valuable info is printed to the log.\nHowever, to avoid the extra noise it is not logged as "debug" but as "trace". Before you run the merge, you can add ',(0,r.mdx)("inlineCode",{parentName:"p"},"--log=trace")," to see these messages on the screen.")))}h.isMDXComponent=!0;const c=[i],u=[o],f={compositions:[{displayName:"Logo",identifier:"Logo"}]};return a})()));
|
package/dist/lane.cmd.d.ts
CHANGED
@@ -40,7 +40,7 @@ export declare class LaneListCmd implements Command {
|
|
40
40
|
id: LaneId;
|
41
41
|
alias?: string | null;
|
42
42
|
isMerged: boolean | null;
|
43
|
-
log?: import("@teambit/
|
43
|
+
log?: import("@teambit/objects").LaneLog;
|
44
44
|
hash: string;
|
45
45
|
}[];
|
46
46
|
currentLane: string | null;
|
@@ -74,7 +74,7 @@ export declare class LaneShowCmd implements Command {
|
|
74
74
|
id: LaneId;
|
75
75
|
alias?: string | null;
|
76
76
|
isMerged: boolean | null;
|
77
|
-
log?: import("@teambit/
|
77
|
+
log?: import("@teambit/objects").LaneLog;
|
78
78
|
hash: string;
|
79
79
|
}>;
|
80
80
|
}
|
@@ -12,7 +12,7 @@ import { MergeStrategy, MergingMain } from '@teambit/merging';
|
|
12
12
|
import { ImporterMain } from '@teambit/importer';
|
13
13
|
import { ComponentID } from '@teambit/component-id';
|
14
14
|
import { Component, ComponentMain } from '@teambit/component';
|
15
|
-
import { Lane, LaneHistory } from '@teambit/
|
15
|
+
import { Lane, LaneHistory } from '@teambit/objects';
|
16
16
|
import { SnapsDistance } from '@teambit/component.snap-distance';
|
17
17
|
import { ExportMain } from '@teambit/export';
|
18
18
|
import { ComponentCompareMain } from '@teambit/component-compare';
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
Object.defineProperty(exports, "Lane", {
|
7
7
|
enumerable: true,
|
8
8
|
get: function () {
|
9
|
-
return
|
9
|
+
return _objects().Lane;
|
10
10
|
}
|
11
11
|
});
|
12
12
|
exports.default = exports.LanesMain = void 0;
|
@@ -136,9 +136,9 @@ function _component() {
|
|
136
136
|
};
|
137
137
|
return data;
|
138
138
|
}
|
139
|
-
function
|
140
|
-
const data = require("@teambit/
|
141
|
-
|
139
|
+
function _objects() {
|
140
|
+
const data = require("@teambit/objects");
|
141
|
+
_objects = function () {
|
142
142
|
return data;
|
143
143
|
};
|
144
144
|
return data;
|
@@ -666,7 +666,7 @@ please create a new lane instead, which will include all components of this lane
|
|
666
666
|
* lanes with the same lane-id but different hashes.
|
667
667
|
*/
|
668
668
|
async restoreLane(laneHash) {
|
669
|
-
const ref =
|
669
|
+
const ref = _objects().Ref.from(laneHash);
|
670
670
|
const objectsFromTrash = await this.scope.legacyScope.objects.getFromTrash([ref]);
|
671
671
|
const laneIdFromTrash = objectsFromTrash[0].toLaneId();
|
672
672
|
const existingWithSameId = await this.loadLane(laneIdFromTrash);
|
@@ -802,7 +802,7 @@ please create a new lane instead, which will include all components of this lane
|
|
802
802
|
const sourceLane = sourceLaneId.isDefault() ? await this.getLaneDataOfDefaultLane() : await this.loadLane(sourceLaneId);
|
803
803
|
const sourceLaneComponents = sourceLaneId.isDefault() ? sourceLane?.components.map(main => ({
|
804
804
|
id: main.id,
|
805
|
-
head:
|
805
|
+
head: _objects().Ref.from(main.head)
|
806
806
|
})) : sourceLane?.components;
|
807
807
|
const targetLane = targetLaneId ? await this.loadLane(targetLaneId) : undefined;
|
808
808
|
const targetLaneIds = targetLane?.toBitIds();
|
@@ -828,7 +828,7 @@ please create a new lane instead, which will include all components of this lane
|
|
828
828
|
}
|
829
829
|
const headOnTargetLane = targetLaneIds ? targetLaneIds.searchWithoutVersion(id)?.version : await this.getHeadOnMain(componentId);
|
830
830
|
if (headOnTargetLane) {
|
831
|
-
const targetVersionObj = await this.scope.legacyScope.objects.load(
|
831
|
+
const targetVersionObj = await this.scope.legacyScope.objects.load(_objects().Ref.from(headOnTargetLane), true);
|
832
832
|
if (targetVersionObj.isRemoved()) {
|
833
833
|
return null;
|
834
834
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_pMapSeries","_interopRequireDefault","_pMap","_scope","_graphql","_express","_workspace","_scope2","_lanesModules","_legacy","_laneId","_bitError","_logger","_merging","_importer","_componentId","_legacyBitId","_component","_scope3","_component2","_export","_lodash","_componentCompare","_componentWriter","_remove","_checkout","_lanesEntities","_harmonyModules","_removeLanes","_lanes","_lane","_lanes2","_switch","_switchLanes","_lanesModules2","_lanesCreate","_lanesDelete","_lanesRestore","_install","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LanesMain","constructor","workspace","scope","merging","componentAspect","logger","importer","exporter","componentCompare","componentWriter","remove","checkout","install","getLanes","name","remote","merged","showDefaultLane","notMerged","showMergeData","Boolean","consumer","Error","laneId","LaneId","from","undefined","remoteObj","getRemoteByName","lanes","listLanes","toString","DEFAULT_LANE","defaultLane","getLaneDataOfDefaultLane","legacyScope","getLanesData","parseLaneId","idStr","parseLaneIdFromString","getLaneHistory","lane","loadLane","BitError","laneHistory","getOrCreateLaneHistory","checkoutHistory","historyId","options","historyItem","getHistoryItemOfCurrentLane","ids","components","map","id","ComponentID","fromString","getCurrentLane","results","changeVersion","versionPerId","allowAddingComponentsFromScope","skipNpmInstall","skipDependencyInstallation","revertHistory","revert","getCurrentLaneId","isDefault","importLaneHistory","history","getHistory","existingLane","isNew","importLaneObject","isLaneExistsOnRemote","scopeImporter","importLanes","getCurrentLaneName","getCurrentLaneNameOrAlias","currentLaneId","trackingData","getLocalTrackedLaneByRemoteName","getDefaultLaneId","setCurrentLane","alias","exported","createLane","forkLaneNewScope","newLane","createLaneInScope","toLaneId","hash","throwForInvalidLaneName","currentLaneScope","defaultScope","laneObj","trackLaneData","localLane","remoteLane","remoteScope","trackLane","scopeJson","setLaneAsNew","onDestroy","localName","remoteName","beforeTrackData","getRemoteTrackedDataByLocalLane","beforeTrackDataCloned","afterTrackData","aliasLane","laneName","includes","LANE_REMOTE_DELIMITER","trackData","laneNameWithoutScope","split","removeTrackLane","changeScope","isValidScopeName","InvalidScopeName","remoteScopeBefore","newLaneId","saveLane","laneHistoryMsg","bitMap","rename","newName","currentName","existingAliasWithNewName","remoteIdStr","objects","remoteLanes","renameRefByNewLaneName","renameLane","isEqual","isExported","isLaneExported","exportLane","exportMany","laneObject","ComponentIdList","allVersions","persistIfNotExists","includeLaneHistory","eject","pattern","deletedComps","deleteComps","packages","c","getPackageName","getHeadOnMain","componentId","modelComponent","getModelComponent","head","fetchLaneWithItsComponents","includeUpdateDependents","debug","fetchLaneComponents","removeLanes","laneNames","opts","force","laneResults","restoreLane","laneHash","ref","Ref","objectsFromTrash","getFromTrash","laneIdFromTrash","existingWithSameId","restoreFromTrash","switchLanes","merge","forceOurs","forceTheirs","workspaceOnly","inInstallContext","mergeStrategy","mergeOptions","MergeOptions","join","switchProps","existingOnWorkspaceOnly","checkoutProps","isLane","promptMergeOptions","reset","all","LaneSwitcher","switch","getDiff","values","diffOptions","laneDiffGenerator","LaneDiffGenerator","generate","getLaneComponentModels","host","getHost","laneComponentIds","getLaneComponentIds","getMany","laneComponents","bitIdsFromBitmap","getAllBitIdsFromAllLanes","filteredComponentIds","laneComponent","some","bitmapComponentId","isEqualWithoutVersion","getLaneReadmeComponent","laneReadmeComponent","readmeComponent","laneReadmeComponentId","get","removeLaneReadme","currentLaneName","result","message","readmeComponentId","existingLaneConfig","getSpecificComponentConfig","LanesAspect","remoteLaneIdStr","readme","removeSpecificComponentConfig","addSpecificComponentConfig","setReadmeComponent","write","diffStatus","sourceLaneId","targetLaneId","profile","sourceLane","sourceLaneComponents","main","targetLane","targetLaneIds","toBitIds","targetMainHeads","compact","Promise","resolveComponentId","headOnMain","importObjectsFromMainIfExist","cache","diffProps","sourceVersionObj","load","isRemoved","headOnTargetLane","searchWithoutVersion","version","targetVersionObj","sourceHead","targetHead","snapDistancesByComponentId","Map","pMap","snapsDistance","getSnapsDistanceBetweenTwoSnaps","set","concurrency","concurrentComponentsLimit","commonSnapsToImport","s","commonSnapBeforeDiverge","sourceOrTargetLane","skipChanges","importWithoutDeps","fromArray","reason","pMapSeries","componentDiffStatus","source","target","componentsStatus","err","noCommonSnap","NoCommonSnap","upToDate","isUpToDate","unrelated","changes","commonSnap","getChanges","ChangeType","NEW","compare","fields","code","status","NONE","changed","f","SOURCE_CODE","ASPECTS","depsFields","field","fieldName","DEPENDENCY","changeType","onSource","snapsOnSourceOnly","onTarget","snapsOnTargetOnly","common","componentDiffStatusOld","recreateNewLaneIfDeleted","getCurrentLaneObject","listUpdatesFromForked","componentsList","isOnMain","forkedFromLaneId","forkedFrom","forkedFromLane","workspaceIds","getAllBitIds","duringMergeIds","listDuringMergeStateComponents","componentsFromModel","getModelComponents","compFromModelOnWorkspace","hasWithoutVersion","toComponentId","remoteForkedLane","getRemoteLane","headOnForked","find","headOnLane","laneHeadLocal","divergeData","getDivergeData","repo","throws","listUpdatesFromMainPending","allIds","includeVersionHistory","ignoreMissingHead","checkedOutVersion","getRef","removeUpdateDependents","removeComponentFromUpdateDependentsIfExist","removeAllUpdateDependents","hasChanged","bitIds","scopeComponents","list","component","getIdsOfDefaultLane","bitId","isMerged","createRoutePath","deleteRoutePath","restoreRoutePath","provider","cli","graphql","loggerMain","express","createLogger","lanesMain","switchCmd","SwitchCmd","fetchCmd","FetchCmd","laneCmd","LaneCmd","commands","LaneListCmd","LaneShowCmd","LaneCreateCmd","LaneRemoveCmd","LaneChangeScopeCmd","LaneAliasCmd","LaneRenameCmd","LaneDiffCmd","LaneRemoveReadmeCmd","LaneImportCmd","LaneRemoveCompCmd","LaneFetchCmd","LaneEjectCmd","LaneHistoryCmd","LaneHistoryDiffCmd","LaneCheckoutCmd","LaneRevertCmd","register","CatLaneHistoryCmd","registerOnStart","lanesSchema","LanesCreateRoute","LanesDeleteRoute","LanesRestoreRoute","exports","CLIAspect","ScopeAspect","WorkspaceAspect","GraphqlAspect","MergingAspect","ComponentAspect","LoggerAspect","ImporterAspect","ExportAspect","ExpressAspect","ComponentCompareAspect","ComponentWriterAspect","RemoveAspect","CheckoutAspect","InstallAspect","MainRuntime","addRuntime","_default"],"sources":["lanes.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport pMapSeries from 'p-map-series';\nimport pMap from 'p-map';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { ExpressAspect, ExpressMain } from '@teambit/express';\nimport { Workspace, WorkspaceAspect } from '@teambit/workspace';\nimport { getRemoteByName } from '@teambit/scope.remotes';\nimport { LaneDiffCmd, LaneDiffGenerator, LaneDiffResults, LaneHistoryDiffCmd } from '@teambit/lanes.modules.diff';\nimport { NoCommonSnap, Scope as LegacyScope, TrackLane, LaneData } from '@teambit/legacy.scope';\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.component-diff';\nimport { MergeStrategy, MergeOptions, MergingMain, MergingAspect } from '@teambit/merging';\nimport { FetchCmd, ImporterAspect, ImporterMain } from '@teambit/importer';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport { InvalidScopeName, isValidScopeName } from '@teambit/legacy-bit-id';\nimport { ComponentAspect, Component, ComponentMain } from '@teambit/component';\nimport { Ref, HistoryItem, Lane, LaneHistory, Version } from '@teambit/scope.objects';\nimport { SnapsDistance, getDivergeData } from '@teambit/component.snap-distance';\nimport { ExportAspect, ExportMain } from '@teambit/export';\nimport { compact } from 'lodash';\nimport { ComponentCompareMain, ComponentCompareAspect } from '@teambit/component-compare';\nimport { ComponentWriterAspect, ComponentWriterMain } from '@teambit/component-writer';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport { CheckoutAspect, CheckoutMain } from '@teambit/checkout';\nimport { ChangeType } from '@teambit/lanes.entities.lane-diff';\nimport { ComponentsList } from '@teambit/legacy.component-list';\nimport { concurrentComponentsLimit } from '@teambit/harmony.modules.concurrency';\nimport { removeLanes } from './remove-lanes';\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 LaneRemoveReadmeCmd,\n LaneRemoveCompCmd,\n CatLaneHistoryCmd,\n LaneHistoryCmd,\n LaneCheckoutCmd,\n LaneCheckoutOpts,\n LaneRevertCmd,\n LaneFetchCmd,\n LaneEjectCmd,\n} from './lane.cmd';\nimport { lanesSchema } from './lanes.graphql';\nimport { SwitchCmd } from './switch.cmd';\nimport { LaneSwitcher } from './switch-lanes';\nimport { createLane, createLaneInScope, throwForInvalidLaneName } from '@teambit/lanes.modules.create-lane';\nimport { LanesCreateRoute } from './lanes.create.route';\nimport { LanesDeleteRoute } from './lanes.delete.route';\nimport { LanesRestoreRoute } from './lanes.restore.route';\nimport { InstallAspect, InstallMain } from '@teambit/install';\n\nexport { Lane };\n\nexport type SnapsDistanceObj = {\n onSource: string[];\n onTarget: string[];\n common?: string;\n};\n\nexport type LaneResults = {\n lanes: LaneData[];\n currentLane?: string | null;\n};\n\nexport type CreateLaneOptions = {\n scope?: string; // default to the defaultScope in workspace.jsonc\n alias?: string; // default to the remote name\n forkLaneNewScope?: boolean;\n};\n\nexport type SwitchLaneOptions = {\n head?: boolean;\n alias?: string;\n merge?: MergeStrategy;\n forceOurs?: boolean;\n forceTheirs?: boolean;\n workspaceOnly?: boolean;\n pattern?: string;\n skipDependencyInstallation?: boolean;\n verbose?: boolean;\n override?: boolean;\n};\n\nexport type LaneComponentDiffStatus = {\n componentId: ComponentID;\n sourceHead: string;\n targetHead?: string;\n /**\n * @deprecated\n * use changes to get list of all the changes\n */\n changeType?: ChangeType;\n changes?: ChangeType[];\n upToDate?: boolean;\n snapsDistance?: SnapsDistanceObj;\n unrelated?: boolean;\n};\n\nexport type LaneDiffStatusOptions = {\n skipChanges?: boolean;\n};\n\nexport type DivergeDataPerId = { id: ComponentID; divergeData: SnapsDistance };\n\nexport type LaneDiffStatus = {\n source: LaneId;\n target: LaneId;\n componentsStatus: LaneComponentDiffStatus[];\n};\n\nexport type MarkRemoveOnLaneResult = { removedFromWs: ComponentID[]; markedRemoved: ComponentID[] };\n\nexport type CreateLaneResult = {\n lane: Lane;\n laneId: LaneId;\n hash: string;\n alias?: string;\n};\n\nexport class LanesMain {\n constructor(\n readonly workspace: Workspace | undefined,\n private scope: ScopeMain,\n private merging: MergingMain,\n private componentAspect: ComponentMain,\n public logger: Logger,\n readonly importer: ImporterMain,\n private exporter: ExportMain,\n private componentCompare: ComponentCompareMain,\n readonly componentWriter: ComponentWriterMain,\n private remove: RemoveMain,\n readonly checkout: CheckoutMain,\n private install: InstallMain\n ) {}\n\n /**\n * return the lane data without the deleted components.\n * the deleted components are filtered out in legacyScope.lanes.getLanesData()\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 (!this.scope) throw new Error(`error: please run the command from a workspace or a scope directory`);\n if (remote) {\n const laneId = name ? LaneId.from(name, remote) : undefined;\n const remoteObj = await getRemoteByName(remote, consumer);\n const lanes = await remoteObj.listLanes(laneId?.toString(), showMergeData);\n // if the remote is http, it eventually calls this method from the remote without the \"remote\" param.\n // again, the deleted components are filtered out.\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 async parseLaneId(idStr: string): Promise<LaneId> {\n const scope: LegacyScope = this.scope.legacyScope;\n return scope.lanes.parseLaneIdFromString(idStr);\n }\n\n async getLaneHistory(laneId: LaneId): Promise<LaneHistory> {\n const lane = await this.loadLane(laneId);\n if (!lane) throw new BitError(`unable to find a lane \"${laneId.toString()}\"`);\n const laneHistory = await this.scope.legacyScope.lanes.getOrCreateLaneHistory(lane);\n return laneHistory;\n }\n\n async checkoutHistory(historyId: string, options?: LaneCheckoutOpts) {\n const historyItem = await this.getHistoryItemOfCurrentLane(historyId);\n const ids = historyItem.components.map((id) => ComponentID.fromString(id));\n const lane = await this.getCurrentLane();\n const results = await this.checkout.checkout({\n ids: ids.map((id) => id.changeVersion(undefined)),\n versionPerId: ids,\n allowAddingComponentsFromScope: true,\n skipNpmInstall: options?.skipDependencyInstallation,\n lane,\n });\n return results;\n }\n\n async revertHistory(historyId: string, options?: LaneCheckoutOpts) {\n const historyItem = await this.getHistoryItemOfCurrentLane(historyId);\n const ids = historyItem.components.map((id) => ComponentID.fromString(id));\n const results = await this.checkout.checkout({\n ids: ids.map((id) => id.changeVersion(undefined)),\n versionPerId: ids,\n allowAddingComponentsFromScope: true,\n revert: true,\n skipNpmInstall: options?.skipDependencyInstallation,\n });\n return results;\n }\n\n private async getHistoryItemOfCurrentLane(historyId: string): Promise<HistoryItem> {\n const laneId = this.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) {\n throw new BitError(`unable to checkout history \"${historyId}\" while on main`);\n }\n await this.importLaneHistory(laneId);\n const laneHistory = await this.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n const historyItem = history[historyId];\n if (!historyItem) {\n throw new BitError(`unable to find history \"${historyId}\" in lane \"${laneId.toString()}\"`);\n }\n return historyItem;\n }\n\n async importLaneHistory(laneId: LaneId) {\n const existingLane = await this.loadLane(laneId);\n if (existingLane?.isNew) return;\n await this.importer.importLaneObject(laneId, undefined, true);\n }\n\n async isLaneExistsOnRemote(laneId: LaneId): Promise<boolean> {\n const results = await this.scope.legacyScope.scopeImporter.importLanes([laneId]);\n return results.length > 0;\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 | undefined> {\n const laneId = this.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) return undefined;\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(\n name: string,\n { scope, alias, forkLaneNewScope }: CreateLaneOptions = {}\n ): Promise<CreateLaneResult> {\n if (!this.workspace) {\n const newLane = await createLaneInScope(name, this.scope);\n return {\n lane: newLane,\n laneId: newLane.toLaneId(),\n hash: newLane.hash().toString(),\n };\n }\n if (alias) {\n throwForInvalidLaneName(alias);\n }\n const currentLaneId = this.workspace.getCurrentLaneId();\n const currentLaneScope = currentLaneId.isDefault() ? undefined : currentLaneId.scope;\n if (!forkLaneNewScope && !currentLaneId.isDefault() && scope && currentLaneScope !== scope) {\n throw new BitError(`you're about to create a lane forked from ${currentLaneId.toString()} and assign it to a different scope \"${scope}\".\nif the lane components have a large history, it would be best to stick with the same scope as the current lane.\nto do that, re-run the command without the \"--scope\" flag. it will create the lane and set the scope to \"${currentLaneScope}\"\nif you wish to keep ${scope} scope, please re-run the command with \"--fork-lane-new-scope\" flag.`);\n }\n scope = scope || (currentLaneId.isDefault() ? this.workspace.defaultScope : currentLaneId.scope);\n const laneObj = await createLane(this.workspace, 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('lane-create');\n\n const results = {\n lane: laneObj,\n alias,\n laneId: laneObj.toLaneId(),\n hash: laneObj.hash().toString(),\n };\n return results;\n }\n\n async loadLane(id: LaneId): Promise<Lane | undefined> {\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('lane-track');\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('lane-alias');\n\n return { laneId };\n }\n\n async changeScope(remoteScope: string, laneName?: string): Promise<{ remoteScopeBefore: string; localName: string }> {\n if (!this.workspace) {\n throw new BitError(`unable to change-scope of a lane outside of Bit workspace`);\n }\n let laneId: LaneId;\n let laneNameWithoutScope: string;\n if (laneName) {\n laneNameWithoutScope = laneName.includes(LANE_REMOTE_DELIMITER)\n ? laneName.split(LANE_REMOTE_DELIMITER)[1]\n : laneName;\n laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(laneName);\n } else {\n laneId = this.workspace.getCurrentLaneId();\n laneNameWithoutScope = laneId.name;\n }\n const lane = await this.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${laneName}\"`);\n }\n if (!lane.isNew) {\n throw new BitError(`changing lane scope-name is allowed for new lanes only. this lane has been exported already.\nplease create a new lane instead, which will include all components of this lane`);\n }\n if (!isValidScopeName(remoteScope)) {\n throw new InvalidScopeName(remoteScope);\n }\n const remoteScopeBefore = lane.scope;\n lane.changeScope(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 laneHistoryMsg: `change scope from ${remoteScopeBefore} to ${remoteScope}`,\n });\n this.workspace.consumer.bitMap.setCurrentLane(newLaneId, false);\n await this.workspace.consumer.onDestroy('lane-scope-change');\n\n return { remoteScopeBefore, localName: laneNameWithoutScope };\n }\n\n /**\n * change a lane-name and if possible, export the lane to the remote\n */\n async rename(newName: string, laneName?: string): Promise<{ currentName: string }> {\n if (!this.workspace) {\n throw new BitError(`unable to rename a lane outside of Bit workspace`);\n }\n throwForInvalidLaneName(newName);\n const currentName = laneName || this.workspace.getCurrentLaneId().name;\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 scope.json related data and change the lane object\n await this.scope.legacyScope.lanes.renameLane(lane, newName);\n\n // change current-lane if needed\n const currentLaneId = this.getCurrentLaneId();\n if (currentLaneId?.isEqual(laneId)) {\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 // this writes the changes done on scope.json file (along with .bitmap)\n await this.workspace.consumer.onDestroy('lane-rename');\n\n return { currentName };\n }\n\n async exportLane(lane: Lane) {\n await this.exporter.exportMany({\n scope: this.scope.legacyScope,\n laneObject: lane,\n ids: new ComponentIdList(),\n allVersions: false,\n });\n }\n\n async importLaneObject(laneId: LaneId, persistIfNotExists = true, includeLaneHistory = false): Promise<Lane> {\n return this.importer.importLaneObject(laneId, persistIfNotExists, includeLaneHistory);\n }\n\n async eject(pattern: string): Promise<ComponentID[]> {\n if (!this.workspace) {\n throw new BitError(`unable to eject a component outside of Bit workspace`);\n }\n const deletedComps = await this.remove.deleteComps(pattern);\n const packages = deletedComps.map((c) => c.getPackageName());\n await this.install.install(packages);\n return deletedComps.map((c) => c.id);\n }\n\n /**\n * get the head hash (snap) of main. return undefined if the component exists only on a lane and was never merged to main\n */\n async getHeadOnMain(componentId: ComponentID): Promise<string | undefined> {\n const modelComponent = await this.scope.legacyScope.getModelComponent(componentId);\n return modelComponent.head?.toString();\n }\n\n /**\n * fetch the lane object and its components from the remote.\n * save the objects and the lane to the local scope.\n * this method doesn't change anything in the workspace.\n */\n async fetchLaneWithItsComponents(laneId: LaneId, includeUpdateDependents = false): Promise<Lane> {\n this.logger.debug(`fetching lane ${laneId.toString()}`);\n const lane = await this.importer.importLaneObject(laneId);\n if (!lane) throw new Error(`unable to import lane ${laneId.toString()} from the remote`);\n\n await this.importer.fetchLaneComponents(lane, includeUpdateDependents);\n this.logger.debug(`fetching lane ${laneId.toString()} done, fetched ${lane.components.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('lane-remove');\n\n return results.laneResults;\n }\n\n /**\n * when deleting a lane object, it is sent into the \"trash\" directory in the scope.\n * this method restores it and put it back in the \"objects\" directory.\n * as an argument, it needs a hash. the reason for not supporting lane-id is because the trash may have multiple\n * lanes with the same lane-id but different hashes.\n */\n async restoreLane(laneHash: string) {\n const ref = Ref.from(laneHash);\n const objectsFromTrash = (await this.scope.legacyScope.objects.getFromTrash([ref])) as Lane[];\n const laneIdFromTrash = objectsFromTrash[0].toLaneId();\n const existingWithSameId = await this.loadLane(laneIdFromTrash);\n if (existingWithSameId) {\n if (existingWithSameId.hash().isEqual(ref)) {\n throw new BitError(`unable to restore lane ${laneIdFromTrash.toString()}, as it already exists`);\n }\n throw new BitError(\n `unable to restore lane ${laneIdFromTrash.toString()}, as a lane with the same id already exists`\n );\n }\n await this.scope.legacyScope.objects.restoreFromTrash([ref]);\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 {\n alias,\n merge,\n forceOurs,\n forceTheirs,\n pattern,\n workspaceOnly,\n skipDependencyInstallation = false,\n head,\n }: SwitchLaneOptions\n ) {\n if (!this.workspace) {\n throw new BitError(`unable to switch lanes outside of Bit workspace`);\n }\n this.workspace.inInstallContext = true;\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: workspaceOnly,\n pattern,\n alias,\n head,\n };\n const checkoutProps = {\n mergeStrategy,\n forceOurs,\n forceTheirs,\n skipNpmInstall: skipDependencyInstallation,\n isLane: true,\n promptMergeOptions: 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, this.componentCompare);\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 return filteredComponentIds.map((laneComponent) => laneComponent.id.changeVersion(laneComponent.head));\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 = laneReadmeComponent.id.changeVersion(laneReadmeComponent.head);\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 = 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, { laneHistoryMsg: 'remove readme' });\n await this.workspace.bitMap.write(`lane-remove-readme`);\n\n return { result: true };\n }\n\n async diffStatus(\n sourceLaneId: LaneId,\n targetLaneId?: LaneId,\n options?: LaneDiffStatusOptions\n ): Promise<LaneDiffStatus> {\n this.logger.profile(`diff status for source lane: ${sourceLaneId.name} and target lane: ${targetLaneId?.name}`);\n\n const sourceLane = sourceLaneId.isDefault()\n ? await this.getLaneDataOfDefaultLane()\n : await this.loadLane(sourceLaneId);\n\n const sourceLaneComponents = sourceLaneId.isDefault()\n ? sourceLane?.components.map((main) => ({ id: main.id, head: Ref.from(main.head) }))\n : sourceLane?.components;\n\n const targetLane = targetLaneId ? await this.loadLane(targetLaneId) : undefined;\n const targetLaneIds = targetLane?.toBitIds();\n const host = this.componentAspect.getHost();\n\n const targetMainHeads =\n !targetLaneId || targetLaneId?.isDefault()\n ? compact(\n await Promise.all(\n (sourceLaneComponents || []).map(async ({ id }) => {\n const componentId = await host.resolveComponentId(id);\n const headOnMain = await this.getHeadOnMain(componentId);\n return headOnMain ? id.changeVersion(headOnMain) : undefined;\n })\n )\n )\n : [];\n\n await this.importer.importObjectsFromMainIfExist(targetMainHeads, { cache: true });\n\n const diffProps = compact(\n await Promise.all(\n (sourceLaneComponents || []).map(async ({ id, head }) => {\n const componentId = await host.resolveComponentId(id);\n const sourceVersionObj = (await this.scope.legacyScope.objects.load(head, true)) as Version;\n\n if (sourceVersionObj.isRemoved()) {\n return null;\n }\n\n const headOnTargetLane = targetLaneIds\n ? targetLaneIds.searchWithoutVersion(id)?.version\n : await this.getHeadOnMain(componentId);\n\n if (headOnTargetLane) {\n const targetVersionObj = (await this.scope.legacyScope.objects.load(\n Ref.from(headOnTargetLane),\n true\n )) as Version;\n\n if (targetVersionObj.isRemoved()) {\n return null;\n }\n }\n\n const sourceHead = head.toString();\n const targetHead = headOnTargetLane;\n\n return { componentId, sourceHead, targetHead };\n })\n )\n );\n\n const snapDistancesByComponentId = new Map<\n string,\n {\n snapsDistance: SnapsDistance;\n sourceHead: string;\n targetHead?: string;\n componentId: ComponentID;\n }\n >();\n\n this.logger.profile(\n `get snaps distance for source lane: ${sourceLane?.id.name} and target lane: ${targetLane?.id.name} with ${diffProps.length} components`\n );\n await pMap(\n diffProps,\n async ({ componentId, sourceHead, targetHead }) => {\n const snapsDistance = await this.scope.getSnapsDistanceBetweenTwoSnaps(\n componentId,\n sourceHead,\n targetHead,\n false\n );\n if (snapsDistance) {\n snapDistancesByComponentId.set(componentId.toString(), {\n snapsDistance,\n sourceHead,\n targetHead,\n componentId,\n });\n }\n },\n {\n concurrency: concurrentComponentsLimit(),\n }\n );\n this.logger.profile(\n `get snaps distance for source lane: ${sourceLane?.id.name} and target lane: ${targetLane?.id.name} with ${diffProps.length} components`\n );\n\n const commonSnapsToImport = compact(\n [...snapDistancesByComponentId.values()].map((s) =>\n s.snapsDistance.commonSnapBeforeDiverge\n ? s.componentId.changeVersion(s.snapsDistance.commonSnapBeforeDiverge.hash)\n : null\n )\n );\n\n const sourceOrTargetLane =\n ((sourceLaneId.isDefault() ? null : (sourceLane as Lane)) ||\n (targetLaneId?.isDefault() ? null : (targetLane as Lane))) ??\n undefined;\n\n if (commonSnapsToImport.length > 0 && !options?.skipChanges) {\n await this.scope.legacyScope.scopeImporter.importWithoutDeps(ComponentIdList.fromArray(commonSnapsToImport), {\n cache: true,\n reason: `get the common snap for lane diff`,\n lane: sourceOrTargetLane,\n });\n }\n\n const results = await pMapSeries(diffProps, async ({ componentId, sourceHead, targetHead }) =>\n this.componentDiffStatus(\n componentId,\n sourceHead,\n targetHead,\n snapDistancesByComponentId.get(componentId.toString())?.snapsDistance,\n options\n )\n );\n\n this.logger.profile(`diff status for source lane: ${sourceLaneId.name} and target lane: ${targetLaneId?.name}`);\n\n return {\n source: sourceLaneId,\n target: targetLaneId || this.getDefaultLaneId(),\n componentsStatus: results,\n };\n }\n\n private async componentDiffStatus(\n componentId: ComponentID,\n sourceHead: string,\n targetHead?: string,\n snapsDistance?: SnapsDistance,\n options?: LaneDiffStatusOptions\n ): Promise<LaneComponentDiffStatus> {\n if (snapsDistance?.err) {\n const noCommonSnap = snapsDistance.err instanceof NoCommonSnap;\n\n return {\n componentId,\n sourceHead,\n targetHead,\n upToDate: snapsDistance?.isUpToDate(),\n unrelated: noCommonSnap || undefined,\n changes: [],\n };\n }\n\n const commonSnap = snapsDistance?.commonSnapBeforeDiverge;\n\n const getChanges = async (): Promise<ChangeType[]> => {\n if (!commonSnap) return [ChangeType.NEW];\n\n // import common snap before we compare\n const compare = await this.componentCompare.compare(\n componentId.changeVersion(commonSnap.hash).toString(),\n componentId.changeVersion(sourceHead).toString()\n );\n\n if (!compare.fields.length && (!compare.code.length || !compare.code.some((c) => c.status !== 'UNCHANGED'))) {\n return [ChangeType.NONE];\n }\n\n const changed: ChangeType[] = [];\n\n if (compare.code.some((f) => f.status !== 'UNCHANGED')) {\n changed.push(ChangeType.SOURCE_CODE);\n }\n\n if (compare.fields.length > 0) {\n changed.push(ChangeType.ASPECTS);\n }\n\n const depsFields = ['dependencies', 'devDependencies', 'extensionDependencies'];\n if (compare.fields.some((field) => depsFields.includes(field.fieldName))) {\n changed.push(ChangeType.DEPENDENCY);\n }\n\n return changed;\n };\n\n const changes = !options?.skipChanges ? await getChanges() : undefined;\n const changeType = changes ? changes[0] : undefined;\n\n return {\n componentId,\n changeType,\n changes,\n sourceHead,\n targetHead: commonSnap?.hash,\n upToDate: snapsDistance?.isUpToDate(),\n snapsDistance: {\n onSource: snapsDistance?.snapsOnSourceOnly.map((s) => s.hash) ?? [],\n onTarget: snapsDistance?.snapsOnTargetOnly.map((s) => s.hash) ?? [],\n common: snapsDistance?.commonSnapBeforeDiverge?.hash,\n },\n };\n }\n\n async componentDiffStatusOld(\n componentId: ComponentID,\n sourceHead: string,\n targetHead?: string,\n options?: LaneDiffStatusOptions\n ): Promise<LaneComponentDiffStatus> {\n const snapsDistance = await this.scope.getSnapsDistanceBetweenTwoSnaps(componentId, sourceHead, targetHead, false);\n\n if (snapsDistance?.err) {\n const noCommonSnap = snapsDistance.err instanceof NoCommonSnap;\n\n return {\n componentId,\n sourceHead,\n targetHead,\n upToDate: snapsDistance?.isUpToDate(),\n unrelated: noCommonSnap || undefined,\n changes: [],\n };\n }\n\n const commonSnap = snapsDistance?.commonSnapBeforeDiverge;\n\n const getChanges = async (): Promise<ChangeType[]> => {\n if (!commonSnap) return [ChangeType.NEW];\n\n const compare = await this.componentCompare.compare(\n componentId.changeVersion(commonSnap.hash).toString(),\n componentId.changeVersion(sourceHead).toString()\n );\n\n if (!compare.fields.length && (!compare.code.length || !compare.code.some((c) => c.status !== 'UNCHANGED'))) {\n return [ChangeType.NONE];\n }\n\n const changed: ChangeType[] = [];\n\n if (compare.code.some((f) => f.status !== 'UNCHANGED')) {\n changed.push(ChangeType.SOURCE_CODE);\n }\n\n if (compare.fields.length > 0) {\n changed.push(ChangeType.ASPECTS);\n }\n\n const depsFields = ['dependencies', 'devDependencies', 'extensionDependencies'];\n if (compare.fields.some((field) => depsFields.includes(field.fieldName))) {\n changed.push(ChangeType.DEPENDENCY);\n }\n\n return changed;\n };\n\n const changes = !options?.skipChanges ? await getChanges() : undefined;\n const changeType = changes ? changes[0] : undefined;\n\n return {\n componentId,\n changeType,\n changes,\n sourceHead,\n targetHead: commonSnap?.hash,\n upToDate: snapsDistance?.isUpToDate(),\n snapsDistance: {\n onSource: snapsDistance?.snapsOnSourceOnly.map((s) => s.hash) ?? [],\n onTarget: snapsDistance?.snapsOnTargetOnly.map((s) => s.hash) ?? [],\n common: snapsDistance?.commonSnapBeforeDiverge?.hash,\n },\n };\n }\n\n private async recreateNewLaneIfDeleted() {\n if (!this.workspace) return;\n const laneId = this.getCurrentLaneId();\n if (!laneId || laneId.isDefault() || this.workspace.consumer.bitMap.isLaneExported) {\n return;\n }\n const laneObj = await this.scope.legacyScope.getCurrentLaneObject();\n if (laneObj) {\n return;\n }\n await this.createLane(laneId.name, { scope: laneId.scope });\n }\n\n /**\n * if the local lane was forked from another lane, this gets the differences between the two.\n * it also fetches the original lane from the remote to make sure the data is up to date.\n */\n async listUpdatesFromForked(componentsList: ComponentsList): Promise<DivergeDataPerId[]> {\n const consumer = this.workspace?.consumer;\n if (!consumer) throw new Error(`unable to get listUpdatesFromForked outside of a workspace`);\n if (consumer.isOnMain()) {\n return [];\n }\n const lane = await consumer.getCurrentLaneObject();\n const forkedFromLaneId = lane?.forkedFrom;\n if (!forkedFromLaneId) {\n return [];\n }\n const forkedFromLane = await consumer.scope.loadLane(forkedFromLaneId);\n if (!forkedFromLane) return []; // should we fetch it here?\n\n const workspaceIds = consumer.bitMap.getAllBitIds();\n\n const duringMergeIds = componentsList.listDuringMergeStateComponents();\n\n const componentsFromModel = await componentsList.getModelComponents();\n const compFromModelOnWorkspace = componentsFromModel\n .filter((c) => workspaceIds.hasWithoutVersion(c.toComponentId()))\n // if a component is merge-pending, it needs to be resolved first before getting more updates from main\n .filter((c) => !duringMergeIds.hasWithoutVersion(c.toComponentId()));\n\n // by default, when on a lane, forked is not fetched. we need to fetch it to get the latest updates.\n await this.fetchLaneWithItsComponents(forkedFromLaneId);\n\n const remoteForkedLane = await consumer.scope.objects.remoteLanes.getRemoteLane(forkedFromLaneId);\n if (!remoteForkedLane.length) return [];\n\n const results = await Promise.all(\n compFromModelOnWorkspace.map(async (modelComponent) => {\n const headOnForked = remoteForkedLane.find((c) => c.id.isEqualWithoutVersion(modelComponent.toComponentId()));\n const headOnLane = modelComponent.laneHeadLocal;\n if (!headOnForked || !headOnLane) return undefined;\n const divergeData = await getDivergeData({\n repo: consumer.scope.objects,\n modelComponent,\n targetHead: headOnForked.head,\n sourceHead: headOnLane,\n throws: false,\n });\n if (!divergeData.snapsOnTargetOnly.length && !divergeData.err) return undefined;\n return { id: modelComponent.toComponentId(), divergeData };\n })\n );\n\n return compact(results);\n }\n\n /**\n * list components on a lane that their main got updates.\n */\n async listUpdatesFromMainPending(componentsList: ComponentsList): Promise<DivergeDataPerId[]> {\n const consumer = this.workspace?.consumer;\n if (!consumer) throw new Error(`unable to get listUpdatesFromForked outside of a workspace`);\n if (consumer.isOnMain()) {\n return [];\n }\n const allIds = consumer.bitMap.getAllBitIds();\n\n const duringMergeIds = componentsList.listDuringMergeStateComponents();\n\n const componentsFromModel = await componentsList.getModelComponents();\n const compFromModelOnWorkspace = componentsFromModel\n .filter((c) => allIds.hasWithoutVersion(c.toComponentId()))\n // if a component is merge-pending, it needs to be resolved first before getting more updates from main\n .filter((c) => !duringMergeIds.hasWithoutVersion(c.toComponentId()));\n\n // by default, when on a lane, main is not fetched. we need to fetch it to get the latest updates.\n await consumer.scope.scopeImporter.importWithoutDeps(\n ComponentIdList.fromArray(compFromModelOnWorkspace.map((c) => c.toComponentId())),\n {\n cache: false,\n includeVersionHistory: true,\n ignoreMissingHead: true,\n reason: 'main components of the current lane to check for updates',\n }\n );\n const results = await Promise.all(\n compFromModelOnWorkspace.map(async (modelComponent) => {\n const headOnMain = modelComponent.head;\n if (!headOnMain) return undefined;\n const checkedOutVersion = allIds.searchWithoutVersion(modelComponent.toComponentId())?.version;\n if (!checkedOutVersion) {\n throw new Error(\n `listUpdatesFromMainPending: unable to find ${modelComponent.toComponentId()} in the workspace`\n );\n }\n const headOnLane = modelComponent.getRef(checkedOutVersion);\n\n const divergeData = await getDivergeData({\n repo: consumer.scope.objects,\n modelComponent,\n targetHead: headOnMain,\n sourceHead: headOnLane,\n throws: false,\n });\n if (!divergeData.snapsOnTargetOnly.length && !divergeData.err) return undefined;\n return { id: modelComponent.toComponentId(), divergeData };\n })\n );\n\n return compact(results);\n }\n\n /**\n * default to remove all of them.\n * returns true if the lane has changed\n */\n async removeUpdateDependents(laneId: LaneId, ids?: ComponentID[]): Promise<boolean> {\n const lane = await this.loadLane(laneId);\n if (!lane) throw new BitError(`unable to find a lane ${laneId.toString()}`);\n if (ids?.length) {\n ids.forEach((id) => lane.removeComponentFromUpdateDependentsIfExist(id));\n } else {\n lane.removeAllUpdateDependents();\n }\n if (lane.hasChanged) {\n await this.scope.legacyScope.lanes.saveLane(lane, { laneHistoryMsg: 'remove update-dependents' });\n return true;\n }\n return false;\n }\n\n private async getLaneDataOfDefaultLane(): Promise<LaneData | null> {\n const consumer = this.workspace?.consumer;\n let bitIds: ComponentID[] = [];\n if (!consumer) {\n const scopeComponents = await this.scope.list();\n bitIds = scopeComponents.filter((component) => component.head).map((component) => component.id);\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 get createRoutePath() {\n return '/lanes/create';\n }\n\n get deleteRoutePath() {\n return '/lanes/delete';\n }\n\n get restoreRoutePath() {\n return '/lanes/restore';\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n ScopeAspect,\n WorkspaceAspect,\n GraphqlAspect,\n MergingAspect,\n ComponentAspect,\n LoggerAspect,\n ImporterAspect,\n ExportAspect,\n ExpressAspect,\n ComponentCompareAspect,\n ComponentWriterAspect,\n RemoveAspect,\n CheckoutAspect,\n InstallAspect,\n ];\n static runtime = MainRuntime;\n static async provider([\n cli,\n scope,\n workspace,\n graphql,\n merging,\n component,\n loggerMain,\n importer,\n exporter,\n express,\n componentCompare,\n componentWriter,\n remove,\n checkout,\n install,\n ]: [\n CLIMain,\n ScopeMain,\n Workspace,\n GraphqlMain,\n MergingMain,\n ComponentMain,\n LoggerMain,\n ImporterMain,\n ExportMain,\n ExpressMain,\n ComponentCompareMain,\n ComponentWriterMain,\n RemoveMain,\n CheckoutMain,\n InstallMain,\n ]) {\n const logger = loggerMain.createLogger(LanesAspect.id);\n const lanesMain = new LanesMain(\n workspace,\n scope,\n merging,\n component,\n logger,\n importer,\n exporter,\n componentCompare,\n componentWriter,\n remove,\n checkout,\n install\n );\n const switchCmd = new SwitchCmd(lanesMain);\n const fetchCmd = new FetchCmd(importer);\n const laneCmd = new LaneCmd(lanesMain, workspace, scope);\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, componentCompare),\n new LaneRemoveReadmeCmd(lanesMain),\n new LaneImportCmd(switchCmd),\n new LaneRemoveCompCmd(workspace, lanesMain),\n new LaneFetchCmd(fetchCmd, lanesMain),\n new LaneEjectCmd(lanesMain),\n ];\n laneCmd.commands.push(new LaneHistoryCmd(lanesMain));\n laneCmd.commands.push(new LaneHistoryDiffCmd(lanesMain, workspace, scope, componentCompare));\n laneCmd.commands.push(new LaneCheckoutCmd(lanesMain));\n laneCmd.commands.push(new LaneRevertCmd(lanesMain));\n cli.register(laneCmd, switchCmd, new CatLaneHistoryCmd(lanesMain));\n cli.registerOnStart(async () => {\n await lanesMain.recreateNewLaneIfDeleted();\n });\n graphql.register(lanesSchema(lanesMain));\n express.register([\n new LanesCreateRoute(lanesMain, logger),\n new LanesDeleteRoute(lanesMain, logger),\n new LanesRestoreRoute(lanesMain, logger),\n ]);\n return lanesMain;\n }\n}\n\nLanesAspect.addRuntime(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,CAACpB,OAAO,EAAEJ,SAAS,EAAE,KAAIyB,yBAAiB,EAAC1B,SAAS,CAAC,CAAC;IAClEL,GAAG,CAACgC,eAAe,CAAC,YAAY;MAC9B,MAAM3B,SAAS,CAACrD,wBAAwB,CAAC,CAAC;IAC5C,CAAC,CAAC;IACFiD,OAAO,CAAC6B,QAAQ,CAAC,IAAAG,qBAAW,EAAC5B,SAAS,CAAC,CAAC;IACxCF,OAAO,CAAC2B,QAAQ,CAAC,CACf,KAAII,+BAAgB,EAAC7B,SAAS,EAAExW,MAAM,CAAC,EACvC,KAAIsY,+BAAgB,EAAC9B,SAAS,EAAExW,MAAM,CAAC,EACvC,KAAIuY,iCAAiB,EAAC/B,SAAS,EAAExW,MAAM,CAAC,CACzC,CAAC;IACF,OAAOwW,SAAS;EAClB;AACF;AAACgC,OAAA,CAAA9Y,SAAA,GAAAA,SAAA;AAAAhB,eAAA,CAjnCYgB,SAAS,WA2gCL,EAAE;AAAAhB,eAAA,CA3gCNgB,SAAS,kBA4gCE,CACpB+Y,gBAAS,EACTC,oBAAW,EACXC,4BAAe,EACfC,wBAAa,EACbC,wBAAa,EACbC,4BAAe,EACfC,sBAAY,EACZC,0BAAc,EACdC,sBAAY,EACZC,wBAAa,EACbC,0CAAsB,EACtBC,wCAAqB,EACrBC,sBAAY,EACZC,0BAAc,EACdC,wBAAa,CACd;AAAA7a,eAAA,CA5hCUgB,SAAS,aA6hCH8Z,kBAAW;AAsF9B3L,oBAAW,CAAC4L,UAAU,CAAC/Z,SAAS,CAAC;AAAC,IAAAga,QAAA,GAAAlB,OAAA,CAAA/a,OAAA,GAEnBiC,SAAS","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_cli","data","require","_pMapSeries","_interopRequireDefault","_pMap","_scope","_graphql","_express","_workspace","_scope2","_lanesModules","_legacy","_laneId","_bitError","_logger","_merging","_importer","_componentId","_legacyBitId","_component","_objects","_component2","_export","_lodash","_componentCompare","_componentWriter","_remove","_checkout","_lanesEntities","_harmonyModules","_removeLanes","_lanes","_lane","_lanes2","_switch","_switchLanes","_lanesModules2","_lanesCreate","_lanesDelete","_lanesRestore","_install","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LanesMain","constructor","workspace","scope","merging","componentAspect","logger","importer","exporter","componentCompare","componentWriter","remove","checkout","install","getLanes","name","remote","merged","showDefaultLane","notMerged","showMergeData","Boolean","consumer","Error","laneId","LaneId","from","undefined","remoteObj","getRemoteByName","lanes","listLanes","toString","DEFAULT_LANE","defaultLane","getLaneDataOfDefaultLane","legacyScope","getLanesData","parseLaneId","idStr","parseLaneIdFromString","getLaneHistory","lane","loadLane","BitError","laneHistory","getOrCreateLaneHistory","checkoutHistory","historyId","options","historyItem","getHistoryItemOfCurrentLane","ids","components","map","id","ComponentID","fromString","getCurrentLane","results","changeVersion","versionPerId","allowAddingComponentsFromScope","skipNpmInstall","skipDependencyInstallation","revertHistory","revert","getCurrentLaneId","isDefault","importLaneHistory","history","getHistory","existingLane","isNew","importLaneObject","isLaneExistsOnRemote","scopeImporter","importLanes","getCurrentLaneName","getCurrentLaneNameOrAlias","currentLaneId","trackingData","getLocalTrackedLaneByRemoteName","getDefaultLaneId","setCurrentLane","alias","exported","createLane","forkLaneNewScope","newLane","createLaneInScope","toLaneId","hash","throwForInvalidLaneName","currentLaneScope","defaultScope","laneObj","trackLaneData","localLane","remoteLane","remoteScope","trackLane","scopeJson","setLaneAsNew","onDestroy","localName","remoteName","beforeTrackData","getRemoteTrackedDataByLocalLane","beforeTrackDataCloned","afterTrackData","aliasLane","laneName","includes","LANE_REMOTE_DELIMITER","trackData","laneNameWithoutScope","split","removeTrackLane","changeScope","isValidScopeName","InvalidScopeName","remoteScopeBefore","newLaneId","saveLane","laneHistoryMsg","bitMap","rename","newName","currentName","existingAliasWithNewName","remoteIdStr","objects","remoteLanes","renameRefByNewLaneName","renameLane","isEqual","isExported","isLaneExported","exportLane","exportMany","laneObject","ComponentIdList","allVersions","persistIfNotExists","includeLaneHistory","eject","pattern","deletedComps","deleteComps","packages","c","getPackageName","getHeadOnMain","componentId","modelComponent","getModelComponent","head","fetchLaneWithItsComponents","includeUpdateDependents","debug","fetchLaneComponents","removeLanes","laneNames","opts","force","laneResults","restoreLane","laneHash","ref","Ref","objectsFromTrash","getFromTrash","laneIdFromTrash","existingWithSameId","restoreFromTrash","switchLanes","merge","forceOurs","forceTheirs","workspaceOnly","inInstallContext","mergeStrategy","mergeOptions","MergeOptions","join","switchProps","existingOnWorkspaceOnly","checkoutProps","isLane","promptMergeOptions","reset","all","LaneSwitcher","switch","getDiff","values","diffOptions","laneDiffGenerator","LaneDiffGenerator","generate","getLaneComponentModels","host","getHost","laneComponentIds","getLaneComponentIds","getMany","laneComponents","bitIdsFromBitmap","getAllBitIdsFromAllLanes","filteredComponentIds","laneComponent","some","bitmapComponentId","isEqualWithoutVersion","getLaneReadmeComponent","laneReadmeComponent","readmeComponent","laneReadmeComponentId","get","removeLaneReadme","currentLaneName","result","message","readmeComponentId","existingLaneConfig","getSpecificComponentConfig","LanesAspect","remoteLaneIdStr","readme","removeSpecificComponentConfig","addSpecificComponentConfig","setReadmeComponent","write","diffStatus","sourceLaneId","targetLaneId","profile","sourceLane","sourceLaneComponents","main","targetLane","targetLaneIds","toBitIds","targetMainHeads","compact","Promise","resolveComponentId","headOnMain","importObjectsFromMainIfExist","cache","diffProps","sourceVersionObj","load","isRemoved","headOnTargetLane","searchWithoutVersion","version","targetVersionObj","sourceHead","targetHead","snapDistancesByComponentId","Map","pMap","snapsDistance","getSnapsDistanceBetweenTwoSnaps","set","concurrency","concurrentComponentsLimit","commonSnapsToImport","s","commonSnapBeforeDiverge","sourceOrTargetLane","skipChanges","importWithoutDeps","fromArray","reason","pMapSeries","componentDiffStatus","source","target","componentsStatus","err","noCommonSnap","NoCommonSnap","upToDate","isUpToDate","unrelated","changes","commonSnap","getChanges","ChangeType","NEW","compare","fields","code","status","NONE","changed","f","SOURCE_CODE","ASPECTS","depsFields","field","fieldName","DEPENDENCY","changeType","onSource","snapsOnSourceOnly","onTarget","snapsOnTargetOnly","common","componentDiffStatusOld","recreateNewLaneIfDeleted","getCurrentLaneObject","listUpdatesFromForked","componentsList","isOnMain","forkedFromLaneId","forkedFrom","forkedFromLane","workspaceIds","getAllBitIds","duringMergeIds","listDuringMergeStateComponents","componentsFromModel","getModelComponents","compFromModelOnWorkspace","hasWithoutVersion","toComponentId","remoteForkedLane","getRemoteLane","headOnForked","find","headOnLane","laneHeadLocal","divergeData","getDivergeData","repo","throws","listUpdatesFromMainPending","allIds","includeVersionHistory","ignoreMissingHead","checkedOutVersion","getRef","removeUpdateDependents","removeComponentFromUpdateDependentsIfExist","removeAllUpdateDependents","hasChanged","bitIds","scopeComponents","list","component","getIdsOfDefaultLane","bitId","isMerged","createRoutePath","deleteRoutePath","restoreRoutePath","provider","cli","graphql","loggerMain","express","createLogger","lanesMain","switchCmd","SwitchCmd","fetchCmd","FetchCmd","laneCmd","LaneCmd","commands","LaneListCmd","LaneShowCmd","LaneCreateCmd","LaneRemoveCmd","LaneChangeScopeCmd","LaneAliasCmd","LaneRenameCmd","LaneDiffCmd","LaneRemoveReadmeCmd","LaneImportCmd","LaneRemoveCompCmd","LaneFetchCmd","LaneEjectCmd","LaneHistoryCmd","LaneHistoryDiffCmd","LaneCheckoutCmd","LaneRevertCmd","register","CatLaneHistoryCmd","registerOnStart","lanesSchema","LanesCreateRoute","LanesDeleteRoute","LanesRestoreRoute","exports","CLIAspect","ScopeAspect","WorkspaceAspect","GraphqlAspect","MergingAspect","ComponentAspect","LoggerAspect","ImporterAspect","ExportAspect","ExpressAspect","ComponentCompareAspect","ComponentWriterAspect","RemoveAspect","CheckoutAspect","InstallAspect","MainRuntime","addRuntime","_default"],"sources":["lanes.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport pMapSeries from 'p-map-series';\nimport pMap from 'p-map';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { ExpressAspect, ExpressMain } from '@teambit/express';\nimport { Workspace, WorkspaceAspect } from '@teambit/workspace';\nimport { getRemoteByName } from '@teambit/scope.remotes';\nimport { LaneDiffCmd, LaneDiffGenerator, LaneDiffResults, LaneHistoryDiffCmd } from '@teambit/lanes.modules.diff';\nimport { NoCommonSnap, Scope as LegacyScope, TrackLane, LaneData } from '@teambit/legacy.scope';\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.component-diff';\nimport { MergeStrategy, MergeOptions, MergingMain, MergingAspect } from '@teambit/merging';\nimport { FetchCmd, ImporterAspect, ImporterMain } from '@teambit/importer';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport { InvalidScopeName, isValidScopeName } from '@teambit/legacy-bit-id';\nimport { ComponentAspect, Component, ComponentMain } from '@teambit/component';\nimport { Ref, HistoryItem, Lane, LaneHistory, Version } from '@teambit/objects';\nimport { SnapsDistance, getDivergeData } from '@teambit/component.snap-distance';\nimport { ExportAspect, ExportMain } from '@teambit/export';\nimport { compact } from 'lodash';\nimport { ComponentCompareMain, ComponentCompareAspect } from '@teambit/component-compare';\nimport { ComponentWriterAspect, ComponentWriterMain } from '@teambit/component-writer';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport { CheckoutAspect, CheckoutMain } from '@teambit/checkout';\nimport { ChangeType } from '@teambit/lanes.entities.lane-diff';\nimport { ComponentsList } from '@teambit/legacy.component-list';\nimport { concurrentComponentsLimit } from '@teambit/harmony.modules.concurrency';\nimport { removeLanes } from './remove-lanes';\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 LaneRemoveReadmeCmd,\n LaneRemoveCompCmd,\n CatLaneHistoryCmd,\n LaneHistoryCmd,\n LaneCheckoutCmd,\n LaneCheckoutOpts,\n LaneRevertCmd,\n LaneFetchCmd,\n LaneEjectCmd,\n} from './lane.cmd';\nimport { lanesSchema } from './lanes.graphql';\nimport { SwitchCmd } from './switch.cmd';\nimport { LaneSwitcher } from './switch-lanes';\nimport { createLane, createLaneInScope, throwForInvalidLaneName } from '@teambit/lanes.modules.create-lane';\nimport { LanesCreateRoute } from './lanes.create.route';\nimport { LanesDeleteRoute } from './lanes.delete.route';\nimport { LanesRestoreRoute } from './lanes.restore.route';\nimport { InstallAspect, InstallMain } from '@teambit/install';\n\nexport { Lane };\n\nexport type SnapsDistanceObj = {\n onSource: string[];\n onTarget: string[];\n common?: string;\n};\n\nexport type LaneResults = {\n lanes: LaneData[];\n currentLane?: string | null;\n};\n\nexport type CreateLaneOptions = {\n scope?: string; // default to the defaultScope in workspace.jsonc\n alias?: string; // default to the remote name\n forkLaneNewScope?: boolean;\n};\n\nexport type SwitchLaneOptions = {\n head?: boolean;\n alias?: string;\n merge?: MergeStrategy;\n forceOurs?: boolean;\n forceTheirs?: boolean;\n workspaceOnly?: boolean;\n pattern?: string;\n skipDependencyInstallation?: boolean;\n verbose?: boolean;\n override?: boolean;\n};\n\nexport type LaneComponentDiffStatus = {\n componentId: ComponentID;\n sourceHead: string;\n targetHead?: string;\n /**\n * @deprecated\n * use changes to get list of all the changes\n */\n changeType?: ChangeType;\n changes?: ChangeType[];\n upToDate?: boolean;\n snapsDistance?: SnapsDistanceObj;\n unrelated?: boolean;\n};\n\nexport type LaneDiffStatusOptions = {\n skipChanges?: boolean;\n};\n\nexport type DivergeDataPerId = { id: ComponentID; divergeData: SnapsDistance };\n\nexport type LaneDiffStatus = {\n source: LaneId;\n target: LaneId;\n componentsStatus: LaneComponentDiffStatus[];\n};\n\nexport type MarkRemoveOnLaneResult = { removedFromWs: ComponentID[]; markedRemoved: ComponentID[] };\n\nexport type CreateLaneResult = {\n lane: Lane;\n laneId: LaneId;\n hash: string;\n alias?: string;\n};\n\nexport class LanesMain {\n constructor(\n readonly workspace: Workspace | undefined,\n private scope: ScopeMain,\n private merging: MergingMain,\n private componentAspect: ComponentMain,\n public logger: Logger,\n readonly importer: ImporterMain,\n private exporter: ExportMain,\n private componentCompare: ComponentCompareMain,\n readonly componentWriter: ComponentWriterMain,\n private remove: RemoveMain,\n readonly checkout: CheckoutMain,\n private install: InstallMain\n ) {}\n\n /**\n * return the lane data without the deleted components.\n * the deleted components are filtered out in legacyScope.lanes.getLanesData()\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 (!this.scope) throw new Error(`error: please run the command from a workspace or a scope directory`);\n if (remote) {\n const laneId = name ? LaneId.from(name, remote) : undefined;\n const remoteObj = await getRemoteByName(remote, consumer);\n const lanes = await remoteObj.listLanes(laneId?.toString(), showMergeData);\n // if the remote is http, it eventually calls this method from the remote without the \"remote\" param.\n // again, the deleted components are filtered out.\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 async parseLaneId(idStr: string): Promise<LaneId> {\n const scope: LegacyScope = this.scope.legacyScope;\n return scope.lanes.parseLaneIdFromString(idStr);\n }\n\n async getLaneHistory(laneId: LaneId): Promise<LaneHistory> {\n const lane = await this.loadLane(laneId);\n if (!lane) throw new BitError(`unable to find a lane \"${laneId.toString()}\"`);\n const laneHistory = await this.scope.legacyScope.lanes.getOrCreateLaneHistory(lane);\n return laneHistory;\n }\n\n async checkoutHistory(historyId: string, options?: LaneCheckoutOpts) {\n const historyItem = await this.getHistoryItemOfCurrentLane(historyId);\n const ids = historyItem.components.map((id) => ComponentID.fromString(id));\n const lane = await this.getCurrentLane();\n const results = await this.checkout.checkout({\n ids: ids.map((id) => id.changeVersion(undefined)),\n versionPerId: ids,\n allowAddingComponentsFromScope: true,\n skipNpmInstall: options?.skipDependencyInstallation,\n lane,\n });\n return results;\n }\n\n async revertHistory(historyId: string, options?: LaneCheckoutOpts) {\n const historyItem = await this.getHistoryItemOfCurrentLane(historyId);\n const ids = historyItem.components.map((id) => ComponentID.fromString(id));\n const results = await this.checkout.checkout({\n ids: ids.map((id) => id.changeVersion(undefined)),\n versionPerId: ids,\n allowAddingComponentsFromScope: true,\n revert: true,\n skipNpmInstall: options?.skipDependencyInstallation,\n });\n return results;\n }\n\n private async getHistoryItemOfCurrentLane(historyId: string): Promise<HistoryItem> {\n const laneId = this.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) {\n throw new BitError(`unable to checkout history \"${historyId}\" while on main`);\n }\n await this.importLaneHistory(laneId);\n const laneHistory = await this.getLaneHistory(laneId);\n const history = laneHistory.getHistory();\n const historyItem = history[historyId];\n if (!historyItem) {\n throw new BitError(`unable to find history \"${historyId}\" in lane \"${laneId.toString()}\"`);\n }\n return historyItem;\n }\n\n async importLaneHistory(laneId: LaneId) {\n const existingLane = await this.loadLane(laneId);\n if (existingLane?.isNew) return;\n await this.importer.importLaneObject(laneId, undefined, true);\n }\n\n async isLaneExistsOnRemote(laneId: LaneId): Promise<boolean> {\n const results = await this.scope.legacyScope.scopeImporter.importLanes([laneId]);\n return results.length > 0;\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 | undefined> {\n const laneId = this.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) return undefined;\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(\n name: string,\n { scope, alias, forkLaneNewScope }: CreateLaneOptions = {}\n ): Promise<CreateLaneResult> {\n if (!this.workspace) {\n const newLane = await createLaneInScope(name, this.scope);\n return {\n lane: newLane,\n laneId: newLane.toLaneId(),\n hash: newLane.hash().toString(),\n };\n }\n if (alias) {\n throwForInvalidLaneName(alias);\n }\n const currentLaneId = this.workspace.getCurrentLaneId();\n const currentLaneScope = currentLaneId.isDefault() ? undefined : currentLaneId.scope;\n if (!forkLaneNewScope && !currentLaneId.isDefault() && scope && currentLaneScope !== scope) {\n throw new BitError(`you're about to create a lane forked from ${currentLaneId.toString()} and assign it to a different scope \"${scope}\".\nif the lane components have a large history, it would be best to stick with the same scope as the current lane.\nto do that, re-run the command without the \"--scope\" flag. it will create the lane and set the scope to \"${currentLaneScope}\"\nif you wish to keep ${scope} scope, please re-run the command with \"--fork-lane-new-scope\" flag.`);\n }\n scope = scope || (currentLaneId.isDefault() ? this.workspace.defaultScope : currentLaneId.scope);\n const laneObj = await createLane(this.workspace, 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('lane-create');\n\n const results = {\n lane: laneObj,\n alias,\n laneId: laneObj.toLaneId(),\n hash: laneObj.hash().toString(),\n };\n return results;\n }\n\n async loadLane(id: LaneId): Promise<Lane | undefined> {\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('lane-track');\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('lane-alias');\n\n return { laneId };\n }\n\n async changeScope(remoteScope: string, laneName?: string): Promise<{ remoteScopeBefore: string; localName: string }> {\n if (!this.workspace) {\n throw new BitError(`unable to change-scope of a lane outside of Bit workspace`);\n }\n let laneId: LaneId;\n let laneNameWithoutScope: string;\n if (laneName) {\n laneNameWithoutScope = laneName.includes(LANE_REMOTE_DELIMITER)\n ? laneName.split(LANE_REMOTE_DELIMITER)[1]\n : laneName;\n laneId = await this.scope.legacyScope.lanes.parseLaneIdFromString(laneName);\n } else {\n laneId = this.workspace.getCurrentLaneId();\n laneNameWithoutScope = laneId.name;\n }\n const lane = await this.loadLane(laneId);\n if (!lane) {\n throw new BitError(`unable to find a local lane \"${laneName}\"`);\n }\n if (!lane.isNew) {\n throw new BitError(`changing lane scope-name is allowed for new lanes only. this lane has been exported already.\nplease create a new lane instead, which will include all components of this lane`);\n }\n if (!isValidScopeName(remoteScope)) {\n throw new InvalidScopeName(remoteScope);\n }\n const remoteScopeBefore = lane.scope;\n lane.changeScope(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 laneHistoryMsg: `change scope from ${remoteScopeBefore} to ${remoteScope}`,\n });\n this.workspace.consumer.bitMap.setCurrentLane(newLaneId, false);\n await this.workspace.consumer.onDestroy('lane-scope-change');\n\n return { remoteScopeBefore, localName: laneNameWithoutScope };\n }\n\n /**\n * change a lane-name and if possible, export the lane to the remote\n */\n async rename(newName: string, laneName?: string): Promise<{ currentName: string }> {\n if (!this.workspace) {\n throw new BitError(`unable to rename a lane outside of Bit workspace`);\n }\n throwForInvalidLaneName(newName);\n const currentName = laneName || this.workspace.getCurrentLaneId().name;\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 scope.json related data and change the lane object\n await this.scope.legacyScope.lanes.renameLane(lane, newName);\n\n // change current-lane if needed\n const currentLaneId = this.getCurrentLaneId();\n if (currentLaneId?.isEqual(laneId)) {\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 // this writes the changes done on scope.json file (along with .bitmap)\n await this.workspace.consumer.onDestroy('lane-rename');\n\n return { currentName };\n }\n\n async exportLane(lane: Lane) {\n await this.exporter.exportMany({\n scope: this.scope.legacyScope,\n laneObject: lane,\n ids: new ComponentIdList(),\n allVersions: false,\n });\n }\n\n async importLaneObject(laneId: LaneId, persistIfNotExists = true, includeLaneHistory = false): Promise<Lane> {\n return this.importer.importLaneObject(laneId, persistIfNotExists, includeLaneHistory);\n }\n\n async eject(pattern: string): Promise<ComponentID[]> {\n if (!this.workspace) {\n throw new BitError(`unable to eject a component outside of Bit workspace`);\n }\n const deletedComps = await this.remove.deleteComps(pattern);\n const packages = deletedComps.map((c) => c.getPackageName());\n await this.install.install(packages);\n return deletedComps.map((c) => c.id);\n }\n\n /**\n * get the head hash (snap) of main. return undefined if the component exists only on a lane and was never merged to main\n */\n async getHeadOnMain(componentId: ComponentID): Promise<string | undefined> {\n const modelComponent = await this.scope.legacyScope.getModelComponent(componentId);\n return modelComponent.head?.toString();\n }\n\n /**\n * fetch the lane object and its components from the remote.\n * save the objects and the lane to the local scope.\n * this method doesn't change anything in the workspace.\n */\n async fetchLaneWithItsComponents(laneId: LaneId, includeUpdateDependents = false): Promise<Lane> {\n this.logger.debug(`fetching lane ${laneId.toString()}`);\n const lane = await this.importer.importLaneObject(laneId);\n if (!lane) throw new Error(`unable to import lane ${laneId.toString()} from the remote`);\n\n await this.importer.fetchLaneComponents(lane, includeUpdateDependents);\n this.logger.debug(`fetching lane ${laneId.toString()} done, fetched ${lane.components.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('lane-remove');\n\n return results.laneResults;\n }\n\n /**\n * when deleting a lane object, it is sent into the \"trash\" directory in the scope.\n * this method restores it and put it back in the \"objects\" directory.\n * as an argument, it needs a hash. the reason for not supporting lane-id is because the trash may have multiple\n * lanes with the same lane-id but different hashes.\n */\n async restoreLane(laneHash: string) {\n const ref = Ref.from(laneHash);\n const objectsFromTrash = (await this.scope.legacyScope.objects.getFromTrash([ref])) as Lane[];\n const laneIdFromTrash = objectsFromTrash[0].toLaneId();\n const existingWithSameId = await this.loadLane(laneIdFromTrash);\n if (existingWithSameId) {\n if (existingWithSameId.hash().isEqual(ref)) {\n throw new BitError(`unable to restore lane ${laneIdFromTrash.toString()}, as it already exists`);\n }\n throw new BitError(\n `unable to restore lane ${laneIdFromTrash.toString()}, as a lane with the same id already exists`\n );\n }\n await this.scope.legacyScope.objects.restoreFromTrash([ref]);\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 {\n alias,\n merge,\n forceOurs,\n forceTheirs,\n pattern,\n workspaceOnly,\n skipDependencyInstallation = false,\n head,\n }: SwitchLaneOptions\n ) {\n if (!this.workspace) {\n throw new BitError(`unable to switch lanes outside of Bit workspace`);\n }\n this.workspace.inInstallContext = true;\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: workspaceOnly,\n pattern,\n alias,\n head,\n };\n const checkoutProps = {\n mergeStrategy,\n forceOurs,\n forceTheirs,\n skipNpmInstall: skipDependencyInstallation,\n isLane: true,\n promptMergeOptions: 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, this.componentCompare);\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 return filteredComponentIds.map((laneComponent) => laneComponent.id.changeVersion(laneComponent.head));\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 = laneReadmeComponent.id.changeVersion(laneReadmeComponent.head);\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 = 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, { laneHistoryMsg: 'remove readme' });\n await this.workspace.bitMap.write(`lane-remove-readme`);\n\n return { result: true };\n }\n\n async diffStatus(\n sourceLaneId: LaneId,\n targetLaneId?: LaneId,\n options?: LaneDiffStatusOptions\n ): Promise<LaneDiffStatus> {\n this.logger.profile(`diff status for source lane: ${sourceLaneId.name} and target lane: ${targetLaneId?.name}`);\n\n const sourceLane = sourceLaneId.isDefault()\n ? await this.getLaneDataOfDefaultLane()\n : await this.loadLane(sourceLaneId);\n\n const sourceLaneComponents = sourceLaneId.isDefault()\n ? sourceLane?.components.map((main) => ({ id: main.id, head: Ref.from(main.head) }))\n : sourceLane?.components;\n\n const targetLane = targetLaneId ? await this.loadLane(targetLaneId) : undefined;\n const targetLaneIds = targetLane?.toBitIds();\n const host = this.componentAspect.getHost();\n\n const targetMainHeads =\n !targetLaneId || targetLaneId?.isDefault()\n ? compact(\n await Promise.all(\n (sourceLaneComponents || []).map(async ({ id }) => {\n const componentId = await host.resolveComponentId(id);\n const headOnMain = await this.getHeadOnMain(componentId);\n return headOnMain ? id.changeVersion(headOnMain) : undefined;\n })\n )\n )\n : [];\n\n await this.importer.importObjectsFromMainIfExist(targetMainHeads, { cache: true });\n\n const diffProps = compact(\n await Promise.all(\n (sourceLaneComponents || []).map(async ({ id, head }) => {\n const componentId = await host.resolveComponentId(id);\n const sourceVersionObj = (await this.scope.legacyScope.objects.load(head, true)) as Version;\n\n if (sourceVersionObj.isRemoved()) {\n return null;\n }\n\n const headOnTargetLane = targetLaneIds\n ? targetLaneIds.searchWithoutVersion(id)?.version\n : await this.getHeadOnMain(componentId);\n\n if (headOnTargetLane) {\n const targetVersionObj = (await this.scope.legacyScope.objects.load(\n Ref.from(headOnTargetLane),\n true\n )) as Version;\n\n if (targetVersionObj.isRemoved()) {\n return null;\n }\n }\n\n const sourceHead = head.toString();\n const targetHead = headOnTargetLane;\n\n return { componentId, sourceHead, targetHead };\n })\n )\n );\n\n const snapDistancesByComponentId = new Map<\n string,\n {\n snapsDistance: SnapsDistance;\n sourceHead: string;\n targetHead?: string;\n componentId: ComponentID;\n }\n >();\n\n this.logger.profile(\n `get snaps distance for source lane: ${sourceLane?.id.name} and target lane: ${targetLane?.id.name} with ${diffProps.length} components`\n );\n await pMap(\n diffProps,\n async ({ componentId, sourceHead, targetHead }) => {\n const snapsDistance = await this.scope.getSnapsDistanceBetweenTwoSnaps(\n componentId,\n sourceHead,\n targetHead,\n false\n );\n if (snapsDistance) {\n snapDistancesByComponentId.set(componentId.toString(), {\n snapsDistance,\n sourceHead,\n targetHead,\n componentId,\n });\n }\n },\n {\n concurrency: concurrentComponentsLimit(),\n }\n );\n this.logger.profile(\n `get snaps distance for source lane: ${sourceLane?.id.name} and target lane: ${targetLane?.id.name} with ${diffProps.length} components`\n );\n\n const commonSnapsToImport = compact(\n [...snapDistancesByComponentId.values()].map((s) =>\n s.snapsDistance.commonSnapBeforeDiverge\n ? s.componentId.changeVersion(s.snapsDistance.commonSnapBeforeDiverge.hash)\n : null\n )\n );\n\n const sourceOrTargetLane =\n ((sourceLaneId.isDefault() ? null : (sourceLane as Lane)) ||\n (targetLaneId?.isDefault() ? null : (targetLane as Lane))) ??\n undefined;\n\n if (commonSnapsToImport.length > 0 && !options?.skipChanges) {\n await this.scope.legacyScope.scopeImporter.importWithoutDeps(ComponentIdList.fromArray(commonSnapsToImport), {\n cache: true,\n reason: `get the common snap for lane diff`,\n lane: sourceOrTargetLane,\n });\n }\n\n const results = await pMapSeries(diffProps, async ({ componentId, sourceHead, targetHead }) =>\n this.componentDiffStatus(\n componentId,\n sourceHead,\n targetHead,\n snapDistancesByComponentId.get(componentId.toString())?.snapsDistance,\n options\n )\n );\n\n this.logger.profile(`diff status for source lane: ${sourceLaneId.name} and target lane: ${targetLaneId?.name}`);\n\n return {\n source: sourceLaneId,\n target: targetLaneId || this.getDefaultLaneId(),\n componentsStatus: results,\n };\n }\n\n private async componentDiffStatus(\n componentId: ComponentID,\n sourceHead: string,\n targetHead?: string,\n snapsDistance?: SnapsDistance,\n options?: LaneDiffStatusOptions\n ): Promise<LaneComponentDiffStatus> {\n if (snapsDistance?.err) {\n const noCommonSnap = snapsDistance.err instanceof NoCommonSnap;\n\n return {\n componentId,\n sourceHead,\n targetHead,\n upToDate: snapsDistance?.isUpToDate(),\n unrelated: noCommonSnap || undefined,\n changes: [],\n };\n }\n\n const commonSnap = snapsDistance?.commonSnapBeforeDiverge;\n\n const getChanges = async (): Promise<ChangeType[]> => {\n if (!commonSnap) return [ChangeType.NEW];\n\n // import common snap before we compare\n const compare = await this.componentCompare.compare(\n componentId.changeVersion(commonSnap.hash).toString(),\n componentId.changeVersion(sourceHead).toString()\n );\n\n if (!compare.fields.length && (!compare.code.length || !compare.code.some((c) => c.status !== 'UNCHANGED'))) {\n return [ChangeType.NONE];\n }\n\n const changed: ChangeType[] = [];\n\n if (compare.code.some((f) => f.status !== 'UNCHANGED')) {\n changed.push(ChangeType.SOURCE_CODE);\n }\n\n if (compare.fields.length > 0) {\n changed.push(ChangeType.ASPECTS);\n }\n\n const depsFields = ['dependencies', 'devDependencies', 'extensionDependencies'];\n if (compare.fields.some((field) => depsFields.includes(field.fieldName))) {\n changed.push(ChangeType.DEPENDENCY);\n }\n\n return changed;\n };\n\n const changes = !options?.skipChanges ? await getChanges() : undefined;\n const changeType = changes ? changes[0] : undefined;\n\n return {\n componentId,\n changeType,\n changes,\n sourceHead,\n targetHead: commonSnap?.hash,\n upToDate: snapsDistance?.isUpToDate(),\n snapsDistance: {\n onSource: snapsDistance?.snapsOnSourceOnly.map((s) => s.hash) ?? [],\n onTarget: snapsDistance?.snapsOnTargetOnly.map((s) => s.hash) ?? [],\n common: snapsDistance?.commonSnapBeforeDiverge?.hash,\n },\n };\n }\n\n async componentDiffStatusOld(\n componentId: ComponentID,\n sourceHead: string,\n targetHead?: string,\n options?: LaneDiffStatusOptions\n ): Promise<LaneComponentDiffStatus> {\n const snapsDistance = await this.scope.getSnapsDistanceBetweenTwoSnaps(componentId, sourceHead, targetHead, false);\n\n if (snapsDistance?.err) {\n const noCommonSnap = snapsDistance.err instanceof NoCommonSnap;\n\n return {\n componentId,\n sourceHead,\n targetHead,\n upToDate: snapsDistance?.isUpToDate(),\n unrelated: noCommonSnap || undefined,\n changes: [],\n };\n }\n\n const commonSnap = snapsDistance?.commonSnapBeforeDiverge;\n\n const getChanges = async (): Promise<ChangeType[]> => {\n if (!commonSnap) return [ChangeType.NEW];\n\n const compare = await this.componentCompare.compare(\n componentId.changeVersion(commonSnap.hash).toString(),\n componentId.changeVersion(sourceHead).toString()\n );\n\n if (!compare.fields.length && (!compare.code.length || !compare.code.some((c) => c.status !== 'UNCHANGED'))) {\n return [ChangeType.NONE];\n }\n\n const changed: ChangeType[] = [];\n\n if (compare.code.some((f) => f.status !== 'UNCHANGED')) {\n changed.push(ChangeType.SOURCE_CODE);\n }\n\n if (compare.fields.length > 0) {\n changed.push(ChangeType.ASPECTS);\n }\n\n const depsFields = ['dependencies', 'devDependencies', 'extensionDependencies'];\n if (compare.fields.some((field) => depsFields.includes(field.fieldName))) {\n changed.push(ChangeType.DEPENDENCY);\n }\n\n return changed;\n };\n\n const changes = !options?.skipChanges ? await getChanges() : undefined;\n const changeType = changes ? changes[0] : undefined;\n\n return {\n componentId,\n changeType,\n changes,\n sourceHead,\n targetHead: commonSnap?.hash,\n upToDate: snapsDistance?.isUpToDate(),\n snapsDistance: {\n onSource: snapsDistance?.snapsOnSourceOnly.map((s) => s.hash) ?? [],\n onTarget: snapsDistance?.snapsOnTargetOnly.map((s) => s.hash) ?? [],\n common: snapsDistance?.commonSnapBeforeDiverge?.hash,\n },\n };\n }\n\n private async recreateNewLaneIfDeleted() {\n if (!this.workspace) return;\n const laneId = this.getCurrentLaneId();\n if (!laneId || laneId.isDefault() || this.workspace.consumer.bitMap.isLaneExported) {\n return;\n }\n const laneObj = await this.scope.legacyScope.getCurrentLaneObject();\n if (laneObj) {\n return;\n }\n await this.createLane(laneId.name, { scope: laneId.scope });\n }\n\n /**\n * if the local lane was forked from another lane, this gets the differences between the two.\n * it also fetches the original lane from the remote to make sure the data is up to date.\n */\n async listUpdatesFromForked(componentsList: ComponentsList): Promise<DivergeDataPerId[]> {\n const consumer = this.workspace?.consumer;\n if (!consumer) throw new Error(`unable to get listUpdatesFromForked outside of a workspace`);\n if (consumer.isOnMain()) {\n return [];\n }\n const lane = await consumer.getCurrentLaneObject();\n const forkedFromLaneId = lane?.forkedFrom;\n if (!forkedFromLaneId) {\n return [];\n }\n const forkedFromLane = await consumer.scope.loadLane(forkedFromLaneId);\n if (!forkedFromLane) return []; // should we fetch it here?\n\n const workspaceIds = consumer.bitMap.getAllBitIds();\n\n const duringMergeIds = componentsList.listDuringMergeStateComponents();\n\n const componentsFromModel = await componentsList.getModelComponents();\n const compFromModelOnWorkspace = componentsFromModel\n .filter((c) => workspaceIds.hasWithoutVersion(c.toComponentId()))\n // if a component is merge-pending, it needs to be resolved first before getting more updates from main\n .filter((c) => !duringMergeIds.hasWithoutVersion(c.toComponentId()));\n\n // by default, when on a lane, forked is not fetched. we need to fetch it to get the latest updates.\n await this.fetchLaneWithItsComponents(forkedFromLaneId);\n\n const remoteForkedLane = await consumer.scope.objects.remoteLanes.getRemoteLane(forkedFromLaneId);\n if (!remoteForkedLane.length) return [];\n\n const results = await Promise.all(\n compFromModelOnWorkspace.map(async (modelComponent) => {\n const headOnForked = remoteForkedLane.find((c) => c.id.isEqualWithoutVersion(modelComponent.toComponentId()));\n const headOnLane = modelComponent.laneHeadLocal;\n if (!headOnForked || !headOnLane) return undefined;\n const divergeData = await getDivergeData({\n repo: consumer.scope.objects,\n modelComponent,\n targetHead: headOnForked.head,\n sourceHead: headOnLane,\n throws: false,\n });\n if (!divergeData.snapsOnTargetOnly.length && !divergeData.err) return undefined;\n return { id: modelComponent.toComponentId(), divergeData };\n })\n );\n\n return compact(results);\n }\n\n /**\n * list components on a lane that their main got updates.\n */\n async listUpdatesFromMainPending(componentsList: ComponentsList): Promise<DivergeDataPerId[]> {\n const consumer = this.workspace?.consumer;\n if (!consumer) throw new Error(`unable to get listUpdatesFromForked outside of a workspace`);\n if (consumer.isOnMain()) {\n return [];\n }\n const allIds = consumer.bitMap.getAllBitIds();\n\n const duringMergeIds = componentsList.listDuringMergeStateComponents();\n\n const componentsFromModel = await componentsList.getModelComponents();\n const compFromModelOnWorkspace = componentsFromModel\n .filter((c) => allIds.hasWithoutVersion(c.toComponentId()))\n // if a component is merge-pending, it needs to be resolved first before getting more updates from main\n .filter((c) => !duringMergeIds.hasWithoutVersion(c.toComponentId()));\n\n // by default, when on a lane, main is not fetched. we need to fetch it to get the latest updates.\n await consumer.scope.scopeImporter.importWithoutDeps(\n ComponentIdList.fromArray(compFromModelOnWorkspace.map((c) => c.toComponentId())),\n {\n cache: false,\n includeVersionHistory: true,\n ignoreMissingHead: true,\n reason: 'main components of the current lane to check for updates',\n }\n );\n const results = await Promise.all(\n compFromModelOnWorkspace.map(async (modelComponent) => {\n const headOnMain = modelComponent.head;\n if (!headOnMain) return undefined;\n const checkedOutVersion = allIds.searchWithoutVersion(modelComponent.toComponentId())?.version;\n if (!checkedOutVersion) {\n throw new Error(\n `listUpdatesFromMainPending: unable to find ${modelComponent.toComponentId()} in the workspace`\n );\n }\n const headOnLane = modelComponent.getRef(checkedOutVersion);\n\n const divergeData = await getDivergeData({\n repo: consumer.scope.objects,\n modelComponent,\n targetHead: headOnMain,\n sourceHead: headOnLane,\n throws: false,\n });\n if (!divergeData.snapsOnTargetOnly.length && !divergeData.err) return undefined;\n return { id: modelComponent.toComponentId(), divergeData };\n })\n );\n\n return compact(results);\n }\n\n /**\n * default to remove all of them.\n * returns true if the lane has changed\n */\n async removeUpdateDependents(laneId: LaneId, ids?: ComponentID[]): Promise<boolean> {\n const lane = await this.loadLane(laneId);\n if (!lane) throw new BitError(`unable to find a lane ${laneId.toString()}`);\n if (ids?.length) {\n ids.forEach((id) => lane.removeComponentFromUpdateDependentsIfExist(id));\n } else {\n lane.removeAllUpdateDependents();\n }\n if (lane.hasChanged) {\n await this.scope.legacyScope.lanes.saveLane(lane, { laneHistoryMsg: 'remove update-dependents' });\n return true;\n }\n return false;\n }\n\n private async getLaneDataOfDefaultLane(): Promise<LaneData | null> {\n const consumer = this.workspace?.consumer;\n let bitIds: ComponentID[] = [];\n if (!consumer) {\n const scopeComponents = await this.scope.list();\n bitIds = scopeComponents.filter((component) => component.head).map((component) => component.id);\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 get createRoutePath() {\n return '/lanes/create';\n }\n\n get deleteRoutePath() {\n return '/lanes/delete';\n }\n\n get restoreRoutePath() {\n return '/lanes/restore';\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n ScopeAspect,\n WorkspaceAspect,\n GraphqlAspect,\n MergingAspect,\n ComponentAspect,\n LoggerAspect,\n ImporterAspect,\n ExportAspect,\n ExpressAspect,\n ComponentCompareAspect,\n ComponentWriterAspect,\n RemoveAspect,\n CheckoutAspect,\n InstallAspect,\n ];\n static runtime = MainRuntime;\n static async provider([\n cli,\n scope,\n workspace,\n graphql,\n merging,\n component,\n loggerMain,\n importer,\n exporter,\n express,\n componentCompare,\n componentWriter,\n remove,\n checkout,\n install,\n ]: [\n CLIMain,\n ScopeMain,\n Workspace,\n GraphqlMain,\n MergingMain,\n ComponentMain,\n LoggerMain,\n ImporterMain,\n ExportMain,\n ExpressMain,\n ComponentCompareMain,\n ComponentWriterMain,\n RemoveMain,\n CheckoutMain,\n InstallMain,\n ]) {\n const logger = loggerMain.createLogger(LanesAspect.id);\n const lanesMain = new LanesMain(\n workspace,\n scope,\n merging,\n component,\n logger,\n importer,\n exporter,\n componentCompare,\n componentWriter,\n remove,\n checkout,\n install\n );\n const switchCmd = new SwitchCmd(lanesMain);\n const fetchCmd = new FetchCmd(importer);\n const laneCmd = new LaneCmd(lanesMain, workspace, scope);\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, componentCompare),\n new LaneRemoveReadmeCmd(lanesMain),\n new LaneImportCmd(switchCmd),\n new LaneRemoveCompCmd(workspace, lanesMain),\n new LaneFetchCmd(fetchCmd, lanesMain),\n new LaneEjectCmd(lanesMain),\n ];\n laneCmd.commands.push(new LaneHistoryCmd(lanesMain));\n laneCmd.commands.push(new LaneHistoryDiffCmd(lanesMain, workspace, scope, componentCompare));\n laneCmd.commands.push(new LaneCheckoutCmd(lanesMain));\n laneCmd.commands.push(new LaneRevertCmd(lanesMain));\n cli.register(laneCmd, switchCmd, new CatLaneHistoryCmd(lanesMain));\n cli.registerOnStart(async () => {\n await lanesMain.recreateNewLaneIfDeleted();\n });\n graphql.register(lanesSchema(lanesMain));\n express.register([\n new LanesCreateRoute(lanesMain, logger),\n new LanesDeleteRoute(lanesMain, logger),\n new LanesRestoreRoute(lanesMain, logger),\n ]);\n return lanesMain;\n }\n}\n\nLanesAspect.addRuntime(LanesMain);\n\nexport default LanesMain;\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;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AC,CAAC;IACFiD,OAAO,CAAC6B,QAAQ,CAAC,IAAAG,qBAAW,EAAC5B,SAAS,CAAC,CAAC;IACxCF,OAAO,CAAC2B,QAAQ,CAAC,CACf,KAAII,+BAAgB,EAAC7B,SAAS,EAAExW,MAAM,CAAC,EACvC,KAAIsY,+BAAgB,EAAC9B,SAAS,EAAExW,MAAM,CAAC,EACvC,KAAIuY,iCAAiB,EAAC/B,SAAS,EAAExW,MAAM,CAAC,CACzC,CAAC;IACF,OAAOwW,SAAS;EAClB;AACF;AAACgC,OAAA,CAAA9Y,SAAA,GAAAA,SAAA;AAAAhB,eAAA,CAjnCYgB,SAAS,WA2gCL,EAAE;AAAAhB,eAAA,CA3gCNgB,SAAS,kBA4gCE,CACpB+Y,gBAAS,EACTC,oBAAW,EACXC,4BAAe,EACfC,wBAAa,EACbC,wBAAa,EACbC,4BAAe,EACfC,sBAAY,EACZC,0BAAc,EACdC,sBAAY,EACZC,wBAAa,EACbC,0CAAsB,EACtBC,wCAAqB,EACrBC,sBAAY,EACZC,0BAAc,EACdC,wBAAa,CACd;AAAA7a,eAAA,CA5hCUgB,SAAS,aA6hCH8Z,kBAAW;AAsF9B3L,oBAAW,CAAC4L,UAAU,CAAC/Z,SAAS,CAAC;AAAC,IAAAga,QAAA,GAAAlB,OAAA,CAAA/a,OAAA,GAEnBiC,SAAS","ignoreList":[]}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.lanes_lanes@1.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.lanes_lanes@1.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.lanes_lanes@1.0.512/dist/lanes.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.lanes_lanes@1.0.512/dist/lanes.docs.mdx';
|
3
3
|
|
4
4
|
export const compositions = [compositions_0];
|
5
5
|
export const overview = [overview_0];
|
package/dist/switch-lanes.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ComponentID } from '@teambit/component-id';
|
2
2
|
import { ApplyVersionResults } from '@teambit/merging';
|
3
|
-
import { Lane } from '@teambit/
|
3
|
+
import { Lane } from '@teambit/objects';
|
4
4
|
import { CheckoutProps } from '@teambit/checkout';
|
5
5
|
import { Workspace } from '@teambit/workspace';
|
6
6
|
import { Logger } from '@teambit/logger';
|
package/dist/switch-lanes.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_laneId","data","require","_componentId","_bitError","_lanesModules","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LaneSwitcher","constructor","workspace","logger","switchProps","checkoutProps","lanes","consumer","switch","setStatusLine","isOnMain","throwForStagedComponents","populateSwitchProps","bitMapIds","bitmapIdsFromCurrentLaneIncludeRemoved","idsToSwitch","ids","map","id","bitMapId","searchWithoutVersion","allowAddingComponentsFromScope","versionPerId","resolveMultipleComponentIds","lane","laneToSwitchTo","results","checkout","saveLanesData","onDestroy","laneId","scope","parseLaneIdFromString","laneName","localLane","loadLane","getMainIds","head","allIds","listIds","legacyScope","scopeImporter","importWithoutDeps","cache","ignoreMissingHead","getIdsOfDefaultLane","mainIds","isDefault","populatePropsAccordingToDefaultLane","laneIds","populatePropsAccordingToLocalLane","populatePropsAccordingToRemoteLane","idsOnLaneOnly","find","isEqualWithoutVersion","idsOnMainOnly","laneBitIds","populateIdsAccordingToPattern","pattern","bitMap","getAllBitIdsFromAllLanes","BitError","filterIdsFromPoolIdsByPattern","remoteLaneId","laneIdToSwitchTo","debug","toString","throwForSwitchingToCurrentLane","remoteLane","fetchLaneWithItsComponents","name","localTrackedLane","getAliasByLaneId","undefined","components","l","changeVersion","LaneId","from","DEFAULT_LANE","toLaneId","c","getCurrentLaneId","isEqual","laneIdStr","localLaneName","alias","trackLane","remoteScope","setCurrentLane","isNew","syncWithIds","ComponentIdList","fromArray","exports"],"sources":["switch-lanes.ts"],"sourcesContent":["import { Consumer } from '@teambit/legacy.consumer';\nimport { LaneId, DEFAULT_LANE } from '@teambit/lane-id';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { ApplyVersionResults } from '@teambit/merging';\nimport { Lane } from '@teambit/scope.objects';\nimport { CheckoutProps } from '@teambit/checkout';\nimport { Workspace } from '@teambit/workspace';\nimport { Logger } from '@teambit/logger';\nimport { BitError } from '@teambit/bit-error';\nimport { throwForStagedComponents } from '@teambit/lanes.modules.create-lane';\nimport { LanesMain } from './lanes.main.runtime';\n\nexport type SwitchProps = {\n laneName: string;\n ids?: ComponentID[];\n laneBitIds?: ComponentID[]; // only needed for the deprecated onLanesOnly prop. once this prop is removed, this prop can be removed as well.\n pattern?: string;\n head?: boolean;\n existingOnWorkspaceOnly?: boolean;\n remoteLane?: Lane;\n localTrackedLane?: string;\n alias?: string;\n};\n\nexport class LaneSwitcher {\n private consumer: Consumer;\n private laneIdToSwitchTo: LaneId; // populated by `this.populateSwitchProps()`\n private laneToSwitchTo: Lane | undefined; // populated by `this.populateSwitchProps()`, if default-lane, it's undefined\n constructor(\n private workspace: Workspace,\n private logger: Logger,\n private switchProps: SwitchProps,\n private checkoutProps: CheckoutProps,\n private lanes: LanesMain\n ) {\n this.consumer = this.workspace.consumer;\n }\n\n async switch(): Promise<ApplyVersionResults> {\n this.logger.setStatusLine(`switching lanes`);\n if (this.workspace.isOnMain()) {\n await throwForStagedComponents(this.workspace);\n }\n await this.populateSwitchProps();\n const bitMapIds = this.workspace.consumer.bitmapIdsFromCurrentLaneIncludeRemoved;\n const idsToSwitch = this.switchProps.ids || [];\n const ids = idsToSwitch.map((id) => {\n const bitMapId = bitMapIds.searchWithoutVersion(id);\n return bitMapId || id;\n });\n\n const checkoutProps: CheckoutProps = {\n ...this.checkoutProps,\n ids,\n allowAddingComponentsFromScope: true,\n versionPerId: await this.workspace.resolveMultipleComponentIds(idsToSwitch),\n lane: this.laneToSwitchTo,\n };\n\n const results = await this.lanes.checkout.checkout(checkoutProps);\n\n await this.saveLanesData();\n await this.consumer.onDestroy('lane-switch');\n\n return results;\n }\n\n private async populateSwitchProps() {\n const laneId = await this.consumer.scope.lanes.parseLaneIdFromString(this.switchProps.laneName);\n\n const localLane = await this.consumer.scope.loadLane(laneId);\n const getMainIds = async () => {\n if (this.switchProps.head) {\n const allIds = this.workspace.listIds();\n await this.workspace.scope.legacyScope.scopeImporter.importWithoutDeps(allIds, {\n cache: false,\n ignoreMissingHead: true,\n });\n return this.consumer.getIdsOfDefaultLane();\n }\n const mainIds = await this.consumer.getIdsOfDefaultLane();\n return mainIds;\n };\n const mainIds = await getMainIds();\n if (laneId.isDefault()) {\n await this.populatePropsAccordingToDefaultLane();\n this.switchProps.ids = mainIds;\n } else {\n const laneIds =\n localLane && !this.switchProps.head\n ? this.populatePropsAccordingToLocalLane(localLane)\n : await this.populatePropsAccordingToRemoteLane(laneId);\n const idsOnLaneOnly = laneIds.filter((id) => !mainIds.find((i) => i.isEqualWithoutVersion(id)));\n const idsOnMainOnly = mainIds.filter((id) => !laneIds.find((i) => i.isEqualWithoutVersion(id)));\n this.switchProps.ids = [...idsOnMainOnly, ...laneIds];\n this.switchProps.laneBitIds = idsOnLaneOnly;\n }\n await this.populateIdsAccordingToPattern();\n }\n\n private async populateIdsAccordingToPattern() {\n if (!this.switchProps.pattern) {\n return;\n }\n if (this.consumer.bitMap.getAllBitIdsFromAllLanes().length) {\n // if the workspace is not empty, it's possible that it has components from lane-x, and is now switching\n // partially to lane-y, while lane-y has the same components as lane-x. in which case, the user ends up with\n // an invalid state of components from lane-x and lane-y together.\n throw new BitError('error: use --pattern only when the workspace is empty');\n }\n const allIds = this.switchProps.ids || [];\n this.switchProps.ids = await this.workspace.filterIdsFromPoolIdsByPattern(this.switchProps.pattern, allIds);\n }\n\n private async populatePropsAccordingToRemoteLane(remoteLaneId: LaneId): Promise<ComponentID[]> {\n this.laneIdToSwitchTo = remoteLaneId;\n this.logger.debug(`populatePropsAccordingToRemoteLane, remoteLaneId: ${remoteLaneId.toString()}`);\n this.throwForSwitchingToCurrentLane();\n const remoteLane = await this.lanes.fetchLaneWithItsComponents(remoteLaneId);\n this.switchProps.laneName = remoteLaneId.name;\n this.switchProps.localTrackedLane = this.consumer.scope.lanes.getAliasByLaneId(remoteLaneId) || undefined;\n this.switchProps.remoteLane = remoteLane;\n this.laneToSwitchTo = remoteLane;\n this.logger.debug(`populatePropsAccordingToRemoteLane, completed`);\n return remoteLane.components.map((l) => l.id.changeVersion(l.head.toString()));\n }\n\n private async populatePropsAccordingToDefaultLane() {\n this.laneIdToSwitchTo = LaneId.from(DEFAULT_LANE, this.consumer.scope.name);\n this.throwForSwitchingToCurrentLane();\n }\n\n private populatePropsAccordingToLocalLane(localLane: Lane): ComponentID[] {\n this.laneIdToSwitchTo = localLane.toLaneId();\n this.laneToSwitchTo = localLane;\n this.throwForSwitchingToCurrentLane();\n return localLane.components.map((c) => c.id.changeVersion(c.head.toString()));\n }\n\n private throwForSwitchingToCurrentLane() {\n if (this.consumer.getCurrentLaneId().isEqual(this.laneIdToSwitchTo)) {\n const laneIdStr = this.laneIdToSwitchTo.isDefault()\n ? this.laneIdToSwitchTo.name\n : this.laneIdToSwitchTo.toString();\n throw new BitError(`already checked out to \"${laneIdStr}\".\nto be up to date with the remote lane, please run \"bit checkout head\"`);\n }\n }\n\n private async saveLanesData() {\n const localLaneName = this.switchProps.alias || this.laneIdToSwitchTo.name;\n if (this.switchProps.remoteLane) {\n if (!this.switchProps.localTrackedLane) {\n this.consumer.scope.lanes.trackLane({\n localLane: localLaneName,\n remoteLane: this.laneIdToSwitchTo.name,\n remoteScope: this.laneIdToSwitchTo.scope,\n });\n }\n }\n\n this.consumer.setCurrentLane(this.laneIdToSwitchTo, !this.laneToSwitchTo?.isNew);\n this.consumer.bitMap.syncWithIds(\n ComponentIdList.fromArray(this.switchProps.ids || []),\n ComponentIdList.fromArray(this.switchProps.laneBitIds || [])\n );\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,aAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,YAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,cAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,aAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8E,SAAAK,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,C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C,IAAI,CAACzF,WAAW,CAACY,GAAG,IAAI,EAAE,CAAC,EACrD4E,8BAAe,CAACC,SAAS,CAAC,IAAI,CAACzF,WAAW,CAACoD,UAAU,IAAI,EAAE,CAC7D,CAAC;EACH;AACF;AAACsC,OAAA,CAAA9F,YAAA,GAAAA,YAAA","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_laneId","data","require","_componentId","_bitError","_lanesModules","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LaneSwitcher","constructor","workspace","logger","switchProps","checkoutProps","lanes","consumer","switch","setStatusLine","isOnMain","throwForStagedComponents","populateSwitchProps","bitMapIds","bitmapIdsFromCurrentLaneIncludeRemoved","idsToSwitch","ids","map","id","bitMapId","searchWithoutVersion","allowAddingComponentsFromScope","versionPerId","resolveMultipleComponentIds","lane","laneToSwitchTo","results","checkout","saveLanesData","onDestroy","laneId","scope","parseLaneIdFromString","laneName","localLane","loadLane","getMainIds","head","allIds","listIds","legacyScope","scopeImporter","importWithoutDeps","cache","ignoreMissingHead","getIdsOfDefaultLane","mainIds","isDefault","populatePropsAccordingToDefaultLane","laneIds","populatePropsAccordingToLocalLane","populatePropsAccordingToRemoteLane","idsOnLaneOnly","find","isEqualWithoutVersion","idsOnMainOnly","laneBitIds","populateIdsAccordingToPattern","pattern","bitMap","getAllBitIdsFromAllLanes","BitError","filterIdsFromPoolIdsByPattern","remoteLaneId","laneIdToSwitchTo","debug","toString","throwForSwitchingToCurrentLane","remoteLane","fetchLaneWithItsComponents","name","localTrackedLane","getAliasByLaneId","undefined","components","l","changeVersion","LaneId","from","DEFAULT_LANE","toLaneId","c","getCurrentLaneId","isEqual","laneIdStr","localLaneName","alias","trackLane","remoteScope","setCurrentLane","isNew","syncWithIds","ComponentIdList","fromArray","exports"],"sources":["switch-lanes.ts"],"sourcesContent":["import { Consumer } from '@teambit/legacy.consumer';\nimport { LaneId, DEFAULT_LANE } from '@teambit/lane-id';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { ApplyVersionResults } from '@teambit/merging';\nimport { Lane } from '@teambit/objects';\nimport { CheckoutProps } from '@teambit/checkout';\nimport { Workspace } from '@teambit/workspace';\nimport { Logger } from '@teambit/logger';\nimport { BitError } from '@teambit/bit-error';\nimport { throwForStagedComponents } from '@teambit/lanes.modules.create-lane';\nimport { LanesMain } from './lanes.main.runtime';\n\nexport type SwitchProps = {\n laneName: string;\n ids?: ComponentID[];\n laneBitIds?: ComponentID[]; // only needed for the deprecated onLanesOnly prop. once this prop is removed, this prop can be removed as well.\n pattern?: string;\n head?: boolean;\n existingOnWorkspaceOnly?: boolean;\n remoteLane?: Lane;\n localTrackedLane?: string;\n alias?: string;\n};\n\nexport class LaneSwitcher {\n private consumer: Consumer;\n private laneIdToSwitchTo: LaneId; // populated by `this.populateSwitchProps()`\n private laneToSwitchTo: Lane | undefined; // populated by `this.populateSwitchProps()`, if default-lane, it's undefined\n constructor(\n private workspace: Workspace,\n private logger: Logger,\n private switchProps: SwitchProps,\n private checkoutProps: CheckoutProps,\n private lanes: LanesMain\n ) {\n this.consumer = this.workspace.consumer;\n }\n\n async switch(): Promise<ApplyVersionResults> {\n this.logger.setStatusLine(`switching lanes`);\n if (this.workspace.isOnMain()) {\n await throwForStagedComponents(this.workspace);\n }\n await this.populateSwitchProps();\n const bitMapIds = this.workspace.consumer.bitmapIdsFromCurrentLaneIncludeRemoved;\n const idsToSwitch = this.switchProps.ids || [];\n const ids = idsToSwitch.map((id) => {\n const bitMapId = bitMapIds.searchWithoutVersion(id);\n return bitMapId || id;\n });\n\n const checkoutProps: CheckoutProps = {\n ...this.checkoutProps,\n ids,\n allowAddingComponentsFromScope: true,\n versionPerId: await this.workspace.resolveMultipleComponentIds(idsToSwitch),\n lane: this.laneToSwitchTo,\n };\n\n const results = await this.lanes.checkout.checkout(checkoutProps);\n\n await this.saveLanesData();\n await this.consumer.onDestroy('lane-switch');\n\n return results;\n }\n\n private async populateSwitchProps() {\n const laneId = await this.consumer.scope.lanes.parseLaneIdFromString(this.switchProps.laneName);\n\n const localLane = await this.consumer.scope.loadLane(laneId);\n const getMainIds = async () => {\n if (this.switchProps.head) {\n const allIds = this.workspace.listIds();\n await this.workspace.scope.legacyScope.scopeImporter.importWithoutDeps(allIds, {\n cache: false,\n ignoreMissingHead: true,\n });\n return this.consumer.getIdsOfDefaultLane();\n }\n const mainIds = await this.consumer.getIdsOfDefaultLane();\n return mainIds;\n };\n const mainIds = await getMainIds();\n if (laneId.isDefault()) {\n await this.populatePropsAccordingToDefaultLane();\n this.switchProps.ids = mainIds;\n } else {\n const laneIds =\n localLane && !this.switchProps.head\n ? this.populatePropsAccordingToLocalLane(localLane)\n : await this.populatePropsAccordingToRemoteLane(laneId);\n const idsOnLaneOnly = laneIds.filter((id) => !mainIds.find((i) => i.isEqualWithoutVersion(id)));\n const idsOnMainOnly = mainIds.filter((id) => !laneIds.find((i) => i.isEqualWithoutVersion(id)));\n this.switchProps.ids = [...idsOnMainOnly, ...laneIds];\n this.switchProps.laneBitIds = idsOnLaneOnly;\n }\n await this.populateIdsAccordingToPattern();\n }\n\n private async populateIdsAccordingToPattern() {\n if (!this.switchProps.pattern) {\n return;\n }\n if (this.consumer.bitMap.getAllBitIdsFromAllLanes().length) {\n // if the workspace is not empty, it's possible that it has components from lane-x, and is now switching\n // partially to lane-y, while lane-y has the same components as lane-x. in which case, the user ends up with\n // an invalid state of components from lane-x and lane-y together.\n throw new BitError('error: use --pattern only when the workspace is empty');\n }\n const allIds = this.switchProps.ids || [];\n this.switchProps.ids = await this.workspace.filterIdsFromPoolIdsByPattern(this.switchProps.pattern, allIds);\n }\n\n private async populatePropsAccordingToRemoteLane(remoteLaneId: LaneId): Promise<ComponentID[]> {\n this.laneIdToSwitchTo = remoteLaneId;\n this.logger.debug(`populatePropsAccordingToRemoteLane, remoteLaneId: ${remoteLaneId.toString()}`);\n this.throwForSwitchingToCurrentLane();\n const remoteLane = await this.lanes.fetchLaneWithItsComponents(remoteLaneId);\n this.switchProps.laneName = remoteLaneId.name;\n this.switchProps.localTrackedLane = this.consumer.scope.lanes.getAliasByLaneId(remoteLaneId) || undefined;\n this.switchProps.remoteLane = remoteLane;\n this.laneToSwitchTo = remoteLane;\n this.logger.debug(`populatePropsAccordingToRemoteLane, completed`);\n return remoteLane.components.map((l) => l.id.changeVersion(l.head.toString()));\n }\n\n private async populatePropsAccordingToDefaultLane() {\n this.laneIdToSwitchTo = LaneId.from(DEFAULT_LANE, this.consumer.scope.name);\n this.throwForSwitchingToCurrentLane();\n }\n\n private populatePropsAccordingToLocalLane(localLane: Lane): ComponentID[] {\n this.laneIdToSwitchTo = localLane.toLaneId();\n this.laneToSwitchTo = localLane;\n this.throwForSwitchingToCurrentLane();\n return localLane.components.map((c) => c.id.changeVersion(c.head.toString()));\n }\n\n private throwForSwitchingToCurrentLane() {\n if (this.consumer.getCurrentLaneId().isEqual(this.laneIdToSwitchTo)) {\n const laneIdStr = this.laneIdToSwitchTo.isDefault()\n ? this.laneIdToSwitchTo.name\n : this.laneIdToSwitchTo.toString();\n throw new BitError(`already checked out to \"${laneIdStr}\".\nto be up to date with the remote lane, please run \"bit checkout head\"`);\n }\n }\n\n private async saveLanesData() {\n const localLaneName = this.switchProps.alias || this.laneIdToSwitchTo.name;\n if (this.switchProps.remoteLane) {\n if (!this.switchProps.localTrackedLane) {\n this.consumer.scope.lanes.trackLane({\n localLane: localLaneName,\n remoteLane: this.laneIdToSwitchTo.name,\n remoteScope: this.laneIdToSwitchTo.scope,\n });\n }\n }\n\n this.consumer.setCurrentLane(this.laneIdToSwitchTo, !this.laneToSwitchTo?.isNew);\n this.consumer.bitMap.syncWithIds(\n ComponentIdList.fromArray(this.switchProps.ids || []),\n ComponentIdList.fromArray(this.switchProps.laneBitI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A9F,YAAA,GAAAA,YAAA","ignoreList":[]}
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/lanes",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.512",
|
4
4
|
"homepage": "https://bit.cloud/teambit/lanes/lanes",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.lanes",
|
8
8
|
"name": "lanes",
|
9
|
-
"version": "1.0.
|
9
|
+
"version": "1.0.512"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -19,7 +19,7 @@
|
|
19
19
|
"group-array": "1.0.0",
|
20
20
|
"@teambit/lanes.ui.models.lanes-model": "0.0.221",
|
21
21
|
"@teambit/bit-error": "0.0.404",
|
22
|
-
"@teambit/lane-id": "0.0.
|
22
|
+
"@teambit/lane-id": "0.0.312",
|
23
23
|
"@teambit/harmony": "0.4.6",
|
24
24
|
"@teambit/component-id": "1.2.2",
|
25
25
|
"@teambit/legacy-bit-id": "1.1.1",
|
@@ -31,42 +31,42 @@
|
|
31
31
|
"@teambit/lanes.ui.compare.lane-compare-page": "0.0.162",
|
32
32
|
"@teambit/lanes.ui.compare.lane-compare": "0.0.193",
|
33
33
|
"@teambit/lanes.ui.navigation.lane-switcher": "0.0.225",
|
34
|
-
"@teambit/checkout": "1.0.
|
35
|
-
"@teambit/cli": "0.0.
|
36
|
-
"@teambit/importer": "1.0.
|
34
|
+
"@teambit/checkout": "1.0.512",
|
35
|
+
"@teambit/cli": "0.0.1089",
|
36
|
+
"@teambit/importer": "1.0.512",
|
37
37
|
"@teambit/legacy.cli.prompts": "0.0.10",
|
38
38
|
"@teambit/legacy.constants": "0.0.5",
|
39
|
-
"@teambit/legacy.scope": "0.0.
|
40
|
-
"@teambit/scope": "1.0.
|
41
|
-
"@teambit/workspace": "1.0.
|
42
|
-
"@teambit/express": "0.0.
|
43
|
-
"@teambit/logger": "0.0.
|
44
|
-
"@teambit/graphql": "1.0.
|
45
|
-
"@teambit/component-compare": "1.0.
|
46
|
-
"@teambit/component-writer": "1.0.
|
47
|
-
"@teambit/component.snap-distance": "0.0.
|
48
|
-
"@teambit/component": "1.0.
|
49
|
-
"@teambit/export": "1.0.
|
39
|
+
"@teambit/legacy.scope": "0.0.19",
|
40
|
+
"@teambit/scope": "1.0.512",
|
41
|
+
"@teambit/workspace": "1.0.512",
|
42
|
+
"@teambit/express": "0.0.1188",
|
43
|
+
"@teambit/logger": "0.0.1182",
|
44
|
+
"@teambit/graphql": "1.0.512",
|
45
|
+
"@teambit/component-compare": "1.0.512",
|
46
|
+
"@teambit/component-writer": "1.0.512",
|
47
|
+
"@teambit/component.snap-distance": "0.0.20",
|
48
|
+
"@teambit/component": "1.0.512",
|
49
|
+
"@teambit/export": "1.0.512",
|
50
50
|
"@teambit/harmony.modules.concurrency": "0.0.6",
|
51
|
-
"@teambit/install": "1.0.
|
52
|
-
"@teambit/lanes.entities.lane-diff": "0.0.
|
53
|
-
"@teambit/lanes.modules.create-lane": "0.0.
|
54
|
-
"@teambit/lanes.modules.diff": "0.0.
|
55
|
-
"@teambit/legacy.component-diff": "0.0.
|
56
|
-
"@teambit/legacy.component-list": "0.0.
|
57
|
-
"@teambit/merging": "1.0.
|
58
|
-
"@teambit/
|
59
|
-
"@teambit/
|
60
|
-
"@teambit/scope.remotes": "0.0.
|
61
|
-
"@teambit/command-bar": "1.0.
|
62
|
-
"@teambit/lanes.hooks.use-lanes": "0.0.
|
63
|
-
"@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.
|
64
|
-
"@teambit/lanes.ui.lane-overview": "0.0.
|
65
|
-
"@teambit/lanes.ui.menus.use-lanes-menu": "0.0.
|
51
|
+
"@teambit/install": "1.0.512",
|
52
|
+
"@teambit/lanes.entities.lane-diff": "0.0.171",
|
53
|
+
"@teambit/lanes.modules.create-lane": "0.0.53",
|
54
|
+
"@teambit/lanes.modules.diff": "0.0.516",
|
55
|
+
"@teambit/legacy.component-diff": "0.0.72",
|
56
|
+
"@teambit/legacy.component-list": "0.0.73",
|
57
|
+
"@teambit/merging": "1.0.512",
|
58
|
+
"@teambit/objects": "0.0.19",
|
59
|
+
"@teambit/remove": "1.0.512",
|
60
|
+
"@teambit/scope.remotes": "0.0.19",
|
61
|
+
"@teambit/command-bar": "1.0.512",
|
62
|
+
"@teambit/lanes.hooks.use-lanes": "0.0.277",
|
63
|
+
"@teambit/lanes.hooks.use-viewed-lane-from-url": "0.0.231",
|
64
|
+
"@teambit/lanes.ui.lane-overview": "0.0.255",
|
65
|
+
"@teambit/lanes.ui.menus.use-lanes-menu": "0.0.225",
|
66
66
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.513",
|
67
|
-
"@teambit/ui": "1.0.
|
68
|
-
"@teambit/legacy.consumer": "0.0.
|
69
|
-
"@teambit/scope.network": "0.0.
|
67
|
+
"@teambit/ui": "1.0.512",
|
68
|
+
"@teambit/legacy.consumer": "0.0.19",
|
69
|
+
"@teambit/scope.network": "0.0.19"
|
70
70
|
},
|
71
71
|
"devDependencies": {
|
72
72
|
"@types/lodash": "4.14.165",
|
@@ -75,11 +75,11 @@
|
|
75
75
|
"fs-extra": "10.0.0",
|
76
76
|
"@types/mocha": "9.1.0",
|
77
77
|
"@teambit/harmony.envs.core-aspect-env": "0.0.65",
|
78
|
-
"@teambit/component.testing.mock-components": "0.0.
|
79
|
-
"@teambit/harmony.testing.load-aspect": "0.0.
|
80
|
-
"@teambit/merge-lanes": "1.0.
|
81
|
-
"@teambit/snapping": "1.0.
|
82
|
-
"@teambit/workspace.testing.mock-workspace": "0.0.
|
78
|
+
"@teambit/component.testing.mock-components": "0.0.279",
|
79
|
+
"@teambit/harmony.testing.load-aspect": "0.0.274",
|
80
|
+
"@teambit/merge-lanes": "1.0.512",
|
81
|
+
"@teambit/snapping": "1.0.512",
|
82
|
+
"@teambit/workspace.testing.mock-workspace": "0.0.46"
|
83
83
|
},
|
84
84
|
"peerDependencies": {
|
85
85
|
"react": "^17.0.0 || ^18.0.0",
|