@teambit/export 1.0.506 → 1.0.508
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 +1 -1
- package/artifacts/preview/teambit_scope_export-preview.js +1 -1
- package/artifacts/schema.json +220 -112
- package/dist/export-scope-components.js +1 -1
- package/dist/export-scope-components.js.map +1 -1
- package/dist/export.main.runtime.d.ts +1 -1
- package/dist/export.main.runtime.js +4 -4
- package/dist/export.main.runtime.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{preview-1736306355320.js → preview-1736535915537.js} +2 -2
- package/package.json +22 -22
@@ -1,4 +1,4 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<testsuites tests="0" failures="0" errors="0" skipped="0">
|
3
|
-
<testsuite name="teambit.scope/export@1.0.
|
3
|
+
<testsuite name="teambit.scope/export@1.0.508" tests="0" failures="0" errors="0" skipped="0"/>
|
4
4
|
</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.scope/export-preview"]=t():e["teambit.scope/export-preview"]=t()}(self,(()=>(()=>{"use strict";var e={
|
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.scope/export-preview"]=t():e["teambit.scope/export-preview"]=t()}(self,(()=>(()=>{"use strict";var e={73899:(e,t,o)=>{var r={id:"teambit.scope/export@1.0.508",homepage:"https://bit.cloud/teambit/scope/export",exported:!0};function n(){const e=i(o(41594));return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,n.__bit_component=r,i.__bit_component=r;const p=()=>n().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},n().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/export.svg"}));p.__bit_component=r,t.Logo=p},41594:e=>{e.exports=React}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};o.r(r),o.d(r,{compositions:()=>f,compositions_metadata:()=>v,overview:()=>m});var n={};o.r(n),o.d(n,{default:()=>d});var i=o(73899);o(41594);const p=MdxJsReact,c=TeambitMdxUiMdxScopeContext;var s=["components"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)({}).hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},a.apply(null,arguments)}var u={},l="wrapper";function d(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;o[r]=e[r]}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,s);return(0,p.mdx)(l,a({},u,o,{components:t,mdxType:"MDXLayout"}),(0,p.mdx)(c.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const f=[i],m=[n],v={compositions:[{displayName:"Logo",identifier:"Logo"}]};return r})()));
|
package/artifacts/schema.json
CHANGED
@@ -267,7 +267,7 @@
|
|
267
267
|
"componentId": {
|
268
268
|
"scope": "teambit.legacy",
|
269
269
|
"name": "scope",
|
270
|
-
"version": "0.0.
|
270
|
+
"version": "0.0.15"
|
271
271
|
}
|
272
272
|
},
|
273
273
|
"isOptional": false
|
@@ -540,7 +540,7 @@
|
|
540
540
|
"componentId": {
|
541
541
|
"scope": "teambit.legacy",
|
542
542
|
"name": "scope",
|
543
|
-
"version": "0.0.
|
543
|
+
"version": "0.0.15"
|
544
544
|
}
|
545
545
|
},
|
546
546
|
"isOptional": false
|
@@ -1526,6 +1526,114 @@
|
|
1526
1526
|
"extendsNodes": []
|
1527
1527
|
}
|
1528
1528
|
},
|
1529
|
+
{
|
1530
|
+
"__schema": "ExportSchema",
|
1531
|
+
"location": {
|
1532
|
+
"filePath": "index.ts",
|
1533
|
+
"line": 1,
|
1534
|
+
"character": 41
|
1535
|
+
},
|
1536
|
+
"signature": "type ObjectsPerRemote = {\n remote: Remote;\n objectList: ObjectList;\n exportedIds?: string[] | undefined;\n}",
|
1537
|
+
"name": "ObjectsPerRemote",
|
1538
|
+
"exportNode": {
|
1539
|
+
"__schema": "TypeSchema",
|
1540
|
+
"location": {
|
1541
|
+
"filePath": "export.main.runtime.ts",
|
1542
|
+
"line": 47,
|
1543
|
+
"character": 1
|
1544
|
+
},
|
1545
|
+
"signature": "type ObjectsPerRemote = {\n remote: Remote;\n objectList: ObjectList;\n exportedIds?: string[] | undefined;\n}",
|
1546
|
+
"name": "ObjectsPerRemote",
|
1547
|
+
"type": {
|
1548
|
+
"__schema": "TypeLiteralSchema",
|
1549
|
+
"location": {
|
1550
|
+
"filePath": "export.main.runtime.ts",
|
1551
|
+
"line": 47,
|
1552
|
+
"character": 32
|
1553
|
+
},
|
1554
|
+
"members": [
|
1555
|
+
{
|
1556
|
+
"__schema": "VariableLikeSchema",
|
1557
|
+
"location": {
|
1558
|
+
"filePath": "export.main.runtime.ts",
|
1559
|
+
"line": 48,
|
1560
|
+
"character": 3
|
1561
|
+
},
|
1562
|
+
"signature": "(property) remote: Remote",
|
1563
|
+
"name": "remote",
|
1564
|
+
"type": {
|
1565
|
+
"__schema": "TypeRefSchema",
|
1566
|
+
"location": {
|
1567
|
+
"filePath": "export.main.runtime.ts",
|
1568
|
+
"line": 48,
|
1569
|
+
"character": 3
|
1570
|
+
},
|
1571
|
+
"name": "Remote",
|
1572
|
+
"componentId": {
|
1573
|
+
"scope": "teambit.scope",
|
1574
|
+
"name": "remotes",
|
1575
|
+
"version": "0.0.15"
|
1576
|
+
}
|
1577
|
+
},
|
1578
|
+
"isOptional": false
|
1579
|
+
},
|
1580
|
+
{
|
1581
|
+
"__schema": "VariableLikeSchema",
|
1582
|
+
"location": {
|
1583
|
+
"filePath": "export.main.runtime.ts",
|
1584
|
+
"line": 49,
|
1585
|
+
"character": 3
|
1586
|
+
},
|
1587
|
+
"signature": "(property) objectList: ObjectList",
|
1588
|
+
"name": "objectList",
|
1589
|
+
"type": {
|
1590
|
+
"__schema": "TypeRefSchema",
|
1591
|
+
"location": {
|
1592
|
+
"filePath": "export.main.runtime.ts",
|
1593
|
+
"line": 49,
|
1594
|
+
"character": 3
|
1595
|
+
},
|
1596
|
+
"name": "ObjectList",
|
1597
|
+
"componentId": {
|
1598
|
+
"scope": "teambit.scope",
|
1599
|
+
"name": "objects",
|
1600
|
+
"version": "0.0.15"
|
1601
|
+
}
|
1602
|
+
},
|
1603
|
+
"isOptional": false
|
1604
|
+
},
|
1605
|
+
{
|
1606
|
+
"__schema": "VariableLikeSchema",
|
1607
|
+
"location": {
|
1608
|
+
"filePath": "export.main.runtime.ts",
|
1609
|
+
"line": 50,
|
1610
|
+
"character": 3
|
1611
|
+
},
|
1612
|
+
"signature": "(property) exportedIds?: string[] | undefined",
|
1613
|
+
"name": "exportedIds",
|
1614
|
+
"type": {
|
1615
|
+
"__schema": "TypeArraySchema",
|
1616
|
+
"location": {
|
1617
|
+
"filePath": "export.main.runtime.ts",
|
1618
|
+
"line": 50,
|
1619
|
+
"character": 17
|
1620
|
+
},
|
1621
|
+
"type": {
|
1622
|
+
"__schema": "KeywordTypeSchema",
|
1623
|
+
"location": {
|
1624
|
+
"filePath": "export.main.runtime.ts",
|
1625
|
+
"line": 50,
|
1626
|
+
"character": 17
|
1627
|
+
},
|
1628
|
+
"name": "string"
|
1629
|
+
}
|
1630
|
+
},
|
1631
|
+
"isOptional": true
|
1632
|
+
}
|
1633
|
+
]
|
1634
|
+
}
|
1635
|
+
}
|
1636
|
+
},
|
1529
1637
|
{
|
1530
1638
|
"__schema": "ExportSchema",
|
1531
1639
|
"location": {
|
@@ -1582,7 +1690,7 @@
|
|
1582
1690
|
"componentId": {
|
1583
1691
|
"scope": "teambit.scope",
|
1584
1692
|
"name": "network",
|
1585
|
-
"version": "0.0.
|
1693
|
+
"version": "0.0.15"
|
1586
1694
|
}
|
1587
1695
|
}
|
1588
1696
|
},
|
@@ -1606,7 +1714,7 @@
|
|
1606
1714
|
"componentId": {
|
1607
1715
|
"scope": "teambit.legacy",
|
1608
1716
|
"name": "scope-api",
|
1609
|
-
"version": "0.0.
|
1717
|
+
"version": "0.0.70"
|
1610
1718
|
}
|
1611
1719
|
}
|
1612
1720
|
},
|
@@ -1630,7 +1738,7 @@
|
|
1630
1738
|
"componentId": {
|
1631
1739
|
"scope": "teambit.scope",
|
1632
1740
|
"name": "remote-actions",
|
1633
|
-
"version": "0.0.
|
1741
|
+
"version": "0.0.15"
|
1634
1742
|
}
|
1635
1743
|
}
|
1636
1744
|
},
|
@@ -1654,7 +1762,7 @@
|
|
1654
1762
|
"componentId": {
|
1655
1763
|
"scope": "teambit.scope",
|
1656
1764
|
"name": "remote-actions",
|
1657
|
-
"version": "0.0.
|
1765
|
+
"version": "0.0.15"
|
1658
1766
|
}
|
1659
1767
|
}
|
1660
1768
|
},
|
@@ -1678,7 +1786,7 @@
|
|
1678
1786
|
"componentId": {
|
1679
1787
|
"scope": "teambit.scope",
|
1680
1788
|
"name": "remote-actions",
|
1681
|
-
"version": "0.0.
|
1789
|
+
"version": "0.0.15"
|
1682
1790
|
}
|
1683
1791
|
}
|
1684
1792
|
},
|
@@ -1702,7 +1810,7 @@
|
|
1702
1810
|
"componentId": {
|
1703
1811
|
"scope": "teambit.scope",
|
1704
1812
|
"name": "remote-actions",
|
1705
|
-
"version": "0.0.
|
1813
|
+
"version": "0.0.15"
|
1706
1814
|
}
|
1707
1815
|
}
|
1708
1816
|
},
|
@@ -1726,7 +1834,7 @@
|
|
1726
1834
|
"componentId": {
|
1727
1835
|
"scope": "teambit.scope",
|
1728
1836
|
"name": "objects",
|
1729
|
-
"version": "0.0.
|
1837
|
+
"version": "0.0.15"
|
1730
1838
|
}
|
1731
1839
|
}
|
1732
1840
|
},
|
@@ -2509,6 +2617,104 @@
|
|
2509
2617
|
"modifiers": []
|
2510
2618
|
}
|
2511
2619
|
},
|
2620
|
+
{
|
2621
|
+
"__schema": "TypeSchema",
|
2622
|
+
"location": {
|
2623
|
+
"filePath": "export.main.runtime.ts",
|
2624
|
+
"line": 47,
|
2625
|
+
"character": 1
|
2626
|
+
},
|
2627
|
+
"signature": "type ObjectsPerRemote = {\n remote: Remote;\n objectList: ObjectList;\n exportedIds?: string[] | undefined;\n}",
|
2628
|
+
"name": "ObjectsPerRemote",
|
2629
|
+
"type": {
|
2630
|
+
"__schema": "TypeLiteralSchema",
|
2631
|
+
"location": {
|
2632
|
+
"filePath": "export.main.runtime.ts",
|
2633
|
+
"line": 47,
|
2634
|
+
"character": 32
|
2635
|
+
},
|
2636
|
+
"members": [
|
2637
|
+
{
|
2638
|
+
"__schema": "VariableLikeSchema",
|
2639
|
+
"location": {
|
2640
|
+
"filePath": "export.main.runtime.ts",
|
2641
|
+
"line": 48,
|
2642
|
+
"character": 3
|
2643
|
+
},
|
2644
|
+
"signature": "(property) remote: Remote",
|
2645
|
+
"name": "remote",
|
2646
|
+
"type": {
|
2647
|
+
"__schema": "TypeRefSchema",
|
2648
|
+
"location": {
|
2649
|
+
"filePath": "export.main.runtime.ts",
|
2650
|
+
"line": 48,
|
2651
|
+
"character": 3
|
2652
|
+
},
|
2653
|
+
"name": "Remote",
|
2654
|
+
"componentId": {
|
2655
|
+
"scope": "teambit.scope",
|
2656
|
+
"name": "remotes",
|
2657
|
+
"version": "0.0.15"
|
2658
|
+
}
|
2659
|
+
},
|
2660
|
+
"isOptional": false
|
2661
|
+
},
|
2662
|
+
{
|
2663
|
+
"__schema": "VariableLikeSchema",
|
2664
|
+
"location": {
|
2665
|
+
"filePath": "export.main.runtime.ts",
|
2666
|
+
"line": 49,
|
2667
|
+
"character": 3
|
2668
|
+
},
|
2669
|
+
"signature": "(property) objectList: ObjectList",
|
2670
|
+
"name": "objectList",
|
2671
|
+
"type": {
|
2672
|
+
"__schema": "TypeRefSchema",
|
2673
|
+
"location": {
|
2674
|
+
"filePath": "export.main.runtime.ts",
|
2675
|
+
"line": 49,
|
2676
|
+
"character": 3
|
2677
|
+
},
|
2678
|
+
"name": "ObjectList",
|
2679
|
+
"componentId": {
|
2680
|
+
"scope": "teambit.scope",
|
2681
|
+
"name": "objects",
|
2682
|
+
"version": "0.0.15"
|
2683
|
+
}
|
2684
|
+
},
|
2685
|
+
"isOptional": false
|
2686
|
+
},
|
2687
|
+
{
|
2688
|
+
"__schema": "VariableLikeSchema",
|
2689
|
+
"location": {
|
2690
|
+
"filePath": "export.main.runtime.ts",
|
2691
|
+
"line": 50,
|
2692
|
+
"character": 3
|
2693
|
+
},
|
2694
|
+
"signature": "(property) exportedIds?: string[] | undefined",
|
2695
|
+
"name": "exportedIds",
|
2696
|
+
"type": {
|
2697
|
+
"__schema": "TypeArraySchema",
|
2698
|
+
"location": {
|
2699
|
+
"filePath": "export.main.runtime.ts",
|
2700
|
+
"line": 50,
|
2701
|
+
"character": 17
|
2702
|
+
},
|
2703
|
+
"type": {
|
2704
|
+
"__schema": "KeywordTypeSchema",
|
2705
|
+
"location": {
|
2706
|
+
"filePath": "export.main.runtime.ts",
|
2707
|
+
"line": 50,
|
2708
|
+
"character": 17
|
2709
|
+
},
|
2710
|
+
"name": "string"
|
2711
|
+
}
|
2712
|
+
},
|
2713
|
+
"isOptional": true
|
2714
|
+
}
|
2715
|
+
]
|
2716
|
+
}
|
2717
|
+
},
|
2512
2718
|
{
|
2513
2719
|
"__schema": "InterfaceSchema",
|
2514
2720
|
"location": {
|
@@ -3027,7 +3233,7 @@
|
|
3027
3233
|
"componentId": {
|
3028
3234
|
"scope": "teambit.legacy",
|
3029
3235
|
"name": "scope",
|
3030
|
-
"version": "0.0.
|
3236
|
+
"version": "0.0.15"
|
3031
3237
|
}
|
3032
3238
|
},
|
3033
3239
|
"isOptional": false
|
@@ -3300,7 +3506,7 @@
|
|
3300
3506
|
"componentId": {
|
3301
3507
|
"scope": "teambit.legacy",
|
3302
3508
|
"name": "scope",
|
3303
|
-
"version": "0.0.
|
3509
|
+
"version": "0.0.15"
|
3304
3510
|
}
|
3305
3511
|
},
|
3306
3512
|
"isOptional": false
|
@@ -4191,7 +4397,7 @@
|
|
4191
4397
|
"componentId": {
|
4192
4398
|
"scope": "teambit.scope",
|
4193
4399
|
"name": "objects",
|
4194
|
-
"version": "0.0.
|
4400
|
+
"version": "0.0.15"
|
4195
4401
|
}
|
4196
4402
|
},
|
4197
4403
|
"isOptional": false
|
@@ -4284,104 +4490,6 @@
|
|
4284
4490
|
]
|
4285
4491
|
}
|
4286
4492
|
},
|
4287
|
-
{
|
4288
|
-
"__schema": "TypeSchema",
|
4289
|
-
"location": {
|
4290
|
-
"filePath": "export.main.runtime.ts",
|
4291
|
-
"line": 47,
|
4292
|
-
"character": 1
|
4293
|
-
},
|
4294
|
-
"signature": "type ObjectsPerRemote = {\n remote: Remote;\n objectList: ObjectList;\n exportedIds?: string[] | undefined;\n}",
|
4295
|
-
"name": "ObjectsPerRemote",
|
4296
|
-
"type": {
|
4297
|
-
"__schema": "TypeLiteralSchema",
|
4298
|
-
"location": {
|
4299
|
-
"filePath": "export.main.runtime.ts",
|
4300
|
-
"line": 47,
|
4301
|
-
"character": 25
|
4302
|
-
},
|
4303
|
-
"members": [
|
4304
|
-
{
|
4305
|
-
"__schema": "VariableLikeSchema",
|
4306
|
-
"location": {
|
4307
|
-
"filePath": "export.main.runtime.ts",
|
4308
|
-
"line": 48,
|
4309
|
-
"character": 3
|
4310
|
-
},
|
4311
|
-
"signature": "(property) remote: Remote",
|
4312
|
-
"name": "remote",
|
4313
|
-
"type": {
|
4314
|
-
"__schema": "TypeRefSchema",
|
4315
|
-
"location": {
|
4316
|
-
"filePath": "export.main.runtime.ts",
|
4317
|
-
"line": 48,
|
4318
|
-
"character": 3
|
4319
|
-
},
|
4320
|
-
"name": "Remote",
|
4321
|
-
"componentId": {
|
4322
|
-
"scope": "teambit.scope",
|
4323
|
-
"name": "remotes",
|
4324
|
-
"version": "0.0.13"
|
4325
|
-
}
|
4326
|
-
},
|
4327
|
-
"isOptional": false
|
4328
|
-
},
|
4329
|
-
{
|
4330
|
-
"__schema": "VariableLikeSchema",
|
4331
|
-
"location": {
|
4332
|
-
"filePath": "export.main.runtime.ts",
|
4333
|
-
"line": 49,
|
4334
|
-
"character": 3
|
4335
|
-
},
|
4336
|
-
"signature": "(property) objectList: ObjectList",
|
4337
|
-
"name": "objectList",
|
4338
|
-
"type": {
|
4339
|
-
"__schema": "TypeRefSchema",
|
4340
|
-
"location": {
|
4341
|
-
"filePath": "export.main.runtime.ts",
|
4342
|
-
"line": 49,
|
4343
|
-
"character": 3
|
4344
|
-
},
|
4345
|
-
"name": "ObjectList",
|
4346
|
-
"componentId": {
|
4347
|
-
"scope": "teambit.scope",
|
4348
|
-
"name": "objects",
|
4349
|
-
"version": "0.0.13"
|
4350
|
-
}
|
4351
|
-
},
|
4352
|
-
"isOptional": false
|
4353
|
-
},
|
4354
|
-
{
|
4355
|
-
"__schema": "VariableLikeSchema",
|
4356
|
-
"location": {
|
4357
|
-
"filePath": "export.main.runtime.ts",
|
4358
|
-
"line": 50,
|
4359
|
-
"character": 3
|
4360
|
-
},
|
4361
|
-
"signature": "(property) exportedIds?: string[] | undefined",
|
4362
|
-
"name": "exportedIds",
|
4363
|
-
"type": {
|
4364
|
-
"__schema": "TypeArraySchema",
|
4365
|
-
"location": {
|
4366
|
-
"filePath": "export.main.runtime.ts",
|
4367
|
-
"line": 50,
|
4368
|
-
"character": 17
|
4369
|
-
},
|
4370
|
-
"type": {
|
4371
|
-
"__schema": "KeywordTypeSchema",
|
4372
|
-
"location": {
|
4373
|
-
"filePath": "export.main.runtime.ts",
|
4374
|
-
"line": 50,
|
4375
|
-
"character": 17
|
4376
|
-
},
|
4377
|
-
"name": "string"
|
4378
|
-
}
|
4379
|
-
},
|
4380
|
-
"isOptional": true
|
4381
|
-
}
|
4382
|
-
]
|
4383
|
-
}
|
4384
|
-
},
|
4385
4493
|
{
|
4386
4494
|
"__schema": "TypeSchema",
|
4387
4495
|
"location": {
|
@@ -5726,7 +5834,7 @@
|
|
5726
5834
|
"componentId": {
|
5727
5835
|
"scope": "teambit.scope",
|
5728
5836
|
"name": "remotes",
|
5729
|
-
"version": "0.0.
|
5837
|
+
"version": "0.0.15"
|
5730
5838
|
}
|
5731
5839
|
},
|
5732
5840
|
"isOptional": false
|
@@ -6415,7 +6523,7 @@
|
|
6415
6523
|
"componentId": {
|
6416
6524
|
"scope": "teambit.scope",
|
6417
6525
|
"name": "export",
|
6418
|
-
"version": "1.0.
|
6526
|
+
"version": "1.0.508"
|
6419
6527
|
},
|
6420
6528
|
"taggedModuleExports": []
|
6421
6529
|
}
|
@@ -351,7 +351,7 @@ async function persistRemotes(manyObjectsPerRemote, clientId) {
|
|
351
351
|
}
|
352
352
|
async function resumeExport(scope, exportId, remotes) {
|
353
353
|
const scopeRemotes = await (0, _scope().getScopeRemotes)(scope);
|
354
|
-
const remotesObj = await Promise.all(remotes.map(r => scopeRemotes.resolve(r
|
354
|
+
const remotesObj = await Promise.all(remotes.map(r => scopeRemotes.resolve(r)));
|
355
355
|
const remotesForPersist = remotesObj.map(remote => ({
|
356
356
|
remote
|
357
357
|
}));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_pMapSeries","data","_interopRequireDefault","require","_lodash","_componentId","_legacy","_scope","_legacy2","_scope2","_scope3","_legacy3","_toolboxPromise","_harmonyModules","e","__esModule","default","exportManyBareScope","scope","objectList","logger","debugAndAddBreadCrumb","objects","length","mergedIds","saveObjects","scopeComponentsImporter","scopeImporter","importManyFromOriginalScopes","bitObjectList","toBitObjects","objectsNotRequireMerge","getObjectsNotRequireMerge","mergedComponentsResults","mergedLanes","mergedLaneHistories","mergeObjects","mergedComponents","map","_","mergedComponent","versionObjects","filter","o","Version","versionsHistory","updateVersionHistory","allObjects","validateObjects","writeObjectsToTheFS","debug","versionsWithComponentId","obj","origin","id","versionsWithOrigin","versionWithoutOrigin","partition","v","versionHistoryOfVersionsWithOrigin","_updateVersionHistoryForVersionsWithOrigin","versionHistoryOfVersionsWithoutOrigin","_updateVersionHistoryForVersionsWithoutOrigin","mutatedVersionObjects","squashed","unrelated","Promise","all","modelComp","updateRebasedVersionHistory","versionsHistoryNoNull","compact","compId","toString","join","componentVersionMap","Map","forEach","version","component","find","c","name","error","hash","versions","get","set","pMapPool","undefined","concurrency","concurrentComponentsLimit","throwForMissingDeps","components","getComponents","lanesObjects","getLanes","getVersions","lanesHistory","getLaneHistories","mergeResults","errors","sources","mergeComponents","mergeAllLanesResults","mapSeries","laneObject","mergeLane","lanesErrors","r","mergeErrors","flat","componentsNeedUpdate","result","ComponentNeedsUpdate","componentsWithConflicts","MergeConflict","idsAndVersions","idsAndVersionsWithConflicts","sortBy","property","idsOfNeedUpdateComps","lane","clearObjectsFromCache","MergeConflictOnRemote","throwForMissingLocalDependencies","mergedVersions","mergedLanesComponents","getMergedIds","toBitId","changeVersion","ComponentIdList","uniqFromArray","laneHistory","existingLaneHistory","load","merge","lanes","compsWithHeads","toBitIds","toComponentIdWithHead","originComp","getOriginCompWithVer","compObj","toComponentId","isEqualWithoutVersion","tag","getTagOfRefIfExists","Ref","from","depsIds","getAllFlattenedDependencies","depId","existingModelComponent","getModelComponentIfExist","ComponentNotFound","versionRef","getRef","Error","objectExist","getCache","has","isEqual","validateRemotes","remotes","clientId","isResumingExport","loader","start","remote","action","ExportValidate","err","errorAndAddBreadCrumb","removePendingDirs","persistRemotes","manyObjectsPerRemote","persistedRemotes","objectsPerRemote","maxRetries","succeed","lastErrMsg","i","exportedIds","ExportPersist","message","PersistFailed","push","resumeExport","exportId","scopeRemotes","getScopeRemotes","remotesObj","resolve","remotesForPersist","pushedRemotes","RemovePendingDir"],"sources":["export-scope-components.ts"],"sourcesContent":["import mapSeries from 'p-map-series';\nimport { compact, partition, property, sortBy } from 'lodash';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { logger } from '@teambit/legacy.logger';\nimport { Remotes, Remote, getScopeRemotes } from '@teambit/scope.remotes';\nimport {\n MergeResult,\n PersistFailed,\n Scope,\n ComponentNeedsUpdate,\n ComponentNotFound,\n MergeConflict,\n MergeConflictOnRemote,\n} from '@teambit/legacy.scope';\nimport {\n Lane,\n Version,\n ModelComponent,\n VersionHistory,\n LaneHistory,\n Ref,\n BitObjectList,\n ObjectList,\n} from '@teambit/scope.objects';\nimport { ExportPersist, ExportValidate, RemovePendingDir } from '@teambit/scope.remote-actions';\nimport { loader } from '@teambit/legacy.loader';\nimport { pMapPool } from '@teambit/toolbox.promise.map-pool';\nimport { concurrentComponentsLimit } from '@teambit/harmony.modules.concurrency';\n\n/**\n * ** Legacy and \"bit sign\" Only **\n *\n * @TODO there is no real difference between bare scope and a working directory scope - let's adjust terminology to avoid confusions in the future\n * saves a component into the objects directory of the remote scope, then, resolves its\n * dependencies, saves them as well. Finally runs the build process if needed on an isolated\n * environment.\n */\nexport async function exportManyBareScope(scope: Scope, objectList: ObjectList): Promise<ComponentIdList> {\n logger.debugAndAddBreadCrumb('exportManyBareScope', `started with ${objectList.objects.length} objects`);\n const mergedIds = await saveObjects(scope, objectList);\n logger.debugAndAddBreadCrumb('exportManyBareScope', 'will try to importMany in case there are missing dependencies');\n const scopeComponentsImporter = scope.scopeImporter;\n await scopeComponentsImporter.importManyFromOriginalScopes(mergedIds); // resolve dependencies\n logger.debugAndAddBreadCrumb('exportManyBareScope', 'successfully ran importMany');\n\n return mergedIds;\n}\n\ntype RemotesForPersist = {\n remote: Remote;\n exportedIds?: string[];\n};\n\n/**\n * save objects into the scope.\n */\nexport async function saveObjects(scope: Scope, objectList: ObjectList): Promise<ComponentIdList> {\n const bitObjectList = await objectList.toBitObjects();\n const objectsNotRequireMerge = bitObjectList.getObjectsNotRequireMerge();\n // components and lanes can't be just added, they need to be carefully merged.\n const { mergedIds, mergedComponentsResults, mergedLanes, mergedLaneHistories } = await mergeObjects(\n scope,\n bitObjectList\n );\n const mergedComponents = mergedComponentsResults.map((_) => _.mergedComponent);\n const versionObjects = objectsNotRequireMerge.filter((o) => o instanceof Version) as Version[];\n const versionsHistory = await updateVersionHistory(scope, mergedComponents, versionObjects);\n const allObjects = [\n ...mergedComponents,\n ...mergedLanes,\n ...objectsNotRequireMerge,\n ...versionsHistory,\n ...mergedLaneHistories,\n ];\n scope.objects.validateObjects(true, allObjects);\n await scope.objects.writeObjectsToTheFS(allObjects);\n logger.debug(\n `export-scope-components.saveObjects, ${allObjects.length} objects were written successfully to the filesystem`\n );\n\n return mergedIds;\n}\n\n/**\n * Previously, the VersionHistory was populated during fetch. However, we want the fetch operation to be more efficient\n * so we move this logic to the export operation.\n * Before version 0.2.22, the Version object didn't have any info about the component-id, so we do update only for\n * rebase. For versions that tagged by > 0.2.22, we have the \"origin.id\" and we know to what component this version\n * belongs to.\n */\nasync function updateVersionHistory(\n scope: Scope,\n mergedComponents: ModelComponent[],\n versionObjects: Version[]\n): Promise<VersionHistory[]> {\n if (!mergedComponents.length) {\n // this is important for bit-sign to not try to update VersionHistory and then error due to missing components\n logger.debug('updateVersionHistory, no components were merged, no need to update VersionHistory');\n return [];\n }\n logger.debug(\n `updateVersionHistory, total components: ${mergedComponents.length}, total versions: ${versionObjects.length}`\n );\n\n const versionsWithComponentId = versionObjects.filter((obj) => obj.origin?.id);\n\n const [versionsWithOrigin, versionWithoutOrigin] = partition(versionsWithComponentId, (v) => v.origin?.id);\n\n const versionHistoryOfVersionsWithOrigin = await _updateVersionHistoryForVersionsWithOrigin(\n scope,\n mergedComponents,\n versionsWithOrigin\n );\n\n const versionHistoryOfVersionsWithoutOrigin = await _updateVersionHistoryForVersionsWithoutOrigin(\n scope,\n mergedComponents,\n versionWithoutOrigin\n );\n\n return [...versionHistoryOfVersionsWithOrigin, ...versionHistoryOfVersionsWithoutOrigin];\n}\n\n/**\n * In case of rebase (squash / unrelated) where the version history is changed, make the necessary changes in the\n * VersionHistory.\n * Because previously (bit-version < 0.2.22) we only knew about this from the Version object, and the Version object\n * didn't have any info about what the component-id is, we have to iterate all model-components, grab their\n * version-history and check whether the version-hash is inside their VersionHistory.\n * it's not ideal performance wise. however, in most cases, this rebase is about squashing, and when squashing, it's\n * done for the entire lane, so all components need to be updated regardless.\n */\nasync function _updateVersionHistoryForVersionsWithoutOrigin(\n scope: Scope,\n mergedComponents: ModelComponent[],\n versionWithoutOrigin: Version[]\n): Promise<VersionHistory[]> {\n const mutatedVersionObjects = versionWithoutOrigin.filter((v) => v.squashed || v.unrelated);\n if (!mutatedVersionObjects.length) return [];\n logger.debug(`_updateVersionHistoryForVersionsWithoutOrigin, found ${mutatedVersionObjects.length} mutated version`);\n const versionsHistory = await Promise.all(\n mergedComponents.map(async (modelComp) =>\n modelComp.updateRebasedVersionHistory(scope.objects, mutatedVersionObjects)\n )\n );\n const versionsHistoryNoNull = compact(versionsHistory);\n logger.debug(`_updateVersionHistoryForVersionsWithoutOrigin, found ${\n versionsHistoryNoNull.length\n } versionsHistory to update\n${versionsHistoryNoNull.map((v) => v.compId.toString()).join(', ')}`);\n\n return versionsHistoryNoNull;\n}\n\nasync function _updateVersionHistoryForVersionsWithOrigin(\n scope: Scope,\n mergedComponents: ModelComponent[],\n versionObjects: Version[]\n): Promise<VersionHistory[]> {\n if (!versionObjects.length) return [];\n logger.debug(`_updateVersionHistoryForVersionsWithOrigin, found ${versionObjects.length} versions with origin`);\n const componentVersionMap = new Map<ModelComponent, Version[]>();\n versionObjects.forEach((version) => {\n const component = mergedComponents.find(\n (c) => c.scope === version.origin?.id.scope && c.name === version.origin?.id.name\n );\n if (!component) {\n logger.error(`updateVersionHistoryIfNeeded, unable to find component for version ${version.hash().toString()}`);\n return;\n }\n const versions = componentVersionMap.get(component) || [];\n componentVersionMap.set(component, [...versions, version]);\n });\n\n const versionsHistory = await pMapPool(\n mergedComponents,\n async (modelComp) => {\n const versions = componentVersionMap.get(modelComp);\n if (!versions || !versions.length) return undefined;\n return modelComp.updateVersionHistory(scope.objects, versions);\n },\n { concurrency: concurrentComponentsLimit() }\n );\n\n return compact(versionsHistory);\n}\n\ntype MergeObjectsResult = {\n mergedIds: ComponentIdList;\n mergedComponentsResults: MergeResult[];\n mergedLanes: Lane[];\n mergedLaneHistories: LaneHistory[];\n};\n\n/**\n * merge components into the scope.\n *\n * a component might have multiple versions that some where merged and some were not.\n * the BitIds returned here includes the versions that were merged. so it could contain multiple\n * ids of the same component with different versions\n */\nexport async function mergeObjects(\n scope: Scope,\n bitObjectList: BitObjectList,\n throwForMissingDeps = false\n): Promise<MergeObjectsResult> {\n const components = bitObjectList.getComponents();\n const lanesObjects = bitObjectList.getLanes();\n const versions = bitObjectList.getVersions();\n const lanesHistory = bitObjectList.getLaneHistories();\n logger.debugAndAddBreadCrumb(\n 'export-scope-components.mergeObjects',\n `Going to merge ${components.length} components, ${lanesObjects.length} lanes`\n );\n const { mergeResults, errors } = lanesObjects.length\n ? { mergeResults: [], errors: [] } // for lanes, no need to merge component objects, the lane is merged later.\n : await scope.sources.mergeComponents(components, versions);\n\n const mergeAllLanesResults = await mapSeries(lanesObjects, (laneObject) =>\n scope.sources.mergeLane(laneObject, false, versions, components)\n );\n const lanesErrors = mergeAllLanesResults.map((r) => r.mergeErrors).flat();\n const componentsNeedUpdate = [\n ...errors.filter((result) => result instanceof ComponentNeedsUpdate),\n ...lanesErrors,\n ] as ComponentNeedsUpdate[];\n const componentsWithConflicts = errors.filter((result) => result instanceof MergeConflict) as MergeConflict[];\n if (componentsWithConflicts.length || componentsNeedUpdate.length) {\n const idsAndVersions = componentsWithConflicts.map((c) => ({ id: c.id, versions: c.versions }));\n const idsAndVersionsWithConflicts = sortBy(idsAndVersions, property('id'));\n const idsOfNeedUpdateComps = sortBy(\n componentsNeedUpdate.map((c) => ({ id: c.id, lane: c.lane })),\n property('id')\n );\n scope.objects.clearObjectsFromCache(); // just in case this error is caught. we don't want to persist anything by mistake.\n throw new MergeConflictOnRemote(idsAndVersionsWithConflicts, idsOfNeedUpdateComps);\n }\n if (throwForMissingDeps) await throwForMissingLocalDependencies(scope, versions, components, lanesObjects);\n const mergedComponents = mergeResults.filter(({ mergedVersions }) => mergedVersions.length);\n const mergedLanesComponents = mergeAllLanesResults\n .map((r) => r.mergeResults)\n .flat()\n .filter(({ mergedVersions }) => mergedVersions.length);\n const mergedComponentsResults = [...mergedComponents, ...mergedLanesComponents];\n const getMergedIds = ({ mergedComponent, mergedVersions }): ComponentID[] =>\n mergedVersions.map((version) => mergedComponent.toBitId().changeVersion(version));\n const mergedIds = ComponentIdList.uniqFromArray(mergedComponentsResults.map(getMergedIds).flat());\n const mergedLanes = mergeAllLanesResults.map((r) => r.mergeLane);\n\n const mergedLaneHistories = await mapSeries(lanesHistory, async (laneHistory) => {\n const existingLaneHistory = (await scope.objects.load(laneHistory.hash())) as LaneHistory | undefined;\n if (existingLaneHistory) {\n existingLaneHistory.merge(laneHistory);\n return existingLaneHistory;\n }\n return laneHistory;\n });\n\n return { mergedIds, mergedComponentsResults, mergedLanes, mergedLaneHistories };\n}\n\n/**\n * make sure that all local objects were actually transferred into the remote.\n * this gets called as part of the export-validate step. it doesn't check for dependencies from\n * other scopes, as they'll be retrieved later by the fetch-missing-deps step.\n * we can't wait for that step to validate local dependencies because it happens after persisting,\n * and we don't want to persist when local dependencies were not exported.\n */\nasync function throwForMissingLocalDependencies(\n scope: Scope,\n versions: Version[],\n components: ModelComponent[],\n lanes: Lane[]\n) {\n const compsWithHeads = lanes.length\n ? lanes.map((lane) => lane.toBitIds()).flat()\n : components.map((c) => c.toComponentIdWithHead());\n\n await Promise.all(\n versions.map(async (version) => {\n const originComp = compsWithHeads.find((id) => version.hash().toString() === id.version);\n if (!originComp) {\n // coz if an older version has a missing dep, then, it's fine. (it can easily happen when exporting lane, which\n // all old versions are exported)\n return;\n }\n const getOriginCompWithVer = () => {\n const compObj = components.find((c) => c.toComponentId().isEqualWithoutVersion(originComp));\n if (!compObj) return originComp;\n const tag = compObj.getTagOfRefIfExists(Ref.from(originComp.version as string));\n if (tag) return originComp.changeVersion(tag);\n return originComp;\n };\n const depsIds = version.getAllFlattenedDependencies();\n await Promise.all(\n depsIds.map(async (depId) => {\n if (depId.scope !== scope.name) return;\n const existingModelComponent =\n (await scope.getModelComponentIfExist(depId)) ||\n components.find((c) => c.toComponentId().isEqualWithoutVersion(depId));\n if (!existingModelComponent) {\n scope.objects.clearObjectsFromCache(); // just in case this error is caught. we don't want to persist anything by mistake.\n throw new ComponentNotFound(depId.toString(), getOriginCompWithVer().toString());\n }\n const versionRef = existingModelComponent.getRef(depId.version as string);\n if (!versionRef) throw new Error(`unable to find Ref/Hash of ${depId.toString()}`);\n const objectExist =\n scope.objects.getCache(versionRef) ||\n (await scope.objects.has(versionRef)) ||\n versions.find((v) => v.hash().isEqual(versionRef));\n if (!objectExist) {\n scope.objects.clearObjectsFromCache(); // just in case this error is caught. we don't want to persist anything by mistake.\n throw new ComponentNotFound(depId.toString(), getOriginCompWithVer().toString());\n }\n })\n );\n })\n );\n}\n\nexport async function validateRemotes(remotes: Remote[], clientId: string, isResumingExport = true) {\n loader.start('verifying that objects can be merged on the remotes...');\n try {\n await Promise.all(\n remotes.map((remote) =>\n remote.action(ExportValidate.name, {\n clientId,\n isResumingExport: true,\n })\n )\n );\n } catch (err: any) {\n logger.errorAndAddBreadCrumb('validateRemotes', 'failed validating remotes', {}, err);\n if (!isResumingExport) {\n // when resuming export, we don't want to delete the pending-objects because some scopes\n // have them persisted and some not. we want to persist to all failing scopes.\n await removePendingDirs(remotes, clientId);\n }\n throw err;\n }\n}\n\nexport async function persistRemotes(manyObjectsPerRemote: RemotesForPersist[], clientId: string) {\n const persistedRemotes: string[] = [];\n await mapSeries(manyObjectsPerRemote, async (objectsPerRemote: RemotesForPersist) => {\n const { remote } = objectsPerRemote;\n loader.start(`persisting data on the remote \"${remote.name}\"...`);\n const maxRetries = 3;\n let succeed = false;\n let lastErrMsg = '';\n for (let i = 0; i < maxRetries; i += 1) {\n try {\n // eslint-disable-next-line no-await-in-loop\n const exportedIds: string[] = await remote.action(ExportPersist.name, { clientId });\n objectsPerRemote.exportedIds = exportedIds;\n succeed = true;\n break;\n } catch (err: any) {\n lastErrMsg = err.message;\n logger.errorAndAddBreadCrumb(\n 'persistRemotes',\n `failed on remote ${remote.name}, attempt ${i + 1} out of ${maxRetries}`,\n {},\n err\n );\n }\n }\n if (!succeed) {\n throw new PersistFailed([remote.name], { [remote.name]: lastErrMsg });\n }\n logger.debugAndAddBreadCrumb('persistRemotes', `successfully pushed all ids to the bare-scope ${remote.name}`);\n persistedRemotes.push(remote.name);\n });\n}\n\nexport async function resumeExport(scope: Scope, exportId: string, remotes: string[]): Promise<string[]> {\n const scopeRemotes: Remotes = await getScopeRemotes(scope);\n const remotesObj = await Promise.all(remotes.map((r) => scopeRemotes.resolve(r, scope)));\n const remotesForPersist: RemotesForPersist[] = remotesObj.map((remote) => ({ remote }));\n await validateRemotes(remotesObj, exportId);\n await persistRemotes(remotesForPersist, exportId);\n return compact(remotesForPersist.map((r) => r.exportedIds).flat());\n}\n\nexport async function removePendingDirs(pushedRemotes: Remote[], clientId: string) {\n await Promise.all(pushedRemotes.map((remote) => remote.action(RemovePendingDir.name, { clientId })));\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,Y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IACAjK,gBAAM,CAACC,qBAAqB,CAAC,gBAAgB,EAAE,iDAAiDoJ,MAAM,CAACvF,IAAI,EAAE,CAAC;IAC9G+F,gBAAgB,CAACU,IAAI,CAAClB,MAAM,CAACvF,IAAI,CAAC;EACpC,CAAC,CAAC;AACJ;AAEO,eAAe0G,YAAYA,CAAC1K,KAAY,EAAE2K,QAAgB,EAAEzB,OAAiB,EAAqB;EACvG,MAAM0B,YAAqB,GAAG,MAAM,IAAAC,wBAAe,EAAC7K,KAAK,CAAC;EAC1D,MAAM8K,UAAU,GAAG,MAAM9H,OAAO,CAACC,GAAG,CAACiG,OAAO,CAAC9H,GAAG,CAAEuE,CAAC,IAAKiF,YAAY,CAACG,OAAO,CAACpF,CAAC,EAAE3F,KAAK,CAAC,CAAC,CAAC;EACxF,MAAMgL,iBAAsC,GAAGF,UAAU,CAAC1J,GAAG,CAAEmI,MAAM,KAAM;IAAEA;EAAO,CAAC,CAAC,CAAC;EACvF,MAAMN,eAAe,CAAC6B,UAAU,EAAEH,QAAQ,CAAC;EAC3C,MAAMd,cAAc,CAACmB,iBAAiB,EAAEL,QAAQ,CAAC;EACjD,OAAO,IAAAtH,iBAAO,EAAC2H,iBAAiB,CAAC5J,GAAG,CAAEuE,CAAC,IAAKA,CAAC,CAAC0E,WAAW,CAAC,CAACxE,IAAI,CAAC,CAAC,CAAC;AACpE;AAEO,eAAe+D,iBAAiBA,CAACqB,aAAuB,EAAE9B,QAAgB,EAAE;EACjF,MAAMnG,OAAO,CAACC,GAAG,CAACgI,aAAa,CAAC7J,GAAG,CAAEmI,MAAM,IAAKA,MAAM,CAACC,MAAM,CAAC0B,0BAAgB,CAAClH,IAAI,EAAE;IAAEmF;EAAS,CAAC,CAAC,CAAC,CAAC;AACtG","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_pMapSeries","data","_interopRequireDefault","require","_lodash","_componentId","_legacy","_scope","_legacy2","_scope2","_scope3","_legacy3","_toolboxPromise","_harmonyModules","e","__esModule","default","exportManyBareScope","scope","objectList","logger","debugAndAddBreadCrumb","objects","length","mergedIds","saveObjects","scopeComponentsImporter","scopeImporter","importManyFromOriginalScopes","bitObjectList","toBitObjects","objectsNotRequireMerge","getObjectsNotRequireMerge","mergedComponentsResults","mergedLanes","mergedLaneHistories","mergeObjects","mergedComponents","map","_","mergedComponent","versionObjects","filter","o","Version","versionsHistory","updateVersionHistory","allObjects","validateObjects","writeObjectsToTheFS","debug","versionsWithComponentId","obj","origin","id","versionsWithOrigin","versionWithoutOrigin","partition","v","versionHistoryOfVersionsWithOrigin","_updateVersionHistoryForVersionsWithOrigin","versionHistoryOfVersionsWithoutOrigin","_updateVersionHistoryForVersionsWithoutOrigin","mutatedVersionObjects","squashed","unrelated","Promise","all","modelComp","updateRebasedVersionHistory","versionsHistoryNoNull","compact","compId","toString","join","componentVersionMap","Map","forEach","version","component","find","c","name","error","hash","versions","get","set","pMapPool","undefined","concurrency","concurrentComponentsLimit","throwForMissingDeps","components","getComponents","lanesObjects","getLanes","getVersions","lanesHistory","getLaneHistories","mergeResults","errors","sources","mergeComponents","mergeAllLanesResults","mapSeries","laneObject","mergeLane","lanesErrors","r","mergeErrors","flat","componentsNeedUpdate","result","ComponentNeedsUpdate","componentsWithConflicts","MergeConflict","idsAndVersions","idsAndVersionsWithConflicts","sortBy","property","idsOfNeedUpdateComps","lane","clearObjectsFromCache","MergeConflictOnRemote","throwForMissingLocalDependencies","mergedVersions","mergedLanesComponents","getMergedIds","toBitId","changeVersion","ComponentIdList","uniqFromArray","laneHistory","existingLaneHistory","load","merge","lanes","compsWithHeads","toBitIds","toComponentIdWithHead","originComp","getOriginCompWithVer","compObj","toComponentId","isEqualWithoutVersion","tag","getTagOfRefIfExists","Ref","from","depsIds","getAllFlattenedDependencies","depId","existingModelComponent","getModelComponentIfExist","ComponentNotFound","versionRef","getRef","Error","objectExist","getCache","has","isEqual","validateRemotes","remotes","clientId","isResumingExport","loader","start","remote","action","ExportValidate","err","errorAndAddBreadCrumb","removePendingDirs","persistRemotes","manyObjectsPerRemote","persistedRemotes","objectsPerRemote","maxRetries","succeed","lastErrMsg","i","exportedIds","ExportPersist","message","PersistFailed","push","resumeExport","exportId","scopeRemotes","getScopeRemotes","remotesObj","resolve","remotesForPersist","pushedRemotes","RemovePendingDir"],"sources":["export-scope-components.ts"],"sourcesContent":["import mapSeries from 'p-map-series';\nimport { compact, partition, property, sortBy } from 'lodash';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { logger } from '@teambit/legacy.logger';\nimport { Remotes, Remote, getScopeRemotes } from '@teambit/scope.remotes';\nimport {\n MergeResult,\n PersistFailed,\n Scope,\n ComponentNeedsUpdate,\n ComponentNotFound,\n MergeConflict,\n MergeConflictOnRemote,\n} from '@teambit/legacy.scope';\nimport {\n Lane,\n Version,\n ModelComponent,\n VersionHistory,\n LaneHistory,\n Ref,\n BitObjectList,\n ObjectList,\n} from '@teambit/scope.objects';\nimport { ExportPersist, ExportValidate, RemovePendingDir } from '@teambit/scope.remote-actions';\nimport { loader } from '@teambit/legacy.loader';\nimport { pMapPool } from '@teambit/toolbox.promise.map-pool';\nimport { concurrentComponentsLimit } from '@teambit/harmony.modules.concurrency';\n\n/**\n * ** Legacy and \"bit sign\" Only **\n *\n * @TODO there is no real difference between bare scope and a working directory scope - let's adjust terminology to avoid confusions in the future\n * saves a component into the objects directory of the remote scope, then, resolves its\n * dependencies, saves them as well. Finally runs the build process if needed on an isolated\n * environment.\n */\nexport async function exportManyBareScope(scope: Scope, objectList: ObjectList): Promise<ComponentIdList> {\n logger.debugAndAddBreadCrumb('exportManyBareScope', `started with ${objectList.objects.length} objects`);\n const mergedIds = await saveObjects(scope, objectList);\n logger.debugAndAddBreadCrumb('exportManyBareScope', 'will try to importMany in case there are missing dependencies');\n const scopeComponentsImporter = scope.scopeImporter;\n await scopeComponentsImporter.importManyFromOriginalScopes(mergedIds); // resolve dependencies\n logger.debugAndAddBreadCrumb('exportManyBareScope', 'successfully ran importMany');\n\n return mergedIds;\n}\n\ntype RemotesForPersist = {\n remote: Remote;\n exportedIds?: string[];\n};\n\n/**\n * save objects into the scope.\n */\nexport async function saveObjects(scope: Scope, objectList: ObjectList): Promise<ComponentIdList> {\n const bitObjectList = await objectList.toBitObjects();\n const objectsNotRequireMerge = bitObjectList.getObjectsNotRequireMerge();\n // components and lanes can't be just added, they need to be carefully merged.\n const { mergedIds, mergedComponentsResults, mergedLanes, mergedLaneHistories } = await mergeObjects(\n scope,\n bitObjectList\n );\n const mergedComponents = mergedComponentsResults.map((_) => _.mergedComponent);\n const versionObjects = objectsNotRequireMerge.filter((o) => o instanceof Version) as Version[];\n const versionsHistory = await updateVersionHistory(scope, mergedComponents, versionObjects);\n const allObjects = [\n ...mergedComponents,\n ...mergedLanes,\n ...objectsNotRequireMerge,\n ...versionsHistory,\n ...mergedLaneHistories,\n ];\n scope.objects.validateObjects(true, allObjects);\n await scope.objects.writeObjectsToTheFS(allObjects);\n logger.debug(\n `export-scope-components.saveObjects, ${allObjects.length} objects were written successfully to the filesystem`\n );\n\n return mergedIds;\n}\n\n/**\n * Previously, the VersionHistory was populated during fetch. However, we want the fetch operation to be more efficient\n * so we move this logic to the export operation.\n * Before version 0.2.22, the Version object didn't have any info about the component-id, so we do update only for\n * rebase. For versions that tagged by > 0.2.22, we have the \"origin.id\" and we know to what component this version\n * belongs to.\n */\nasync function updateVersionHistory(\n scope: Scope,\n mergedComponents: ModelComponent[],\n versionObjects: Version[]\n): Promise<VersionHistory[]> {\n if (!mergedComponents.length) {\n // this is important for bit-sign to not try to update VersionHistory and then error due to missing components\n logger.debug('updateVersionHistory, no components were merged, no need to update VersionHistory');\n return [];\n }\n logger.debug(\n `updateVersionHistory, total components: ${mergedComponents.length}, total versions: ${versionObjects.length}`\n );\n\n const versionsWithComponentId = versionObjects.filter((obj) => obj.origin?.id);\n\n const [versionsWithOrigin, versionWithoutOrigin] = partition(versionsWithComponentId, (v) => v.origin?.id);\n\n const versionHistoryOfVersionsWithOrigin = await _updateVersionHistoryForVersionsWithOrigin(\n scope,\n mergedComponents,\n versionsWithOrigin\n );\n\n const versionHistoryOfVersionsWithoutOrigin = await _updateVersionHistoryForVersionsWithoutOrigin(\n scope,\n mergedComponents,\n versionWithoutOrigin\n );\n\n return [...versionHistoryOfVersionsWithOrigin, ...versionHistoryOfVersionsWithoutOrigin];\n}\n\n/**\n * In case of rebase (squash / unrelated) where the version history is changed, make the necessary changes in the\n * VersionHistory.\n * Because previously (bit-version < 0.2.22) we only knew about this from the Version object, and the Version object\n * didn't have any info about what the component-id is, we have to iterate all model-components, grab their\n * version-history and check whether the version-hash is inside their VersionHistory.\n * it's not ideal performance wise. however, in most cases, this rebase is about squashing, and when squashing, it's\n * done for the entire lane, so all components need to be updated regardless.\n */\nasync function _updateVersionHistoryForVersionsWithoutOrigin(\n scope: Scope,\n mergedComponents: ModelComponent[],\n versionWithoutOrigin: Version[]\n): Promise<VersionHistory[]> {\n const mutatedVersionObjects = versionWithoutOrigin.filter((v) => v.squashed || v.unrelated);\n if (!mutatedVersionObjects.length) return [];\n logger.debug(`_updateVersionHistoryForVersionsWithoutOrigin, found ${mutatedVersionObjects.length} mutated version`);\n const versionsHistory = await Promise.all(\n mergedComponents.map(async (modelComp) =>\n modelComp.updateRebasedVersionHistory(scope.objects, mutatedVersionObjects)\n )\n );\n const versionsHistoryNoNull = compact(versionsHistory);\n logger.debug(`_updateVersionHistoryForVersionsWithoutOrigin, found ${\n versionsHistoryNoNull.length\n } versionsHistory to update\n${versionsHistoryNoNull.map((v) => v.compId.toString()).join(', ')}`);\n\n return versionsHistoryNoNull;\n}\n\nasync function _updateVersionHistoryForVersionsWithOrigin(\n scope: Scope,\n mergedComponents: ModelComponent[],\n versionObjects: Version[]\n): Promise<VersionHistory[]> {\n if (!versionObjects.length) return [];\n logger.debug(`_updateVersionHistoryForVersionsWithOrigin, found ${versionObjects.length} versions with origin`);\n const componentVersionMap = new Map<ModelComponent, Version[]>();\n versionObjects.forEach((version) => {\n const component = mergedComponents.find(\n (c) => c.scope === version.origin?.id.scope && c.name === version.origin?.id.name\n );\n if (!component) {\n logger.error(`updateVersionHistoryIfNeeded, unable to find component for version ${version.hash().toString()}`);\n return;\n }\n const versions = componentVersionMap.get(component) || [];\n componentVersionMap.set(component, [...versions, version]);\n });\n\n const versionsHistory = await pMapPool(\n mergedComponents,\n async (modelComp) => {\n const versions = componentVersionMap.get(modelComp);\n if (!versions || !versions.length) return undefined;\n return modelComp.updateVersionHistory(scope.objects, versions);\n },\n { concurrency: concurrentComponentsLimit() }\n );\n\n return compact(versionsHistory);\n}\n\ntype MergeObjectsResult = {\n mergedIds: ComponentIdList;\n mergedComponentsResults: MergeResult[];\n mergedLanes: Lane[];\n mergedLaneHistories: LaneHistory[];\n};\n\n/**\n * merge components into the scope.\n *\n * a component might have multiple versions that some where merged and some were not.\n * the BitIds returned here includes the versions that were merged. so it could contain multiple\n * ids of the same component with different versions\n */\nexport async function mergeObjects(\n scope: Scope,\n bitObjectList: BitObjectList,\n throwForMissingDeps = false\n): Promise<MergeObjectsResult> {\n const components = bitObjectList.getComponents();\n const lanesObjects = bitObjectList.getLanes();\n const versions = bitObjectList.getVersions();\n const lanesHistory = bitObjectList.getLaneHistories();\n logger.debugAndAddBreadCrumb(\n 'export-scope-components.mergeObjects',\n `Going to merge ${components.length} components, ${lanesObjects.length} lanes`\n );\n const { mergeResults, errors } = lanesObjects.length\n ? { mergeResults: [], errors: [] } // for lanes, no need to merge component objects, the lane is merged later.\n : await scope.sources.mergeComponents(components, versions);\n\n const mergeAllLanesResults = await mapSeries(lanesObjects, (laneObject) =>\n scope.sources.mergeLane(laneObject, false, versions, components)\n );\n const lanesErrors = mergeAllLanesResults.map((r) => r.mergeErrors).flat();\n const componentsNeedUpdate = [\n ...errors.filter((result) => result instanceof ComponentNeedsUpdate),\n ...lanesErrors,\n ] as ComponentNeedsUpdate[];\n const componentsWithConflicts = errors.filter((result) => result instanceof MergeConflict) as MergeConflict[];\n if (componentsWithConflicts.length || componentsNeedUpdate.length) {\n const idsAndVersions = componentsWithConflicts.map((c) => ({ id: c.id, versions: c.versions }));\n const idsAndVersionsWithConflicts = sortBy(idsAndVersions, property('id'));\n const idsOfNeedUpdateComps = sortBy(\n componentsNeedUpdate.map((c) => ({ id: c.id, lane: c.lane })),\n property('id')\n );\n scope.objects.clearObjectsFromCache(); // just in case this error is caught. we don't want to persist anything by mistake.\n throw new MergeConflictOnRemote(idsAndVersionsWithConflicts, idsOfNeedUpdateComps);\n }\n if (throwForMissingDeps) await throwForMissingLocalDependencies(scope, versions, components, lanesObjects);\n const mergedComponents = mergeResults.filter(({ mergedVersions }) => mergedVersions.length);\n const mergedLanesComponents = mergeAllLanesResults\n .map((r) => r.mergeResults)\n .flat()\n .filter(({ mergedVersions }) => mergedVersions.length);\n const mergedComponentsResults = [...mergedComponents, ...mergedLanesComponents];\n const getMergedIds = ({ mergedComponent, mergedVersions }): ComponentID[] =>\n mergedVersions.map((version) => mergedComponent.toBitId().changeVersion(version));\n const mergedIds = ComponentIdList.uniqFromArray(mergedComponentsResults.map(getMergedIds).flat());\n const mergedLanes = mergeAllLanesResults.map((r) => r.mergeLane);\n\n const mergedLaneHistories = await mapSeries(lanesHistory, async (laneHistory) => {\n const existingLaneHistory = (await scope.objects.load(laneHistory.hash())) as LaneHistory | undefined;\n if (existingLaneHistory) {\n existingLaneHistory.merge(laneHistory);\n return existingLaneHistory;\n }\n return laneHistory;\n });\n\n return { mergedIds, mergedComponentsResults, mergedLanes, mergedLaneHistories };\n}\n\n/**\n * make sure that all local objects were actually transferred into the remote.\n * this gets called as part of the export-validate step. it doesn't check for dependencies from\n * other scopes, as they'll be retrieved later by the fetch-missing-deps step.\n * we can't wait for that step to validate local dependencies because it happens after persisting,\n * and we don't want to persist when local dependencies were not exported.\n */\nasync function throwForMissingLocalDependencies(\n scope: Scope,\n versions: Version[],\n components: ModelComponent[],\n lanes: Lane[]\n) {\n const compsWithHeads = lanes.length\n ? lanes.map((lane) => lane.toBitIds()).flat()\n : components.map((c) => c.toComponentIdWithHead());\n\n await Promise.all(\n versions.map(async (version) => {\n const originComp = compsWithHeads.find((id) => version.hash().toString() === id.version);\n if (!originComp) {\n // coz if an older version has a missing dep, then, it's fine. (it can easily happen when exporting lane, which\n // all old versions are exported)\n return;\n }\n const getOriginCompWithVer = () => {\n const compObj = components.find((c) => c.toComponentId().isEqualWithoutVersion(originComp));\n if (!compObj) return originComp;\n const tag = compObj.getTagOfRefIfExists(Ref.from(originComp.version as string));\n if (tag) return originComp.changeVersion(tag);\n return originComp;\n };\n const depsIds = version.getAllFlattenedDependencies();\n await Promise.all(\n depsIds.map(async (depId) => {\n if (depId.scope !== scope.name) return;\n const existingModelComponent =\n (await scope.getModelComponentIfExist(depId)) ||\n components.find((c) => c.toComponentId().isEqualWithoutVersion(depId));\n if (!existingModelComponent) {\n scope.objects.clearObjectsFromCache(); // just in case this error is caught. we don't want to persist anything by mistake.\n throw new ComponentNotFound(depId.toString(), getOriginCompWithVer().toString());\n }\n const versionRef = existingModelComponent.getRef(depId.version as string);\n if (!versionRef) throw new Error(`unable to find Ref/Hash of ${depId.toString()}`);\n const objectExist =\n scope.objects.getCache(versionRef) ||\n (await scope.objects.has(versionRef)) ||\n versions.find((v) => v.hash().isEqual(versionRef));\n if (!objectExist) {\n scope.objects.clearObjectsFromCache(); // just in case this error is caught. we don't want to persist anything by mistake.\n throw new ComponentNotFound(depId.toString(), getOriginCompWithVer().toString());\n }\n })\n );\n })\n );\n}\n\nexport async function validateRemotes(remotes: Remote[], clientId: string, isResumingExport = true) {\n loader.start('verifying that objects can be merged on the remotes...');\n try {\n await Promise.all(\n remotes.map((remote) =>\n remote.action(ExportValidate.name, {\n clientId,\n isResumingExport: true,\n })\n )\n );\n } catch (err: any) {\n logger.errorAndAddBreadCrumb('validateRemotes', 'failed validating remotes', {}, err);\n if (!isResumingExport) {\n // when resuming export, we don't want to delete the pending-objects because some scopes\n // have them persisted and some not. we want to persist to all failing scopes.\n await removePendingDirs(remotes, clientId);\n }\n throw err;\n }\n}\n\nexport async function persistRemotes(manyObjectsPerRemote: RemotesForPersist[], clientId: string) {\n const persistedRemotes: string[] = [];\n await mapSeries(manyObjectsPerRemote, async (objectsPerRemote: RemotesForPersist) => {\n const { remote } = objectsPerRemote;\n loader.start(`persisting data on the remote \"${remote.name}\"...`);\n const maxRetries = 3;\n let succeed = false;\n let lastErrMsg = '';\n for (let i = 0; i < maxRetries; i += 1) {\n try {\n // eslint-disable-next-line no-await-in-loop\n const exportedIds: string[] = await remote.action(ExportPersist.name, { clientId });\n objectsPerRemote.exportedIds = exportedIds;\n succeed = true;\n break;\n } catch (err: any) {\n lastErrMsg = err.message;\n logger.errorAndAddBreadCrumb(\n 'persistRemotes',\n `failed on remote ${remote.name}, attempt ${i + 1} out of ${maxRetries}`,\n {},\n err\n );\n }\n }\n if (!succeed) {\n throw new PersistFailed([remote.name], { [remote.name]: lastErrMsg });\n }\n logger.debugAndAddBreadCrumb('persistRemotes', `successfully pushed all ids to the bare-scope ${remote.name}`);\n persistedRemotes.push(remote.name);\n });\n}\n\nexport async function resumeExport(scope: Scope, exportId: string, remotes: string[]): Promise<string[]> {\n const scopeRemotes: Remotes = await getScopeRemotes(scope);\n const remotesObj = await Promise.all(remotes.map((r) => scopeRemotes.resolve(r)));\n const remotesForPersist: RemotesForPersist[] = remotesObj.map((remote) => ({ remote }));\n await validateRemotes(remotesObj, exportId);\n await persistRemotes(remotesForPersist, exportId);\n return compact(remotesForPersist.map((r) => r.exportedIds).flat());\n}\n\nexport async function removePendingDirs(pushedRemotes: Remote[], clientId: string) {\n await Promise.all(pushedRemotes.map((remote) => remote.action(RemovePendingDir.name, { clientId })));\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MA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AC;IAC9G+F,gBAAgB,CAACU,IAAI,CAAClB,MAAM,CAACvF,IAAI,CAAC;EACpC,CAAC,CAAC;AACJ;AAEO,eAAe0G,YAAYA,CAAC1K,KAAY,EAAE2K,QAAgB,EAAEzB,OAAiB,EAAqB;EACvG,MAAM0B,YAAqB,GAAG,MAAM,IAAAC,wBAAe,EAAC7K,KAAK,CAAC;EAC1D,MAAM8K,UAAU,GAAG,MAAM9H,OAAO,CAACC,GAAG,CAACiG,OAAO,CAAC9H,GAAG,CAAEuE,CAAC,IAAKiF,YAAY,CAACG,OAAO,CAACpF,CAAC,CAAC,CAAC,CAAC;EACjF,MAAMqF,iBAAsC,GAAGF,UAAU,CAAC1J,GAAG,CAAEmI,MAAM,KAAM;IAAEA;EAAO,CAAC,CAAC,CAAC;EACvF,MAAMN,eAAe,CAAC6B,UAAU,EAAEH,QAAQ,CAAC;EAC3C,MAAMd,cAAc,CAACmB,iBAAiB,EAAEL,QAAQ,CAAC;EACjD,OAAO,IAAAtH,iBAAO,EAAC2H,iBAAiB,CAAC5J,GAAG,CAAEuE,CAAC,IAAKA,CAAC,CAAC0E,WAAW,CAAC,CAACxE,IAAI,CAAC,CAAC,CAAC;AACpE;AAEO,eAAe+D,iBAAiBA,CAACqB,aAAuB,EAAE9B,QAAgB,EAAE;EACjF,MAAMnG,OAAO,CAACC,GAAG,CAACgI,aAAa,CAAC7J,GAAG,CAAEmI,MAAM,IAAKA,MAAM,CAACC,MAAM,CAAC0B,0BAAgB,CAAClH,IAAI,EAAE;IAAEmF;EAAS,CAAC,CAAC,CAAC,CAAC;AACtG","ignoreList":[]}
|
@@ -12,7 +12,7 @@ import { DependencyResolverMain } from '@teambit/dependency-resolver';
|
|
12
12
|
import { Lane, ObjectList } from '@teambit/scope.objects';
|
13
13
|
import { Scope } from '@teambit/legacy.scope';
|
14
14
|
export type OnExportIdTransformer = (id: ComponentID) => ComponentID;
|
15
|
-
type ObjectsPerRemote = {
|
15
|
+
export type ObjectsPerRemote = {
|
16
16
|
remote: Remote;
|
17
17
|
objectList: ObjectList;
|
18
18
|
exportedIds?: string[];
|
@@ -390,7 +390,7 @@ if the export fails with missing objects/versions/components, run "bit fetch --l
|
|
390
390
|
return;
|
391
391
|
}
|
392
392
|
// by getting the remote we also validate that this scope actually exists.
|
393
|
-
const remote = await scopeRemotes.resolve(scopeName
|
393
|
+
const remote = await scopeRemotes.resolve(scopeName);
|
394
394
|
const list = await remote.list();
|
395
395
|
const listIds = _componentId().ComponentIdList.fromArray(list.map(listItem => listItem.id));
|
396
396
|
newIdsGrouped[scopeName].forEach(id => {
|
@@ -442,7 +442,7 @@ if the export fails with missing objects/versions/components, run "bit fetch --l
|
|
442
442
|
this.logger.debug(`export-scope-components, export to the following scopes ${groupedByScopeString}`);
|
443
443
|
const getUpdatedObjectsToExport = async (remoteNameStr, bitIds, lane) => {
|
444
444
|
bitIds.throwForDuplicationIgnoreVersion();
|
445
|
-
const remote = await scopeRemotes.resolve(remoteNameStr
|
445
|
+
const remote = await scopeRemotes.resolve(remoteNameStr);
|
446
446
|
const idsToChangeLocally = _componentId().ComponentIdList.fromArray(bitIds.filter(id => !scope.isExported(id)));
|
447
447
|
const componentsAndObjects = [];
|
448
448
|
const objectList = new (_scope4().ObjectList)();
|
@@ -735,7 +735,7 @@ if the export fails with missing objects/versions/components, run "bit fetch --l
|
|
735
735
|
}
|
736
736
|
async getComponentsToExport(ids = [], includeNonStaged) {
|
737
737
|
const consumer = this.workspace.consumer;
|
738
|
-
const componentsList = new (_legacy3().ComponentsList)(
|
738
|
+
const componentsList = new (_legacy3().ComponentsList)(this.workspace);
|
739
739
|
const idsHaveWildcard = (0, _legacy4().hasWildcard)(ids);
|
740
740
|
const throwForLocalOnlyIfNeeded = async bitIds => {
|
741
741
|
const localOnlyComponents = this.workspace.listLocalOnly();
|
@@ -786,7 +786,7 @@ ${localOnlyExportPending.map(c => c.toString()).join('\n')}`);
|
|
786
786
|
throw new Error(`fatal: unable to load the current lane object (${currentLaneId.toString()})`);
|
787
787
|
}
|
788
788
|
this.logger.setStatusLine(BEFORE_LOADING_COMPONENTS);
|
789
|
-
const componentsList = new (_legacy3().ComponentsList)(
|
789
|
+
const componentsList = new (_legacy3().ComponentsList)(this.workspace);
|
790
790
|
const componentsToExportWithoutRemoved = includeNonStaged ? await componentsList.listNonNewComponentsIds() : await componentsList.listExportPendingComponentsIds(laneObject);
|
791
791
|
const removedStagedBitIds = await this.getRemovedStagedBitIds();
|
792
792
|
const componentsToExport = _componentId().ComponentIdList.uniqFromArray([...componentsToExportWithoutRemoved, ...removedStagedBitIds]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_cli","_scope","_bitError","_legacy","_componentId","_legacy2","_legacy3","_remove","_legacy4","_workspace","_logger","_lodash","_pMapSeries","_laneId","_scope2","_eject","_scope3","_workspaceModules","_dependencyResolver","_exportScopeComponents","_scope4","_legacy5","_component","_export","_exportCmd","_resumeExportCmd","_excluded","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_objectWithoutProperties","i","_objectWithoutPropertiesLoose","s","includes","propertyIsEnumerable","call","n","hasOwnProperty","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","BEFORE_EXPORT","BEFORE_EXPORTS","BEFORE_LOADING_COMPONENTS","ExportMain","constructor","workspace","remove","depResolver","logger","eject","export","params","nonExistOnBitMap","newIdsOnRemote","missingScope","exported","removedIds","exportedLanes","rippleJobs","exportComponents","ejectResults","clearCache","ejectExportedComponents","exportResults","componentsIds","rippleJobUrls","getRippleJobUrls","Scope","onPostExport","catch","err","error","lane","undefined","map","job","getCloudDomain","scope","replace","name","_ref","ids","includeNonStaged","headOnly","originDirectly","OutsideWorkspaceError","consumer","idsToExport","laneObject","getComponentsToExport","updatedIds","ComponentIdList","forkLaneNewScope","BitError","readmeComponent","_throwForUnsnappedLaneReadme","forkedFrom","isNew","id","toString","isOnMain","updatedLocally","exportMany","exportHeadsOnly","filterOutExistingVersions","Boolean","allVersions","updateLanesAfterExport","getRemovedStagedBitIds","workspaceIds","listIds","hasWithoutVersion","_updateIdsOnBitMap","bitMap","linkToNodeModulesByIds","removeFromStagedConfig","legacyScope","stagedSnaps","deleteFile","fs","getLastMergedPath","Analytics","setExtraData","onDestroy","resumeExportId","throwForMissingArtifacts","includeParents","exportOrigin","debug","scopeRemotes","getScopeRemotes","groupByScopeName","idList","reduce","acc","current","scopeName","Error","idsGroupedByScope","validateTargetScopeForLanes","newIds","fromArray","isExported","newIdsGrouped","mapSeries","remote","resolve","list","listItem","addMainHeadIfPossible","allHashes","modelComponent","head","find","h","hash","objects","has","getVersionsToExport","getCompHeadIncludeUpdateDependents","toComponentId","headVersion","loadVersion","parents","fromWorkspace","getIdIfExist","localTagsOrHashes","getLocalHashes","getAllVersionHashes","repo","groupedByScopeString","join","getUpdatedObjectsToExport","remoteNameStr","bitIds","throwForDuplicationIgnoreVersion","idsToChangeLocally","componentsAndObjects","objectList","ObjectList","objectListPerName","modelComponents","getModelComponent","clearObjectsFromCache","refsToPotentialExportPerComponent","refs","getRefsToExportPerComp","allHashesAsStr","flat","ref","existingOnRemote","scopeImporter","checkWhatHashesExistOnRemote","refsToExportPerComponent","filteredOutRefs","refsToExport","existing","compact","bitObjectToObjectItem","obj","buffer","compress","type","getType","processModelComponent","idFromWorkspace","clearStateData","objectItems","collectVersionsObjects","objectsList","toBitObjects","componentAndObject","component","getAll","convertToCorrectScope","remoteObj","url","host","date","Date","now","addScopeListItem","componentBuffer","componentData","objectsBuffer","Promise","all","allObjectsData","addIfNotExist","laneHistory","lanes","getOrCreateLaneHistory","laneHistoryData","laneData","manyObjectsPerRemote","pushAllToCentralHub","transformToOneObjectListWithScopeData","http","Http","connect","CENTRAL_BIT_HUB_URL","CENTRAL_BIT_HUB_NAME","pushResults","pushToCentralHub","origin","failedScopes","successIds","errors","metadata","PersistFailed","exportedBitIds","ComponentID","fromString","exportedIds","objectPerRemote","idsPerScope","jobs","updateLocalObjects","objectsPerRemote","componentObject","sources","put","add","remoteLanes","syncWithLaneObject","remoteLaneId","LaneId","from","DEFAULT_LANE","loadRemoteLane","addEntry","getHead","persist","idsWithRemoteScope","changeVersion","idsWithRemoteScopeUniq","uniqFromArray","sort","hasWithoutScopeAndVersion","warnCancelExport","consoleWarning","process","on","centralHubResults","remotes","validateRemotes","persistRemotes","shouldPushToCentralHub","pushToRemotesCarefully","setStatusLine","results","removeListener","objPerRemote","addScopeName","mergeObjectList","force","ejectErr","c","msg","clientId","pushRemotesPendingDir","pushOptions","pushedRemotes","count","pushMany","warn","removePendingDirs","hubRemotes","m","isHub","componentsObjects","remoteScope","exportingIds","shouldFork","shouldChangeScope","hasComponentChanged","idWithFutureScope","searchWithoutScopeAndVersion","stagedConfig","getStagedConfig","compId","removeComponentConfig","write","componentsList","ComponentsList","idsHaveWildcard","hasWildcard","throwForLocalOnlyIfNeeded","localOnlyComponents","listLocalOnly","localOnlyExportPending","isUserTryingToExportLanes","componentsToExport","getLaneCompIdsToExport","loaderMsg","filtered","exportPendingComponents","listNonNewComponentsIds","listExportPendingComponentsIds","filterComponentsByWildcard","parsedIds","getParsedId","loadComponents","currentLaneId","getCurrentLaneId","loadLane","componentsToExportWithoutRemoved","removedStagedBitIds","removedStaged","getRemovedStaged","provider","cli","loggerMain","createLogger","ExportAspect","exportMain","register","ResumeExportCmd","ExportCmd","exports","MainRuntime","CLIAspect","ScopeAspect","WorkspaceAspect","RemoveAspect","DependencyResolverAspect","LoggerAspect","EjectAspect","addRuntime","componentsId","resultId","updateComponentId","hasVersion","isValid","getComponent","getComponentHead","isEqual","currentLane","isCurrentLane","setCurrentLane","toLaneId","scopeJson","removeLaneFromNew","isOnLane","_default"],"sources":["export.main.runtime.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\nimport { BitError } from '@teambit/bit-error';\nimport { Analytics } from '@teambit/legacy.analytics';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { CENTRAL_BIT_HUB_NAME, CENTRAL_BIT_HUB_URL, getCloudDomain } from '@teambit/legacy.constants';\nimport { Consumer } from '@teambit/legacy.consumer';\nimport { BitMap } from '@teambit/legacy.bit-map';\nimport { ComponentsList } from '@teambit/legacy.component-list';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport { hasWildcard } from '@teambit/legacy.utils';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { compact } from 'lodash';\nimport mapSeries from 'p-map-series';\nimport { LaneId, DEFAULT_LANE } from '@teambit/lane-id';\nimport { Remotes, Remote, getScopeRemotes } from '@teambit/scope.remotes';\nimport { EjectAspect, EjectMain, EjectResults } from '@teambit/eject';\nimport { Http, ExportOrigin } from '@teambit/scope.network';\nimport { linkToNodeModulesByIds } from '@teambit/workspace.modules.node-modules-linker';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { persistRemotes, validateRemotes, removePendingDirs } from './export-scope-components';\nimport {\n Lane,\n ModelComponent,\n ObjectItem,\n ObjectList,\n LaneReadmeComponent,\n BitObject,\n Ref,\n} from '@teambit/scope.objects';\nimport { Scope, PersistFailed } from '@teambit/legacy.scope';\nimport { getAllVersionHashes } from '@teambit/component.snap-distance';\nimport { ExportAspect } from './export.aspect';\nimport { ExportCmd } from './export-cmd';\nimport { ResumeExportCmd } from './resume-export-cmd';\n\nexport type OnExportIdTransformer = (id: ComponentID) => ComponentID;\n\nconst BEFORE_EXPORT = 'exporting component';\nconst BEFORE_EXPORTS = 'exporting components';\nconst BEFORE_LOADING_COMPONENTS = 'loading components';\n\ntype ModelComponentAndObjects = { component: ModelComponent; objects: BitObject[] };\ntype ObjectListPerName = { [name: string]: ObjectList };\ntype ObjectsPerRemote = {\n remote: Remote;\n objectList: ObjectList;\n exportedIds?: string[];\n};\ntype ObjectsPerRemoteExtended = ObjectsPerRemote & {\n objectListPerName: ObjectListPerName;\n idsToChangeLocally: ComponentIdList;\n componentsAndObjects: ModelComponentAndObjects[];\n};\n\ntype ExportParams = {\n ids?: string[];\n eject?: boolean;\n allVersions?: boolean;\n originDirectly?: boolean;\n includeNonStaged?: boolean;\n resumeExportId?: string | undefined;\n headOnly?: boolean;\n ignoreMissingArtifacts?: boolean;\n forkLaneNewScope?: boolean;\n};\n\nexport interface ExportResult {\n nonExistOnBitMap: ComponentID[];\n newIdsOnRemote: ComponentID[];\n removedIds: ComponentIdList;\n missingScope: ComponentID[];\n componentsIds: ComponentID[];\n exportedLanes: Lane[];\n rippleJobs: string[];\n rippleJobUrls: string[];\n ejectResults: EjectResults | undefined;\n}\n\nexport class ExportMain {\n constructor(\n private workspace: Workspace,\n private remove: RemoveMain,\n private depResolver: DependencyResolverMain,\n private logger: Logger,\n private eject: EjectMain\n ) {}\n\n async export(params: ExportParams = {}): Promise<ExportResult> {\n const { nonExistOnBitMap, newIdsOnRemote, missingScope, exported, removedIds, exportedLanes, rippleJobs } =\n await this.exportComponents(params);\n let ejectResults: EjectResults | undefined;\n await this.workspace.clearCache(); // needed when one process executes multiple commands, such as in \"bit test\" or \"bit cli\"\n if (params.eject) ejectResults = await this.ejectExportedComponents(exported);\n const exportResults: ExportResult = {\n componentsIds: exported,\n newIdsOnRemote,\n nonExistOnBitMap,\n removedIds,\n missingScope,\n ejectResults,\n exportedLanes,\n rippleJobs,\n rippleJobUrls: this.getRippleJobUrls(exportedLanes, rippleJobs),\n };\n if (Scope.onPostExport) {\n await Scope.onPostExport(exported, exportedLanes).catch((err) => {\n this.logger.error('fatal: onPostExport encountered an error (this error does not stop the process)', err);\n });\n }\n\n return exportResults;\n }\n\n private getRippleJobUrls(exportedLanes: Lane[], rippleJobs: string[]): string[] {\n const lane = exportedLanes.length ? exportedLanes?.[0] : undefined;\n const rippleJobUrls = lane\n ? rippleJobs.map(\n (job) =>\n `https://${getCloudDomain()}/${lane.scope.replace('.', '/')}/~lane/${lane.name}/~ripple-ci/job/${job}`\n )\n : rippleJobs.map((job) => `https://${getCloudDomain()}/ripple-ci/job/${job}`);\n return rippleJobUrls;\n }\n\n private async exportComponents({\n ids,\n includeNonStaged,\n headOnly,\n originDirectly,\n ...params\n }: ExportParams): Promise<{\n updatedIds: ComponentID[];\n nonExistOnBitMap: ComponentID[];\n removedIds: ComponentIdList;\n missingScope: ComponentID[];\n exported: ComponentID[];\n exportedLanes: Lane[];\n newIdsOnRemote: ComponentID[];\n rippleJobs: string[];\n }> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer: Consumer = this.workspace.consumer;\n const { idsToExport, missingScope, laneObject } = await this.getComponentsToExport(\n ids,\n includeNonStaged || headOnly\n );\n\n if (!idsToExport.length && !laneObject) {\n return {\n updatedIds: [],\n nonExistOnBitMap: [],\n removedIds: new ComponentIdList(),\n missingScope,\n exported: [],\n newIdsOnRemote: [],\n exportedLanes: [],\n rippleJobs: [],\n };\n }\n if (!idsToExport.length && laneObject && params.forkLaneNewScope) {\n throw new BitError(`the forked lane \"${laneObject.name}\" has no changes, to export all its components, please use \"--all\" flag\nif the export fails with missing objects/versions/components, run \"bit fetch --lanes <lane-name> --all-history\", to make sure you have the full history locally`);\n }\n\n // validate lane readme component and ensure it has been snapped\n if (laneObject?.readmeComponent) {\n _throwForUnsnappedLaneReadme(laneObject);\n }\n\n if (\n !params.forkLaneNewScope &&\n laneObject?.forkedFrom &&\n laneObject.isNew &&\n laneObject.forkedFrom.scope !== laneObject.scope\n ) {\n throw new BitError(`error: the current lane ${laneObject\n .id()\n .toString()} was forked from ${laneObject.forkedFrom.toString()}\nand is about to export to a different scope (${laneObject.scope}) than the original lane (${\n laneObject.forkedFrom.scope\n }).\non large lanes with long history graph, it results in exporting lots of objects to the new scope, some of them might be missing locally.\nif you can use the same scope as the original name, change it now by running \"bit lane change-scope ${\n laneObject.name\n } ${laneObject.forkedFrom.scope}\".\notherwise, re-run the export with \"--fork-lane-new-scope\" flag.\nif the export fails with missing objects/versions/components, run \"bit fetch --lanes <lane-name> --all-history\", to make sure you have the full history locally`);\n }\n const isOnMain = consumer.isOnMain();\n const { exported, updatedLocally, newIdsOnRemote, rippleJobs } = await this.exportMany({\n ...params,\n exportHeadsOnly: headOnly,\n scope: consumer.scope,\n ids: idsToExport,\n laneObject,\n originDirectly,\n isOnMain,\n filterOutExistingVersions: Boolean(!params.allVersions && laneObject),\n });\n if (laneObject) await updateLanesAfterExport(consumer, laneObject);\n const removedIds = await this.getRemovedStagedBitIds();\n const workspaceIds = this.workspace.listIds();\n const nonExistOnBitMap = exported.filter(\n (id) => !workspaceIds.hasWithoutVersion(id) && !removedIds.hasWithoutVersion(id)\n );\n const updatedIds = _updateIdsOnBitMap(consumer.bitMap, updatedLocally);\n // re-generate the package.json, this way, it has the correct data in the componentId prop.\n await linkToNodeModulesByIds(this.workspace, updatedIds, true);\n await this.removeFromStagedConfig(exported);\n // ideally we should delete the staged-snaps only for the exported snaps. however, it's not easy, and it's ok to\n // delete them all because this file is mainly an optimization for the import process.\n await this.workspace.scope.legacyScope.stagedSnaps.deleteFile();\n await fs.remove(this.workspace.scope.getLastMergedPath());\n Analytics.setExtraData('num_components', exported.length);\n // it is important to have consumer.onDestroy() before running the eject operation, we want the\n // export and eject operations to function independently. we don't want to lose the changes to\n // .bitmap file done by the export action in case the eject action has failed.\n await consumer.onDestroy('export');\n return {\n updatedIds,\n nonExistOnBitMap,\n removedIds,\n missingScope,\n exported,\n newIdsOnRemote,\n exportedLanes: laneObject ? [laneObject] : [],\n rippleJobs,\n };\n }\n\n /**\n * the export process uses four steps. read more about it here: https://github.com/teambit/bit/pull/3371\n */\n async exportMany({\n scope,\n ids, // when exporting a lane, the ids are the lane component ids\n laneObject,\n allVersions,\n originDirectly,\n resumeExportId,\n throwForMissingArtifacts,\n isOnMain = true,\n exportHeadsOnly, // relevant when exporting from bare-scope, especially when re-exporting existing versions, the normal calculation based on getDivergeData won't work\n includeParents, // relevant when exportHeadsOnly is used. sometimes the parents head are needed as well\n filterOutExistingVersions, // go to the remote and check whether the version exists there. if so, don't export it\n exportOrigin = 'export',\n }: {\n scope: Scope;\n ids: ComponentIdList;\n laneObject?: Lane;\n allVersions?: boolean;\n originDirectly?: boolean;\n resumeExportId?: string | undefined;\n throwForMissingArtifacts?: boolean;\n isOnMain?: boolean;\n exportHeadsOnly?: boolean;\n includeParents?: boolean;\n filterOutExistingVersions?: boolean;\n exportOrigin?: ExportOrigin;\n }): Promise<{\n exported: ComponentIdList;\n updatedLocally: ComponentIdList;\n newIdsOnRemote: ComponentID[];\n rippleJobs: string[];\n }> {\n this.logger.debug(`scope.exportMany, ids: ${ids.toString()}`);\n const scopeRemotes: Remotes = await getScopeRemotes(scope);\n\n const groupByScopeName = (idList: ComponentIdList): { [scopeName: string]: ComponentIdList } => {\n return idList.reduce((acc, current) => {\n const scopeName = current.scope;\n if (!scopeName) {\n throw new Error(`toGroupByScopeName() expect ids to have a scope name, got ${current.toString()}`);\n }\n if (acc[scopeName]) acc[scopeName].push(current);\n else acc[scopeName] = new ComponentIdList(current);\n return acc;\n }, {});\n };\n\n const idsGroupedByScope = groupByScopeName(ids);\n\n /**\n * when a component is exported for the first time, and the lane-scope is not the same as the component-scope, it's\n * important to validate that there is no such component in the original scope. otherwise, later, it'll be impossible\n * to merge the lane because these two components don't have any snap in common.\n */\n const validateTargetScopeForLanes = async () => {\n if (!laneObject) {\n return;\n }\n const newIds = ComponentIdList.fromArray(ids.filter((id) => !scope.isExported(id)));\n const newIdsGrouped = groupByScopeName(newIds);\n await mapSeries(Object.keys(newIdsGrouped), async (scopeName) => {\n if (scopeName === laneObject.scope) {\n // this validation is redundant if the lane-component is in the same scope as the lane-object\n return;\n }\n // by getting the remote we also validate that this scope actually exists.\n const remote = await scopeRemotes.resolve(scopeName, scope);\n const list = await remote.list();\n const listIds = ComponentIdList.fromArray(list.map((listItem) => listItem.id));\n newIdsGrouped[scopeName].forEach((id) => {\n if (listIds.hasWithoutVersion(id)) {\n throw new Error(`unable to export a lane with a new component \"${id.toString()}\", which has the default-scope \"${scopeName}\".\n this scope already has a component with the same name. as such, it'll be impossible to merge the lane later because these two components are different`);\n }\n });\n });\n };\n\n /**\n * by default, when exporting a lane, it traverse from the Lane's head and therefore it may skip the main head.\n * later, if for some reason the original component was deleted in its scope, the head object will be missing.\n */\n const addMainHeadIfPossible = async (allHashes: Ref[], modelComponent: ModelComponent) => {\n const head = modelComponent.head;\n if (!head) return;\n if (allHashes.find((h) => h.hash === head.hash)) return; // head is already in the list\n if (!(await scope.objects.has(head))) return; // it should not happen. but if it does, we don't want to block the export\n allHashes.push(head);\n };\n\n const getVersionsToExport = async (modelComponent: ModelComponent): Promise<Ref[]> => {\n if (exportHeadsOnly) {\n const head =\n laneObject?.getCompHeadIncludeUpdateDependents(modelComponent.toComponentId()) || modelComponent.head;\n if (!head) {\n throw new Error(\n `getVersionsToExport should export the head only, but the head of ${modelComponent.id()} is missing`\n );\n }\n if (includeParents) {\n const headVersion = await modelComponent.loadVersion(head.toString(), scope.objects);\n return [head, ...headVersion.parents];\n }\n return [head];\n }\n const fromWorkspace = this.workspace?.getIdIfExist(modelComponent.toComponentId());\n const localTagsOrHashes = await modelComponent.getLocalHashes(scope.objects, fromWorkspace);\n if (!allVersions) {\n return localTagsOrHashes;\n }\n\n const allHashes = await getAllVersionHashes({ modelComponent, repo: scope.objects });\n await addMainHeadIfPossible(allHashes, modelComponent);\n return allHashes;\n };\n\n await validateTargetScopeForLanes();\n const groupedByScopeString = Object.keys(idsGroupedByScope)\n .map((scopeName) => `scope \"${scopeName}\": ${idsGroupedByScope[scopeName].toString()}`)\n .join(', ');\n this.logger.debug(`export-scope-components, export to the following scopes ${groupedByScopeString}`);\n\n const getUpdatedObjectsToExport = async (\n remoteNameStr: string,\n bitIds: ComponentIdList,\n lane?: Lane\n ): Promise<ObjectsPerRemoteExtended> => {\n bitIds.throwForDuplicationIgnoreVersion();\n const remote: Remote = await scopeRemotes.resolve(remoteNameStr, scope);\n const idsToChangeLocally = ComponentIdList.fromArray(bitIds.filter((id) => !scope.isExported(id)));\n const componentsAndObjects: ModelComponentAndObjects[] = [];\n const objectList = new ObjectList();\n const objectListPerName: ObjectListPerName = {};\n\n const modelComponents = await mapSeries(bitIds, (id) => scope.getModelComponent(id));\n // super important! otherwise, the processModelComponent() changes objects in memory, while the key remains the same\n scope.objects.clearObjectsFromCache();\n\n const refsToPotentialExportPerComponent = await mapSeries(modelComponents, async (modelComponent) => {\n const refs = await getVersionsToExport(modelComponent);\n return { modelComponent, refs };\n });\n\n const getRefsToExportPerComp = async () => {\n if (!filterOutExistingVersions) {\n return refsToPotentialExportPerComponent;\n }\n const allHashesAsStr = refsToPotentialExportPerComponent\n .map((r) => r.refs)\n .flat()\n .map((ref) => ref.toString());\n const existingOnRemote = await scope.scopeImporter.checkWhatHashesExistOnRemote(remoteNameStr, allHashesAsStr);\n // for lanes, some snaps might be already on the remote, and the reason they're staged is due to a previous merge.\n const refsToExportPerComponent = refsToPotentialExportPerComponent.map(({ modelComponent, refs }) => {\n const filteredOutRefs: string[] = [];\n const refsToExport = refs.filter((ref) => {\n const existing = existingOnRemote.includes(ref.toString());\n if (existing) filteredOutRefs.push(ref.toString());\n return !existing;\n });\n if (filteredOutRefs.length)\n this.logger.debug(\n `export-scope-components, the following refs were filtered out from ${modelComponent\n .id()\n .toString()} because they already exist on the remote:\\n${filteredOutRefs.join('\\n')}`\n );\n\n return refsToExport.length ? { modelComponent, refs: refsToExport } : null;\n });\n\n return compact(refsToExportPerComponent);\n };\n\n const bitObjectToObjectItem = async (obj: BitObject): Promise<ObjectItem> => {\n return {\n ref: obj.hash(),\n buffer: await obj.compress(),\n type: obj.getType(),\n };\n };\n\n const processModelComponent = async ({\n modelComponent,\n refs,\n }: {\n modelComponent: ModelComponent;\n refs: Ref[];\n }) => {\n const idFromWorkspace = this.workspace?.getIdIfExist(modelComponent.toComponentId());\n modelComponent.clearStateData();\n const objectItems = await modelComponent.collectVersionsObjects(\n scope.objects,\n refs.map((ref) => ref.toString()),\n throwForMissingArtifacts,\n idFromWorkspace\n );\n const objectsList = await new ObjectList(objectItems).toBitObjects();\n const componentAndObject = { component: modelComponent, objects: objectsList.getAll() };\n await this.convertToCorrectScope(scope, componentAndObject, remoteNameStr, bitIds, ids);\n const remoteObj = { url: remote.host, name: remote.name, date: Date.now().toString() };\n modelComponent.addScopeListItem(remoteObj);\n componentsAndObjects.push(componentAndObject);\n const componentBuffer = await modelComponent.compress();\n const componentData = { ref: modelComponent.hash(), buffer: componentBuffer, type: modelComponent.getType() };\n const objectsBuffer = await Promise.all(\n componentAndObject.objects.map(async (obj) => bitObjectToObjectItem(obj))\n );\n const allObjectsData = [componentData, ...objectsBuffer];\n objectListPerName[modelComponent.name] = new ObjectList(allObjectsData);\n objectList.addIfNotExist(allObjectsData);\n };\n\n const refsToExportPerComponent = await getRefsToExportPerComp();\n // don't use Promise.all, otherwise, it'll throw \"JavaScript heap out of memory\" on a large set of data\n await mapSeries(refsToExportPerComponent, processModelComponent);\n if (lane) {\n const laneHistory = await scope.lanes.getOrCreateLaneHistory(lane);\n const laneHistoryData = await bitObjectToObjectItem(laneHistory);\n objectList.addIfNotExist([laneHistoryData]);\n const laneData = await bitObjectToObjectItem(lane);\n objectList.addIfNotExist([laneData]);\n }\n\n return { remote, objectList, objectListPerName, idsToChangeLocally, componentsAndObjects };\n };\n\n const manyObjectsPerRemote = laneObject\n ? [await getUpdatedObjectsToExport(laneObject.scope, ids, laneObject)]\n : await mapSeries(Object.keys(idsGroupedByScope), (scopeName) =>\n getUpdatedObjectsToExport(scopeName, idsGroupedByScope[scopeName], laneObject)\n );\n\n const pushAllToCentralHub = async () => {\n const objectList = this.transformToOneObjectListWithScopeData(manyObjectsPerRemote);\n const http = await Http.connect(CENTRAL_BIT_HUB_URL, CENTRAL_BIT_HUB_NAME);\n const pushResults = await http.pushToCentralHub(objectList, { origin: exportOrigin });\n const { failedScopes, successIds, errors, metadata } = pushResults;\n if (failedScopes.length) {\n throw new PersistFailed(failedScopes, errors);\n }\n const exportedBitIds = successIds.map((id) => ComponentID.fromString(id));\n if (manyObjectsPerRemote.length === 1) {\n // when on a lane, it's always exported to the lane. and the ids can be from different scopes, so having the\n // filter below, will remove these components from the output of bit-export at the end.\n manyObjectsPerRemote[0].exportedIds = exportedBitIds.map((id) => id.toString());\n } else {\n manyObjectsPerRemote.forEach((objectPerRemote) => {\n const idsPerScope = exportedBitIds.filter((id) => id.scope === objectPerRemote.remote.name);\n // it's possible that idsPerScope is an empty array, in case the objects were exported already before\n objectPerRemote.exportedIds = idsPerScope.map((id) => id.toString());\n });\n }\n return { rippleJobs: metadata?.jobs };\n };\n\n const updateLocalObjects = async (\n lane?: Lane\n ): Promise<\n Array<{ exported: ComponentIdList; updatedLocally: ComponentIdList; newIdsOnRemote: ComponentID[] }>\n > => {\n return mapSeries(manyObjectsPerRemote, async (objectsPerRemote: ObjectsPerRemoteExtended) => {\n const { remote, idsToChangeLocally, componentsAndObjects, exportedIds } = objectsPerRemote;\n const remoteNameStr = remote.name;\n\n componentsAndObjects.forEach((componentObject) => scope.sources.put(componentObject));\n\n // update lanes\n if (lane) {\n if (idsToChangeLocally.length) {\n // otherwise, we don't want to update scope-name of components in the lane object\n scope.objects.add(lane);\n }\n await scope.objects.remoteLanes.syncWithLaneObject(remoteNameStr, lane);\n }\n\n if (isOnMain && !lane) {\n // all exported from main\n const remoteLaneId = LaneId.from(DEFAULT_LANE, remoteNameStr);\n await scope.objects.remoteLanes.loadRemoteLane(remoteLaneId);\n await Promise.all(\n componentsAndObjects.map(async ({ component }) => {\n await scope.objects.remoteLanes.addEntry(remoteLaneId, component.toComponentId(), component.getHead());\n })\n );\n }\n\n await scope.objects.persist();\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const newIdsOnRemote = exportedIds!.map((id) => ComponentID.fromString(id));\n // remove version. exported component might have multiple versions exported\n const idsWithRemoteScope: ComponentID[] = newIdsOnRemote.map((id) => id.changeVersion(undefined));\n const idsWithRemoteScopeUniq = ComponentIdList.uniqFromArray(idsWithRemoteScope).sort();\n return {\n newIdsOnRemote,\n exported: idsWithRemoteScopeUniq,\n updatedLocally: ComponentIdList.fromArray(\n idsWithRemoteScopeUniq.filter((id) => idsToChangeLocally.hasWithoutScopeAndVersion(id))\n ),\n };\n });\n };\n\n const warnCancelExport = () => {\n this.logger.consoleWarning(\n `unable to cancel the export process at this point because the communication with the remote already started`\n );\n };\n process.on('SIGINT', warnCancelExport);\n let centralHubResults;\n if (resumeExportId) {\n const remotes = manyObjectsPerRemote.map((o) => o.remote);\n await validateRemotes(remotes, resumeExportId);\n await persistRemotes(manyObjectsPerRemote, resumeExportId);\n } else if (this.shouldPushToCentralHub(manyObjectsPerRemote, scopeRemotes, originDirectly)) {\n centralHubResults = await pushAllToCentralHub();\n } else {\n // await pushToRemotes();\n await this.pushToRemotesCarefully(manyObjectsPerRemote, resumeExportId);\n }\n\n this.logger.setStatusLine('updating data locally...');\n const results = await updateLocalObjects(laneObject);\n process.removeListener('SIGINT', warnCancelExport);\n return {\n newIdsOnRemote: results.map((r) => r.newIdsOnRemote).flat(),\n exported: ComponentIdList.uniqFromArray(results.map((r) => r.exported).flat()),\n updatedLocally: ComponentIdList.uniqFromArray(results.map((r) => r.updatedLocally).flat()),\n rippleJobs: centralHubResults?.rippleJobs || [],\n };\n }\n\n private transformToOneObjectListWithScopeData(objectsPerRemote: ObjectsPerRemote[]): ObjectList {\n const objectList = new ObjectList();\n objectsPerRemote.forEach((objPerRemote) => {\n objPerRemote.objectList.addScopeName(objPerRemote.remote.name);\n objectList.mergeObjectList(objPerRemote.objectList);\n });\n return objectList;\n }\n\n private async ejectExportedComponents(componentsIds: ComponentID[]): Promise<EjectResults> {\n const consumer: Consumer = this.workspace.consumer;\n let ejectResults: EjectResults;\n try {\n ejectResults = await this.eject.eject(componentsIds, { force: true });\n } catch (err: any) {\n const ejectErr = `The components ${componentsIds.map((c) => c.toString()).join(', ')} were exported successfully.\n However, the eject operation has failed due to an error: ${err.msg || err}`;\n this.logger.error(ejectErr, err);\n throw new Error(ejectErr);\n }\n // run the consumer.onDestroy() again, to write the changes done by the eject action to .bitmap\n await consumer.onDestroy('export (eject)');\n return ejectResults;\n }\n\n async pushToRemotesCarefully(manyObjectsPerRemote: ObjectsPerRemote[], resumeExportId?: string) {\n const remotes = manyObjectsPerRemote.map((o) => o.remote);\n const clientId = resumeExportId || Date.now().toString();\n await this.pushRemotesPendingDir(clientId, manyObjectsPerRemote, resumeExportId);\n await validateRemotes(remotes, clientId, Boolean(resumeExportId));\n await persistRemotes(manyObjectsPerRemote, clientId);\n }\n\n private async pushRemotesPendingDir(\n clientId: string,\n manyObjectsPerRemote: ObjectsPerRemote[],\n resumeExportId?: string\n ): Promise<void> {\n if (resumeExportId) {\n this.logger.debug('pushRemotesPendingDir - skip as the resumeExportId was passed');\n // no need to transfer the objects, they're already on the server. also, since this clientId\n // exists already on the remote pending-dir, it'll cause a collision.\n return;\n }\n const pushOptions = { clientId };\n const pushedRemotes: Remote[] = [];\n await mapSeries(manyObjectsPerRemote, async (objectsPerRemote: ObjectsPerRemote) => {\n const { remote, objectList } = objectsPerRemote;\n this.logger.setStatusLine(`transferring ${objectList.count()} objects to the remote \"${remote.name}\"...`);\n try {\n await remote.pushMany(objectList, pushOptions, {});\n this.logger.debug(\n 'pushRemotesPendingDir, successfully pushed all objects to the pending-dir directory on the remote'\n );\n pushedRemotes.push(remote);\n } catch (err: any) {\n this.logger.warn('exportMany, failed pushing objects to the remote');\n await removePendingDirs(pushedRemotes, clientId);\n throw err;\n }\n });\n }\n\n shouldPushToCentralHub(\n manyObjectsPerRemote: ObjectsPerRemote[],\n scopeRemotes: Remotes,\n originDirectly = false\n ): boolean {\n if (originDirectly) return false;\n const hubRemotes = manyObjectsPerRemote.filter((m) => scopeRemotes.isHub(m.remote.name));\n if (!hubRemotes.length) return false;\n if (hubRemotes.length === manyObjectsPerRemote.length) return true; // all are hub\n // @todo: maybe create a flag \"no-central\" to support this workflow\n throw new BitError(\n `some of your components are configured to be exported to a local scope and some to the bit.cloud hub. this is not supported`\n );\n }\n\n /**\n * Component and dependencies id changes:\n * When exporting components with dependencies to a bare-scope, some of the dependencies may be created locally and as\n * a result their scope-name is null. Before the bare-scope gets the components, convert these scope names\n * to the bare-scope name.\n *\n * This is the Harmony version of \"convertToCorrectScope\". No more codemod and no more hash changes.\n */\n private async convertToCorrectScope(\n scope: Scope,\n componentsObjects: ModelComponentAndObjects,\n remoteScope: string,\n exportingIds: ComponentIdList,\n ids: ComponentIdList,\n shouldFork = false // not in used currently, but might be needed soon\n ): Promise<boolean> {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const shouldChangeScope = shouldFork\n ? remoteScope !== componentsObjects.component.scope\n : !componentsObjects.component.scope;\n const hasComponentChanged = shouldChangeScope;\n if (shouldChangeScope) {\n const idWithFutureScope = ids.searchWithoutScopeAndVersion(componentsObjects.component.toComponentId());\n componentsObjects.component.scope = idWithFutureScope?.scope || remoteScope;\n }\n\n // return true if one of the versions has changed or the component itself\n return hasComponentChanged;\n }\n\n private async removeFromStagedConfig(ids: ComponentID[]) {\n this.logger.debug(`removeFromStagedConfig, ${ids.length} ids`);\n const stagedConfig = await this.workspace.scope.getStagedConfig();\n ids.map((compId) => stagedConfig.removeComponentConfig(compId));\n await stagedConfig.write();\n }\n\n private async getComponentsToExport(\n ids: string[] = [],\n includeNonStaged?: boolean\n ): Promise<{\n idsToExport: ComponentIdList;\n missingScope: ComponentID[];\n laneObject?: Lane;\n }> {\n const consumer = this.workspace.consumer;\n const componentsList = new ComponentsList(consumer);\n const idsHaveWildcard = hasWildcard(ids);\n const throwForLocalOnlyIfNeeded = async (\n bitIds: ComponentIdList\n ): Promise<{ idsToExport: ComponentIdList; missingScope: ComponentID[] }> => {\n const localOnlyComponents = this.workspace.listLocalOnly();\n const localOnlyExportPending = bitIds.filter((id) => localOnlyComponents.hasWithoutScopeAndVersion(id));\n if (localOnlyExportPending.length) {\n throw new BitError(`unable to export the following components as they are local only:\n(either bit-reset them or run \"bit local-only unset\" to make them non local only)\n${localOnlyExportPending.map((c) => c.toString()).join('\\n')}`);\n }\n return { idsToExport: ComponentIdList.fromArray(bitIds), missingScope: [] };\n };\n if (isUserTryingToExportLanes(consumer)) {\n if (ids.length) {\n throw new BitError(`when checked out to a lane, all its components are exported. please omit the ids`);\n }\n const { componentsToExport, laneObject } = await this.getLaneCompIdsToExport(consumer, includeNonStaged);\n const loaderMsg = componentsToExport.length > 1 ? BEFORE_EXPORTS : BEFORE_EXPORT;\n this.logger.setStatusLine(loaderMsg);\n const filtered = await throwForLocalOnlyIfNeeded(componentsToExport);\n return { ...filtered, laneObject };\n }\n if (!ids.length || idsHaveWildcard) {\n this.logger.setStatusLine(BEFORE_LOADING_COMPONENTS);\n const exportPendingComponents: ComponentIdList = includeNonStaged\n ? await componentsList.listNonNewComponentsIds()\n : await componentsList.listExportPendingComponentsIds();\n const componentsToExport = idsHaveWildcard\n ? ComponentsList.filterComponentsByWildcard(exportPendingComponents, ids)\n : exportPendingComponents;\n const loaderMsg = componentsToExport.length > 1 ? BEFORE_EXPORTS : BEFORE_EXPORT;\n this.logger.setStatusLine(loaderMsg);\n return throwForLocalOnlyIfNeeded(componentsToExport);\n }\n this.logger.setStatusLine(BEFORE_EXPORT); // show single export\n const parsedIds = await Promise.all(ids.map((id) => getParsedId(consumer, id)));\n // load the components for fixing any out-of-sync issues.\n await consumer.loadComponents(ComponentIdList.fromArray(parsedIds));\n\n return throwForLocalOnlyIfNeeded(ComponentIdList.fromArray(parsedIds));\n }\n\n private async getLaneCompIdsToExport(\n consumer: Consumer,\n includeNonStaged?: boolean\n ): Promise<{ componentsToExport: ComponentIdList; laneObject: Lane }> {\n const currentLaneId = consumer.getCurrentLaneId();\n const laneObject = await consumer.scope.loadLane(currentLaneId);\n if (!laneObject) {\n throw new Error(`fatal: unable to load the current lane object (${currentLaneId.toString()})`);\n }\n this.logger.setStatusLine(BEFORE_LOADING_COMPONENTS);\n const componentsList = new ComponentsList(consumer);\n const componentsToExportWithoutRemoved = includeNonStaged\n ? await componentsList.listNonNewComponentsIds()\n : await componentsList.listExportPendingComponentsIds(laneObject);\n const removedStagedBitIds = await this.getRemovedStagedBitIds();\n const componentsToExport = ComponentIdList.uniqFromArray([\n ...componentsToExportWithoutRemoved,\n ...removedStagedBitIds,\n ]);\n return { componentsToExport, laneObject };\n }\n\n private async getRemovedStagedBitIds(): Promise<ComponentIdList> {\n const removedStaged = await this.remove.getRemovedStaged();\n return ComponentIdList.fromArray(removedStaged.map((id) => id.changeVersion(undefined)));\n }\n\n static runtime = MainRuntime;\n static dependencies = [\n CLIAspect,\n ScopeAspect,\n WorkspaceAspect,\n RemoveAspect,\n DependencyResolverAspect,\n LoggerAspect,\n EjectAspect,\n ];\n static async provider([cli, scope, workspace, remove, depResolver, loggerMain, eject]: [\n CLIMain,\n ScopeMain,\n Workspace,\n RemoveMain,\n DependencyResolverMain,\n LoggerMain,\n EjectMain,\n ]) {\n const logger = loggerMain.createLogger(ExportAspect.id);\n const exportMain = new ExportMain(workspace, remove, depResolver, logger, eject);\n cli.register(new ResumeExportCmd(scope), new ExportCmd(exportMain));\n return exportMain;\n }\n}\n\nExportAspect.addRuntime(ExportMain);\n\n/**\n * the componentsIds passed here are the ones that didn't have scope-name before, and now they have.\n * so if the bitMap.updateComponentId returns bitId without scope-name is because it couldn't find it there\n */\nfunction _updateIdsOnBitMap(bitMap: BitMap, componentsIds: ComponentIdList): ComponentID[] {\n const updatedIds: ComponentID[] = [];\n componentsIds.forEach((componentsId) => {\n const resultId = bitMap.updateComponentId(componentsId, true);\n if (resultId.hasVersion()) updatedIds.push(resultId);\n });\n return updatedIds;\n}\n\nasync function getParsedId(consumer: Consumer, id: string): Promise<ComponentID> {\n // reason why not calling `consumer.getParsedId()` only is because a component might not be on\n // .bitmap and only in the scope. we support this case and enable to export\n try {\n return consumer.getParsedId(id);\n } catch {\n return consumer.scope.getParsedId(id);\n }\n}\n\nfunction _throwForUnsnappedLaneReadme(lane: Lane) {\n const readmeComponent = lane.readmeComponent as LaneReadmeComponent;\n\n const isValid =\n readmeComponent?.head &&\n lane.getComponent(readmeComponent.id) &&\n lane.getComponentHead(readmeComponent.id)?.isEqual(readmeComponent?.head);\n\n if (!isValid) {\n throw new BitError(\n `${lane?.name} has a readme component ${readmeComponent.id} that hasn't been snapped on the lane.\n Please run either snap -a or snap ${readmeComponent.id} to snap the component on the lane before exporting it.`\n );\n }\n}\n\nasync function updateLanesAfterExport(consumer: Consumer, lane: Lane) {\n const currentLane = consumer.getCurrentLaneId();\n const isCurrentLane = lane.name === currentLane.name;\n if (!isCurrentLane) {\n throw new Error(\n `updateLanesAfterExport should get called only with current lane, got ${lane.name}, current ${currentLane.name}`\n );\n }\n consumer.setCurrentLane(lane.toLaneId(), true);\n consumer.scope.scopeJson.removeLaneFromNew(lane.name);\n lane.isNew = false;\n}\n\nexport function isUserTryingToExportLanes(consumer: Consumer) {\n return consumer.isOnLane();\n}\n\nexport default ExportMain;\n"],"mappings":";;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,OAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,MAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,UAAA;EAA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B,QAAkB,EAAEd,IAAU,EAAE;EACpE,MAAMiT,WAAW,GAAGnS,QAAQ,CAACkQ,gBAAgB,CAAC,CAAC;EAC/C,MAAMkC,aAAa,GAAGlT,IAAI,CAACO,IAAI,KAAK0S,WAAW,CAAC1S,IAAI;EACpD,IAAI,CAAC2S,aAAa,EAAE;IAClB,MAAM,IAAIjP,KAAK,CACb,wEAAwEjE,IAAI,CAACO,IAAI,aAAa0S,WAAW,CAAC1S,IAAI,EAChH,CAAC;EACH;EACAO,QAAQ,CAACqS,cAAc,CAACnT,IAAI,CAACoT,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC;EAC9CtS,QAAQ,CAACT,KAAK,CAACgT,SAAS,CAACC,iBAAiB,CAACtT,IAAI,CAACO,IAAI,CAAC;EACrDP,IAAI,CAACyB,KAAK,GAAG,KAAK;AACpB;AAEO,SAAS0O,yBAAyBA,CAACrP,QAAkB,EAAE;EAC5D,OAAOA,QAAQ,CAACyS,QAAQ,CAAC,CAAC;AAC5B;AAAC,IAAAC,QAAA,GAAAzB,OAAA,CAAAvW,OAAA,GAEc2C,UAAU","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_cli","_scope","_bitError","_legacy","_componentId","_legacy2","_legacy3","_remove","_legacy4","_workspace","_logger","_lodash","_pMapSeries","_laneId","_scope2","_eject","_scope3","_workspaceModules","_dependencyResolver","_exportScopeComponents","_scope4","_legacy5","_component","_export","_exportCmd","_resumeExportCmd","_excluded","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_objectWithoutProperties","i","_objectWithoutPropertiesLoose","s","includes","propertyIsEnumerable","call","n","hasOwnProperty","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","BEFORE_EXPORT","BEFORE_EXPORTS","BEFORE_LOADING_COMPONENTS","ExportMain","constructor","workspace","remove","depResolver","logger","eject","export","params","nonExistOnBitMap","newIdsOnRemote","missingScope","exported","removedIds","exportedLanes","rippleJobs","exportComponents","ejectResults","clearCache","ejectExportedComponents","exportResults","componentsIds","rippleJobUrls","getRippleJobUrls","Scope","onPostExport","catch","err","error","lane","undefined","map","job","getCloudDomain","scope","replace","name","_ref","ids","includeNonStaged","headOnly","originDirectly","OutsideWorkspaceError","consumer","idsToExport","laneObject","getComponentsToExport","updatedIds","ComponentIdList","forkLaneNewScope","BitError","readmeComponent","_throwForUnsnappedLaneReadme","forkedFrom","isNew","id","toString","isOnMain","updatedLocally","exportMany","exportHeadsOnly","filterOutExistingVersions","Boolean","allVersions","updateLanesAfterExport","getRemovedStagedBitIds","workspaceIds","listIds","hasWithoutVersion","_updateIdsOnBitMap","bitMap","linkToNodeModulesByIds","removeFromStagedConfig","legacyScope","stagedSnaps","deleteFile","fs","getLastMergedPath","Analytics","setExtraData","onDestroy","resumeExportId","throwForMissingArtifacts","includeParents","exportOrigin","debug","scopeRemotes","getScopeRemotes","groupByScopeName","idList","reduce","acc","current","scopeName","Error","idsGroupedByScope","validateTargetScopeForLanes","newIds","fromArray","isExported","newIdsGrouped","mapSeries","remote","resolve","list","listItem","addMainHeadIfPossible","allHashes","modelComponent","head","find","h","hash","objects","has","getVersionsToExport","getCompHeadIncludeUpdateDependents","toComponentId","headVersion","loadVersion","parents","fromWorkspace","getIdIfExist","localTagsOrHashes","getLocalHashes","getAllVersionHashes","repo","groupedByScopeString","join","getUpdatedObjectsToExport","remoteNameStr","bitIds","throwForDuplicationIgnoreVersion","idsToChangeLocally","componentsAndObjects","objectList","ObjectList","objectListPerName","modelComponents","getModelComponent","clearObjectsFromCache","refsToPotentialExportPerComponent","refs","getRefsToExportPerComp","allHashesAsStr","flat","ref","existingOnRemote","scopeImporter","checkWhatHashesExistOnRemote","refsToExportPerComponent","filteredOutRefs","refsToExport","existing","compact","bitObjectToObjectItem","obj","buffer","compress","type","getType","processModelComponent","idFromWorkspace","clearStateData","objectItems","collectVersionsObjects","objectsList","toBitObjects","componentAndObject","component","getAll","convertToCorrectScope","remoteObj","url","host","date","Date","now","addScopeListItem","componentBuffer","componentData","objectsBuffer","Promise","all","allObjectsData","addIfNotExist","laneHistory","lanes","getOrCreateLaneHistory","laneHistoryData","laneData","manyObjectsPerRemote","pushAllToCentralHub","transformToOneObjectListWithScopeData","http","Http","connect","CENTRAL_BIT_HUB_URL","CENTRAL_BIT_HUB_NAME","pushResults","pushToCentralHub","origin","failedScopes","successIds","errors","metadata","PersistFailed","exportedBitIds","ComponentID","fromString","exportedIds","objectPerRemote","idsPerScope","jobs","updateLocalObjects","objectsPerRemote","componentObject","sources","put","add","remoteLanes","syncWithLaneObject","remoteLaneId","LaneId","from","DEFAULT_LANE","loadRemoteLane","addEntry","getHead","persist","idsWithRemoteScope","changeVersion","idsWithRemoteScopeUniq","uniqFromArray","sort","hasWithoutScopeAndVersion","warnCancelExport","consoleWarning","process","on","centralHubResults","remotes","validateRemotes","persistRemotes","shouldPushToCentralHub","pushToRemotesCarefully","setStatusLine","results","removeListener","objPerRemote","addScopeName","mergeObjectList","force","ejectErr","c","msg","clientId","pushRemotesPendingDir","pushOptions","pushedRemotes","count","pushMany","warn","removePendingDirs","hubRemotes","m","isHub","componentsObjects","remoteScope","exportingIds","shouldFork","shouldChangeScope","hasComponentChanged","idWithFutureScope","searchWithoutScopeAndVersion","stagedConfig","getStagedConfig","compId","removeComponentConfig","write","componentsList","ComponentsList","idsHaveWildcard","hasWildcard","throwForLocalOnlyIfNeeded","localOnlyComponents","listLocalOnly","localOnlyExportPending","isUserTryingToExportLanes","componentsToExport","getLaneCompIdsToExport","loaderMsg","filtered","exportPendingComponents","listNonNewComponentsIds","listExportPendingComponentsIds","filterComponentsByWildcard","parsedIds","getParsedId","loadComponents","currentLaneId","getCurrentLaneId","loadLane","componentsToExportWithoutRemoved","removedStagedBitIds","removedStaged","getRemovedStaged","provider","cli","loggerMain","createLogger","ExportAspect","exportMain","register","ResumeExportCmd","ExportCmd","exports","MainRuntime","CLIAspect","ScopeAspect","WorkspaceAspect","RemoveAspect","DependencyResolverAspect","LoggerAspect","EjectAspect","addRuntime","componentsId","resultId","updateComponentId","hasVersion","isValid","getComponent","getComponentHead","isEqual","currentLane","isCurrentLane","setCurrentLane","toLaneId","scopeJson","removeLaneFromNew","isOnLane","_default"],"sources":["export.main.runtime.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\nimport { BitError } from '@teambit/bit-error';\nimport { Analytics } from '@teambit/legacy.analytics';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { CENTRAL_BIT_HUB_NAME, CENTRAL_BIT_HUB_URL, getCloudDomain } from '@teambit/legacy.constants';\nimport { Consumer } from '@teambit/legacy.consumer';\nimport { BitMap } from '@teambit/legacy.bit-map';\nimport { ComponentsList } from '@teambit/legacy.component-list';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport { hasWildcard } from '@teambit/legacy.utils';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { compact } from 'lodash';\nimport mapSeries from 'p-map-series';\nimport { LaneId, DEFAULT_LANE } from '@teambit/lane-id';\nimport { Remotes, Remote, getScopeRemotes } from '@teambit/scope.remotes';\nimport { EjectAspect, EjectMain, EjectResults } from '@teambit/eject';\nimport { Http, ExportOrigin } from '@teambit/scope.network';\nimport { linkToNodeModulesByIds } from '@teambit/workspace.modules.node-modules-linker';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { persistRemotes, validateRemotes, removePendingDirs } from './export-scope-components';\nimport {\n Lane,\n ModelComponent,\n ObjectItem,\n ObjectList,\n LaneReadmeComponent,\n BitObject,\n Ref,\n} from '@teambit/scope.objects';\nimport { Scope, PersistFailed } from '@teambit/legacy.scope';\nimport { getAllVersionHashes } from '@teambit/component.snap-distance';\nimport { ExportAspect } from './export.aspect';\nimport { ExportCmd } from './export-cmd';\nimport { ResumeExportCmd } from './resume-export-cmd';\n\nexport type OnExportIdTransformer = (id: ComponentID) => ComponentID;\n\nconst BEFORE_EXPORT = 'exporting component';\nconst BEFORE_EXPORTS = 'exporting components';\nconst BEFORE_LOADING_COMPONENTS = 'loading components';\n\ntype ModelComponentAndObjects = { component: ModelComponent; objects: BitObject[] };\ntype ObjectListPerName = { [name: string]: ObjectList };\nexport type ObjectsPerRemote = {\n remote: Remote;\n objectList: ObjectList;\n exportedIds?: string[];\n};\ntype ObjectsPerRemoteExtended = ObjectsPerRemote & {\n objectListPerName: ObjectListPerName;\n idsToChangeLocally: ComponentIdList;\n componentsAndObjects: ModelComponentAndObjects[];\n};\n\ntype ExportParams = {\n ids?: string[];\n eject?: boolean;\n allVersions?: boolean;\n originDirectly?: boolean;\n includeNonStaged?: boolean;\n resumeExportId?: string | undefined;\n headOnly?: boolean;\n ignoreMissingArtifacts?: boolean;\n forkLaneNewScope?: boolean;\n};\n\nexport interface ExportResult {\n nonExistOnBitMap: ComponentID[];\n newIdsOnRemote: ComponentID[];\n removedIds: ComponentIdList;\n missingScope: ComponentID[];\n componentsIds: ComponentID[];\n exportedLanes: Lane[];\n rippleJobs: string[];\n rippleJobUrls: string[];\n ejectResults: EjectResults | undefined;\n}\n\nexport class ExportMain {\n constructor(\n private workspace: Workspace,\n private remove: RemoveMain,\n private depResolver: DependencyResolverMain,\n private logger: Logger,\n private eject: EjectMain\n ) {}\n\n async export(params: ExportParams = {}): Promise<ExportResult> {\n const { nonExistOnBitMap, newIdsOnRemote, missingScope, exported, removedIds, exportedLanes, rippleJobs } =\n await this.exportComponents(params);\n let ejectResults: EjectResults | undefined;\n await this.workspace.clearCache(); // needed when one process executes multiple commands, such as in \"bit test\" or \"bit cli\"\n if (params.eject) ejectResults = await this.ejectExportedComponents(exported);\n const exportResults: ExportResult = {\n componentsIds: exported,\n newIdsOnRemote,\n nonExistOnBitMap,\n removedIds,\n missingScope,\n ejectResults,\n exportedLanes,\n rippleJobs,\n rippleJobUrls: this.getRippleJobUrls(exportedLanes, rippleJobs),\n };\n if (Scope.onPostExport) {\n await Scope.onPostExport(exported, exportedLanes).catch((err) => {\n this.logger.error('fatal: onPostExport encountered an error (this error does not stop the process)', err);\n });\n }\n\n return exportResults;\n }\n\n private getRippleJobUrls(exportedLanes: Lane[], rippleJobs: string[]): string[] {\n const lane = exportedLanes.length ? exportedLanes?.[0] : undefined;\n const rippleJobUrls = lane\n ? rippleJobs.map(\n (job) =>\n `https://${getCloudDomain()}/${lane.scope.replace('.', '/')}/~lane/${lane.name}/~ripple-ci/job/${job}`\n )\n : rippleJobs.map((job) => `https://${getCloudDomain()}/ripple-ci/job/${job}`);\n return rippleJobUrls;\n }\n\n private async exportComponents({\n ids,\n includeNonStaged,\n headOnly,\n originDirectly,\n ...params\n }: ExportParams): Promise<{\n updatedIds: ComponentID[];\n nonExistOnBitMap: ComponentID[];\n removedIds: ComponentIdList;\n missingScope: ComponentID[];\n exported: ComponentID[];\n exportedLanes: Lane[];\n newIdsOnRemote: ComponentID[];\n rippleJobs: string[];\n }> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer: Consumer = this.workspace.consumer;\n const { idsToExport, missingScope, laneObject } = await this.getComponentsToExport(\n ids,\n includeNonStaged || headOnly\n );\n\n if (!idsToExport.length && !laneObject) {\n return {\n updatedIds: [],\n nonExistOnBitMap: [],\n removedIds: new ComponentIdList(),\n missingScope,\n exported: [],\n newIdsOnRemote: [],\n exportedLanes: [],\n rippleJobs: [],\n };\n }\n if (!idsToExport.length && laneObject && params.forkLaneNewScope) {\n throw new BitError(`the forked lane \"${laneObject.name}\" has no changes, to export all its components, please use \"--all\" flag\nif the export fails with missing objects/versions/components, run \"bit fetch --lanes <lane-name> --all-history\", to make sure you have the full history locally`);\n }\n\n // validate lane readme component and ensure it has been snapped\n if (laneObject?.readmeComponent) {\n _throwForUnsnappedLaneReadme(laneObject);\n }\n\n if (\n !params.forkLaneNewScope &&\n laneObject?.forkedFrom &&\n laneObject.isNew &&\n laneObject.forkedFrom.scope !== laneObject.scope\n ) {\n throw new BitError(`error: the current lane ${laneObject\n .id()\n .toString()} was forked from ${laneObject.forkedFrom.toString()}\nand is about to export to a different scope (${laneObject.scope}) than the original lane (${\n laneObject.forkedFrom.scope\n }).\non large lanes with long history graph, it results in exporting lots of objects to the new scope, some of them might be missing locally.\nif you can use the same scope as the original name, change it now by running \"bit lane change-scope ${\n laneObject.name\n } ${laneObject.forkedFrom.scope}\".\notherwise, re-run the export with \"--fork-lane-new-scope\" flag.\nif the export fails with missing objects/versions/components, run \"bit fetch --lanes <lane-name> --all-history\", to make sure you have the full history locally`);\n }\n const isOnMain = consumer.isOnMain();\n const { exported, updatedLocally, newIdsOnRemote, rippleJobs } = await this.exportMany({\n ...params,\n exportHeadsOnly: headOnly,\n scope: consumer.scope,\n ids: idsToExport,\n laneObject,\n originDirectly,\n isOnMain,\n filterOutExistingVersions: Boolean(!params.allVersions && laneObject),\n });\n if (laneObject) await updateLanesAfterExport(consumer, laneObject);\n const removedIds = await this.getRemovedStagedBitIds();\n const workspaceIds = this.workspace.listIds();\n const nonExistOnBitMap = exported.filter(\n (id) => !workspaceIds.hasWithoutVersion(id) && !removedIds.hasWithoutVersion(id)\n );\n const updatedIds = _updateIdsOnBitMap(consumer.bitMap, updatedLocally);\n // re-generate the package.json, this way, it has the correct data in the componentId prop.\n await linkToNodeModulesByIds(this.workspace, updatedIds, true);\n await this.removeFromStagedConfig(exported);\n // ideally we should delete the staged-snaps only for the exported snaps. however, it's not easy, and it's ok to\n // delete them all because this file is mainly an optimization for the import process.\n await this.workspace.scope.legacyScope.stagedSnaps.deleteFile();\n await fs.remove(this.workspace.scope.getLastMergedPath());\n Analytics.setExtraData('num_components', exported.length);\n // it is important to have consumer.onDestroy() before running the eject operation, we want the\n // export and eject operations to function independently. we don't want to lose the changes to\n // .bitmap file done by the export action in case the eject action has failed.\n await consumer.onDestroy('export');\n return {\n updatedIds,\n nonExistOnBitMap,\n removedIds,\n missingScope,\n exported,\n newIdsOnRemote,\n exportedLanes: laneObject ? [laneObject] : [],\n rippleJobs,\n };\n }\n\n /**\n * the export process uses four steps. read more about it here: https://github.com/teambit/bit/pull/3371\n */\n async exportMany({\n scope,\n ids, // when exporting a lane, the ids are the lane component ids\n laneObject,\n allVersions,\n originDirectly,\n resumeExportId,\n throwForMissingArtifacts,\n isOnMain = true,\n exportHeadsOnly, // relevant when exporting from bare-scope, especially when re-exporting existing versions, the normal calculation based on getDivergeData won't work\n includeParents, // relevant when exportHeadsOnly is used. sometimes the parents head are needed as well\n filterOutExistingVersions, // go to the remote and check whether the version exists there. if so, don't export it\n exportOrigin = 'export',\n }: {\n scope: Scope;\n ids: ComponentIdList;\n laneObject?: Lane;\n allVersions?: boolean;\n originDirectly?: boolean;\n resumeExportId?: string | undefined;\n throwForMissingArtifacts?: boolean;\n isOnMain?: boolean;\n exportHeadsOnly?: boolean;\n includeParents?: boolean;\n filterOutExistingVersions?: boolean;\n exportOrigin?: ExportOrigin;\n }): Promise<{\n exported: ComponentIdList;\n updatedLocally: ComponentIdList;\n newIdsOnRemote: ComponentID[];\n rippleJobs: string[];\n }> {\n this.logger.debug(`scope.exportMany, ids: ${ids.toString()}`);\n const scopeRemotes: Remotes = await getScopeRemotes(scope);\n\n const groupByScopeName = (idList: ComponentIdList): { [scopeName: string]: ComponentIdList } => {\n return idList.reduce((acc, current) => {\n const scopeName = current.scope;\n if (!scopeName) {\n throw new Error(`toGroupByScopeName() expect ids to have a scope name, got ${current.toString()}`);\n }\n if (acc[scopeName]) acc[scopeName].push(current);\n else acc[scopeName] = new ComponentIdList(current);\n return acc;\n }, {});\n };\n\n const idsGroupedByScope = groupByScopeName(ids);\n\n /**\n * when a component is exported for the first time, and the lane-scope is not the same as the component-scope, it's\n * important to validate that there is no such component in the original scope. otherwise, later, it'll be impossible\n * to merge the lane because these two components don't have any snap in common.\n */\n const validateTargetScopeForLanes = async () => {\n if (!laneObject) {\n return;\n }\n const newIds = ComponentIdList.fromArray(ids.filter((id) => !scope.isExported(id)));\n const newIdsGrouped = groupByScopeName(newIds);\n await mapSeries(Object.keys(newIdsGrouped), async (scopeName) => {\n if (scopeName === laneObject.scope) {\n // this validation is redundant if the lane-component is in the same scope as the lane-object\n return;\n }\n // by getting the remote we also validate that this scope actually exists.\n const remote = await scopeRemotes.resolve(scopeName);\n const list = await remote.list();\n const listIds = ComponentIdList.fromArray(list.map((listItem) => listItem.id));\n newIdsGrouped[scopeName].forEach((id) => {\n if (listIds.hasWithoutVersion(id)) {\n throw new Error(`unable to export a lane with a new component \"${id.toString()}\", which has the default-scope \"${scopeName}\".\n this scope already has a component with the same name. as such, it'll be impossible to merge the lane later because these two components are different`);\n }\n });\n });\n };\n\n /**\n * by default, when exporting a lane, it traverse from the Lane's head and therefore it may skip the main head.\n * later, if for some reason the original component was deleted in its scope, the head object will be missing.\n */\n const addMainHeadIfPossible = async (allHashes: Ref[], modelComponent: ModelComponent) => {\n const head = modelComponent.head;\n if (!head) return;\n if (allHashes.find((h) => h.hash === head.hash)) return; // head is already in the list\n if (!(await scope.objects.has(head))) return; // it should not happen. but if it does, we don't want to block the export\n allHashes.push(head);\n };\n\n const getVersionsToExport = async (modelComponent: ModelComponent): Promise<Ref[]> => {\n if (exportHeadsOnly) {\n const head =\n laneObject?.getCompHeadIncludeUpdateDependents(modelComponent.toComponentId()) || modelComponent.head;\n if (!head) {\n throw new Error(\n `getVersionsToExport should export the head only, but the head of ${modelComponent.id()} is missing`\n );\n }\n if (includeParents) {\n const headVersion = await modelComponent.loadVersion(head.toString(), scope.objects);\n return [head, ...headVersion.parents];\n }\n return [head];\n }\n const fromWorkspace = this.workspace?.getIdIfExist(modelComponent.toComponentId());\n const localTagsOrHashes = await modelComponent.getLocalHashes(scope.objects, fromWorkspace);\n if (!allVersions) {\n return localTagsOrHashes;\n }\n\n const allHashes = await getAllVersionHashes({ modelComponent, repo: scope.objects });\n await addMainHeadIfPossible(allHashes, modelComponent);\n return allHashes;\n };\n\n await validateTargetScopeForLanes();\n const groupedByScopeString = Object.keys(idsGroupedByScope)\n .map((scopeName) => `scope \"${scopeName}\": ${idsGroupedByScope[scopeName].toString()}`)\n .join(', ');\n this.logger.debug(`export-scope-components, export to the following scopes ${groupedByScopeString}`);\n\n const getUpdatedObjectsToExport = async (\n remoteNameStr: string,\n bitIds: ComponentIdList,\n lane?: Lane\n ): Promise<ObjectsPerRemoteExtended> => {\n bitIds.throwForDuplicationIgnoreVersion();\n const remote: Remote = await scopeRemotes.resolve(remoteNameStr);\n const idsToChangeLocally = ComponentIdList.fromArray(bitIds.filter((id) => !scope.isExported(id)));\n const componentsAndObjects: ModelComponentAndObjects[] = [];\n const objectList = new ObjectList();\n const objectListPerName: ObjectListPerName = {};\n\n const modelComponents = await mapSeries(bitIds, (id) => scope.getModelComponent(id));\n // super important! otherwise, the processModelComponent() changes objects in memory, while the key remains the same\n scope.objects.clearObjectsFromCache();\n\n const refsToPotentialExportPerComponent = await mapSeries(modelComponents, async (modelComponent) => {\n const refs = await getVersionsToExport(modelComponent);\n return { modelComponent, refs };\n });\n\n const getRefsToExportPerComp = async () => {\n if (!filterOutExistingVersions) {\n return refsToPotentialExportPerComponent;\n }\n const allHashesAsStr = refsToPotentialExportPerComponent\n .map((r) => r.refs)\n .flat()\n .map((ref) => ref.toString());\n const existingOnRemote = await scope.scopeImporter.checkWhatHashesExistOnRemote(remoteNameStr, allHashesAsStr);\n // for lanes, some snaps might be already on the remote, and the reason they're staged is due to a previous merge.\n const refsToExportPerComponent = refsToPotentialExportPerComponent.map(({ modelComponent, refs }) => {\n const filteredOutRefs: string[] = [];\n const refsToExport = refs.filter((ref) => {\n const existing = existingOnRemote.includes(ref.toString());\n if (existing) filteredOutRefs.push(ref.toString());\n return !existing;\n });\n if (filteredOutRefs.length)\n this.logger.debug(\n `export-scope-components, the following refs were filtered out from ${modelComponent\n .id()\n .toString()} because they already exist on the remote:\\n${filteredOutRefs.join('\\n')}`\n );\n\n return refsToExport.length ? { modelComponent, refs: refsToExport } : null;\n });\n\n return compact(refsToExportPerComponent);\n };\n\n const bitObjectToObjectItem = async (obj: BitObject): Promise<ObjectItem> => {\n return {\n ref: obj.hash(),\n buffer: await obj.compress(),\n type: obj.getType(),\n };\n };\n\n const processModelComponent = async ({\n modelComponent,\n refs,\n }: {\n modelComponent: ModelComponent;\n refs: Ref[];\n }) => {\n const idFromWorkspace = this.workspace?.getIdIfExist(modelComponent.toComponentId());\n modelComponent.clearStateData();\n const objectItems = await modelComponent.collectVersionsObjects(\n scope.objects,\n refs.map((ref) => ref.toString()),\n throwForMissingArtifacts,\n idFromWorkspace\n );\n const objectsList = await new ObjectList(objectItems).toBitObjects();\n const componentAndObject = { component: modelComponent, objects: objectsList.getAll() };\n await this.convertToCorrectScope(scope, componentAndObject, remoteNameStr, bitIds, ids);\n const remoteObj = { url: remote.host, name: remote.name, date: Date.now().toString() };\n modelComponent.addScopeListItem(remoteObj);\n componentsAndObjects.push(componentAndObject);\n const componentBuffer = await modelComponent.compress();\n const componentData = { ref: modelComponent.hash(), buffer: componentBuffer, type: modelComponent.getType() };\n const objectsBuffer = await Promise.all(\n componentAndObject.objects.map(async (obj) => bitObjectToObjectItem(obj))\n );\n const allObjectsData = [componentData, ...objectsBuffer];\n objectListPerName[modelComponent.name] = new ObjectList(allObjectsData);\n objectList.addIfNotExist(allObjectsData);\n };\n\n const refsToExportPerComponent = await getRefsToExportPerComp();\n // don't use Promise.all, otherwise, it'll throw \"JavaScript heap out of memory\" on a large set of data\n await mapSeries(refsToExportPerComponent, processModelComponent);\n if (lane) {\n const laneHistory = await scope.lanes.getOrCreateLaneHistory(lane);\n const laneHistoryData = await bitObjectToObjectItem(laneHistory);\n objectList.addIfNotExist([laneHistoryData]);\n const laneData = await bitObjectToObjectItem(lane);\n objectList.addIfNotExist([laneData]);\n }\n\n return { remote, objectList, objectListPerName, idsToChangeLocally, componentsAndObjects };\n };\n\n const manyObjectsPerRemote = laneObject\n ? [await getUpdatedObjectsToExport(laneObject.scope, ids, laneObject)]\n : await mapSeries(Object.keys(idsGroupedByScope), (scopeName) =>\n getUpdatedObjectsToExport(scopeName, idsGroupedByScope[scopeName], laneObject)\n );\n\n const pushAllToCentralHub = async () => {\n const objectList = this.transformToOneObjectListWithScopeData(manyObjectsPerRemote);\n const http = await Http.connect(CENTRAL_BIT_HUB_URL, CENTRAL_BIT_HUB_NAME);\n const pushResults = await http.pushToCentralHub(objectList, { origin: exportOrigin });\n const { failedScopes, successIds, errors, metadata } = pushResults;\n if (failedScopes.length) {\n throw new PersistFailed(failedScopes, errors);\n }\n const exportedBitIds = successIds.map((id) => ComponentID.fromString(id));\n if (manyObjectsPerRemote.length === 1) {\n // when on a lane, it's always exported to the lane. and the ids can be from different scopes, so having the\n // filter below, will remove these components from the output of bit-export at the end.\n manyObjectsPerRemote[0].exportedIds = exportedBitIds.map((id) => id.toString());\n } else {\n manyObjectsPerRemote.forEach((objectPerRemote) => {\n const idsPerScope = exportedBitIds.filter((id) => id.scope === objectPerRemote.remote.name);\n // it's possible that idsPerScope is an empty array, in case the objects were exported already before\n objectPerRemote.exportedIds = idsPerScope.map((id) => id.toString());\n });\n }\n return { rippleJobs: metadata?.jobs };\n };\n\n const updateLocalObjects = async (\n lane?: Lane\n ): Promise<\n Array<{ exported: ComponentIdList; updatedLocally: ComponentIdList; newIdsOnRemote: ComponentID[] }>\n > => {\n return mapSeries(manyObjectsPerRemote, async (objectsPerRemote: ObjectsPerRemoteExtended) => {\n const { remote, idsToChangeLocally, componentsAndObjects, exportedIds } = objectsPerRemote;\n const remoteNameStr = remote.name;\n\n componentsAndObjects.forEach((componentObject) => scope.sources.put(componentObject));\n\n // update lanes\n if (lane) {\n if (idsToChangeLocally.length) {\n // otherwise, we don't want to update scope-name of components in the lane object\n scope.objects.add(lane);\n }\n await scope.objects.remoteLanes.syncWithLaneObject(remoteNameStr, lane);\n }\n\n if (isOnMain && !lane) {\n // all exported from main\n const remoteLaneId = LaneId.from(DEFAULT_LANE, remoteNameStr);\n await scope.objects.remoteLanes.loadRemoteLane(remoteLaneId);\n await Promise.all(\n componentsAndObjects.map(async ({ component }) => {\n await scope.objects.remoteLanes.addEntry(remoteLaneId, component.toComponentId(), component.getHead());\n })\n );\n }\n\n await scope.objects.persist();\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const newIdsOnRemote = exportedIds!.map((id) => ComponentID.fromString(id));\n // remove version. exported component might have multiple versions exported\n const idsWithRemoteScope: ComponentID[] = newIdsOnRemote.map((id) => id.changeVersion(undefined));\n const idsWithRemoteScopeUniq = ComponentIdList.uniqFromArray(idsWithRemoteScope).sort();\n return {\n newIdsOnRemote,\n exported: idsWithRemoteScopeUniq,\n updatedLocally: ComponentIdList.fromArray(\n idsWithRemoteScopeUniq.filter((id) => idsToChangeLocally.hasWithoutScopeAndVersion(id))\n ),\n };\n });\n };\n\n const warnCancelExport = () => {\n this.logger.consoleWarning(\n `unable to cancel the export process at this point because the communication with the remote already started`\n );\n };\n process.on('SIGINT', warnCancelExport);\n let centralHubResults;\n if (resumeExportId) {\n const remotes = manyObjectsPerRemote.map((o) => o.remote);\n await validateRemotes(remotes, resumeExportId);\n await persistRemotes(manyObjectsPerRemote, resumeExportId);\n } else if (this.shouldPushToCentralHub(manyObjectsPerRemote, scopeRemotes, originDirectly)) {\n centralHubResults = await pushAllToCentralHub();\n } else {\n // await pushToRemotes();\n await this.pushToRemotesCarefully(manyObjectsPerRemote, resumeExportId);\n }\n\n this.logger.setStatusLine('updating data locally...');\n const results = await updateLocalObjects(laneObject);\n process.removeListener('SIGINT', warnCancelExport);\n return {\n newIdsOnRemote: results.map((r) => r.newIdsOnRemote).flat(),\n exported: ComponentIdList.uniqFromArray(results.map((r) => r.exported).flat()),\n updatedLocally: ComponentIdList.uniqFromArray(results.map((r) => r.updatedLocally).flat()),\n rippleJobs: centralHubResults?.rippleJobs || [],\n };\n }\n\n private transformToOneObjectListWithScopeData(objectsPerRemote: ObjectsPerRemote[]): ObjectList {\n const objectList = new ObjectList();\n objectsPerRemote.forEach((objPerRemote) => {\n objPerRemote.objectList.addScopeName(objPerRemote.remote.name);\n objectList.mergeObjectList(objPerRemote.objectList);\n });\n return objectList;\n }\n\n private async ejectExportedComponents(componentsIds: ComponentID[]): Promise<EjectResults> {\n const consumer: Consumer = this.workspace.consumer;\n let ejectResults: EjectResults;\n try {\n ejectResults = await this.eject.eject(componentsIds, { force: true });\n } catch (err: any) {\n const ejectErr = `The components ${componentsIds.map((c) => c.toString()).join(', ')} were exported successfully.\n However, the eject operation has failed due to an error: ${err.msg || err}`;\n this.logger.error(ejectErr, err);\n throw new Error(ejectErr);\n }\n // run the consumer.onDestroy() again, to write the changes done by the eject action to .bitmap\n await consumer.onDestroy('export (eject)');\n return ejectResults;\n }\n\n async pushToRemotesCarefully(manyObjectsPerRemote: ObjectsPerRemote[], resumeExportId?: string) {\n const remotes = manyObjectsPerRemote.map((o) => o.remote);\n const clientId = resumeExportId || Date.now().toString();\n await this.pushRemotesPendingDir(clientId, manyObjectsPerRemote, resumeExportId);\n await validateRemotes(remotes, clientId, Boolean(resumeExportId));\n await persistRemotes(manyObjectsPerRemote, clientId);\n }\n\n private async pushRemotesPendingDir(\n clientId: string,\n manyObjectsPerRemote: ObjectsPerRemote[],\n resumeExportId?: string\n ): Promise<void> {\n if (resumeExportId) {\n this.logger.debug('pushRemotesPendingDir - skip as the resumeExportId was passed');\n // no need to transfer the objects, they're already on the server. also, since this clientId\n // exists already on the remote pending-dir, it'll cause a collision.\n return;\n }\n const pushOptions = { clientId };\n const pushedRemotes: Remote[] = [];\n await mapSeries(manyObjectsPerRemote, async (objectsPerRemote: ObjectsPerRemote) => {\n const { remote, objectList } = objectsPerRemote;\n this.logger.setStatusLine(`transferring ${objectList.count()} objects to the remote \"${remote.name}\"...`);\n try {\n await remote.pushMany(objectList, pushOptions, {});\n this.logger.debug(\n 'pushRemotesPendingDir, successfully pushed all objects to the pending-dir directory on the remote'\n );\n pushedRemotes.push(remote);\n } catch (err: any) {\n this.logger.warn('exportMany, failed pushing objects to the remote');\n await removePendingDirs(pushedRemotes, clientId);\n throw err;\n }\n });\n }\n\n shouldPushToCentralHub(\n manyObjectsPerRemote: ObjectsPerRemote[],\n scopeRemotes: Remotes,\n originDirectly = false\n ): boolean {\n if (originDirectly) return false;\n const hubRemotes = manyObjectsPerRemote.filter((m) => scopeRemotes.isHub(m.remote.name));\n if (!hubRemotes.length) return false;\n if (hubRemotes.length === manyObjectsPerRemote.length) return true; // all are hub\n // @todo: maybe create a flag \"no-central\" to support this workflow\n throw new BitError(\n `some of your components are configured to be exported to a local scope and some to the bit.cloud hub. this is not supported`\n );\n }\n\n /**\n * Component and dependencies id changes:\n * When exporting components with dependencies to a bare-scope, some of the dependencies may be created locally and as\n * a result their scope-name is null. Before the bare-scope gets the components, convert these scope names\n * to the bare-scope name.\n *\n * This is the Harmony version of \"convertToCorrectScope\". No more codemod and no more hash changes.\n */\n private async convertToCorrectScope(\n scope: Scope,\n componentsObjects: ModelComponentAndObjects,\n remoteScope: string,\n exportingIds: ComponentIdList,\n ids: ComponentIdList,\n shouldFork = false // not in used currently, but might be needed soon\n ): Promise<boolean> {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const shouldChangeScope = shouldFork\n ? remoteScope !== componentsObjects.component.scope\n : !componentsObjects.component.scope;\n const hasComponentChanged = shouldChangeScope;\n if (shouldChangeScope) {\n const idWithFutureScope = ids.searchWithoutScopeAndVersion(componentsObjects.component.toComponentId());\n componentsObjects.component.scope = idWithFutureScope?.scope || remoteScope;\n }\n\n // return true if one of the versions has changed or the component itself\n return hasComponentChanged;\n }\n\n private async removeFromStagedConfig(ids: ComponentID[]) {\n this.logger.debug(`removeFromStagedConfig, ${ids.length} ids`);\n const stagedConfig = await this.workspace.scope.getStagedConfig();\n ids.map((compId) => stagedConfig.removeComponentConfig(compId));\n await stagedConfig.write();\n }\n\n private async getComponentsToExport(\n ids: string[] = [],\n includeNonStaged?: boolean\n ): Promise<{\n idsToExport: ComponentIdList;\n missingScope: ComponentID[];\n laneObject?: Lane;\n }> {\n const consumer = this.workspace.consumer;\n const componentsList = new ComponentsList(this.workspace);\n const idsHaveWildcard = hasWildcard(ids);\n const throwForLocalOnlyIfNeeded = async (\n bitIds: ComponentIdList\n ): Promise<{ idsToExport: ComponentIdList; missingScope: ComponentID[] }> => {\n const localOnlyComponents = this.workspace.listLocalOnly();\n const localOnlyExportPending = bitIds.filter((id) => localOnlyComponents.hasWithoutScopeAndVersion(id));\n if (localOnlyExportPending.length) {\n throw new BitError(`unable to export the following components as they are local only:\n(either bit-reset them or run \"bit local-only unset\" to make them non local only)\n${localOnlyExportPending.map((c) => c.toString()).join('\\n')}`);\n }\n return { idsToExport: ComponentIdList.fromArray(bitIds), missingScope: [] };\n };\n if (isUserTryingToExportLanes(consumer)) {\n if (ids.length) {\n throw new BitError(`when checked out to a lane, all its components are exported. please omit the ids`);\n }\n const { componentsToExport, laneObject } = await this.getLaneCompIdsToExport(consumer, includeNonStaged);\n const loaderMsg = componentsToExport.length > 1 ? BEFORE_EXPORTS : BEFORE_EXPORT;\n this.logger.setStatusLine(loaderMsg);\n const filtered = await throwForLocalOnlyIfNeeded(componentsToExport);\n return { ...filtered, laneObject };\n }\n if (!ids.length || idsHaveWildcard) {\n this.logger.setStatusLine(BEFORE_LOADING_COMPONENTS);\n const exportPendingComponents: ComponentIdList = includeNonStaged\n ? await componentsList.listNonNewComponentsIds()\n : await componentsList.listExportPendingComponentsIds();\n const componentsToExport = idsHaveWildcard\n ? ComponentsList.filterComponentsByWildcard(exportPendingComponents, ids)\n : exportPendingComponents;\n const loaderMsg = componentsToExport.length > 1 ? BEFORE_EXPORTS : BEFORE_EXPORT;\n this.logger.setStatusLine(loaderMsg);\n return throwForLocalOnlyIfNeeded(componentsToExport);\n }\n this.logger.setStatusLine(BEFORE_EXPORT); // show single export\n const parsedIds = await Promise.all(ids.map((id) => getParsedId(consumer, id)));\n // load the components for fixing any out-of-sync issues.\n await consumer.loadComponents(ComponentIdList.fromArray(parsedIds));\n\n return throwForLocalOnlyIfNeeded(ComponentIdList.fromArray(parsedIds));\n }\n\n private async getLaneCompIdsToExport(\n consumer: Consumer,\n includeNonStaged?: boolean\n ): Promise<{ componentsToExport: ComponentIdList; laneObject: Lane }> {\n const currentLaneId = consumer.getCurrentLaneId();\n const laneObject = await consumer.scope.loadLane(currentLaneId);\n if (!laneObject) {\n throw new Error(`fatal: unable to load the current lane object (${currentLaneId.toString()})`);\n }\n this.logger.setStatusLine(BEFORE_LOADING_COMPONENTS);\n const componentsList = new ComponentsList(this.workspace);\n const componentsToExportWithoutRemoved = includeNonStaged\n ? await componentsList.listNonNewComponentsIds()\n : await componentsList.listExportPendingComponentsIds(laneObject);\n const removedStagedBitIds = await this.getRemovedStagedBitIds();\n const componentsToExport = ComponentIdList.uniqFromArray([\n ...componentsToExportWithoutRemoved,\n ...removedStagedBitIds,\n ]);\n return { componentsToExport, laneObject };\n }\n\n private async getRemovedStagedBitIds(): Promise<ComponentIdList> {\n const removedStaged = await this.remove.getRemovedStaged();\n return ComponentIdList.fromArray(removedStaged.map((id) => id.changeVersion(undefined)));\n }\n\n static runtime = MainRuntime;\n static dependencies = [\n CLIAspect,\n ScopeAspect,\n WorkspaceAspect,\n RemoveAspect,\n DependencyResolverAspect,\n LoggerAspect,\n EjectAspect,\n ];\n static async provider([cli, scope, workspace, remove, depResolver, loggerMain, eject]: [\n CLIMain,\n ScopeMain,\n Workspace,\n RemoveMain,\n DependencyResolverMain,\n LoggerMain,\n EjectMain,\n ]) {\n const logger = loggerMain.createLogger(ExportAspect.id);\n const exportMain = new ExportMain(workspace, remove, depResolver, logger, eject);\n cli.register(new ResumeExportCmd(scope), new ExportCmd(exportMain));\n return exportMain;\n }\n}\n\nExportAspect.addRuntime(ExportMain);\n\n/**\n * the componentsIds passed here are the ones that didn't have scope-name before, and now they have.\n * so if the bitMap.updateComponentId returns bitId without scope-name is because it couldn't find it there\n */\nfunction _updateIdsOnBitMap(bitMap: BitMap, componentsIds: ComponentIdList): ComponentID[] {\n const updatedIds: ComponentID[] = [];\n componentsIds.forEach((componentsId) => {\n const resultId = bitMap.updateComponentId(componentsId, true);\n if (resultId.hasVersion()) updatedIds.push(resultId);\n });\n return updatedIds;\n}\n\nasync function getParsedId(consumer: Consumer, id: string): Promise<ComponentID> {\n // reason why not calling `consumer.getParsedId()` only is because a component might not be on\n // .bitmap and only in the scope. we support this case and enable to export\n try {\n return consumer.getParsedId(id);\n } catch {\n return consumer.scope.getParsedId(id);\n }\n}\n\nfunction _throwForUnsnappedLaneReadme(lane: Lane) {\n const readmeComponent = lane.readmeComponent as LaneReadmeComponent;\n\n const isValid =\n readmeComponent?.head &&\n lane.getComponent(readmeComponent.id) &&\n lane.getComponentHead(readmeComponent.id)?.isEqual(readmeComponent?.head);\n\n if (!isValid) {\n throw new BitError(\n `${lane?.name} has a readme component ${readmeComponent.id} that hasn't been snapped on the lane.\n Please run either snap -a or snap ${readmeComponent.id} to snap the component on the lane before exporting it.`\n );\n }\n}\n\nasync function updateLanesAfterExport(consumer: Consumer, lane: Lane) {\n const currentLane = consumer.getCurrentLaneId();\n const isCurrentLane = lane.name === currentLane.name;\n if (!isCurrentLane) {\n throw new Error(\n `updateLanesAfterExport should get called only with current lane, got ${lane.name}, current ${currentLane.name}`\n );\n }\n consumer.setCurrentLane(lane.toLaneId(), true);\n consumer.scope.scopeJson.removeLaneFromNew(lane.name);\n lane.isNew = false;\n}\n\nexport function isUserTryingToExportLanes(consumer: Consumer) {\n return consumer.isOnLane();\n}\n\nexport default ExportMain;\n"],"mappings":";;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,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+S,gBAAgB,CAACzR,eAAe,CAACI,EAAE,CAAC,EAAEsR,OAAO,CAAC1R,eAAe,EAAE0D,IAAI,CAAC;EAE3E,IAAI,CAAC6N,OAAO,EAAE;IACZ,MAAM,KAAIxR,oBAAQ,EAChB,GAAGrB,IAAI,EAAEO,IAAI,2BAA2Be,eAAe,CAACI,EAAE;AAChE,0CAA0CJ,eAAe,CAACI,EAAE,yDACxD,CAAC;EACH;AACF;AAEA,eAAeS,sBAAsBA,CAACrB,QAAkB,EAAEd,IAAU,EAAE;EACpE,MAAMiT,WAAW,GAAGnS,QAAQ,CAACkQ,gBAAgB,CAAC,CAAC;EAC/C,MAAMkC,aAAa,GAAGlT,IAAI,CAACO,IAAI,KAAK0S,WAAW,CAAC1S,IAAI;EACpD,IAAI,CAAC2S,aAAa,EAAE;IAClB,MAAM,IAAIjP,KAAK,CACb,wEAAwEjE,IAAI,CAACO,IAAI,aAAa0S,WAAW,CAAC1S,IAAI,EAChH,CAAC;EACH;EACAO,QAAQ,CAACqS,cAAc,CAACnT,IAAI,CAACoT,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC;EAC9CtS,QAAQ,CAACT,KAAK,CAACgT,SAAS,CAACC,iBAAiB,CAACtT,IAAI,CAACO,IAAI,CAAC;EACrDP,IAAI,CAACyB,KAAK,GAAG,KAAK;AACpB;AAEO,SAAS0O,yBAAyBA,CAACrP,QAAkB,EAAE;EAC5D,OAAOA,QAAQ,CAACyS,QAAQ,CAAC,CAAC;AAC5B;AAAC,IAAAC,QAAA,GAAAzB,OAAA,CAAAvW,OAAA,GAEc2C,UAAU","ignoreList":[]}
|
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export type { ExportMain, ExportResult } from './export.main.runtime';
|
1
|
+
export type { ExportMain, ExportResult, ObjectsPerRemote } from './export.main.runtime';
|
2
2
|
export { ExportAspect } from './export.aspect';
|
3
3
|
export type { Network } from '@teambit/scope.network';
|
4
4
|
export type { PushOptions } from '@teambit/legacy.scope-api';
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_export","data","require","_scope","_scope2","_exportScopeComponents"],"sources":["index.ts"],"sourcesContent":["export type { ExportMain, ExportResult } from './export.main.runtime';\nexport { ExportAspect } from './export.aspect';\nexport type { Network } from '@teambit/scope.network';\nexport type { PushOptions } from '@teambit/legacy.scope-api';\nexport { ExportPersist, ExportValidate, RemovePendingDir, FetchMissingDeps } from '@teambit/scope.remote-actions';\nexport { ObjectList } from '@teambit/scope.objects';\nexport {\n exportManyBareScope,\n saveObjects,\n persistRemotes,\n validateRemotes,\n resumeExport,\n removePendingDirs,\n mergeObjects,\n} from './export-scope-components';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,uBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,sBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_export","data","require","_scope","_scope2","_exportScopeComponents"],"sources":["index.ts"],"sourcesContent":["export type { ExportMain, ExportResult, ObjectsPerRemote } from './export.main.runtime';\nexport { ExportAspect } from './export.aspect';\nexport type { Network } from '@teambit/scope.network';\nexport type { PushOptions } from '@teambit/legacy.scope-api';\nexport { ExportPersist, ExportValidate, RemovePendingDir, FetchMissingDeps } from '@teambit/scope.remote-actions';\nexport { ObjectList } from '@teambit/scope.objects';\nexport {\n exportManyBareScope,\n saveObjects,\n persistRemotes,\n validateRemotes,\n resumeExport,\n removePendingDirs,\n mergeObjects,\n} from './export-scope-components';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,uBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,sBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_export@1.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_export@1.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_export@1.0.508/dist/export.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_export@1.0.508/dist/export.docs.mdx';
|
3
3
|
|
4
4
|
export const compositions = [compositions_0];
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/export",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.508",
|
4
4
|
"homepage": "https://bit.cloud/teambit/scope/export",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.scope",
|
8
8
|
"name": "export",
|
9
|
-
"version": "1.0.
|
9
|
+
"version": "1.0.508"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -18,37 +18,37 @@
|
|
18
18
|
"@teambit/harmony": "0.4.6",
|
19
19
|
"@teambit/bit-error": "0.0.404",
|
20
20
|
"@teambit/lane-id": "0.0.311",
|
21
|
-
"@teambit/cli": "0.0.
|
22
|
-
"@teambit/eject": "1.0.
|
21
|
+
"@teambit/cli": "0.0.1085",
|
22
|
+
"@teambit/eject": "1.0.508",
|
23
23
|
"@teambit/legacy.constants": "0.0.4",
|
24
24
|
"@teambit/harmony.modules.concurrency": "0.0.5",
|
25
25
|
"@teambit/legacy.loader": "0.0.4",
|
26
26
|
"@teambit/legacy.logger": "0.0.6",
|
27
|
-
"@teambit/legacy.scope": "0.0.
|
28
|
-
"@teambit/scope.objects": "0.0.
|
29
|
-
"@teambit/scope.remote-actions": "0.0.
|
30
|
-
"@teambit/scope.remotes": "0.0.
|
31
|
-
"@teambit/toolbox.promise.map-pool": "0.0.
|
32
|
-
"@teambit/component.snap-distance": "0.0.
|
33
|
-
"@teambit/dependency-resolver": "1.0.
|
27
|
+
"@teambit/legacy.scope": "0.0.15",
|
28
|
+
"@teambit/scope.objects": "0.0.15",
|
29
|
+
"@teambit/scope.remote-actions": "0.0.15",
|
30
|
+
"@teambit/scope.remotes": "0.0.15",
|
31
|
+
"@teambit/toolbox.promise.map-pool": "0.0.3",
|
32
|
+
"@teambit/component.snap-distance": "0.0.16",
|
33
|
+
"@teambit/dependency-resolver": "1.0.508",
|
34
34
|
"@teambit/legacy.analytics": "0.0.64",
|
35
|
-
"@teambit/legacy.bit-map": "0.0.
|
36
|
-
"@teambit/legacy.component-list": "0.0.
|
37
|
-
"@teambit/legacy.consumer": "0.0.
|
35
|
+
"@teambit/legacy.bit-map": "0.0.72",
|
36
|
+
"@teambit/legacy.component-list": "0.0.69",
|
37
|
+
"@teambit/legacy.consumer": "0.0.15",
|
38
38
|
"@teambit/legacy.utils": "0.0.12",
|
39
|
-
"@teambit/logger": "0.0.
|
40
|
-
"@teambit/remove": "1.0.
|
41
|
-
"@teambit/scope.network": "0.0.
|
42
|
-
"@teambit/scope": "1.0.
|
43
|
-
"@teambit/workspace.modules.node-modules-linker": "0.0.
|
44
|
-
"@teambit/workspace": "1.0.
|
45
|
-
"@teambit/legacy.scope-api": "0.0.
|
39
|
+
"@teambit/logger": "0.0.1178",
|
40
|
+
"@teambit/remove": "1.0.508",
|
41
|
+
"@teambit/scope.network": "0.0.15",
|
42
|
+
"@teambit/scope": "1.0.508",
|
43
|
+
"@teambit/workspace.modules.node-modules-linker": "0.0.243",
|
44
|
+
"@teambit/workspace": "1.0.508",
|
45
|
+
"@teambit/legacy.scope-api": "0.0.70"
|
46
46
|
},
|
47
47
|
"devDependencies": {
|
48
48
|
"@types/lodash": "4.14.165",
|
49
49
|
"@types/fs-extra": "9.0.7",
|
50
50
|
"@types/mocha": "9.1.0",
|
51
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
51
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.65"
|
52
52
|
},
|
53
53
|
"peerDependencies": {
|
54
54
|
"react": "^17.0.0 || ^18.0.0",
|