@teambit/export 1.0.346 → 1.0.348
Sign up to get free protection for your applications and to get access to all the features.
- package/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_scope_export-preview.js +1 -1
- package/artifacts/schema.json +63 -63
- package/dist/export.main.runtime.d.ts +0 -4
- package/dist/export.main.runtime.js +12 -29
- package/dist/export.main.runtime.js.map +1 -1
- package/dist/{preview-1721618348248.js → preview-1721791303259.js} +2 -2
- package/package.json +14 -14
@@ -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.348" 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={36587:(e,t,o)=>{var r={id:"teambit.scope/export@1.0.348",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(36587);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
@@ -929,7 +929,7 @@
|
|
929
929
|
"__schema": "VariableLikeSchema",
|
930
930
|
"location": {
|
931
931
|
"filePath": "export.main.runtime.ts",
|
932
|
-
"line":
|
932
|
+
"line": 833,
|
933
933
|
"character": 3
|
934
934
|
},
|
935
935
|
"signature": "(property) ExportMain.runtime: RuntimeDefinition",
|
@@ -938,7 +938,7 @@
|
|
938
938
|
"__schema": "InferenceTypeSchema",
|
939
939
|
"location": {
|
940
940
|
"filePath": "export.main.runtime.ts",
|
941
|
-
"line":
|
941
|
+
"line": 833,
|
942
942
|
"character": 3
|
943
943
|
},
|
944
944
|
"type": "RuntimeDefinition"
|
@@ -950,7 +950,7 @@
|
|
950
950
|
"__schema": "VariableLikeSchema",
|
951
951
|
"location": {
|
952
952
|
"filePath": "export.main.runtime.ts",
|
953
|
-
"line":
|
953
|
+
"line": 834,
|
954
954
|
"character": 3
|
955
955
|
},
|
956
956
|
"signature": "(property) ExportMain.dependencies: Aspect[]",
|
@@ -959,7 +959,7 @@
|
|
959
959
|
"__schema": "InferenceTypeSchema",
|
960
960
|
"location": {
|
961
961
|
"filePath": "export.main.runtime.ts",
|
962
|
-
"line":
|
962
|
+
"line": 834,
|
963
963
|
"character": 3
|
964
964
|
},
|
965
965
|
"type": "Aspect[]"
|
@@ -971,7 +971,7 @@
|
|
971
971
|
"__schema": "FunctionLikeSchema",
|
972
972
|
"location": {
|
973
973
|
"filePath": "export.main.runtime.ts",
|
974
|
-
"line":
|
974
|
+
"line": 843,
|
975
975
|
"character": 3
|
976
976
|
},
|
977
977
|
"signature": "(method) ExportMain.provider([cli, scope, workspace, remove, depResolver, loggerMain, eject]: [\n CLIMain,\n ScopeMain,\n Workspace,\n RemoveMain,\n DependencyResolverMain,\n LoggerMain,\n EjectMain\n]): Promise<ExportMain>",
|
@@ -981,7 +981,7 @@
|
|
981
981
|
"__schema": "ParameterSchema",
|
982
982
|
"location": {
|
983
983
|
"filePath": "export.main.runtime.ts",
|
984
|
-
"line":
|
984
|
+
"line": 843,
|
985
985
|
"character": 25
|
986
986
|
},
|
987
987
|
"name": "[ cli, scope, workspace, remove, depResolver, loggerMain, eject ]",
|
@@ -989,7 +989,7 @@
|
|
989
989
|
"__schema": "TupleTypeSchema",
|
990
990
|
"location": {
|
991
991
|
"filePath": "export.main.runtime.ts",
|
992
|
-
"line":
|
992
|
+
"line": 843,
|
993
993
|
"character": 90
|
994
994
|
},
|
995
995
|
"elements": [
|
@@ -997,7 +997,7 @@
|
|
997
997
|
"__schema": "TypeRefSchema",
|
998
998
|
"location": {
|
999
999
|
"filePath": "export.main.runtime.ts",
|
1000
|
-
"line":
|
1000
|
+
"line": 844,
|
1001
1001
|
"character": 5
|
1002
1002
|
},
|
1003
1003
|
"name": "CLIMain"
|
@@ -1006,7 +1006,7 @@
|
|
1006
1006
|
"__schema": "TypeRefSchema",
|
1007
1007
|
"location": {
|
1008
1008
|
"filePath": "export.main.runtime.ts",
|
1009
|
-
"line":
|
1009
|
+
"line": 845,
|
1010
1010
|
"character": 5
|
1011
1011
|
},
|
1012
1012
|
"name": "ScopeMain"
|
@@ -1015,7 +1015,7 @@
|
|
1015
1015
|
"__schema": "TypeRefSchema",
|
1016
1016
|
"location": {
|
1017
1017
|
"filePath": "export.main.runtime.ts",
|
1018
|
-
"line":
|
1018
|
+
"line": 846,
|
1019
1019
|
"character": 5
|
1020
1020
|
},
|
1021
1021
|
"name": "Workspace"
|
@@ -1024,7 +1024,7 @@
|
|
1024
1024
|
"__schema": "TypeRefSchema",
|
1025
1025
|
"location": {
|
1026
1026
|
"filePath": "export.main.runtime.ts",
|
1027
|
-
"line":
|
1027
|
+
"line": 847,
|
1028
1028
|
"character": 5
|
1029
1029
|
},
|
1030
1030
|
"name": "RemoveMain"
|
@@ -1033,7 +1033,7 @@
|
|
1033
1033
|
"__schema": "TypeRefSchema",
|
1034
1034
|
"location": {
|
1035
1035
|
"filePath": "export.main.runtime.ts",
|
1036
|
-
"line":
|
1036
|
+
"line": 848,
|
1037
1037
|
"character": 5
|
1038
1038
|
},
|
1039
1039
|
"name": "DependencyResolverMain"
|
@@ -1042,7 +1042,7 @@
|
|
1042
1042
|
"__schema": "TypeRefSchema",
|
1043
1043
|
"location": {
|
1044
1044
|
"filePath": "export.main.runtime.ts",
|
1045
|
-
"line":
|
1045
|
+
"line": 849,
|
1046
1046
|
"character": 5
|
1047
1047
|
},
|
1048
1048
|
"name": "LoggerMain"
|
@@ -1051,7 +1051,7 @@
|
|
1051
1051
|
"__schema": "TypeRefSchema",
|
1052
1052
|
"location": {
|
1053
1053
|
"filePath": "export.main.runtime.ts",
|
1054
|
-
"line":
|
1054
|
+
"line": 850,
|
1055
1055
|
"character": 5
|
1056
1056
|
},
|
1057
1057
|
"name": "EjectMain"
|
@@ -1066,7 +1066,7 @@
|
|
1066
1066
|
"__schema": "InferenceTypeSchema",
|
1067
1067
|
"location": {
|
1068
1068
|
"filePath": "export.main.runtime.ts",
|
1069
|
-
"line":
|
1069
|
+
"line": 843,
|
1070
1070
|
"character": 3
|
1071
1071
|
},
|
1072
1072
|
"type": "Promise<ExportMain>"
|
@@ -1380,7 +1380,7 @@
|
|
1380
1380
|
"componentId": {
|
1381
1381
|
"scope": "teambit.legacy",
|
1382
1382
|
"name": "scope-api",
|
1383
|
-
"version": "0.0.
|
1383
|
+
"version": "0.0.12"
|
1384
1384
|
}
|
1385
1385
|
}
|
1386
1386
|
},
|
@@ -2668,7 +2668,7 @@
|
|
2668
2668
|
"__schema": "VariableLikeSchema",
|
2669
2669
|
"location": {
|
2670
2670
|
"filePath": "export.main.runtime.ts",
|
2671
|
-
"line":
|
2671
|
+
"line": 833,
|
2672
2672
|
"character": 3
|
2673
2673
|
},
|
2674
2674
|
"signature": "(property) ExportMain.runtime: RuntimeDefinition",
|
@@ -2677,7 +2677,7 @@
|
|
2677
2677
|
"__schema": "InferenceTypeSchema",
|
2678
2678
|
"location": {
|
2679
2679
|
"filePath": "export.main.runtime.ts",
|
2680
|
-
"line":
|
2680
|
+
"line": 833,
|
2681
2681
|
"character": 3
|
2682
2682
|
},
|
2683
2683
|
"type": "RuntimeDefinition"
|
@@ -2689,7 +2689,7 @@
|
|
2689
2689
|
"__schema": "VariableLikeSchema",
|
2690
2690
|
"location": {
|
2691
2691
|
"filePath": "export.main.runtime.ts",
|
2692
|
-
"line":
|
2692
|
+
"line": 834,
|
2693
2693
|
"character": 3
|
2694
2694
|
},
|
2695
2695
|
"signature": "(property) ExportMain.dependencies: Aspect[]",
|
@@ -2698,7 +2698,7 @@
|
|
2698
2698
|
"__schema": "InferenceTypeSchema",
|
2699
2699
|
"location": {
|
2700
2700
|
"filePath": "export.main.runtime.ts",
|
2701
|
-
"line":
|
2701
|
+
"line": 834,
|
2702
2702
|
"character": 3
|
2703
2703
|
},
|
2704
2704
|
"type": "Aspect[]"
|
@@ -2710,7 +2710,7 @@
|
|
2710
2710
|
"__schema": "FunctionLikeSchema",
|
2711
2711
|
"location": {
|
2712
2712
|
"filePath": "export.main.runtime.ts",
|
2713
|
-
"line":
|
2713
|
+
"line": 843,
|
2714
2714
|
"character": 3
|
2715
2715
|
},
|
2716
2716
|
"signature": "(method) ExportMain.provider([cli, scope, workspace, remove, depResolver, loggerMain, eject]: [\n CLIMain,\n ScopeMain,\n Workspace,\n RemoveMain,\n DependencyResolverMain,\n LoggerMain,\n EjectMain\n]): Promise<ExportMain>",
|
@@ -2720,7 +2720,7 @@
|
|
2720
2720
|
"__schema": "ParameterSchema",
|
2721
2721
|
"location": {
|
2722
2722
|
"filePath": "export.main.runtime.ts",
|
2723
|
-
"line":
|
2723
|
+
"line": 843,
|
2724
2724
|
"character": 25
|
2725
2725
|
},
|
2726
2726
|
"name": "[ cli, scope, workspace, remove, depResolver, loggerMain, eject ]",
|
@@ -2728,7 +2728,7 @@
|
|
2728
2728
|
"__schema": "TupleTypeSchema",
|
2729
2729
|
"location": {
|
2730
2730
|
"filePath": "export.main.runtime.ts",
|
2731
|
-
"line":
|
2731
|
+
"line": 843,
|
2732
2732
|
"character": 90
|
2733
2733
|
},
|
2734
2734
|
"elements": [
|
@@ -2736,7 +2736,7 @@
|
|
2736
2736
|
"__schema": "TypeRefSchema",
|
2737
2737
|
"location": {
|
2738
2738
|
"filePath": "export.main.runtime.ts",
|
2739
|
-
"line":
|
2739
|
+
"line": 844,
|
2740
2740
|
"character": 5
|
2741
2741
|
},
|
2742
2742
|
"name": "CLIMain"
|
@@ -2745,7 +2745,7 @@
|
|
2745
2745
|
"__schema": "TypeRefSchema",
|
2746
2746
|
"location": {
|
2747
2747
|
"filePath": "export.main.runtime.ts",
|
2748
|
-
"line":
|
2748
|
+
"line": 845,
|
2749
2749
|
"character": 5
|
2750
2750
|
},
|
2751
2751
|
"name": "ScopeMain"
|
@@ -2754,7 +2754,7 @@
|
|
2754
2754
|
"__schema": "TypeRefSchema",
|
2755
2755
|
"location": {
|
2756
2756
|
"filePath": "export.main.runtime.ts",
|
2757
|
-
"line":
|
2757
|
+
"line": 846,
|
2758
2758
|
"character": 5
|
2759
2759
|
},
|
2760
2760
|
"name": "Workspace"
|
@@ -2763,7 +2763,7 @@
|
|
2763
2763
|
"__schema": "TypeRefSchema",
|
2764
2764
|
"location": {
|
2765
2765
|
"filePath": "export.main.runtime.ts",
|
2766
|
-
"line":
|
2766
|
+
"line": 847,
|
2767
2767
|
"character": 5
|
2768
2768
|
},
|
2769
2769
|
"name": "RemoveMain"
|
@@ -2772,7 +2772,7 @@
|
|
2772
2772
|
"__schema": "TypeRefSchema",
|
2773
2773
|
"location": {
|
2774
2774
|
"filePath": "export.main.runtime.ts",
|
2775
|
-
"line":
|
2775
|
+
"line": 848,
|
2776
2776
|
"character": 5
|
2777
2777
|
},
|
2778
2778
|
"name": "DependencyResolverMain"
|
@@ -2781,7 +2781,7 @@
|
|
2781
2781
|
"__schema": "TypeRefSchema",
|
2782
2782
|
"location": {
|
2783
2783
|
"filePath": "export.main.runtime.ts",
|
2784
|
-
"line":
|
2784
|
+
"line": 849,
|
2785
2785
|
"character": 5
|
2786
2786
|
},
|
2787
2787
|
"name": "LoggerMain"
|
@@ -2790,7 +2790,7 @@
|
|
2790
2790
|
"__schema": "TypeRefSchema",
|
2791
2791
|
"location": {
|
2792
2792
|
"filePath": "export.main.runtime.ts",
|
2793
|
-
"line":
|
2793
|
+
"line": 850,
|
2794
2794
|
"character": 5
|
2795
2795
|
},
|
2796
2796
|
"name": "EjectMain"
|
@@ -2805,7 +2805,7 @@
|
|
2805
2805
|
"__schema": "InferenceTypeSchema",
|
2806
2806
|
"location": {
|
2807
2807
|
"filePath": "export.main.runtime.ts",
|
2808
|
-
"line":
|
2808
|
+
"line": 843,
|
2809
2809
|
"character": 3
|
2810
2810
|
},
|
2811
2811
|
"type": "Promise<ExportMain>"
|
@@ -2823,7 +2823,7 @@
|
|
2823
2823
|
"__schema": "FunctionLikeSchema",
|
2824
2824
|
"location": {
|
2825
2825
|
"filePath": "export.main.runtime.ts",
|
2826
|
-
"line":
|
2826
|
+
"line": 913,
|
2827
2827
|
"character": 1
|
2828
2828
|
},
|
2829
2829
|
"signature": "function isUserTryingToExportLanes(consumer: Consumer): boolean",
|
@@ -2833,7 +2833,7 @@
|
|
2833
2833
|
"__schema": "ParameterSchema",
|
2834
2834
|
"location": {
|
2835
2835
|
"filePath": "export.main.runtime.ts",
|
2836
|
-
"line":
|
2836
|
+
"line": 913,
|
2837
2837
|
"character": 43
|
2838
2838
|
},
|
2839
2839
|
"name": "consumer",
|
@@ -2841,7 +2841,7 @@
|
|
2841
2841
|
"__schema": "TypeRefSchema",
|
2842
2842
|
"location": {
|
2843
2843
|
"filePath": "export.main.runtime.ts",
|
2844
|
-
"line":
|
2844
|
+
"line": 913,
|
2845
2845
|
"character": 53
|
2846
2846
|
},
|
2847
2847
|
"name": "Consumer"
|
@@ -2854,7 +2854,7 @@
|
|
2854
2854
|
"__schema": "InferenceTypeSchema",
|
2855
2855
|
"location": {
|
2856
2856
|
"filePath": "export.main.runtime.ts",
|
2857
|
-
"line":
|
2857
|
+
"line": 913,
|
2858
2858
|
"character": 1
|
2859
2859
|
},
|
2860
2860
|
"type": "boolean"
|
@@ -2867,7 +2867,7 @@
|
|
2867
2867
|
"__schema": "UnImplementedSchema",
|
2868
2868
|
"location": {
|
2869
2869
|
"filePath": "export.main.runtime.ts",
|
2870
|
-
"line":
|
2870
|
+
"line": 917,
|
2871
2871
|
"character": 16
|
2872
2872
|
},
|
2873
2873
|
"name": "ExportMain",
|
@@ -3435,7 +3435,7 @@
|
|
3435
3435
|
"__schema": "UnImplementedSchema",
|
3436
3436
|
"location": {
|
3437
3437
|
"filePath": "export.main.runtime.ts",
|
3438
|
-
"line":
|
3438
|
+
"line": 859,
|
3439
3439
|
"character": 1
|
3440
3440
|
},
|
3441
3441
|
"name": "ExportAspect.addRuntime(ExportMain);",
|
@@ -3445,14 +3445,14 @@
|
|
3445
3445
|
"__schema": "FunctionLikeSchema",
|
3446
3446
|
"location": {
|
3447
3447
|
"filePath": "export.main.runtime.ts",
|
3448
|
-
"line":
|
3448
|
+
"line": 865,
|
3449
3449
|
"character": 1
|
3450
3450
|
},
|
3451
3451
|
"doc": {
|
3452
3452
|
"__schema": "DocSchema",
|
3453
3453
|
"location": {
|
3454
3454
|
"filePath": "export.main.runtime.ts",
|
3455
|
-
"line":
|
3455
|
+
"line": 861,
|
3456
3456
|
"character": 1
|
3457
3457
|
},
|
3458
3458
|
"raw": "/**\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 */",
|
@@ -3466,7 +3466,7 @@
|
|
3466
3466
|
"__schema": "ParameterSchema",
|
3467
3467
|
"location": {
|
3468
3468
|
"filePath": "export.main.runtime.ts",
|
3469
|
-
"line":
|
3469
|
+
"line": 865,
|
3470
3470
|
"character": 29
|
3471
3471
|
},
|
3472
3472
|
"name": "bitMap",
|
@@ -3474,7 +3474,7 @@
|
|
3474
3474
|
"__schema": "TypeRefSchema",
|
3475
3475
|
"location": {
|
3476
3476
|
"filePath": "export.main.runtime.ts",
|
3477
|
-
"line":
|
3477
|
+
"line": 865,
|
3478
3478
|
"character": 37
|
3479
3479
|
},
|
3480
3480
|
"name": "BitMap"
|
@@ -3486,7 +3486,7 @@
|
|
3486
3486
|
"__schema": "ParameterSchema",
|
3487
3487
|
"location": {
|
3488
3488
|
"filePath": "export.main.runtime.ts",
|
3489
|
-
"line":
|
3489
|
+
"line": 865,
|
3490
3490
|
"character": 45
|
3491
3491
|
},
|
3492
3492
|
"name": "componentsIds",
|
@@ -3494,7 +3494,7 @@
|
|
3494
3494
|
"__schema": "TypeRefSchema",
|
3495
3495
|
"location": {
|
3496
3496
|
"filePath": "export.main.runtime.ts",
|
3497
|
-
"line":
|
3497
|
+
"line": 865,
|
3498
3498
|
"character": 60
|
3499
3499
|
},
|
3500
3500
|
"name": "ComponentIdList"
|
@@ -3507,14 +3507,14 @@
|
|
3507
3507
|
"__schema": "TypeArraySchema",
|
3508
3508
|
"location": {
|
3509
3509
|
"filePath": "export.main.runtime.ts",
|
3510
|
-
"line":
|
3510
|
+
"line": 865,
|
3511
3511
|
"character": 78
|
3512
3512
|
},
|
3513
3513
|
"type": {
|
3514
3514
|
"__schema": "TypeRefSchema",
|
3515
3515
|
"location": {
|
3516
3516
|
"filePath": "export.main.runtime.ts",
|
3517
|
-
"line":
|
3517
|
+
"line": 865,
|
3518
3518
|
"character": 78
|
3519
3519
|
},
|
3520
3520
|
"name": "ComponentID"
|
@@ -3526,7 +3526,7 @@
|
|
3526
3526
|
"__schema": "FunctionLikeSchema",
|
3527
3527
|
"location": {
|
3528
3528
|
"filePath": "export.main.runtime.ts",
|
3529
|
-
"line":
|
3529
|
+
"line": 874,
|
3530
3530
|
"character": 1
|
3531
3531
|
},
|
3532
3532
|
"signature": "function getParsedId(consumer: Consumer, id: string): Promise<ComponentID>",
|
@@ -3536,7 +3536,7 @@
|
|
3536
3536
|
"__schema": "ParameterSchema",
|
3537
3537
|
"location": {
|
3538
3538
|
"filePath": "export.main.runtime.ts",
|
3539
|
-
"line":
|
3539
|
+
"line": 874,
|
3540
3540
|
"character": 28
|
3541
3541
|
},
|
3542
3542
|
"name": "consumer",
|
@@ -3544,7 +3544,7 @@
|
|
3544
3544
|
"__schema": "TypeRefSchema",
|
3545
3545
|
"location": {
|
3546
3546
|
"filePath": "export.main.runtime.ts",
|
3547
|
-
"line":
|
3547
|
+
"line": 874,
|
3548
3548
|
"character": 38
|
3549
3549
|
},
|
3550
3550
|
"name": "Consumer"
|
@@ -3556,7 +3556,7 @@
|
|
3556
3556
|
"__schema": "ParameterSchema",
|
3557
3557
|
"location": {
|
3558
3558
|
"filePath": "export.main.runtime.ts",
|
3559
|
-
"line":
|
3559
|
+
"line": 874,
|
3560
3560
|
"character": 48
|
3561
3561
|
},
|
3562
3562
|
"name": "id",
|
@@ -3564,7 +3564,7 @@
|
|
3564
3564
|
"__schema": "KeywordTypeSchema",
|
3565
3565
|
"location": {
|
3566
3566
|
"filePath": "export.main.runtime.ts",
|
3567
|
-
"line":
|
3567
|
+
"line": 874,
|
3568
3568
|
"character": 52
|
3569
3569
|
},
|
3570
3570
|
"name": "string"
|
@@ -3577,7 +3577,7 @@
|
|
3577
3577
|
"__schema": "TypeRefSchema",
|
3578
3578
|
"location": {
|
3579
3579
|
"filePath": "export.main.runtime.ts",
|
3580
|
-
"line":
|
3580
|
+
"line": 874,
|
3581
3581
|
"character": 61
|
3582
3582
|
},
|
3583
3583
|
"name": "Promise",
|
@@ -3586,7 +3586,7 @@
|
|
3586
3586
|
"__schema": "TypeRefSchema",
|
3587
3587
|
"location": {
|
3588
3588
|
"filePath": "export.main.runtime.ts",
|
3589
|
-
"line":
|
3589
|
+
"line": 874,
|
3590
3590
|
"character": 69
|
3591
3591
|
},
|
3592
3592
|
"name": "ComponentID"
|
@@ -3601,7 +3601,7 @@
|
|
3601
3601
|
"__schema": "FunctionLikeSchema",
|
3602
3602
|
"location": {
|
3603
3603
|
"filePath": "export.main.runtime.ts",
|
3604
|
-
"line":
|
3604
|
+
"line": 884,
|
3605
3605
|
"character": 1
|
3606
3606
|
},
|
3607
3607
|
"signature": "function _throwForUnsnappedLaneReadme(lane: Lane): void",
|
@@ -3611,7 +3611,7 @@
|
|
3611
3611
|
"__schema": "ParameterSchema",
|
3612
3612
|
"location": {
|
3613
3613
|
"filePath": "export.main.runtime.ts",
|
3614
|
-
"line":
|
3614
|
+
"line": 884,
|
3615
3615
|
"character": 39
|
3616
3616
|
},
|
3617
3617
|
"name": "lane",
|
@@ -3619,7 +3619,7 @@
|
|
3619
3619
|
"__schema": "TypeRefSchema",
|
3620
3620
|
"location": {
|
3621
3621
|
"filePath": "export.main.runtime.ts",
|
3622
|
-
"line":
|
3622
|
+
"line": 884,
|
3623
3623
|
"character": 45
|
3624
3624
|
},
|
3625
3625
|
"name": "Lane"
|
@@ -3632,7 +3632,7 @@
|
|
3632
3632
|
"__schema": "TypeRefSchema",
|
3633
3633
|
"location": {
|
3634
3634
|
"filePath": "export.main.runtime.ts",
|
3635
|
-
"line":
|
3635
|
+
"line": 884,
|
3636
3636
|
"character": 1
|
3637
3637
|
},
|
3638
3638
|
"name": "_throwForUnsnappedLaneReadme",
|
@@ -3644,7 +3644,7 @@
|
|
3644
3644
|
"__schema": "FunctionLikeSchema",
|
3645
3645
|
"location": {
|
3646
3646
|
"filePath": "export.main.runtime.ts",
|
3647
|
-
"line":
|
3647
|
+
"line": 900,
|
3648
3648
|
"character": 1
|
3649
3649
|
},
|
3650
3650
|
"signature": "function updateLanesAfterExport(consumer: Consumer, lane: Lane): Promise<void>",
|
@@ -3654,7 +3654,7 @@
|
|
3654
3654
|
"__schema": "ParameterSchema",
|
3655
3655
|
"location": {
|
3656
3656
|
"filePath": "export.main.runtime.ts",
|
3657
|
-
"line":
|
3657
|
+
"line": 900,
|
3658
3658
|
"character": 39
|
3659
3659
|
},
|
3660
3660
|
"name": "consumer",
|
@@ -3662,7 +3662,7 @@
|
|
3662
3662
|
"__schema": "TypeRefSchema",
|
3663
3663
|
"location": {
|
3664
3664
|
"filePath": "export.main.runtime.ts",
|
3665
|
-
"line":
|
3665
|
+
"line": 900,
|
3666
3666
|
"character": 49
|
3667
3667
|
},
|
3668
3668
|
"name": "Consumer"
|
@@ -3674,7 +3674,7 @@
|
|
3674
3674
|
"__schema": "ParameterSchema",
|
3675
3675
|
"location": {
|
3676
3676
|
"filePath": "export.main.runtime.ts",
|
3677
|
-
"line":
|
3677
|
+
"line": 900,
|
3678
3678
|
"character": 59
|
3679
3679
|
},
|
3680
3680
|
"name": "lane",
|
@@ -3682,7 +3682,7 @@
|
|
3682
3682
|
"__schema": "TypeRefSchema",
|
3683
3683
|
"location": {
|
3684
3684
|
"filePath": "export.main.runtime.ts",
|
3685
|
-
"line":
|
3685
|
+
"line": 900,
|
3686
3686
|
"character": 65
|
3687
3687
|
},
|
3688
3688
|
"name": "Lane"
|
@@ -3695,7 +3695,7 @@
|
|
3695
3695
|
"__schema": "InferenceTypeSchema",
|
3696
3696
|
"location": {
|
3697
3697
|
"filePath": "export.main.runtime.ts",
|
3698
|
-
"line":
|
3698
|
+
"line": 900,
|
3699
3699
|
"character": 1
|
3700
3700
|
},
|
3701
3701
|
"type": "Promise<void>"
|
@@ -3747,7 +3747,7 @@
|
|
3747
3747
|
"componentId": {
|
3748
3748
|
"scope": "teambit.scope",
|
3749
3749
|
"name": "export",
|
3750
|
-
"version": "1.0.
|
3750
|
+
"version": "1.0.348"
|
3751
3751
|
},
|
3752
3752
|
"taggedModuleExports": []
|
3753
3753
|
}
|
@@ -81,10 +81,6 @@ export declare class ExportMain {
|
|
81
81
|
private convertToCorrectScope;
|
82
82
|
private removeFromStagedConfig;
|
83
83
|
private getComponentsToExport;
|
84
|
-
/**
|
85
|
-
* remove the entire "idsWithFutureScope" thing. is not relevant anymore.
|
86
|
-
*/
|
87
|
-
private getIdsWithFutureScope;
|
88
84
|
private getLaneCompIdsToExport;
|
89
85
|
private getRemovedStagedBitIds;
|
90
86
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
@@ -831,17 +831,18 @@ if the export fails with missing objects/versions/components, run "bit fetch --l
|
|
831
831
|
const consumer = this.workspace.consumer;
|
832
832
|
const componentsList = new (_legacy2().ComponentsList)(consumer);
|
833
833
|
const idsHaveWildcard = (0, _legacy3().hasWildcard)(ids);
|
834
|
-
const
|
835
|
-
const
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
834
|
+
const throwForLocalOnlyIfNeeded = async bitIds => {
|
835
|
+
const localOnlyComponents = this.workspace.listLocalOnly();
|
836
|
+
const localOnlyExportPending = bitIds.filter(id => localOnlyComponents.hasWithoutScopeAndVersion(id));
|
837
|
+
if (localOnlyExportPending.length) {
|
838
|
+
throw new (_bitError().BitError)(`unable to export the following components as they are local only:
|
839
|
+
(either bit-reset them or run "bit local-only unset" to make them non local only)
|
840
|
+
${localOnlyExportPending.map(c => c.toString()).join('\n')}`);
|
841
|
+
}
|
841
842
|
return {
|
842
843
|
idsToExport: _componentId().ComponentIdList.fromArray(bitIds),
|
843
844
|
missingScope: [],
|
844
|
-
idsWithFutureScope
|
845
|
+
idsWithFutureScope: bitIds
|
845
846
|
};
|
846
847
|
};
|
847
848
|
if (isUserTryingToExportLanes(consumer)) {
|
@@ -854,7 +855,7 @@ if the export fails with missing objects/versions/components, run "bit fetch --l
|
|
854
855
|
} = await this.getLaneCompIdsToExport(consumer, includeNonStaged);
|
855
856
|
const loaderMsg = componentsToExport.length > 1 ? _loaderMessages().BEFORE_EXPORTS : _loaderMessages().BEFORE_EXPORT;
|
856
857
|
_loader().default.start(loaderMsg);
|
857
|
-
const filtered = await
|
858
|
+
const filtered = await throwForLocalOnlyIfNeeded(componentsToExport);
|
858
859
|
return _objectSpread(_objectSpread({}, filtered), {}, {
|
859
860
|
laneObject
|
860
861
|
});
|
@@ -865,31 +866,13 @@ if the export fails with missing objects/versions/components, run "bit fetch --l
|
|
865
866
|
const componentsToExport = idsHaveWildcard ? _legacy2().ComponentsList.filterComponentsByWildcard(exportPendingComponents, ids) : exportPendingComponents;
|
866
867
|
const loaderMsg = componentsToExport.length > 1 ? _loaderMessages().BEFORE_EXPORTS : _loaderMessages().BEFORE_EXPORT;
|
867
868
|
_loader().default.start(loaderMsg);
|
868
|
-
return
|
869
|
+
return throwForLocalOnlyIfNeeded(componentsToExport);
|
869
870
|
}
|
870
871
|
_loader().default.start(_loaderMessages().BEFORE_EXPORT); // show single export
|
871
872
|
const parsedIds = await Promise.all(ids.map(id => getParsedId(consumer, id)));
|
872
873
|
// load the components for fixing any out-of-sync issues.
|
873
874
|
await consumer.loadComponents(_componentId().ComponentIdList.fromArray(parsedIds));
|
874
|
-
return
|
875
|
-
}
|
876
|
-
|
877
|
-
/**
|
878
|
-
* remove the entire "idsWithFutureScope" thing. is not relevant anymore.
|
879
|
-
*/
|
880
|
-
async getIdsWithFutureScope(ids) {
|
881
|
-
return ids;
|
882
|
-
// const idsArrayP = ids.map(async (id) => {
|
883
|
-
// if (id.hasScope()) return id;
|
884
|
-
// const componentId = await this.workspace.resolveComponentId(id);
|
885
|
-
// const finalScope = await this.workspace.componentDefaultScope(componentId);
|
886
|
-
// if (finalScope) {
|
887
|
-
// return id.changeScope(finalScope);
|
888
|
-
// }
|
889
|
-
// return id;
|
890
|
-
// });
|
891
|
-
// const idsArray = await Promise.all(idsArrayP);
|
892
|
-
// return ComponentIdList.fromArray(idsArray);
|
875
|
+
return throwForLocalOnlyIfNeeded(_componentId().ComponentIdList.fromArray(parsedIds));
|
893
876
|
}
|
894
877
|
async getLaneCompIdsToExport(consumer, includeNonStaged) {
|
895
878
|
const currentLaneId = consumer.getCurrentLaneId();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_cli","_scope","_bitError","_legacy","_componentId","_loader","_loaderMessages","_constants","_legacy2","_remove","_models","_legacy3","_scope2","_workspace","_logger","_http","_objectList","_lodash","_pMapSeries","_laneId","_eject","_harmonyModules","_scopeRemotes","_workspaceModules","_dependencyResolver","_exportScopeComponents","_persistFailed","_traverseVersions","_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","ExportMain","constructor","workspace","remove","depResolver","logger","eject","export","params","nonExistOnBitMap","missingScope","exported","removedIds","exportedLanes","rippleJobs","exportComponents","ejectResults","clearCache","ejectExportedComponents","exportResults","componentsIds","Scope","onPostExport","catch","err","error","_ref","ids","includeNonStaged","headOnly","originDirectly","OutsideWorkspaceError","consumer","idsToExport","idsWithFutureScope","laneObject","getComponentsToExport","updatedIds","ComponentIdList","newIdsOnRemote","readmeComponent","_throwForUnsnappedLaneReadme","forkLaneNewScope","forkedFrom","isNew","scope","BitError","id","toString","name","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","exportOrigin","debug","scopeRemotes","getScopeRemotes","groupByScopeName","idList","reduce","acc","current","getScopeName","idWithDefaultScope","searchWithoutScopeAndVersion","scopeName","Error","idsGroupedByScope","validateTargetScopeForLanes","newIds","fromArray","isExported","newIdsGrouped","mapSeries","remote","resolve","list","map","listItem","addMainHeadIfPossible","allHashes","modelComponent","head","find","h","hash","objects","has","getVersionsToExport","getCompHeadIncludeUpdateDependents","toComponentId","localTagsOrHashes","getLocalHashes","getAllVersionHashes","repo","groupedByScopeString","join","getUpdatedObjectsToExport","remoteNameStr","bitIds","lane","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","clearStateData","objectItems","collectVersionsObjects","objectsList","toBitObjects","componentAndObject","component","getAll","convertToCorrectScope","remoteObj","url","host","date","Date","now","addScopeListItem","componentBuffer","componentData","objectsBuffer","Promise","all","allObjectsData","addIfNotExist","isFeatureEnabled","SUPPORT_LANE_HISTORY","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","undefined","idsWithRemoteScopeUniq","uniqFromArray","hasWithoutScopeAndVersion","warnCancelExport","consoleWarning","process","on","centralHubResults","remotes","validateRemotes","persistRemotes","shouldPushToCentralHub","pushToRemotesCarefully","loader","start","results","removeListener","objPerRemote","addScopeName","mergeObjectList","force","ejectErr","c","msg","clientId","pushRemotesPendingDir","pushOptions","pushedRemotes","count","pushMany","warn","removePendingDirs","hubRemotes","m","isHub","componentsObjects","remoteScope","exportingIds","shouldFork","versionsObjects","object","Version","haveVersionsChanged","objectVersion","didDependencyChange","changeDependencyScope","changeExtensionsScope","shouldChangeScope","hasComponentChanged","idWithFutureScope","some","x","version","hasChanged","getAllDependencies","dependency","updatedIdWithScope","getIdWithUpdatedScope","flattenedIds","flattenedDependencies","needsChange","getBitIdsWithUpdatedScope","hasFlattenedEdgesChanged","flattenedEdges","getFlattenedEdges","updatedFlattenedEdges","edge","source","target","flattenedEdgeToSource","flattenedEdgesRef","extensions","ext","extensionId","updatedScope","isEqual","dependencyId","depId","ModelComponent","fromBitId","dependencyObject","loadSync","Symlink","changeScope","realScope","currentlyExportedDep","stagedConfig","getStagedConfig","compId","removeComponentConfig","write","componentsList","ComponentsList","idsHaveWildcard","hasWildcard","filterNonScopeIfNeeded","getIdsWithFutureScope","isUserTryingToExportLanes","componentsToExport","getLaneCompIdsToExport","loaderMsg","BEFORE_EXPORTS","BEFORE_EXPORT","filtered","BEFORE_LOADING_COMPONENTS","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","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 loader from '@teambit/legacy/dist/cli/loader';\nimport {\n BEFORE_EXPORT,\n BEFORE_EXPORTS,\n BEFORE_LOADING_COMPONENTS,\n} from '@teambit/legacy/dist/cli/loader/loader-messages';\nimport { CENTRAL_BIT_HUB_NAME, CENTRAL_BIT_HUB_URL } from '@teambit/legacy/dist/constants';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { BitMap } from '@teambit/legacy.bit-map';\nimport { ComponentsList } from '@teambit/legacy.component-list';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport { Lane, ModelComponent, Symlink, Version } from '@teambit/legacy/dist/scope/models';\nimport { hasWildcard } from '@teambit/legacy.utils';\nimport { Scope } from '@teambit/legacy/dist/scope';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { LaneReadmeComponent } from '@teambit/legacy/dist/scope/models/lane';\nimport { Http } from '@teambit/legacy/dist/scope/network/http';\nimport { ObjectItem, ObjectList } from '@teambit/legacy/dist/scope/objects/object-list';\nimport { compact } from 'lodash';\nimport mapSeries from 'p-map-series';\nimport { LaneId, DEFAULT_LANE } from '@teambit/lane-id';\nimport { Remote, Remotes } from '@teambit/legacy/dist/remotes';\nimport { EjectAspect, EjectMain, EjectResults } from '@teambit/eject';\nimport { SUPPORT_LANE_HISTORY, isFeatureEnabled } from '@teambit/harmony.modules.feature-toggle';\nimport { getScopeRemotes } from '@teambit/legacy/dist/scope/scope-remotes';\nimport { ExportOrigin } from '@teambit/legacy/dist/scope/network/http/http';\nimport { linkToNodeModulesByIds } from '@teambit/workspace.modules.node-modules-linker';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport {\n persistRemotes,\n validateRemotes,\n removePendingDirs,\n} from '@teambit/legacy/dist/scope/component-ops/export-scope-components';\nimport { BitObject, Ref } from '@teambit/legacy/dist/scope/objects';\nimport { PersistFailed } from '@teambit/legacy/dist/scope/exceptions/persist-failed';\nimport { getAllVersionHashes } from '@teambit/legacy/dist/scope/component-ops/traverse-versions';\nimport { ExportAspect } from './export.aspect';\nimport { ExportCmd } from './export-cmd';\nimport { ResumeExportCmd } from './resume-export-cmd';\n\nexport type OnExportIdTransformer = (id: ComponentID) => ComponentID;\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 removedIds: ComponentIdList;\n missingScope: ComponentID[];\n componentsIds: ComponentID[];\n exportedLanes: Lane[];\n rippleJobs: 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, 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 = {\n componentsIds: exported,\n nonExistOnBitMap,\n removedIds,\n missingScope,\n ejectResults,\n exportedLanes,\n 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 return exportResults;\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, idsWithFutureScope, laneObject } = await this.getComponentsToExport(\n ids,\n includeNonStaged || headOnly\n );\n\n if (!idsToExport.length) {\n return {\n updatedIds: [],\n nonExistOnBitMap: [],\n removedIds: new ComponentIdList(),\n missingScope,\n exported: [],\n newIdsOnRemote: [],\n exportedLanes: [],\n rippleJobs: [],\n };\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 idsWithFutureScope,\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 // @ts-ignore todo: remove after deleting teambit.legacy\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 idsWithFutureScope,\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 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 idsWithFutureScope: ComponentIdList;\n resumeExportId?: string | undefined;\n throwForMissingArtifacts?: boolean;\n isOnMain?: boolean;\n exportHeadsOnly?: 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 getScopeName = () => {\n if (current.scope) return current.scope;\n const idWithDefaultScope = idsWithFutureScope.searchWithoutScopeAndVersion(current);\n return idWithDefaultScope ? idWithDefaultScope.scope : null;\n };\n const scopeName = getScopeName();\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 return [head];\n }\n const localTagsOrHashes = await modelComponent.getLocalHashes(scope.objects);\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 modelComponent.clearStateData();\n const objectItems = await modelComponent.collectVersionsObjects(\n scope.objects,\n refs.map((ref) => ref.toString()),\n throwForMissingArtifacts\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, idsWithFutureScope);\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 if (isFeatureEnabled(SUPPORT_LANE_HISTORY)) {\n const laneHistory = await this.workspace.scope.legacyScope.lanes.getOrCreateLaneHistory(lane);\n const laneHistoryData = await bitObjectToObjectItem(laneHistory);\n objectList.addIfNotExist([laneHistoryData]);\n }\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);\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 loader.start('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 private 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 loader.start(`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 private 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 idsWithFutureScope: 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 versionsObjects: Version[] = componentsObjects.objects.filter((object) => object instanceof Version);\n const haveVersionsChanged = await Promise.all(\n versionsObjects.map(async (objectVersion: Version) => {\n const didDependencyChange = changeDependencyScope(objectVersion);\n changeExtensionsScope(objectVersion);\n\n return didDependencyChange;\n })\n );\n const shouldChangeScope = shouldFork\n ? remoteScope !== componentsObjects.component.scope\n : !componentsObjects.component.scope;\n const hasComponentChanged = shouldChangeScope;\n if (shouldChangeScope) {\n const idWithFutureScope = idsWithFutureScope.searchWithoutScopeAndVersion(\n componentsObjects.component.toComponentId()\n );\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 haveVersionsChanged.some((x) => x) || hasComponentChanged;\n\n async function changeDependencyScope(version: Version): Promise<boolean> {\n let hasChanged = false;\n version.getAllDependencies().forEach((dependency) => {\n const updatedIdWithScope = getIdWithUpdatedScope(dependency.id);\n if (!dependency.id.scope) {\n hasChanged = true;\n dependency.id = updatedIdWithScope;\n }\n });\n const flattenedIds: ComponentIdList = version.flattenedDependencies;\n const needsChange = flattenedIds.some((id) => !id.scope);\n if (needsChange) {\n version.flattenedDependencies = getBitIdsWithUpdatedScope(flattenedIds);\n hasChanged = true;\n }\n let hasFlattenedEdgesChanged = false;\n const flattenedEdges = await version.getFlattenedEdges(scope.objects);\n const updatedFlattenedEdges = flattenedEdges.map((edge) => {\n if (edge.source.scope && edge.target.scope) {\n return edge;\n }\n hasFlattenedEdgesChanged = true;\n return {\n ...edge,\n source: getIdWithUpdatedScope(edge.source),\n target: getIdWithUpdatedScope(edge.target),\n };\n });\n if (hasFlattenedEdgesChanged) {\n const source = Version.flattenedEdgeToSource(updatedFlattenedEdges);\n version.flattenedEdgesRef = source?.hash();\n if (source) componentsObjects.objects.push(source);\n hasChanged = true;\n }\n return hasChanged;\n }\n\n function changeExtensionsScope(version: Version): boolean {\n let hasChanged = false;\n version.extensions.forEach((ext) => {\n if (ext.extensionId) {\n const updatedScope = getIdWithUpdatedScope(ext.extensionId);\n if (!updatedScope.isEqual(ext.extensionId)) {\n hasChanged = true;\n ext.extensionId = updatedScope;\n }\n }\n });\n return hasChanged;\n }\n\n function getIdWithUpdatedScope(dependencyId: ComponentID): ComponentID {\n if (dependencyId.scope) {\n return dependencyId; // it's not new\n }\n const depId = ModelComponent.fromBitId(dependencyId);\n // todo: use 'load' for async and switch the foreach with map.\n const dependencyObject = scope.objects.loadSync(depId.hash());\n if (dependencyObject instanceof Symlink) {\n return dependencyId.changeScope(dependencyObject.realScope);\n }\n const currentlyExportedDep = idsWithFutureScope.searchWithoutScopeAndVersion(dependencyId);\n const scopeName = currentlyExportedDep?.scope || remoteScope;\n if (!scopeName) throw new Error(`unable to find scopeName for ${dependencyId.toString()}`);\n return dependencyId.changeScope(scopeName);\n }\n\n function getBitIdsWithUpdatedScope(bitIds: ComponentIdList): ComponentIdList {\n const updatedIds = bitIds.map((id) => getIdWithUpdatedScope(id));\n return ComponentIdList.fromArray(updatedIds);\n }\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 idsWithFutureScope: ComponentIdList;\n laneObject?: Lane;\n }> {\n const consumer = this.workspace.consumer;\n const componentsList = new ComponentsList(consumer);\n const idsHaveWildcard = hasWildcard(ids);\n const filterNonScopeIfNeeded = async (\n bitIds: ComponentIdList\n ): Promise<{ idsToExport: ComponentIdList; missingScope: ComponentID[]; idsWithFutureScope: ComponentIdList }> => {\n const idsWithFutureScope = await this.getIdsWithFutureScope(bitIds);\n // const [idsToExport, missingScope] = R.partition((id) => {\n // const idWithFutureScope = idsWithFutureScope.searchWithoutScopeAndVersion(id);\n // if (!idWithFutureScope) throw new Error(`idsWithFutureScope is missing ${id.toString()}`);\n // return idWithFutureScope.hasScope();\n // }, bitIds);\n return { idsToExport: ComponentIdList.fromArray(bitIds), missingScope: [], idsWithFutureScope };\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 loader.start(loaderMsg);\n const filtered = await filterNonScopeIfNeeded(componentsToExport);\n return { ...filtered, laneObject };\n }\n if (!ids.length || idsHaveWildcard) {\n loader.start(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 loader.start(loaderMsg);\n return filterNonScopeIfNeeded(componentsToExport);\n }\n loader.start(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 filterNonScopeIfNeeded(ComponentIdList.fromArray(parsedIds));\n }\n\n /**\n * remove the entire \"idsWithFutureScope\" thing. is not relevant anymore.\n */\n private async getIdsWithFutureScope(ids: ComponentIdList): Promise<ComponentIdList> {\n return ids;\n // const idsArrayP = ids.map(async (id) => {\n // if (id.hasScope()) return id;\n // const componentId = await this.workspace.resolveComponentId(id);\n // const finalScope = await this.workspace.componentDefaultScope(componentId);\n // if (finalScope) {\n // return id.changeScope(finalScope);\n // }\n // return id;\n // });\n // const idsArray = await Promise.all(idsArrayP);\n // return ComponentIdList.fromArray(idsArray);\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 loader.start(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 (err: any) {\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;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IAAI,CAAC;EAE3E,IAAI,CAACuQ,OAAO,EAAE;IACZ,MAAM,KAAIlU,oBAAQ,EAChB,GAAG6E,IAAI,EAAE1E,IAAI,2BAA2BT,eAAe,CAACO,EAAE;AAChE,0CAA0CP,eAAe,CAACO,EAAE,yDACxD,CAAC;EACH;AACF;AAEA,eAAeU,sBAAsBA,CAACzB,QAAkB,EAAE2F,IAAU,EAAE;EACpE,MAAMwP,WAAW,GAAGnV,QAAQ,CAACmT,gBAAgB,CAAC,CAAC;EAC/C,MAAMiC,aAAa,GAAGzP,IAAI,CAAC1E,IAAI,KAAKkU,WAAW,CAAClU,IAAI;EACpD,IAAI,CAACmU,aAAa,EAAE;IAClB,MAAM,IAAI3R,KAAK,CACb,wEAAwEkC,IAAI,CAAC1E,IAAI,aAAakU,WAAW,CAAClU,IAAI,EAChH,CAAC;EACH;EACAjB,QAAQ,CAACqV,cAAc,CAAC1P,IAAI,CAAC2P,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC;EAC9CtV,QAAQ,CAACa,KAAK,CAAC0U,SAAS,CAACC,iBAAiB,CAAC7P,IAAI,CAAC1E,IAAI,CAAC;EACrD0E,IAAI,CAAC/E,KAAK,GAAG,KAAK;AACpB;AAEO,SAASuR,yBAAyBA,CAACnS,QAAkB,EAAE;EAC5D,OAAOA,QAAQ,CAACyV,QAAQ,CAAC,CAAC;AAC5B;AAAC,IAAAC,QAAA,GAAAxB,OAAA,CAAA1Y,OAAA,GAEcwC,UAAU","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_cli","_scope","_bitError","_legacy","_componentId","_loader","_loaderMessages","_constants","_legacy2","_remove","_models","_legacy3","_scope2","_workspace","_logger","_http","_objectList","_lodash","_pMapSeries","_laneId","_eject","_harmonyModules","_scopeRemotes","_workspaceModules","_dependencyResolver","_exportScopeComponents","_persistFailed","_traverseVersions","_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","ExportMain","constructor","workspace","remove","depResolver","logger","eject","export","params","nonExistOnBitMap","missingScope","exported","removedIds","exportedLanes","rippleJobs","exportComponents","ejectResults","clearCache","ejectExportedComponents","exportResults","componentsIds","Scope","onPostExport","catch","err","error","_ref","ids","includeNonStaged","headOnly","originDirectly","OutsideWorkspaceError","consumer","idsToExport","idsWithFutureScope","laneObject","getComponentsToExport","updatedIds","ComponentIdList","newIdsOnRemote","readmeComponent","_throwForUnsnappedLaneReadme","forkLaneNewScope","forkedFrom","isNew","scope","BitError","id","toString","name","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","exportOrigin","debug","scopeRemotes","getScopeRemotes","groupByScopeName","idList","reduce","acc","current","getScopeName","idWithDefaultScope","searchWithoutScopeAndVersion","scopeName","Error","idsGroupedByScope","validateTargetScopeForLanes","newIds","fromArray","isExported","newIdsGrouped","mapSeries","remote","resolve","list","map","listItem","addMainHeadIfPossible","allHashes","modelComponent","head","find","h","hash","objects","has","getVersionsToExport","getCompHeadIncludeUpdateDependents","toComponentId","localTagsOrHashes","getLocalHashes","getAllVersionHashes","repo","groupedByScopeString","join","getUpdatedObjectsToExport","remoteNameStr","bitIds","lane","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","clearStateData","objectItems","collectVersionsObjects","objectsList","toBitObjects","componentAndObject","component","getAll","convertToCorrectScope","remoteObj","url","host","date","Date","now","addScopeListItem","componentBuffer","componentData","objectsBuffer","Promise","all","allObjectsData","addIfNotExist","isFeatureEnabled","SUPPORT_LANE_HISTORY","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","undefined","idsWithRemoteScopeUniq","uniqFromArray","hasWithoutScopeAndVersion","warnCancelExport","consoleWarning","process","on","centralHubResults","remotes","validateRemotes","persistRemotes","shouldPushToCentralHub","pushToRemotesCarefully","loader","start","results","removeListener","objPerRemote","addScopeName","mergeObjectList","force","ejectErr","c","msg","clientId","pushRemotesPendingDir","pushOptions","pushedRemotes","count","pushMany","warn","removePendingDirs","hubRemotes","m","isHub","componentsObjects","remoteScope","exportingIds","shouldFork","versionsObjects","object","Version","haveVersionsChanged","objectVersion","didDependencyChange","changeDependencyScope","changeExtensionsScope","shouldChangeScope","hasComponentChanged","idWithFutureScope","some","x","version","hasChanged","getAllDependencies","dependency","updatedIdWithScope","getIdWithUpdatedScope","flattenedIds","flattenedDependencies","needsChange","getBitIdsWithUpdatedScope","hasFlattenedEdgesChanged","flattenedEdges","getFlattenedEdges","updatedFlattenedEdges","edge","source","target","flattenedEdgeToSource","flattenedEdgesRef","extensions","ext","extensionId","updatedScope","isEqual","dependencyId","depId","ModelComponent","fromBitId","dependencyObject","loadSync","Symlink","changeScope","realScope","currentlyExportedDep","stagedConfig","getStagedConfig","compId","removeComponentConfig","write","componentsList","ComponentsList","idsHaveWildcard","hasWildcard","throwForLocalOnlyIfNeeded","localOnlyComponents","listLocalOnly","localOnlyExportPending","isUserTryingToExportLanes","componentsToExport","getLaneCompIdsToExport","loaderMsg","BEFORE_EXPORTS","BEFORE_EXPORT","filtered","BEFORE_LOADING_COMPONENTS","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","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 loader from '@teambit/legacy/dist/cli/loader';\nimport {\n BEFORE_EXPORT,\n BEFORE_EXPORTS,\n BEFORE_LOADING_COMPONENTS,\n} from '@teambit/legacy/dist/cli/loader/loader-messages';\nimport { CENTRAL_BIT_HUB_NAME, CENTRAL_BIT_HUB_URL } from '@teambit/legacy/dist/constants';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { BitMap } from '@teambit/legacy.bit-map';\nimport { ComponentsList } from '@teambit/legacy.component-list';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport { Lane, ModelComponent, Symlink, Version } from '@teambit/legacy/dist/scope/models';\nimport { hasWildcard } from '@teambit/legacy.utils';\nimport { Scope } from '@teambit/legacy/dist/scope';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { LaneReadmeComponent } from '@teambit/legacy/dist/scope/models/lane';\nimport { Http } from '@teambit/legacy/dist/scope/network/http';\nimport { ObjectItem, ObjectList } from '@teambit/legacy/dist/scope/objects/object-list';\nimport { compact } from 'lodash';\nimport mapSeries from 'p-map-series';\nimport { LaneId, DEFAULT_LANE } from '@teambit/lane-id';\nimport { Remote, Remotes } from '@teambit/legacy/dist/remotes';\nimport { EjectAspect, EjectMain, EjectResults } from '@teambit/eject';\nimport { SUPPORT_LANE_HISTORY, isFeatureEnabled } from '@teambit/harmony.modules.feature-toggle';\nimport { getScopeRemotes } from '@teambit/legacy/dist/scope/scope-remotes';\nimport { ExportOrigin } from '@teambit/legacy/dist/scope/network/http/http';\nimport { linkToNodeModulesByIds } from '@teambit/workspace.modules.node-modules-linker';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport {\n persistRemotes,\n validateRemotes,\n removePendingDirs,\n} from '@teambit/legacy/dist/scope/component-ops/export-scope-components';\nimport { BitObject, Ref } from '@teambit/legacy/dist/scope/objects';\nimport { PersistFailed } from '@teambit/legacy/dist/scope/exceptions/persist-failed';\nimport { getAllVersionHashes } from '@teambit/legacy/dist/scope/component-ops/traverse-versions';\nimport { ExportAspect } from './export.aspect';\nimport { ExportCmd } from './export-cmd';\nimport { ResumeExportCmd } from './resume-export-cmd';\n\nexport type OnExportIdTransformer = (id: ComponentID) => ComponentID;\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 removedIds: ComponentIdList;\n missingScope: ComponentID[];\n componentsIds: ComponentID[];\n exportedLanes: Lane[];\n rippleJobs: 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, 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 = {\n componentsIds: exported,\n nonExistOnBitMap,\n removedIds,\n missingScope,\n ejectResults,\n exportedLanes,\n 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 return exportResults;\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, idsWithFutureScope, laneObject } = await this.getComponentsToExport(\n ids,\n includeNonStaged || headOnly\n );\n\n if (!idsToExport.length) {\n return {\n updatedIds: [],\n nonExistOnBitMap: [],\n removedIds: new ComponentIdList(),\n missingScope,\n exported: [],\n newIdsOnRemote: [],\n exportedLanes: [],\n rippleJobs: [],\n };\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 idsWithFutureScope,\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 // @ts-ignore todo: remove after deleting teambit.legacy\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 idsWithFutureScope,\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 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 idsWithFutureScope: ComponentIdList;\n resumeExportId?: string | undefined;\n throwForMissingArtifacts?: boolean;\n isOnMain?: boolean;\n exportHeadsOnly?: 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 getScopeName = () => {\n if (current.scope) return current.scope;\n const idWithDefaultScope = idsWithFutureScope.searchWithoutScopeAndVersion(current);\n return idWithDefaultScope ? idWithDefaultScope.scope : null;\n };\n const scopeName = getScopeName();\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 return [head];\n }\n const localTagsOrHashes = await modelComponent.getLocalHashes(scope.objects);\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 modelComponent.clearStateData();\n const objectItems = await modelComponent.collectVersionsObjects(\n scope.objects,\n refs.map((ref) => ref.toString()),\n throwForMissingArtifacts\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, idsWithFutureScope);\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 if (isFeatureEnabled(SUPPORT_LANE_HISTORY)) {\n const laneHistory = await this.workspace.scope.legacyScope.lanes.getOrCreateLaneHistory(lane);\n const laneHistoryData = await bitObjectToObjectItem(laneHistory);\n objectList.addIfNotExist([laneHistoryData]);\n }\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);\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 loader.start('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 private 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 loader.start(`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 private 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 idsWithFutureScope: 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 versionsObjects: Version[] = componentsObjects.objects.filter((object) => object instanceof Version);\n const haveVersionsChanged = await Promise.all(\n versionsObjects.map(async (objectVersion: Version) => {\n const didDependencyChange = changeDependencyScope(objectVersion);\n changeExtensionsScope(objectVersion);\n\n return didDependencyChange;\n })\n );\n const shouldChangeScope = shouldFork\n ? remoteScope !== componentsObjects.component.scope\n : !componentsObjects.component.scope;\n const hasComponentChanged = shouldChangeScope;\n if (shouldChangeScope) {\n const idWithFutureScope = idsWithFutureScope.searchWithoutScopeAndVersion(\n componentsObjects.component.toComponentId()\n );\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 haveVersionsChanged.some((x) => x) || hasComponentChanged;\n\n async function changeDependencyScope(version: Version): Promise<boolean> {\n let hasChanged = false;\n version.getAllDependencies().forEach((dependency) => {\n const updatedIdWithScope = getIdWithUpdatedScope(dependency.id);\n if (!dependency.id.scope) {\n hasChanged = true;\n dependency.id = updatedIdWithScope;\n }\n });\n const flattenedIds: ComponentIdList = version.flattenedDependencies;\n const needsChange = flattenedIds.some((id) => !id.scope);\n if (needsChange) {\n version.flattenedDependencies = getBitIdsWithUpdatedScope(flattenedIds);\n hasChanged = true;\n }\n let hasFlattenedEdgesChanged = false;\n const flattenedEdges = await version.getFlattenedEdges(scope.objects);\n const updatedFlattenedEdges = flattenedEdges.map((edge) => {\n if (edge.source.scope && edge.target.scope) {\n return edge;\n }\n hasFlattenedEdgesChanged = true;\n return {\n ...edge,\n source: getIdWithUpdatedScope(edge.source),\n target: getIdWithUpdatedScope(edge.target),\n };\n });\n if (hasFlattenedEdgesChanged) {\n const source = Version.flattenedEdgeToSource(updatedFlattenedEdges);\n version.flattenedEdgesRef = source?.hash();\n if (source) componentsObjects.objects.push(source);\n hasChanged = true;\n }\n return hasChanged;\n }\n\n function changeExtensionsScope(version: Version): boolean {\n let hasChanged = false;\n version.extensions.forEach((ext) => {\n if (ext.extensionId) {\n const updatedScope = getIdWithUpdatedScope(ext.extensionId);\n if (!updatedScope.isEqual(ext.extensionId)) {\n hasChanged = true;\n ext.extensionId = updatedScope;\n }\n }\n });\n return hasChanged;\n }\n\n function getIdWithUpdatedScope(dependencyId: ComponentID): ComponentID {\n if (dependencyId.scope) {\n return dependencyId; // it's not new\n }\n const depId = ModelComponent.fromBitId(dependencyId);\n // todo: use 'load' for async and switch the foreach with map.\n const dependencyObject = scope.objects.loadSync(depId.hash());\n if (dependencyObject instanceof Symlink) {\n return dependencyId.changeScope(dependencyObject.realScope);\n }\n const currentlyExportedDep = idsWithFutureScope.searchWithoutScopeAndVersion(dependencyId);\n const scopeName = currentlyExportedDep?.scope || remoteScope;\n if (!scopeName) throw new Error(`unable to find scopeName for ${dependencyId.toString()}`);\n return dependencyId.changeScope(scopeName);\n }\n\n function getBitIdsWithUpdatedScope(bitIds: ComponentIdList): ComponentIdList {\n const updatedIds = bitIds.map((id) => getIdWithUpdatedScope(id));\n return ComponentIdList.fromArray(updatedIds);\n }\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 idsWithFutureScope: ComponentIdList;\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[]; idsWithFutureScope: ComponentIdList }> => {\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: [], idsWithFutureScope: bitIds };\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 loader.start(loaderMsg);\n const filtered = await throwForLocalOnlyIfNeeded(componentsToExport);\n return { ...filtered, laneObject };\n }\n if (!ids.length || idsHaveWildcard) {\n loader.start(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 loader.start(loaderMsg);\n return throwForLocalOnlyIfNeeded(componentsToExport);\n }\n loader.start(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 loader.start(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 (err: any) {\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;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;A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,CAACyP,gBAAgB,CAAC5U,eAAe,CAACO,EAAE,CAAC,EAAE8P,OAAO,CAACrQ,eAAe,EAAEiE,IAAI,CAAC;EAE3E,IAAI,CAACyQ,OAAO,EAAE;IACZ,MAAM,KAAIpU,oBAAQ,EAChB,GAAG6E,IAAI,EAAE1E,IAAI,2BAA2BT,eAAe,CAACO,EAAE;AAChE,0CAA0CP,eAAe,CAACO,EAAE,yDACxD,CAAC;EACH;AACF;AAEA,eAAeU,sBAAsBA,CAACzB,QAAkB,EAAE2F,IAAU,EAAE;EACpE,MAAM0P,WAAW,GAAGrV,QAAQ,CAACqT,gBAAgB,CAAC,CAAC;EAC/C,MAAMiC,aAAa,GAAG3P,IAAI,CAAC1E,IAAI,KAAKoU,WAAW,CAACpU,IAAI;EACpD,IAAI,CAACqU,aAAa,EAAE;IAClB,MAAM,IAAI7R,KAAK,CACb,wEAAwEkC,IAAI,CAAC1E,IAAI,aAAaoU,WAAW,CAACpU,IAAI,EAChH,CAAC;EACH;EACAjB,QAAQ,CAACuV,cAAc,CAAC5P,IAAI,CAAC6P,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC;EAC9CxV,QAAQ,CAACa,KAAK,CAAC4U,SAAS,CAACC,iBAAiB,CAAC/P,IAAI,CAAC1E,IAAI,CAAC;EACrD0E,IAAI,CAAC/E,KAAK,GAAG,KAAK;AACpB;AAEO,SAASyR,yBAAyBA,CAACrS,QAAkB,EAAE;EAC5D,OAAOA,QAAQ,CAAC2V,QAAQ,CAAC,CAAC;AAC5B;AAAC,IAAAC,QAAA,GAAAxB,OAAA,CAAA5Y,OAAA,GAEcwC,UAAU","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.348/dist/export.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_export@1.0.348/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.348",
|
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.348"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -18,20 +18,20 @@
|
|
18
18
|
"@teambit/bit-error": "0.0.404",
|
19
19
|
"@teambit/component-id": "1.2.0",
|
20
20
|
"@teambit/lane-id": "0.0.311",
|
21
|
-
"@teambit/cli": "0.0.
|
22
|
-
"@teambit/eject": "1.0.
|
23
|
-
"@teambit/dependency-resolver": "1.0.
|
21
|
+
"@teambit/cli": "0.0.925",
|
22
|
+
"@teambit/eject": "1.0.348",
|
23
|
+
"@teambit/dependency-resolver": "1.0.348",
|
24
24
|
"@teambit/harmony.modules.feature-toggle": "0.0.4",
|
25
|
-
"@teambit/legacy.analytics": "0.0.
|
26
|
-
"@teambit/legacy.bit-map": "0.0.
|
27
|
-
"@teambit/legacy.component-list": "0.0.
|
25
|
+
"@teambit/legacy.analytics": "0.0.15",
|
26
|
+
"@teambit/legacy.bit-map": "0.0.13",
|
27
|
+
"@teambit/legacy.component-list": "0.0.10",
|
28
28
|
"@teambit/legacy.utils": "0.0.4",
|
29
|
-
"@teambit/logger": "0.0.
|
30
|
-
"@teambit/remove": "1.0.
|
31
|
-
"@teambit/scope": "1.0.
|
32
|
-
"@teambit/workspace.modules.node-modules-linker": "0.0.
|
33
|
-
"@teambit/workspace": "1.0.
|
34
|
-
"@teambit/legacy.scope-api": "0.0.
|
29
|
+
"@teambit/logger": "0.0.1018",
|
30
|
+
"@teambit/remove": "1.0.348",
|
31
|
+
"@teambit/scope": "1.0.348",
|
32
|
+
"@teambit/workspace.modules.node-modules-linker": "0.0.184",
|
33
|
+
"@teambit/workspace": "1.0.348",
|
34
|
+
"@teambit/legacy.scope-api": "0.0.12"
|
35
35
|
},
|
36
36
|
"devDependencies": {
|
37
37
|
"@types/lodash": "4.14.165",
|