@teambit/component-compare 1.0.265 → 1.0.266
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_component_component_compare-preview.js +1 -1
- package/artifacts/schema.json +83 -83
- package/dist/component-compare.main.runtime.js +17 -0
- package/dist/component-compare.main.runtime.js.map +1 -1
- package/dist/{preview-1715052001040.js → preview-1715115990259.js} +2 -2
- package/package.json +11 -11
|
@@ -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.component/component-compare@1.0.
|
|
3
|
+
<testsuite name="teambit.component/component-compare@1.0.266" 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.component/component-compare-preview"]=t():e["teambit.component/component-compare-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.component/component-compare-preview"]=t():e["teambit.component/component-compare-preview"]=t()}(self,(()=>(()=>{"use strict";var e={11618:(e,t,o)=>{var n={id:"teambit.component/component-compare@1.0.266",homepage:"https://bit.cloud/teambit/component/component-compare",exported:!0};function r(){const e=a(o(41594));return r=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,a.__bit_component=n;const i=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/bit-icons/compare.svg"}));i.__bit_component=n,t.Logo=i},41594:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},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 n={};return(()=>{o.r(n),o.d(n,{compositions:()=>d,compositions_metadata:()=>u,overview:()=>l});var e={};o.r(e),o.d(e,{default:()=>s});var t=o(11618);o(41594);const r=MdxJsReact,a=TeambitMdxUiMdxScopeContext;var i=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},p.apply(this,arguments)}var c={},m="wrapper";function s(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;o[n]=e[n]}return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)o=a[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,i);return(0,r.mdx)(m,p({},c,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(a.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,r.mdx)("p",null,(0,r.mdx)("a",{parentName:"p",href:"https://bit.cloud/blog/introducing-a-new-feature-component-compare-l4qyxtoo?baseVersion=0.0.5"},"Introducing Component Compare")),(0,r.mdx)("p",null,"Component Compare allows users to compare two component versions. It provides a unified view of all the following differences,"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Code: Modifications made to the source code of the component."),(0,r.mdx)("li",{parentName:"ul"},"Composition: Changes made to how the component looks visually."),(0,r.mdx)("li",{parentName:"ul"},"Tests: Changes made to how the component is tested."),(0,r.mdx)("li",{parentName:"ul"},"Dependencies: Changes made to the component's dependency graph."),(0,r.mdx)("li",{parentName:"ul"},"Overview: Changes to the auto-generated documentation for the component."),(0,r.mdx)("li",{parentName:"ul"},"Aspects: Changes made to the extensions for the component."),(0,r.mdx)("li",{parentName:"ul"},"Changelog: Changes exported between the two selected versions"))))}s.isMDXComponent=!0;const d=[t],l=[e],u={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),n})()));
|
package/artifacts/schema.json
CHANGED
|
@@ -604,7 +604,7 @@
|
|
|
604
604
|
"__schema": "FunctionLikeSchema",
|
|
605
605
|
"location": {
|
|
606
606
|
"filePath": "component-compare.main.runtime.ts",
|
|
607
|
-
"line":
|
|
607
|
+
"line": 259,
|
|
608
608
|
"character": 3
|
|
609
609
|
},
|
|
610
610
|
"signature": "(method) ComponentCompareMain.diffBetweenVersionsObjects(modelComponent: ModelComponent, fromVersionObject: Version, toVersionObject: Version, fromVersion: string, toVersion: string, diffOpts: DiffOptions): Promise<DiffResults>",
|
|
@@ -614,7 +614,7 @@
|
|
|
614
614
|
"__schema": "ParameterSchema",
|
|
615
615
|
"location": {
|
|
616
616
|
"filePath": "component-compare.main.runtime.ts",
|
|
617
|
-
"line":
|
|
617
|
+
"line": 260,
|
|
618
618
|
"character": 5
|
|
619
619
|
},
|
|
620
620
|
"name": "modelComponent",
|
|
@@ -622,7 +622,7 @@
|
|
|
622
622
|
"__schema": "TypeRefSchema",
|
|
623
623
|
"location": {
|
|
624
624
|
"filePath": "component-compare.main.runtime.ts",
|
|
625
|
-
"line":
|
|
625
|
+
"line": 260,
|
|
626
626
|
"character": 21
|
|
627
627
|
},
|
|
628
628
|
"name": "ModelComponent",
|
|
@@ -635,7 +635,7 @@
|
|
|
635
635
|
"__schema": "ParameterSchema",
|
|
636
636
|
"location": {
|
|
637
637
|
"filePath": "component-compare.main.runtime.ts",
|
|
638
|
-
"line":
|
|
638
|
+
"line": 261,
|
|
639
639
|
"character": 5
|
|
640
640
|
},
|
|
641
641
|
"name": "fromVersionObject",
|
|
@@ -643,7 +643,7 @@
|
|
|
643
643
|
"__schema": "TypeRefSchema",
|
|
644
644
|
"location": {
|
|
645
645
|
"filePath": "component-compare.main.runtime.ts",
|
|
646
|
-
"line":
|
|
646
|
+
"line": 261,
|
|
647
647
|
"character": 24
|
|
648
648
|
},
|
|
649
649
|
"name": "Version",
|
|
@@ -656,7 +656,7 @@
|
|
|
656
656
|
"__schema": "ParameterSchema",
|
|
657
657
|
"location": {
|
|
658
658
|
"filePath": "component-compare.main.runtime.ts",
|
|
659
|
-
"line":
|
|
659
|
+
"line": 262,
|
|
660
660
|
"character": 5
|
|
661
661
|
},
|
|
662
662
|
"name": "toVersionObject",
|
|
@@ -664,7 +664,7 @@
|
|
|
664
664
|
"__schema": "TypeRefSchema",
|
|
665
665
|
"location": {
|
|
666
666
|
"filePath": "component-compare.main.runtime.ts",
|
|
667
|
-
"line":
|
|
667
|
+
"line": 262,
|
|
668
668
|
"character": 22
|
|
669
669
|
},
|
|
670
670
|
"name": "Version",
|
|
@@ -677,7 +677,7 @@
|
|
|
677
677
|
"__schema": "ParameterSchema",
|
|
678
678
|
"location": {
|
|
679
679
|
"filePath": "component-compare.main.runtime.ts",
|
|
680
|
-
"line":
|
|
680
|
+
"line": 263,
|
|
681
681
|
"character": 5
|
|
682
682
|
},
|
|
683
683
|
"name": "fromVersion",
|
|
@@ -685,7 +685,7 @@
|
|
|
685
685
|
"__schema": "KeywordTypeSchema",
|
|
686
686
|
"location": {
|
|
687
687
|
"filePath": "component-compare.main.runtime.ts",
|
|
688
|
-
"line":
|
|
688
|
+
"line": 263,
|
|
689
689
|
"character": 18
|
|
690
690
|
},
|
|
691
691
|
"name": "string"
|
|
@@ -697,7 +697,7 @@
|
|
|
697
697
|
"__schema": "ParameterSchema",
|
|
698
698
|
"location": {
|
|
699
699
|
"filePath": "component-compare.main.runtime.ts",
|
|
700
|
-
"line":
|
|
700
|
+
"line": 264,
|
|
701
701
|
"character": 5
|
|
702
702
|
},
|
|
703
703
|
"name": "toVersion",
|
|
@@ -705,7 +705,7 @@
|
|
|
705
705
|
"__schema": "KeywordTypeSchema",
|
|
706
706
|
"location": {
|
|
707
707
|
"filePath": "component-compare.main.runtime.ts",
|
|
708
|
-
"line":
|
|
708
|
+
"line": 264,
|
|
709
709
|
"character": 16
|
|
710
710
|
},
|
|
711
711
|
"name": "string"
|
|
@@ -717,7 +717,7 @@
|
|
|
717
717
|
"__schema": "ParameterSchema",
|
|
718
718
|
"location": {
|
|
719
719
|
"filePath": "component-compare.main.runtime.ts",
|
|
720
|
-
"line":
|
|
720
|
+
"line": 265,
|
|
721
721
|
"character": 5
|
|
722
722
|
},
|
|
723
723
|
"name": "diffOpts",
|
|
@@ -725,7 +725,7 @@
|
|
|
725
725
|
"__schema": "TypeRefSchema",
|
|
726
726
|
"location": {
|
|
727
727
|
"filePath": "component-compare.main.runtime.ts",
|
|
728
|
-
"line":
|
|
728
|
+
"line": 265,
|
|
729
729
|
"character": 15
|
|
730
730
|
},
|
|
731
731
|
"name": "DiffOptions",
|
|
@@ -739,7 +739,7 @@
|
|
|
739
739
|
"__schema": "InferenceTypeSchema",
|
|
740
740
|
"location": {
|
|
741
741
|
"filePath": "component-compare.main.runtime.ts",
|
|
742
|
-
"line":
|
|
742
|
+
"line": 259,
|
|
743
743
|
"character": 3
|
|
744
744
|
},
|
|
745
745
|
"type": "Promise<DiffResults>"
|
|
@@ -752,7 +752,7 @@
|
|
|
752
752
|
"__schema": "VariableLikeSchema",
|
|
753
753
|
"location": {
|
|
754
754
|
"filePath": "component-compare.main.runtime.ts",
|
|
755
|
-
"line":
|
|
755
|
+
"line": 295,
|
|
756
756
|
"character": 3
|
|
757
757
|
},
|
|
758
758
|
"signature": "(property) ComponentCompareMain.slots: never[]",
|
|
@@ -761,7 +761,7 @@
|
|
|
761
761
|
"__schema": "InferenceTypeSchema",
|
|
762
762
|
"location": {
|
|
763
763
|
"filePath": "component-compare.main.runtime.ts",
|
|
764
|
-
"line":
|
|
764
|
+
"line": 295,
|
|
765
765
|
"character": 3
|
|
766
766
|
},
|
|
767
767
|
"type": "never[]"
|
|
@@ -773,7 +773,7 @@
|
|
|
773
773
|
"__schema": "VariableLikeSchema",
|
|
774
774
|
"location": {
|
|
775
775
|
"filePath": "component-compare.main.runtime.ts",
|
|
776
|
-
"line":
|
|
776
|
+
"line": 296,
|
|
777
777
|
"character": 3
|
|
778
778
|
},
|
|
779
779
|
"signature": "(property) ComponentCompareMain.dependencies: Aspect[]",
|
|
@@ -782,7 +782,7 @@
|
|
|
782
782
|
"__schema": "InferenceTypeSchema",
|
|
783
783
|
"location": {
|
|
784
784
|
"filePath": "component-compare.main.runtime.ts",
|
|
785
|
-
"line":
|
|
785
|
+
"line": 296,
|
|
786
786
|
"character": 3
|
|
787
787
|
},
|
|
788
788
|
"type": "Aspect[]"
|
|
@@ -794,7 +794,7 @@
|
|
|
794
794
|
"__schema": "VariableLikeSchema",
|
|
795
795
|
"location": {
|
|
796
796
|
"filePath": "component-compare.main.runtime.ts",
|
|
797
|
-
"line":
|
|
797
|
+
"line": 307,
|
|
798
798
|
"character": 3
|
|
799
799
|
},
|
|
800
800
|
"signature": "(property) ComponentCompareMain.runtime: RuntimeDefinition",
|
|
@@ -803,7 +803,7 @@
|
|
|
803
803
|
"__schema": "InferenceTypeSchema",
|
|
804
804
|
"location": {
|
|
805
805
|
"filePath": "component-compare.main.runtime.ts",
|
|
806
|
-
"line":
|
|
806
|
+
"line": 307,
|
|
807
807
|
"character": 3
|
|
808
808
|
},
|
|
809
809
|
"type": "RuntimeDefinition"
|
|
@@ -815,7 +815,7 @@
|
|
|
815
815
|
"__schema": "FunctionLikeSchema",
|
|
816
816
|
"location": {
|
|
817
817
|
"filePath": "component-compare.main.runtime.ts",
|
|
818
|
-
"line":
|
|
818
|
+
"line": 308,
|
|
819
819
|
"character": 3
|
|
820
820
|
},
|
|
821
821
|
"signature": "(method) ComponentCompareMain.provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver, importer]: [\n GraphqlMain,\n ComponentMain,\n ScopeMain,\n LoggerMain,\n CLIMain,\n Workspace,\n TesterMain,\n DependencyResolverMain,\n ImporterMain\n]): Promise<ComponentCompareMain>",
|
|
@@ -825,7 +825,7 @@
|
|
|
825
825
|
"__schema": "ParameterSchema",
|
|
826
826
|
"location": {
|
|
827
827
|
"filePath": "component-compare.main.runtime.ts",
|
|
828
|
-
"line":
|
|
828
|
+
"line": 308,
|
|
829
829
|
"character": 25
|
|
830
830
|
},
|
|
831
831
|
"name": "[ graphql, component, scope, loggerMain, cli, workspace, tester, depResolver, importer ]",
|
|
@@ -833,7 +833,7 @@
|
|
|
833
833
|
"__schema": "TupleTypeSchema",
|
|
834
834
|
"location": {
|
|
835
835
|
"filePath": "component-compare.main.runtime.ts",
|
|
836
|
-
"line":
|
|
836
|
+
"line": 308,
|
|
837
837
|
"character": 113
|
|
838
838
|
},
|
|
839
839
|
"elements": [
|
|
@@ -841,7 +841,7 @@
|
|
|
841
841
|
"__schema": "TypeRefSchema",
|
|
842
842
|
"location": {
|
|
843
843
|
"filePath": "component-compare.main.runtime.ts",
|
|
844
|
-
"line":
|
|
844
|
+
"line": 309,
|
|
845
845
|
"character": 5
|
|
846
846
|
},
|
|
847
847
|
"name": "GraphqlMain",
|
|
@@ -854,7 +854,7 @@
|
|
|
854
854
|
"__schema": "TypeRefSchema",
|
|
855
855
|
"location": {
|
|
856
856
|
"filePath": "component-compare.main.runtime.ts",
|
|
857
|
-
"line":
|
|
857
|
+
"line": 310,
|
|
858
858
|
"character": 5
|
|
859
859
|
},
|
|
860
860
|
"name": "ComponentMain",
|
|
@@ -867,7 +867,7 @@
|
|
|
867
867
|
"__schema": "TypeRefSchema",
|
|
868
868
|
"location": {
|
|
869
869
|
"filePath": "component-compare.main.runtime.ts",
|
|
870
|
-
"line":
|
|
870
|
+
"line": 311,
|
|
871
871
|
"character": 5
|
|
872
872
|
},
|
|
873
873
|
"name": "ScopeMain",
|
|
@@ -880,7 +880,7 @@
|
|
|
880
880
|
"__schema": "TypeRefSchema",
|
|
881
881
|
"location": {
|
|
882
882
|
"filePath": "component-compare.main.runtime.ts",
|
|
883
|
-
"line":
|
|
883
|
+
"line": 312,
|
|
884
884
|
"character": 5
|
|
885
885
|
},
|
|
886
886
|
"name": "LoggerMain",
|
|
@@ -893,7 +893,7 @@
|
|
|
893
893
|
"__schema": "TypeRefSchema",
|
|
894
894
|
"location": {
|
|
895
895
|
"filePath": "component-compare.main.runtime.ts",
|
|
896
|
-
"line":
|
|
896
|
+
"line": 313,
|
|
897
897
|
"character": 5
|
|
898
898
|
},
|
|
899
899
|
"name": "CLIMain",
|
|
@@ -906,7 +906,7 @@
|
|
|
906
906
|
"__schema": "TypeRefSchema",
|
|
907
907
|
"location": {
|
|
908
908
|
"filePath": "component-compare.main.runtime.ts",
|
|
909
|
-
"line":
|
|
909
|
+
"line": 314,
|
|
910
910
|
"character": 5
|
|
911
911
|
},
|
|
912
912
|
"name": "Workspace",
|
|
@@ -919,7 +919,7 @@
|
|
|
919
919
|
"__schema": "TypeRefSchema",
|
|
920
920
|
"location": {
|
|
921
921
|
"filePath": "component-compare.main.runtime.ts",
|
|
922
|
-
"line":
|
|
922
|
+
"line": 315,
|
|
923
923
|
"character": 5
|
|
924
924
|
},
|
|
925
925
|
"name": "TesterMain",
|
|
@@ -932,7 +932,7 @@
|
|
|
932
932
|
"__schema": "TypeRefSchema",
|
|
933
933
|
"location": {
|
|
934
934
|
"filePath": "component-compare.main.runtime.ts",
|
|
935
|
-
"line":
|
|
935
|
+
"line": 316,
|
|
936
936
|
"character": 5
|
|
937
937
|
},
|
|
938
938
|
"name": "DependencyResolverMain",
|
|
@@ -945,7 +945,7 @@
|
|
|
945
945
|
"__schema": "TypeRefSchema",
|
|
946
946
|
"location": {
|
|
947
947
|
"filePath": "component-compare.main.runtime.ts",
|
|
948
|
-
"line":
|
|
948
|
+
"line": 317,
|
|
949
949
|
"character": 5
|
|
950
950
|
},
|
|
951
951
|
"name": "ImporterMain",
|
|
@@ -964,7 +964,7 @@
|
|
|
964
964
|
"__schema": "InferenceTypeSchema",
|
|
965
965
|
"location": {
|
|
966
966
|
"filePath": "component-compare.main.runtime.ts",
|
|
967
|
-
"line":
|
|
967
|
+
"line": 308,
|
|
968
968
|
"character": 3
|
|
969
969
|
},
|
|
970
970
|
"type": "Promise<ComponentCompareMain>"
|
|
@@ -2389,7 +2389,7 @@
|
|
|
2389
2389
|
"__schema": "FunctionLikeSchema",
|
|
2390
2390
|
"location": {
|
|
2391
2391
|
"filePath": "component-compare.main.runtime.ts",
|
|
2392
|
-
"line":
|
|
2392
|
+
"line": 259,
|
|
2393
2393
|
"character": 3
|
|
2394
2394
|
},
|
|
2395
2395
|
"signature": "(method) ComponentCompareMain.diffBetweenVersionsObjects(modelComponent: ModelComponent, fromVersionObject: Version, toVersionObject: Version, fromVersion: string, toVersion: string, diffOpts: DiffOptions): Promise<DiffResults>",
|
|
@@ -2399,7 +2399,7 @@
|
|
|
2399
2399
|
"__schema": "ParameterSchema",
|
|
2400
2400
|
"location": {
|
|
2401
2401
|
"filePath": "component-compare.main.runtime.ts",
|
|
2402
|
-
"line":
|
|
2402
|
+
"line": 260,
|
|
2403
2403
|
"character": 5
|
|
2404
2404
|
},
|
|
2405
2405
|
"name": "modelComponent",
|
|
@@ -2407,7 +2407,7 @@
|
|
|
2407
2407
|
"__schema": "TypeRefSchema",
|
|
2408
2408
|
"location": {
|
|
2409
2409
|
"filePath": "component-compare.main.runtime.ts",
|
|
2410
|
-
"line":
|
|
2410
|
+
"line": 260,
|
|
2411
2411
|
"character": 21
|
|
2412
2412
|
},
|
|
2413
2413
|
"name": "ModelComponent",
|
|
@@ -2420,7 +2420,7 @@
|
|
|
2420
2420
|
"__schema": "ParameterSchema",
|
|
2421
2421
|
"location": {
|
|
2422
2422
|
"filePath": "component-compare.main.runtime.ts",
|
|
2423
|
-
"line":
|
|
2423
|
+
"line": 261,
|
|
2424
2424
|
"character": 5
|
|
2425
2425
|
},
|
|
2426
2426
|
"name": "fromVersionObject",
|
|
@@ -2428,7 +2428,7 @@
|
|
|
2428
2428
|
"__schema": "TypeRefSchema",
|
|
2429
2429
|
"location": {
|
|
2430
2430
|
"filePath": "component-compare.main.runtime.ts",
|
|
2431
|
-
"line":
|
|
2431
|
+
"line": 261,
|
|
2432
2432
|
"character": 24
|
|
2433
2433
|
},
|
|
2434
2434
|
"name": "Version",
|
|
@@ -2441,7 +2441,7 @@
|
|
|
2441
2441
|
"__schema": "ParameterSchema",
|
|
2442
2442
|
"location": {
|
|
2443
2443
|
"filePath": "component-compare.main.runtime.ts",
|
|
2444
|
-
"line":
|
|
2444
|
+
"line": 262,
|
|
2445
2445
|
"character": 5
|
|
2446
2446
|
},
|
|
2447
2447
|
"name": "toVersionObject",
|
|
@@ -2449,7 +2449,7 @@
|
|
|
2449
2449
|
"__schema": "TypeRefSchema",
|
|
2450
2450
|
"location": {
|
|
2451
2451
|
"filePath": "component-compare.main.runtime.ts",
|
|
2452
|
-
"line":
|
|
2452
|
+
"line": 262,
|
|
2453
2453
|
"character": 22
|
|
2454
2454
|
},
|
|
2455
2455
|
"name": "Version",
|
|
@@ -2462,7 +2462,7 @@
|
|
|
2462
2462
|
"__schema": "ParameterSchema",
|
|
2463
2463
|
"location": {
|
|
2464
2464
|
"filePath": "component-compare.main.runtime.ts",
|
|
2465
|
-
"line":
|
|
2465
|
+
"line": 263,
|
|
2466
2466
|
"character": 5
|
|
2467
2467
|
},
|
|
2468
2468
|
"name": "fromVersion",
|
|
@@ -2470,7 +2470,7 @@
|
|
|
2470
2470
|
"__schema": "KeywordTypeSchema",
|
|
2471
2471
|
"location": {
|
|
2472
2472
|
"filePath": "component-compare.main.runtime.ts",
|
|
2473
|
-
"line":
|
|
2473
|
+
"line": 263,
|
|
2474
2474
|
"character": 18
|
|
2475
2475
|
},
|
|
2476
2476
|
"name": "string"
|
|
@@ -2482,7 +2482,7 @@
|
|
|
2482
2482
|
"__schema": "ParameterSchema",
|
|
2483
2483
|
"location": {
|
|
2484
2484
|
"filePath": "component-compare.main.runtime.ts",
|
|
2485
|
-
"line":
|
|
2485
|
+
"line": 264,
|
|
2486
2486
|
"character": 5
|
|
2487
2487
|
},
|
|
2488
2488
|
"name": "toVersion",
|
|
@@ -2490,7 +2490,7 @@
|
|
|
2490
2490
|
"__schema": "KeywordTypeSchema",
|
|
2491
2491
|
"location": {
|
|
2492
2492
|
"filePath": "component-compare.main.runtime.ts",
|
|
2493
|
-
"line":
|
|
2493
|
+
"line": 264,
|
|
2494
2494
|
"character": 16
|
|
2495
2495
|
},
|
|
2496
2496
|
"name": "string"
|
|
@@ -2502,7 +2502,7 @@
|
|
|
2502
2502
|
"__schema": "ParameterSchema",
|
|
2503
2503
|
"location": {
|
|
2504
2504
|
"filePath": "component-compare.main.runtime.ts",
|
|
2505
|
-
"line":
|
|
2505
|
+
"line": 265,
|
|
2506
2506
|
"character": 5
|
|
2507
2507
|
},
|
|
2508
2508
|
"name": "diffOpts",
|
|
@@ -2510,7 +2510,7 @@
|
|
|
2510
2510
|
"__schema": "TypeRefSchema",
|
|
2511
2511
|
"location": {
|
|
2512
2512
|
"filePath": "component-compare.main.runtime.ts",
|
|
2513
|
-
"line":
|
|
2513
|
+
"line": 265,
|
|
2514
2514
|
"character": 15
|
|
2515
2515
|
},
|
|
2516
2516
|
"name": "DiffOptions",
|
|
@@ -2524,7 +2524,7 @@
|
|
|
2524
2524
|
"__schema": "InferenceTypeSchema",
|
|
2525
2525
|
"location": {
|
|
2526
2526
|
"filePath": "component-compare.main.runtime.ts",
|
|
2527
|
-
"line":
|
|
2527
|
+
"line": 259,
|
|
2528
2528
|
"character": 3
|
|
2529
2529
|
},
|
|
2530
2530
|
"type": "Promise<DiffResults>"
|
|
@@ -2537,7 +2537,7 @@
|
|
|
2537
2537
|
"__schema": "VariableLikeSchema",
|
|
2538
2538
|
"location": {
|
|
2539
2539
|
"filePath": "component-compare.main.runtime.ts",
|
|
2540
|
-
"line":
|
|
2540
|
+
"line": 295,
|
|
2541
2541
|
"character": 3
|
|
2542
2542
|
},
|
|
2543
2543
|
"signature": "(property) ComponentCompareMain.slots: never[]",
|
|
@@ -2546,7 +2546,7 @@
|
|
|
2546
2546
|
"__schema": "InferenceTypeSchema",
|
|
2547
2547
|
"location": {
|
|
2548
2548
|
"filePath": "component-compare.main.runtime.ts",
|
|
2549
|
-
"line":
|
|
2549
|
+
"line": 295,
|
|
2550
2550
|
"character": 3
|
|
2551
2551
|
},
|
|
2552
2552
|
"type": "never[]"
|
|
@@ -2558,7 +2558,7 @@
|
|
|
2558
2558
|
"__schema": "VariableLikeSchema",
|
|
2559
2559
|
"location": {
|
|
2560
2560
|
"filePath": "component-compare.main.runtime.ts",
|
|
2561
|
-
"line":
|
|
2561
|
+
"line": 296,
|
|
2562
2562
|
"character": 3
|
|
2563
2563
|
},
|
|
2564
2564
|
"signature": "(property) ComponentCompareMain.dependencies: Aspect[]",
|
|
@@ -2567,7 +2567,7 @@
|
|
|
2567
2567
|
"__schema": "InferenceTypeSchema",
|
|
2568
2568
|
"location": {
|
|
2569
2569
|
"filePath": "component-compare.main.runtime.ts",
|
|
2570
|
-
"line":
|
|
2570
|
+
"line": 296,
|
|
2571
2571
|
"character": 3
|
|
2572
2572
|
},
|
|
2573
2573
|
"type": "Aspect[]"
|
|
@@ -2579,7 +2579,7 @@
|
|
|
2579
2579
|
"__schema": "VariableLikeSchema",
|
|
2580
2580
|
"location": {
|
|
2581
2581
|
"filePath": "component-compare.main.runtime.ts",
|
|
2582
|
-
"line":
|
|
2582
|
+
"line": 307,
|
|
2583
2583
|
"character": 3
|
|
2584
2584
|
},
|
|
2585
2585
|
"signature": "(property) ComponentCompareMain.runtime: RuntimeDefinition",
|
|
@@ -2588,7 +2588,7 @@
|
|
|
2588
2588
|
"__schema": "InferenceTypeSchema",
|
|
2589
2589
|
"location": {
|
|
2590
2590
|
"filePath": "component-compare.main.runtime.ts",
|
|
2591
|
-
"line":
|
|
2591
|
+
"line": 307,
|
|
2592
2592
|
"character": 3
|
|
2593
2593
|
},
|
|
2594
2594
|
"type": "RuntimeDefinition"
|
|
@@ -2600,7 +2600,7 @@
|
|
|
2600
2600
|
"__schema": "FunctionLikeSchema",
|
|
2601
2601
|
"location": {
|
|
2602
2602
|
"filePath": "component-compare.main.runtime.ts",
|
|
2603
|
-
"line":
|
|
2603
|
+
"line": 308,
|
|
2604
2604
|
"character": 3
|
|
2605
2605
|
},
|
|
2606
2606
|
"signature": "(method) ComponentCompareMain.provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver, importer]: [\n GraphqlMain,\n ComponentMain,\n ScopeMain,\n LoggerMain,\n CLIMain,\n Workspace,\n TesterMain,\n DependencyResolverMain,\n ImporterMain\n]): Promise<ComponentCompareMain>",
|
|
@@ -2610,7 +2610,7 @@
|
|
|
2610
2610
|
"__schema": "ParameterSchema",
|
|
2611
2611
|
"location": {
|
|
2612
2612
|
"filePath": "component-compare.main.runtime.ts",
|
|
2613
|
-
"line":
|
|
2613
|
+
"line": 308,
|
|
2614
2614
|
"character": 25
|
|
2615
2615
|
},
|
|
2616
2616
|
"name": "[ graphql, component, scope, loggerMain, cli, workspace, tester, depResolver, importer ]",
|
|
@@ -2618,7 +2618,7 @@
|
|
|
2618
2618
|
"__schema": "TupleTypeSchema",
|
|
2619
2619
|
"location": {
|
|
2620
2620
|
"filePath": "component-compare.main.runtime.ts",
|
|
2621
|
-
"line":
|
|
2621
|
+
"line": 308,
|
|
2622
2622
|
"character": 113
|
|
2623
2623
|
},
|
|
2624
2624
|
"elements": [
|
|
@@ -2626,7 +2626,7 @@
|
|
|
2626
2626
|
"__schema": "TypeRefSchema",
|
|
2627
2627
|
"location": {
|
|
2628
2628
|
"filePath": "component-compare.main.runtime.ts",
|
|
2629
|
-
"line":
|
|
2629
|
+
"line": 309,
|
|
2630
2630
|
"character": 5
|
|
2631
2631
|
},
|
|
2632
2632
|
"name": "GraphqlMain",
|
|
@@ -2639,7 +2639,7 @@
|
|
|
2639
2639
|
"__schema": "TypeRefSchema",
|
|
2640
2640
|
"location": {
|
|
2641
2641
|
"filePath": "component-compare.main.runtime.ts",
|
|
2642
|
-
"line":
|
|
2642
|
+
"line": 310,
|
|
2643
2643
|
"character": 5
|
|
2644
2644
|
},
|
|
2645
2645
|
"name": "ComponentMain",
|
|
@@ -2652,7 +2652,7 @@
|
|
|
2652
2652
|
"__schema": "TypeRefSchema",
|
|
2653
2653
|
"location": {
|
|
2654
2654
|
"filePath": "component-compare.main.runtime.ts",
|
|
2655
|
-
"line":
|
|
2655
|
+
"line": 311,
|
|
2656
2656
|
"character": 5
|
|
2657
2657
|
},
|
|
2658
2658
|
"name": "ScopeMain",
|
|
@@ -2665,7 +2665,7 @@
|
|
|
2665
2665
|
"__schema": "TypeRefSchema",
|
|
2666
2666
|
"location": {
|
|
2667
2667
|
"filePath": "component-compare.main.runtime.ts",
|
|
2668
|
-
"line":
|
|
2668
|
+
"line": 312,
|
|
2669
2669
|
"character": 5
|
|
2670
2670
|
},
|
|
2671
2671
|
"name": "LoggerMain",
|
|
@@ -2678,7 +2678,7 @@
|
|
|
2678
2678
|
"__schema": "TypeRefSchema",
|
|
2679
2679
|
"location": {
|
|
2680
2680
|
"filePath": "component-compare.main.runtime.ts",
|
|
2681
|
-
"line":
|
|
2681
|
+
"line": 313,
|
|
2682
2682
|
"character": 5
|
|
2683
2683
|
},
|
|
2684
2684
|
"name": "CLIMain",
|
|
@@ -2691,7 +2691,7 @@
|
|
|
2691
2691
|
"__schema": "TypeRefSchema",
|
|
2692
2692
|
"location": {
|
|
2693
2693
|
"filePath": "component-compare.main.runtime.ts",
|
|
2694
|
-
"line":
|
|
2694
|
+
"line": 314,
|
|
2695
2695
|
"character": 5
|
|
2696
2696
|
},
|
|
2697
2697
|
"name": "Workspace",
|
|
@@ -2704,7 +2704,7 @@
|
|
|
2704
2704
|
"__schema": "TypeRefSchema",
|
|
2705
2705
|
"location": {
|
|
2706
2706
|
"filePath": "component-compare.main.runtime.ts",
|
|
2707
|
-
"line":
|
|
2707
|
+
"line": 315,
|
|
2708
2708
|
"character": 5
|
|
2709
2709
|
},
|
|
2710
2710
|
"name": "TesterMain",
|
|
@@ -2717,7 +2717,7 @@
|
|
|
2717
2717
|
"__schema": "TypeRefSchema",
|
|
2718
2718
|
"location": {
|
|
2719
2719
|
"filePath": "component-compare.main.runtime.ts",
|
|
2720
|
-
"line":
|
|
2720
|
+
"line": 316,
|
|
2721
2721
|
"character": 5
|
|
2722
2722
|
},
|
|
2723
2723
|
"name": "DependencyResolverMain",
|
|
@@ -2730,7 +2730,7 @@
|
|
|
2730
2730
|
"__schema": "TypeRefSchema",
|
|
2731
2731
|
"location": {
|
|
2732
2732
|
"filePath": "component-compare.main.runtime.ts",
|
|
2733
|
-
"line":
|
|
2733
|
+
"line": 317,
|
|
2734
2734
|
"character": 5
|
|
2735
2735
|
},
|
|
2736
2736
|
"name": "ImporterMain",
|
|
@@ -2749,7 +2749,7 @@
|
|
|
2749
2749
|
"__schema": "InferenceTypeSchema",
|
|
2750
2750
|
"location": {
|
|
2751
2751
|
"filePath": "component-compare.main.runtime.ts",
|
|
2752
|
-
"line":
|
|
2752
|
+
"line": 308,
|
|
2753
2753
|
"character": 3
|
|
2754
2754
|
},
|
|
2755
2755
|
"type": "Promise<ComponentCompareMain>"
|
|
@@ -2767,7 +2767,7 @@
|
|
|
2767
2767
|
"__schema": "UnImplementedSchema",
|
|
2768
2768
|
"location": {
|
|
2769
2769
|
"filePath": "component-compare.main.runtime.ts",
|
|
2770
|
-
"line":
|
|
2770
|
+
"line": 351,
|
|
2771
2771
|
"character": 16
|
|
2772
2772
|
},
|
|
2773
2773
|
"name": "ComponentCompareMain",
|
|
@@ -2887,7 +2887,7 @@
|
|
|
2887
2887
|
"__schema": "FunctionLikeSchema",
|
|
2888
2888
|
"location": {
|
|
2889
2889
|
"filePath": "component-compare.main.runtime.ts",
|
|
2890
|
-
"line":
|
|
2890
|
+
"line": 335,
|
|
2891
2891
|
"character": 1
|
|
2892
2892
|
},
|
|
2893
2893
|
"signature": "function hasDiff(diffResult: DiffResults): boolean",
|
|
@@ -2897,7 +2897,7 @@
|
|
|
2897
2897
|
"__schema": "ParameterSchema",
|
|
2898
2898
|
"location": {
|
|
2899
2899
|
"filePath": "component-compare.main.runtime.ts",
|
|
2900
|
-
"line":
|
|
2900
|
+
"line": 335,
|
|
2901
2901
|
"character": 18
|
|
2902
2902
|
},
|
|
2903
2903
|
"name": "diffResult",
|
|
@@ -2905,7 +2905,7 @@
|
|
|
2905
2905
|
"__schema": "TypeRefSchema",
|
|
2906
2906
|
"location": {
|
|
2907
2907
|
"filePath": "component-compare.main.runtime.ts",
|
|
2908
|
-
"line":
|
|
2908
|
+
"line": 335,
|
|
2909
2909
|
"character": 30
|
|
2910
2910
|
},
|
|
2911
2911
|
"name": "DiffResults",
|
|
@@ -2919,7 +2919,7 @@
|
|
|
2919
2919
|
"__schema": "KeywordTypeSchema",
|
|
2920
2920
|
"location": {
|
|
2921
2921
|
"filePath": "component-compare.main.runtime.ts",
|
|
2922
|
-
"line":
|
|
2922
|
+
"line": 335,
|
|
2923
2923
|
"character": 44
|
|
2924
2924
|
},
|
|
2925
2925
|
"name": "boolean"
|
|
@@ -2930,7 +2930,7 @@
|
|
|
2930
2930
|
"__schema": "FunctionLikeSchema",
|
|
2931
2931
|
"location": {
|
|
2932
2932
|
"filePath": "component-compare.main.runtime.ts",
|
|
2933
|
-
"line":
|
|
2933
|
+
"line": 339,
|
|
2934
2934
|
"character": 1
|
|
2935
2935
|
},
|
|
2936
2936
|
"signature": "function updateFieldsDiff(componentA: ConsumerComponent, componentB: ConsumerComponent, diffResult: DiffResults, diffOpts: DiffOptions): Promise<void>",
|
|
@@ -2940,7 +2940,7 @@
|
|
|
2940
2940
|
"__schema": "ParameterSchema",
|
|
2941
2941
|
"location": {
|
|
2942
2942
|
"filePath": "component-compare.main.runtime.ts",
|
|
2943
|
-
"line":
|
|
2943
|
+
"line": 340,
|
|
2944
2944
|
"character": 3
|
|
2945
2945
|
},
|
|
2946
2946
|
"name": "componentA",
|
|
@@ -2948,7 +2948,7 @@
|
|
|
2948
2948
|
"__schema": "TypeRefSchema",
|
|
2949
2949
|
"location": {
|
|
2950
2950
|
"filePath": "component-compare.main.runtime.ts",
|
|
2951
|
-
"line":
|
|
2951
|
+
"line": 340,
|
|
2952
2952
|
"character": 15
|
|
2953
2953
|
},
|
|
2954
2954
|
"name": "ConsumerComponent",
|
|
@@ -2961,7 +2961,7 @@
|
|
|
2961
2961
|
"__schema": "ParameterSchema",
|
|
2962
2962
|
"location": {
|
|
2963
2963
|
"filePath": "component-compare.main.runtime.ts",
|
|
2964
|
-
"line":
|
|
2964
|
+
"line": 341,
|
|
2965
2965
|
"character": 3
|
|
2966
2966
|
},
|
|
2967
2967
|
"name": "componentB",
|
|
@@ -2969,7 +2969,7 @@
|
|
|
2969
2969
|
"__schema": "TypeRefSchema",
|
|
2970
2970
|
"location": {
|
|
2971
2971
|
"filePath": "component-compare.main.runtime.ts",
|
|
2972
|
-
"line":
|
|
2972
|
+
"line": 341,
|
|
2973
2973
|
"character": 15
|
|
2974
2974
|
},
|
|
2975
2975
|
"name": "ConsumerComponent",
|
|
@@ -2982,7 +2982,7 @@
|
|
|
2982
2982
|
"__schema": "ParameterSchema",
|
|
2983
2983
|
"location": {
|
|
2984
2984
|
"filePath": "component-compare.main.runtime.ts",
|
|
2985
|
-
"line":
|
|
2985
|
+
"line": 342,
|
|
2986
2986
|
"character": 3
|
|
2987
2987
|
},
|
|
2988
2988
|
"name": "diffResult",
|
|
@@ -2990,7 +2990,7 @@
|
|
|
2990
2990
|
"__schema": "TypeRefSchema",
|
|
2991
2991
|
"location": {
|
|
2992
2992
|
"filePath": "component-compare.main.runtime.ts",
|
|
2993
|
-
"line":
|
|
2993
|
+
"line": 342,
|
|
2994
2994
|
"character": 15
|
|
2995
2995
|
},
|
|
2996
2996
|
"name": "DiffResults",
|
|
@@ -3003,7 +3003,7 @@
|
|
|
3003
3003
|
"__schema": "ParameterSchema",
|
|
3004
3004
|
"location": {
|
|
3005
3005
|
"filePath": "component-compare.main.runtime.ts",
|
|
3006
|
-
"line":
|
|
3006
|
+
"line": 343,
|
|
3007
3007
|
"character": 3
|
|
3008
3008
|
},
|
|
3009
3009
|
"name": "diffOpts",
|
|
@@ -3011,7 +3011,7 @@
|
|
|
3011
3011
|
"__schema": "TypeRefSchema",
|
|
3012
3012
|
"location": {
|
|
3013
3013
|
"filePath": "component-compare.main.runtime.ts",
|
|
3014
|
-
"line":
|
|
3014
|
+
"line": 343,
|
|
3015
3015
|
"character": 13
|
|
3016
3016
|
},
|
|
3017
3017
|
"name": "DiffOptions",
|
|
@@ -3025,7 +3025,7 @@
|
|
|
3025
3025
|
"__schema": "InferenceTypeSchema",
|
|
3026
3026
|
"location": {
|
|
3027
3027
|
"filePath": "component-compare.main.runtime.ts",
|
|
3028
|
-
"line":
|
|
3028
|
+
"line": 339,
|
|
3029
3029
|
"character": 1
|
|
3030
3030
|
},
|
|
3031
3031
|
"type": "Promise<void>"
|
|
@@ -3038,7 +3038,7 @@
|
|
|
3038
3038
|
"__schema": "UnImplementedSchema",
|
|
3039
3039
|
"location": {
|
|
3040
3040
|
"filePath": "component-compare.main.runtime.ts",
|
|
3041
|
-
"line":
|
|
3041
|
+
"line": 349,
|
|
3042
3042
|
"character": 1
|
|
3043
3043
|
},
|
|
3044
3044
|
"name": "ComponentCompareAspect.addRuntime(ComponentCompareMain);",
|
|
@@ -3779,7 +3779,7 @@
|
|
|
3779
3779
|
"componentId": {
|
|
3780
3780
|
"scope": "teambit.component",
|
|
3781
3781
|
"name": "component-compare",
|
|
3782
|
-
"version": "1.0.
|
|
3782
|
+
"version": "1.0.266"
|
|
3783
3783
|
},
|
|
3784
3784
|
"taggedModuleExports": []
|
|
3785
3785
|
}
|
|
@@ -25,6 +25,13 @@ function _workspace() {
|
|
|
25
25
|
};
|
|
26
26
|
return data;
|
|
27
27
|
}
|
|
28
|
+
function _componentId() {
|
|
29
|
+
const data = require("@teambit/component-id");
|
|
30
|
+
_componentId = function () {
|
|
31
|
+
return data;
|
|
32
|
+
};
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
28
35
|
function _scope() {
|
|
29
36
|
const data = require("@teambit/scope");
|
|
30
37
|
_scope = function () {
|
|
@@ -235,6 +242,11 @@ class ComponentCompareMain {
|
|
|
235
242
|
throw new (_bitError().BitError)(`component ${component.id.toString()} doesn't have any version yet`);
|
|
236
243
|
}
|
|
237
244
|
const repository = consumer.scope.objects;
|
|
245
|
+
const idList = _componentId().ComponentIdList.fromArray([component.id.changeVersion(version)]);
|
|
246
|
+
await consumer.scope.scopeImporter.importWithoutDeps(idList, {
|
|
247
|
+
cache: true,
|
|
248
|
+
reason: 'to show diff'
|
|
249
|
+
});
|
|
238
250
|
const fromVersionObject = await modelComponent.loadVersion(version, repository);
|
|
239
251
|
const versionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);
|
|
240
252
|
const fsFiles = consumerComponent.files;
|
|
@@ -257,6 +269,11 @@ class ComponentCompareMain {
|
|
|
257
269
|
throw new (_bitError().BitError)(`component ${id.toString()} doesn't have any version yet`);
|
|
258
270
|
}
|
|
259
271
|
const repository = consumer.scope.objects;
|
|
272
|
+
const idList = _componentId().ComponentIdList.fromArray([id.changeVersion(version), id.changeVersion(toVersion)]);
|
|
273
|
+
await consumer.scope.scopeImporter.importWithoutDeps(idList, {
|
|
274
|
+
cache: true,
|
|
275
|
+
reason: 'to show diff'
|
|
276
|
+
});
|
|
260
277
|
const fromVersionObject = await modelComponent.loadVersion(version, repository);
|
|
261
278
|
const toVersionObject = await modelComponent.loadVersion(toVersion, repository);
|
|
262
279
|
const fromVersionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_bitError","_workspace","_scope","_graphql","_builder","_dependencyResolver","_logger","_componentsDiff","_componentsObjectDiff","_tester","_component","_componentCompare","_componentCompare2","_diffCmd","_importer","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","ComponentCompareMain","constructor","componentAspect","scope","logger","tester","depResolver","importer","workspace","compare","baseIdStr","compareIdStr","host","getHost","baseCompId","compareCompId","resolveMultipleComponentIds","modelComponent","legacyScope","getModelComponentIfExist","BitError","toString","importObjectsFromMainIfExist","cache","baseVersion","version","compareVersion","repository","objects","baseVersionObject","loadVersion","compareVersionObject","diff","diffBetweenVersionsObjects","baseComponent","get","compareComponent","baseTestFiles","getTestFiles","map","file","relative","compareTestFiles","allTestFiles","testFilesDiff","filesDiff","filter","fileDiff","includes","filePath","status","compareResult","id","code","fields","fieldsDiff","tests","diffByCLIValues","pattern","toVersion","verbose","table","OutsideWorkspaceError","ids","idsByPattern","listTagPendingIds","consumer","length","diffResults","componentsDiff","formatDepsAsTable","onDestroy","getConfigForDiffById","componentId","resolveComponentId","component","Error","getConfigForDiffByCompObject","depData","getDependencies","serializedToString","dep","idWithoutVersion","__type","split","lifecycle","source","serializeAndSort","deps","serialized","serialize","sort","serializeAspect","comp","aspects","state","withoutEntries","BuilderAspect","DependencyResolverAspect","toLegacy","sortById","toConfigObject","dependencies","diffOpts","components","getMany","getResults","Promise","all","getComponentDiffBetweenVersions","getComponentDiffOfVersion","getComponentDiff","componentsDiffResults","consumerComponent","_consumer","diffResult","hasDiff","fromVersionObject","versionFiles","modelFilesToSourceFiles","fsFiles","files","versionB","getFilesDiff","fromVersionComponent","toConsumerComponent","name","updateFieldsDiff","toVersionObject","fromVersionFiles","toVersionFiles","toVersionComponent","componentFromModel","isDeleted","modelFiles","fromVersion","toComponentId","color","undefined","hash","provider","graphql","loggerMain","cli","createLogger","ComponentCompareAspect","componentCompareMain","register","DiffCmd","componentCompareSchema","exports","GraphqlAspect","ComponentAspect","ScopeAspect","LoggerAspect","CLIAspect","WorkspaceAspect","TesterAspect","ImporterAspect","MainRuntime","find","diffOutput","componentA","componentB","diffBetweenComponentsObjects","addRuntime","_default","default"],"sources":["component-compare.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { BitError } from '@teambit/bit-error';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { ComponentID } from '@teambit/component-id';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { BuilderAspect } from '@teambit/builder';\nimport { ModelComponent, Version } from '@teambit/legacy/dist/scope/models';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport {\n DependencyResolverAspect,\n DependencyList,\n DependencyResolverMain,\n SerializedDependency,\n} from '@teambit/dependency-resolver';\nimport { LoggerAspect, LoggerMain, Logger } from '@teambit/logger';\nimport {\n DiffOptions,\n DiffResults,\n FieldsDiff,\n FileDiff,\n getFilesDiff,\n} from '@teambit/legacy/dist/consumer/component-ops/components-diff';\nimport { diffBetweenComponentsObjects } from '@teambit/legacy/dist/consumer/component-ops/components-object-diff';\nimport { TesterMain, TesterAspect } from '@teambit/tester';\nimport { ComponentAspect, Component, ComponentMain } from '@teambit/component';\nimport { componentCompareSchema } from './component-compare.graphql';\nimport { ComponentCompareAspect } from './component-compare.aspect';\nimport { DiffCmd } from './diff-cmd';\nimport { ImporterAspect, ImporterMain } from '@teambit/importer';\n\nexport type ComponentCompareResult = {\n id: string;\n code: FileDiff[];\n fields: FieldsDiff[];\n tests: FileDiff[];\n};\n\ntype ConfigDiff = {\n version?: string;\n dependencies?: string[];\n aspects?: Record<string, any>;\n};\n\nexport class ComponentCompareMain {\n constructor(\n private componentAspect: ComponentMain,\n private scope: ScopeMain,\n private logger: Logger,\n private tester: TesterMain,\n private depResolver: DependencyResolverMain,\n private importer: ImporterMain,\n private workspace?: Workspace\n ) {}\n\n async compare(baseIdStr: string, compareIdStr: string): Promise<ComponentCompareResult> {\n const host = this.componentAspect.getHost();\n const [baseCompId, compareCompId] = await host.resolveMultipleComponentIds([baseIdStr, compareIdStr]);\n const modelComponent = await this.scope.legacyScope.getModelComponentIfExist(compareCompId);\n\n if (!modelComponent) {\n throw new BitError(`component ${compareCompId.toString()} doesn't have any version yet`);\n }\n\n // import missing components that might be on main\n await this.importer.importObjectsFromMainIfExist([baseCompId, compareCompId], {\n cache: true,\n });\n\n const baseVersion = baseCompId.version as string;\n const compareVersion = compareCompId.version as string;\n\n const repository = this.scope.legacyScope.objects;\n const baseVersionObject = await modelComponent.loadVersion(baseVersion, repository);\n const compareVersionObject = await modelComponent.loadVersion(compareVersion, repository);\n\n const diff: DiffResults = await this.diffBetweenVersionsObjects(\n modelComponent,\n baseVersionObject,\n compareVersionObject,\n baseVersion,\n compareVersion,\n {}\n );\n\n const baseComponent = await host.get(baseCompId);\n const compareComponent = await host.get(compareCompId);\n\n const baseTestFiles =\n (baseComponent && (await this.tester.getTestFiles(baseComponent).map((file) => file.relative))) || [];\n const compareTestFiles =\n (compareComponent && (await this.tester.getTestFiles(compareComponent).map((file) => file.relative))) || [];\n\n const allTestFiles = [...baseTestFiles, ...compareTestFiles];\n\n const testFilesDiff = (diff.filesDiff || []).filter(\n (fileDiff: FileDiff) => allTestFiles.includes(fileDiff.filePath) && fileDiff.status !== 'UNCHANGED'\n );\n\n const compareResult = {\n id: `${baseCompId}-${compareCompId}`,\n code: diff.filesDiff || [],\n fields: diff.fieldsDiff || [],\n tests: testFilesDiff,\n };\n\n return compareResult;\n }\n\n async diffByCLIValues(\n pattern?: string,\n version?: string,\n toVersion?: string,\n { verbose, table }: { verbose?: boolean; table?: boolean } = {}\n ): Promise<any> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const ids = pattern ? await this.workspace.idsByPattern(pattern) : await this.workspace.listTagPendingIds();\n const consumer = this.workspace.consumer;\n if (!ids.length) {\n return [];\n }\n const diffResults = await this.componentsDiff(ids, version, toVersion, {\n verbose,\n formatDepsAsTable: table,\n });\n await consumer.onDestroy('diff');\n return diffResults;\n }\n\n async getConfigForDiffById(id: string): Promise<ConfigDiff> {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const componentId = await workspace.resolveComponentId(id);\n const component = await workspace.scope.get(componentId, false);\n if (!component) throw new Error(`getConfigForDiff: unable to find component ${id} in local scope`);\n return this.getConfigForDiffByCompObject(component);\n }\n\n async getConfigForDiffByCompObject(component: Component) {\n const depData = this.depResolver.getDependencies(component);\n const serializedToString = (dep: SerializedDependency) => {\n const idWithoutVersion = dep.__type === 'package' ? dep.id : dep.id.split('@')[0];\n return `${idWithoutVersion}@${dep.version} (${dep.lifecycle}) ${dep.source ? `(${dep.source})` : ''}`;\n };\n const serializeAndSort = (deps: DependencyList) => {\n const serialized = deps.serialize().map(serializedToString);\n return serialized.sort();\n };\n const serializeAspect = (comp: Component) => {\n const aspects = comp.state.aspects.withoutEntries([BuilderAspect.id, DependencyResolverAspect.id]);\n // return aspects.serialize();\n return aspects.toLegacy().sortById().toConfigObject();\n };\n return {\n version: component.id.version,\n dependencies: serializeAndSort(depData),\n aspects: serializeAspect(component),\n };\n }\n\n private async componentsDiff(\n ids: ComponentID[],\n version: string | null | undefined,\n toVersion: string | null | undefined,\n diffOpts: DiffOptions\n ): Promise<DiffResults[]> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer = this.workspace?.consumer;\n const components = await this.workspace.getMany(ids);\n if (!components.length) throw new BitError('failed loading the components');\n\n const getResults = (): Promise<DiffResults[]> => {\n if (version && toVersion) {\n return Promise.all(ids.map((id) => getComponentDiffBetweenVersions(id)));\n }\n if (version) {\n return Promise.all(components.map((component) => getComponentDiffOfVersion(component)));\n }\n return Promise.all(components.map((component) => getComponentDiff(component)));\n };\n const componentsDiffResults = await getResults();\n return componentsDiffResults;\n\n async function getComponentDiffOfVersion(component: Component): Promise<DiffResults> {\n if (!version) throw new Error('getComponentDiffOfVersion expects to get version');\n const consumerComponent = component.state._consumer as ConsumerComponent;\n const diffResult: DiffResults = { id: component.id, hasDiff: false };\n const modelComponent = await consumer.scope.getModelComponentIfExist(component.id);\n if (!modelComponent) {\n throw new BitError(`component ${component.id.toString()} doesn't have any version yet`);\n }\n const repository = consumer.scope.objects;\n const fromVersionObject: Version = await modelComponent.loadVersion(version, repository);\n const versionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const fsFiles = consumerComponent.files;\n // version must be defined as the component.componentFromModel do exist\n const versionB: string = component.id.version;\n // this function gets called only when version is set\n diffResult.filesDiff = await getFilesDiff(versionFiles, fsFiles, version, versionB);\n const fromVersionComponent = await modelComponent.toConsumerComponent(version, consumer.scope.name, repository);\n await updateFieldsDiff(fromVersionComponent, consumerComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n\n async function getComponentDiffBetweenVersions(id: ComponentID): Promise<DiffResults> {\n if (!version || !toVersion)\n throw new Error('getComponentDiffBetweenVersions expects to get version and toVersion');\n const diffResult: DiffResults = { id, hasDiff: false };\n const modelComponent = await consumer.scope.getModelComponentIfExist(id);\n if (!modelComponent) {\n throw new BitError(`component ${id.toString()} doesn't have any version yet`);\n }\n const repository = consumer.scope.objects;\n\n const fromVersionObject: Version = await modelComponent.loadVersion(version, repository);\n const toVersionObject: Version = await modelComponent.loadVersion(toVersion, repository);\n const fromVersionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const toVersionFiles = await toVersionObject.modelFilesToSourceFiles(repository);\n diffResult.filesDiff = await getFilesDiff(fromVersionFiles, toVersionFiles, version, toVersion);\n const fromVersionComponent = await modelComponent.toConsumerComponent(version, consumer.scope.name, repository);\n const toVersionComponent = await modelComponent.toConsumerComponent(toVersion, consumer.scope.name, repository);\n await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n\n async function getComponentDiff(component: Component): Promise<DiffResults> {\n const diffResult: DiffResults = { id: component.id, hasDiff: false };\n const consumerComponent = component.state._consumer as ConsumerComponent;\n if (!consumerComponent.componentFromModel) {\n if (component.isDeleted()) {\n // component exists in the model but not in the filesystem, show all files as deleted\n // the reason it is loaded without componentFromModel is because it was loaded from the scope, not workspace.\n // as a proof, consumerComponent.loadedFromFileSystem is false.\n const modelFiles = consumerComponent.files;\n diffResult.filesDiff = await getFilesDiff(modelFiles, [], component.id.version, component.id.version);\n if (hasDiff(diffResult)) diffResult.hasDiff = true;\n return diffResult;\n }\n // it's a new component. not modified. show all files as new.\n const fsFiles = consumerComponent.files;\n diffResult.filesDiff = await getFilesDiff([], fsFiles, component.id.version, component.id.version);\n if (hasDiff(diffResult)) diffResult.hasDiff = true;\n return diffResult;\n }\n const modelFiles = consumerComponent.componentFromModel.files;\n const fsFiles = consumerComponent.files;\n diffResult.filesDiff = await getFilesDiff(modelFiles, fsFiles, component.id.version, component.id.version);\n await updateFieldsDiff(consumerComponent.componentFromModel, consumerComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n }\n\n async diffBetweenVersionsObjects(\n modelComponent: ModelComponent,\n fromVersionObject: Version,\n toVersionObject: Version,\n fromVersion: string,\n toVersion: string,\n diffOpts: DiffOptions\n ) {\n const diffResult: DiffResults = { id: modelComponent.toComponentId(), hasDiff: false };\n const scope = this.scope.legacyScope;\n const repository = scope.objects;\n const fromVersionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const toVersionFiles = await toVersionObject.modelFilesToSourceFiles(repository);\n const color = diffOpts.color ?? true;\n diffResult.filesDiff = await getFilesDiff(\n fromVersionFiles,\n toVersionFiles,\n fromVersion,\n toVersion,\n undefined,\n color\n );\n const fromVersionComponent = await modelComponent.toConsumerComponent(\n fromVersionObject.hash().toString(),\n scope.name,\n repository\n );\n const toVersionComponent = await modelComponent.toConsumerComponent(\n toVersionObject.hash().toString(),\n scope.name,\n repository\n );\n await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);\n return diffResult;\n }\n\n static slots = [];\n static dependencies = [\n GraphqlAspect,\n ComponentAspect,\n ScopeAspect,\n LoggerAspect,\n CLIAspect,\n WorkspaceAspect,\n TesterAspect,\n DependencyResolverAspect,\n ImporterAspect,\n ];\n static runtime = MainRuntime;\n static async provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver, importer]: [\n GraphqlMain,\n ComponentMain,\n ScopeMain,\n LoggerMain,\n CLIMain,\n Workspace,\n TesterMain,\n DependencyResolverMain,\n ImporterMain\n ]) {\n const logger = loggerMain.createLogger(ComponentCompareAspect.id);\n const componentCompareMain = new ComponentCompareMain(\n component,\n scope,\n logger,\n tester,\n depResolver,\n importer,\n workspace\n );\n cli.register(new DiffCmd(componentCompareMain));\n graphql.register(componentCompareSchema(componentCompareMain));\n return componentCompareMain;\n }\n}\n\nfunction hasDiff(diffResult: DiffResults): boolean {\n return !!((diffResult.filesDiff && diffResult.filesDiff.find((file) => file.diffOutput)) || diffResult.fieldsDiff);\n}\n\nasync function updateFieldsDiff(\n componentA: ConsumerComponent,\n componentB: ConsumerComponent,\n diffResult: DiffResults,\n diffOpts: DiffOptions\n) {\n diffResult.fieldsDiff = await diffBetweenComponentsObjects(componentA, componentB, diffOpts);\n diffResult.hasDiff = hasDiff(diffResult);\n}\n\nComponentCompareAspect.addRuntime(ComponentCompareMain);\n\nexport default ComponentCompareMain;\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAA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CAACrK,oBAAoB,CAAC;AAAC,IAAAsK,QAAA,GAAAhB,OAAA,CAAAiB,OAAA,GAEzCvK,oBAAoB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_bitError","_workspace","_componentId","_scope","_graphql","_builder","_dependencyResolver","_logger","_componentsDiff","_componentsObjectDiff","_tester","_component","_componentCompare","_componentCompare2","_diffCmd","_importer","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","ComponentCompareMain","constructor","componentAspect","scope","logger","tester","depResolver","importer","workspace","compare","baseIdStr","compareIdStr","host","getHost","baseCompId","compareCompId","resolveMultipleComponentIds","modelComponent","legacyScope","getModelComponentIfExist","BitError","toString","importObjectsFromMainIfExist","cache","baseVersion","version","compareVersion","repository","objects","baseVersionObject","loadVersion","compareVersionObject","diff","diffBetweenVersionsObjects","baseComponent","get","compareComponent","baseTestFiles","getTestFiles","map","file","relative","compareTestFiles","allTestFiles","testFilesDiff","filesDiff","filter","fileDiff","includes","filePath","status","compareResult","id","code","fields","fieldsDiff","tests","diffByCLIValues","pattern","toVersion","verbose","table","OutsideWorkspaceError","ids","idsByPattern","listTagPendingIds","consumer","length","diffResults","componentsDiff","formatDepsAsTable","onDestroy","getConfigForDiffById","componentId","resolveComponentId","component","Error","getConfigForDiffByCompObject","depData","getDependencies","serializedToString","dep","idWithoutVersion","__type","split","lifecycle","source","serializeAndSort","deps","serialized","serialize","sort","serializeAspect","comp","aspects","state","withoutEntries","BuilderAspect","DependencyResolverAspect","toLegacy","sortById","toConfigObject","dependencies","diffOpts","components","getMany","getResults","Promise","all","getComponentDiffBetweenVersions","getComponentDiffOfVersion","getComponentDiff","componentsDiffResults","consumerComponent","_consumer","diffResult","hasDiff","idList","ComponentIdList","fromArray","changeVersion","scopeImporter","importWithoutDeps","reason","fromVersionObject","versionFiles","modelFilesToSourceFiles","fsFiles","files","versionB","getFilesDiff","fromVersionComponent","toConsumerComponent","name","updateFieldsDiff","toVersionObject","fromVersionFiles","toVersionFiles","toVersionComponent","componentFromModel","isDeleted","modelFiles","fromVersion","toComponentId","color","undefined","hash","provider","graphql","loggerMain","cli","createLogger","ComponentCompareAspect","componentCompareMain","register","DiffCmd","componentCompareSchema","exports","GraphqlAspect","ComponentAspect","ScopeAspect","LoggerAspect","CLIAspect","WorkspaceAspect","TesterAspect","ImporterAspect","MainRuntime","find","diffOutput","componentA","componentB","diffBetweenComponentsObjects","addRuntime","_default","default"],"sources":["component-compare.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { BitError } from '@teambit/bit-error';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { BuilderAspect } from '@teambit/builder';\nimport { ModelComponent, Version } from '@teambit/legacy/dist/scope/models';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport {\n DependencyResolverAspect,\n DependencyList,\n DependencyResolverMain,\n SerializedDependency,\n} from '@teambit/dependency-resolver';\nimport { LoggerAspect, LoggerMain, Logger } from '@teambit/logger';\nimport {\n DiffOptions,\n DiffResults,\n FieldsDiff,\n FileDiff,\n getFilesDiff,\n} from '@teambit/legacy/dist/consumer/component-ops/components-diff';\nimport { diffBetweenComponentsObjects } from '@teambit/legacy/dist/consumer/component-ops/components-object-diff';\nimport { TesterMain, TesterAspect } from '@teambit/tester';\nimport { ComponentAspect, Component, ComponentMain } from '@teambit/component';\nimport { componentCompareSchema } from './component-compare.graphql';\nimport { ComponentCompareAspect } from './component-compare.aspect';\nimport { DiffCmd } from './diff-cmd';\nimport { ImporterAspect, ImporterMain } from '@teambit/importer';\n\nexport type ComponentCompareResult = {\n id: string;\n code: FileDiff[];\n fields: FieldsDiff[];\n tests: FileDiff[];\n};\n\ntype ConfigDiff = {\n version?: string;\n dependencies?: string[];\n aspects?: Record<string, any>;\n};\n\nexport class ComponentCompareMain {\n constructor(\n private componentAspect: ComponentMain,\n private scope: ScopeMain,\n private logger: Logger,\n private tester: TesterMain,\n private depResolver: DependencyResolverMain,\n private importer: ImporterMain,\n private workspace?: Workspace\n ) {}\n\n async compare(baseIdStr: string, compareIdStr: string): Promise<ComponentCompareResult> {\n const host = this.componentAspect.getHost();\n const [baseCompId, compareCompId] = await host.resolveMultipleComponentIds([baseIdStr, compareIdStr]);\n const modelComponent = await this.scope.legacyScope.getModelComponentIfExist(compareCompId);\n\n if (!modelComponent) {\n throw new BitError(`component ${compareCompId.toString()} doesn't have any version yet`);\n }\n\n // import missing components that might be on main\n await this.importer.importObjectsFromMainIfExist([baseCompId, compareCompId], {\n cache: true,\n });\n\n const baseVersion = baseCompId.version as string;\n const compareVersion = compareCompId.version as string;\n\n const repository = this.scope.legacyScope.objects;\n const baseVersionObject = await modelComponent.loadVersion(baseVersion, repository);\n const compareVersionObject = await modelComponent.loadVersion(compareVersion, repository);\n\n const diff: DiffResults = await this.diffBetweenVersionsObjects(\n modelComponent,\n baseVersionObject,\n compareVersionObject,\n baseVersion,\n compareVersion,\n {}\n );\n\n const baseComponent = await host.get(baseCompId);\n const compareComponent = await host.get(compareCompId);\n\n const baseTestFiles =\n (baseComponent && (await this.tester.getTestFiles(baseComponent).map((file) => file.relative))) || [];\n const compareTestFiles =\n (compareComponent && (await this.tester.getTestFiles(compareComponent).map((file) => file.relative))) || [];\n\n const allTestFiles = [...baseTestFiles, ...compareTestFiles];\n\n const testFilesDiff = (diff.filesDiff || []).filter(\n (fileDiff: FileDiff) => allTestFiles.includes(fileDiff.filePath) && fileDiff.status !== 'UNCHANGED'\n );\n\n const compareResult = {\n id: `${baseCompId}-${compareCompId}`,\n code: diff.filesDiff || [],\n fields: diff.fieldsDiff || [],\n tests: testFilesDiff,\n };\n\n return compareResult;\n }\n\n async diffByCLIValues(\n pattern?: string,\n version?: string,\n toVersion?: string,\n { verbose, table }: { verbose?: boolean; table?: boolean } = {}\n ): Promise<any> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const ids = pattern ? await this.workspace.idsByPattern(pattern) : await this.workspace.listTagPendingIds();\n const consumer = this.workspace.consumer;\n if (!ids.length) {\n return [];\n }\n const diffResults = await this.componentsDiff(ids, version, toVersion, {\n verbose,\n formatDepsAsTable: table,\n });\n await consumer.onDestroy('diff');\n return diffResults;\n }\n\n async getConfigForDiffById(id: string): Promise<ConfigDiff> {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const componentId = await workspace.resolveComponentId(id);\n const component = await workspace.scope.get(componentId, false);\n if (!component) throw new Error(`getConfigForDiff: unable to find component ${id} in local scope`);\n return this.getConfigForDiffByCompObject(component);\n }\n\n async getConfigForDiffByCompObject(component: Component) {\n const depData = this.depResolver.getDependencies(component);\n const serializedToString = (dep: SerializedDependency) => {\n const idWithoutVersion = dep.__type === 'package' ? dep.id : dep.id.split('@')[0];\n return `${idWithoutVersion}@${dep.version} (${dep.lifecycle}) ${dep.source ? `(${dep.source})` : ''}`;\n };\n const serializeAndSort = (deps: DependencyList) => {\n const serialized = deps.serialize().map(serializedToString);\n return serialized.sort();\n };\n const serializeAspect = (comp: Component) => {\n const aspects = comp.state.aspects.withoutEntries([BuilderAspect.id, DependencyResolverAspect.id]);\n // return aspects.serialize();\n return aspects.toLegacy().sortById().toConfigObject();\n };\n return {\n version: component.id.version,\n dependencies: serializeAndSort(depData),\n aspects: serializeAspect(component),\n };\n }\n\n private async componentsDiff(\n ids: ComponentID[],\n version: string | null | undefined,\n toVersion: string | null | undefined,\n diffOpts: DiffOptions\n ): Promise<DiffResults[]> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer = this.workspace?.consumer;\n const components = await this.workspace.getMany(ids);\n if (!components.length) throw new BitError('failed loading the components');\n\n const getResults = (): Promise<DiffResults[]> => {\n if (version && toVersion) {\n return Promise.all(ids.map((id) => getComponentDiffBetweenVersions(id)));\n }\n if (version) {\n return Promise.all(components.map((component) => getComponentDiffOfVersion(component)));\n }\n return Promise.all(components.map((component) => getComponentDiff(component)));\n };\n const componentsDiffResults = await getResults();\n return componentsDiffResults;\n\n async function getComponentDiffOfVersion(component: Component): Promise<DiffResults> {\n if (!version) throw new Error('getComponentDiffOfVersion expects to get version');\n const consumerComponent = component.state._consumer as ConsumerComponent;\n const diffResult: DiffResults = { id: component.id, hasDiff: false };\n const modelComponent = await consumer.scope.getModelComponentIfExist(component.id);\n if (!modelComponent) {\n throw new BitError(`component ${component.id.toString()} doesn't have any version yet`);\n }\n const repository = consumer.scope.objects;\n const idList = ComponentIdList.fromArray([component.id.changeVersion(version)]);\n await consumer.scope.scopeImporter.importWithoutDeps(idList, { cache: true, reason: 'to show diff' });\n const fromVersionObject: Version = await modelComponent.loadVersion(version, repository);\n const versionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const fsFiles = consumerComponent.files;\n // version must be defined as the component.componentFromModel do exist\n const versionB: string = component.id.version;\n // this function gets called only when version is set\n diffResult.filesDiff = await getFilesDiff(versionFiles, fsFiles, version, versionB);\n const fromVersionComponent = await modelComponent.toConsumerComponent(version, consumer.scope.name, repository);\n await updateFieldsDiff(fromVersionComponent, consumerComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n\n async function getComponentDiffBetweenVersions(id: ComponentID): Promise<DiffResults> {\n if (!version || !toVersion)\n throw new Error('getComponentDiffBetweenVersions expects to get version and toVersion');\n const diffResult: DiffResults = { id, hasDiff: false };\n const modelComponent = await consumer.scope.getModelComponentIfExist(id);\n if (!modelComponent) {\n throw new BitError(`component ${id.toString()} doesn't have any version yet`);\n }\n const repository = consumer.scope.objects;\n const idList = ComponentIdList.fromArray([id.changeVersion(version), id.changeVersion(toVersion)]);\n await consumer.scope.scopeImporter.importWithoutDeps(idList, { cache: true, reason: 'to show diff' });\n const fromVersionObject: Version = await modelComponent.loadVersion(version, repository);\n const toVersionObject: Version = await modelComponent.loadVersion(toVersion, repository);\n const fromVersionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const toVersionFiles = await toVersionObject.modelFilesToSourceFiles(repository);\n diffResult.filesDiff = await getFilesDiff(fromVersionFiles, toVersionFiles, version, toVersion);\n const fromVersionComponent = await modelComponent.toConsumerComponent(version, consumer.scope.name, repository);\n const toVersionComponent = await modelComponent.toConsumerComponent(toVersion, consumer.scope.name, repository);\n await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n\n async function getComponentDiff(component: Component): Promise<DiffResults> {\n const diffResult: DiffResults = { id: component.id, hasDiff: false };\n const consumerComponent = component.state._consumer as ConsumerComponent;\n if (!consumerComponent.componentFromModel) {\n if (component.isDeleted()) {\n // component exists in the model but not in the filesystem, show all files as deleted\n // the reason it is loaded without componentFromModel is because it was loaded from the scope, not workspace.\n // as a proof, consumerComponent.loadedFromFileSystem is false.\n const modelFiles = consumerComponent.files;\n diffResult.filesDiff = await getFilesDiff(modelFiles, [], component.id.version, component.id.version);\n if (hasDiff(diffResult)) diffResult.hasDiff = true;\n return diffResult;\n }\n // it's a new component. not modified. show all files as new.\n const fsFiles = consumerComponent.files;\n diffResult.filesDiff = await getFilesDiff([], fsFiles, component.id.version, component.id.version);\n if (hasDiff(diffResult)) diffResult.hasDiff = true;\n return diffResult;\n }\n const modelFiles = consumerComponent.componentFromModel.files;\n const fsFiles = consumerComponent.files;\n diffResult.filesDiff = await getFilesDiff(modelFiles, fsFiles, component.id.version, component.id.version);\n await updateFieldsDiff(consumerComponent.componentFromModel, consumerComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n }\n\n async diffBetweenVersionsObjects(\n modelComponent: ModelComponent,\n fromVersionObject: Version,\n toVersionObject: Version,\n fromVersion: string,\n toVersion: string,\n diffOpts: DiffOptions\n ) {\n const diffResult: DiffResults = { id: modelComponent.toComponentId(), hasDiff: false };\n const scope = this.scope.legacyScope;\n const repository = scope.objects;\n const fromVersionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const toVersionFiles = await toVersionObject.modelFilesToSourceFiles(repository);\n const color = diffOpts.color ?? true;\n diffResult.filesDiff = await getFilesDiff(\n fromVersionFiles,\n toVersionFiles,\n fromVersion,\n toVersion,\n undefined,\n color\n );\n const fromVersionComponent = await modelComponent.toConsumerComponent(\n fromVersionObject.hash().toString(),\n scope.name,\n repository\n );\n const toVersionComponent = await modelComponent.toConsumerComponent(\n toVersionObject.hash().toString(),\n scope.name,\n repository\n );\n await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);\n return diffResult;\n }\n\n static slots = [];\n static dependencies = [\n GraphqlAspect,\n ComponentAspect,\n ScopeAspect,\n LoggerAspect,\n CLIAspect,\n WorkspaceAspect,\n TesterAspect,\n DependencyResolverAspect,\n ImporterAspect,\n ];\n static runtime = MainRuntime;\n static async provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver, importer]: [\n GraphqlMain,\n ComponentMain,\n ScopeMain,\n LoggerMain,\n CLIMain,\n Workspace,\n TesterMain,\n DependencyResolverMain,\n ImporterMain\n ]) {\n const logger = loggerMain.createLogger(ComponentCompareAspect.id);\n const componentCompareMain = new ComponentCompareMain(\n component,\n scope,\n logger,\n tester,\n depResolver,\n importer,\n workspace\n );\n cli.register(new DiffCmd(componentCompareMain));\n graphql.register(componentCompareSchema(componentCompareMain));\n return componentCompareMain;\n }\n}\n\nfunction hasDiff(diffResult: DiffResults): boolean {\n return !!((diffResult.filesDiff && diffResult.filesDiff.find((file) => file.diffOutput)) || diffResult.fieldsDiff);\n}\n\nasync function updateFieldsDiff(\n componentA: ConsumerComponent,\n componentB: ConsumerComponent,\n diffResult: DiffResults,\n diffOpts: DiffOptions\n) {\n diffResult.fieldsDiff = await diffBetweenComponentsObjects(componentA, componentB, diffOpts);\n diffResult.hasDiff = hasDiff(diffResult);\n}\n\nComponentCompareAspect.addRuntime(ComponentCompareMain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/teambit.component_component-compare@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-compare@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-compare@1.0.266/dist/component-compare.compositions.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-compare@1.0.266/dist/component-compare.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/component-compare",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.266",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/component/component-compare",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "component-compare",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.266"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"graphql-tag": "2.12.1",
|
|
@@ -19,20 +19,20 @@
|
|
|
19
19
|
"@teambit/component-id": "1.2.0",
|
|
20
20
|
"@teambit/component.ui.component-compare.compare-aspects.compare-aspects": "0.0.146",
|
|
21
21
|
"@teambit/component.ui.component-compare.models.component-compare-props": "0.0.105",
|
|
22
|
-
"@teambit/component": "1.0.
|
|
23
|
-
"@teambit/builder": "1.0.
|
|
22
|
+
"@teambit/component": "1.0.266",
|
|
23
|
+
"@teambit/builder": "1.0.266",
|
|
24
24
|
"@teambit/cli": "0.0.863",
|
|
25
|
-
"@teambit/dependency-resolver": "1.0.
|
|
26
|
-
"@teambit/graphql": "1.0.
|
|
27
|
-
"@teambit/importer": "1.0.
|
|
25
|
+
"@teambit/dependency-resolver": "1.0.266",
|
|
26
|
+
"@teambit/graphql": "1.0.266",
|
|
27
|
+
"@teambit/importer": "1.0.266",
|
|
28
28
|
"@teambit/logger": "0.0.956",
|
|
29
|
-
"@teambit/scope": "1.0.
|
|
30
|
-
"@teambit/tester": "1.0.
|
|
31
|
-
"@teambit/workspace": "1.0.
|
|
29
|
+
"@teambit/scope": "1.0.266",
|
|
30
|
+
"@teambit/tester": "1.0.266",
|
|
31
|
+
"@teambit/workspace": "1.0.266",
|
|
32
32
|
"@teambit/component.ui.component-compare.changelog": "0.0.181",
|
|
33
33
|
"@teambit/component.ui.component-compare.component-compare": "0.0.182",
|
|
34
34
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.508",
|
|
35
|
-
"@teambit/ui": "1.0.
|
|
35
|
+
"@teambit/ui": "1.0.266"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/lodash.flatten": "4.4.6",
|