@teambit/component 1.0.173 → 1.0.174
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/static/css/teambit.component/{component-preview.f9f484f7.css → component-preview.ce7d0a74.css} +2 -2
- package/artifacts/preview/teambit_component_component-preview.js +1 -1
- package/artifacts/schema.json +150 -50
- package/dist/component.d.ts +6 -1
- package/dist/component.js +12 -1
- package/dist/component.js.map +1 -1
- package/dist/preview-1708958940676.js +7 -0
- package/package.json +18 -18
- package/dist/preview-1708466611462.js +0 -7
package/artifacts/schema.json
CHANGED
|
@@ -1548,8 +1548,8 @@
|
|
|
1548
1548
|
"line": 293,
|
|
1549
1549
|
"character": 3
|
|
1550
1550
|
},
|
|
1551
|
-
"raw": "/**\n * id.version can be either a
|
|
1552
|
-
"comment": "id.version can be either a
|
|
1551
|
+
"raw": "/**\n * id.version can be either a tag or a hash.\n * if it's a hash, it may have a tag point to it. if it does, return the tag.\n */",
|
|
1552
|
+
"comment": "id.version can be either a tag or a hash.\nif it's a hash, it may have a tag point to it. if it does, return the tag."
|
|
1553
1553
|
},
|
|
1554
1554
|
"signature": "(method) Component.getTag(): Tag | undefined",
|
|
1555
1555
|
"name": "getTag",
|
|
@@ -1598,6 +1598,56 @@
|
|
|
1598
1598
|
"line": 303,
|
|
1599
1599
|
"character": 3
|
|
1600
1600
|
},
|
|
1601
|
+
"raw": "/**\n * id.version can be either a tag or a hash.\n * if it's a tag, find the hash it points to.\n */",
|
|
1602
|
+
"comment": "id.version can be either a tag or a hash.\nif it's a tag, find the hash it points to."
|
|
1603
|
+
},
|
|
1604
|
+
"signature": "(method) Component.getSnapHash(): string | undefined",
|
|
1605
|
+
"name": "getSnapHash",
|
|
1606
|
+
"params": [],
|
|
1607
|
+
"returnType": {
|
|
1608
|
+
"__schema": "TypeUnionSchema",
|
|
1609
|
+
"location": {
|
|
1610
|
+
"filePath": "component.ts",
|
|
1611
|
+
"line": 307,
|
|
1612
|
+
"character": 18
|
|
1613
|
+
},
|
|
1614
|
+
"types": [
|
|
1615
|
+
{
|
|
1616
|
+
"__schema": "KeywordTypeSchema",
|
|
1617
|
+
"location": {
|
|
1618
|
+
"filePath": "component.ts",
|
|
1619
|
+
"line": 307,
|
|
1620
|
+
"character": 18
|
|
1621
|
+
},
|
|
1622
|
+
"name": "string"
|
|
1623
|
+
},
|
|
1624
|
+
{
|
|
1625
|
+
"__schema": "KeywordTypeSchema",
|
|
1626
|
+
"location": {
|
|
1627
|
+
"filePath": "component.ts",
|
|
1628
|
+
"line": 307,
|
|
1629
|
+
"character": 27
|
|
1630
|
+
},
|
|
1631
|
+
"name": "undefined"
|
|
1632
|
+
}
|
|
1633
|
+
]
|
|
1634
|
+
},
|
|
1635
|
+
"modifiers": []
|
|
1636
|
+
},
|
|
1637
|
+
{
|
|
1638
|
+
"__schema": "FunctionLikeSchema",
|
|
1639
|
+
"location": {
|
|
1640
|
+
"filePath": "component.ts",
|
|
1641
|
+
"line": 318,
|
|
1642
|
+
"character": 3
|
|
1643
|
+
},
|
|
1644
|
+
"doc": {
|
|
1645
|
+
"__schema": "DocSchema",
|
|
1646
|
+
"location": {
|
|
1647
|
+
"filePath": "component.ts",
|
|
1648
|
+
"line": 314,
|
|
1649
|
+
"character": 3
|
|
1650
|
+
},
|
|
1601
1651
|
"raw": "/**\n * checkout the component to a different version in its working tree.\n */",
|
|
1602
1652
|
"comment": "checkout the component to a different version in its working tree."
|
|
1603
1653
|
},
|
|
@@ -1608,7 +1658,7 @@
|
|
|
1608
1658
|
"__schema": "ParameterSchema",
|
|
1609
1659
|
"location": {
|
|
1610
1660
|
"filePath": "component.ts",
|
|
1611
|
-
"line":
|
|
1661
|
+
"line": 318,
|
|
1612
1662
|
"character": 12
|
|
1613
1663
|
},
|
|
1614
1664
|
"name": "version",
|
|
@@ -1616,7 +1666,7 @@
|
|
|
1616
1666
|
"__schema": "TypeRefSchema",
|
|
1617
1667
|
"location": {
|
|
1618
1668
|
"filePath": "component.ts",
|
|
1619
|
-
"line":
|
|
1669
|
+
"line": 318,
|
|
1620
1670
|
"character": 21
|
|
1621
1671
|
},
|
|
1622
1672
|
"name": "SemVer"
|
|
@@ -1629,7 +1679,7 @@
|
|
|
1629
1679
|
"__schema": "InferenceTypeSchema",
|
|
1630
1680
|
"location": {
|
|
1631
1681
|
"filePath": "component.ts",
|
|
1632
|
-
"line":
|
|
1682
|
+
"line": 318,
|
|
1633
1683
|
"character": 3
|
|
1634
1684
|
},
|
|
1635
1685
|
"type": "void"
|
|
@@ -1640,14 +1690,14 @@
|
|
|
1640
1690
|
"__schema": "FunctionLikeSchema",
|
|
1641
1691
|
"location": {
|
|
1642
1692
|
"filePath": "component.ts",
|
|
1643
|
-
"line":
|
|
1693
|
+
"line": 336,
|
|
1644
1694
|
"character": 3
|
|
1645
1695
|
},
|
|
1646
1696
|
"doc": {
|
|
1647
1697
|
"__schema": "DocSchema",
|
|
1648
1698
|
"location": {
|
|
1649
1699
|
"filePath": "component.ts",
|
|
1650
|
-
"line":
|
|
1700
|
+
"line": 320,
|
|
1651
1701
|
"character": 3
|
|
1652
1702
|
},
|
|
1653
1703
|
"raw": "/**\n * examine difference between two components.\n */",
|
|
@@ -1660,7 +1710,7 @@
|
|
|
1660
1710
|
"__schema": "ParameterSchema",
|
|
1661
1711
|
"location": {
|
|
1662
1712
|
"filePath": "component.ts",
|
|
1663
|
-
"line":
|
|
1713
|
+
"line": 336,
|
|
1664
1714
|
"character": 9
|
|
1665
1715
|
},
|
|
1666
1716
|
"name": "path",
|
|
@@ -1668,7 +1718,7 @@
|
|
|
1668
1718
|
"__schema": "KeywordTypeSchema",
|
|
1669
1719
|
"location": {
|
|
1670
1720
|
"filePath": "component.ts",
|
|
1671
|
-
"line":
|
|
1721
|
+
"line": 336,
|
|
1672
1722
|
"character": 15
|
|
1673
1723
|
},
|
|
1674
1724
|
"name": "string"
|
|
@@ -1680,7 +1730,7 @@
|
|
|
1680
1730
|
"__schema": "ParameterSchema",
|
|
1681
1731
|
"location": {
|
|
1682
1732
|
"filePath": "component.ts",
|
|
1683
|
-
"line":
|
|
1733
|
+
"line": 336,
|
|
1684
1734
|
"character": 23
|
|
1685
1735
|
},
|
|
1686
1736
|
"name": "fs",
|
|
@@ -1688,7 +1738,7 @@
|
|
|
1688
1738
|
"__schema": "TypeRefSchema",
|
|
1689
1739
|
"location": {
|
|
1690
1740
|
"filePath": "component.ts",
|
|
1691
|
-
"line":
|
|
1741
|
+
"line": 336,
|
|
1692
1742
|
"character": 28
|
|
1693
1743
|
},
|
|
1694
1744
|
"name": "AnyFS"
|
|
@@ -1701,7 +1751,7 @@
|
|
|
1701
1751
|
"__schema": "InferenceTypeSchema",
|
|
1702
1752
|
"location": {
|
|
1703
1753
|
"filePath": "component.ts",
|
|
1704
|
-
"line":
|
|
1754
|
+
"line": 336,
|
|
1705
1755
|
"character": 3
|
|
1706
1756
|
},
|
|
1707
1757
|
"type": "void"
|
|
@@ -1712,14 +1762,14 @@
|
|
|
1712
1762
|
"__schema": "FunctionLikeSchema",
|
|
1713
1763
|
"location": {
|
|
1714
1764
|
"filePath": "component.ts",
|
|
1715
|
-
"line":
|
|
1765
|
+
"line": 346,
|
|
1716
1766
|
"character": 3
|
|
1717
1767
|
},
|
|
1718
1768
|
"doc": {
|
|
1719
1769
|
"__schema": "DocSchema",
|
|
1720
1770
|
"location": {
|
|
1721
1771
|
"filePath": "component.ts",
|
|
1722
|
-
"line":
|
|
1772
|
+
"line": 338,
|
|
1723
1773
|
"character": 3
|
|
1724
1774
|
},
|
|
1725
1775
|
"raw": "/**\n *\n * Check if 2 components are equal\n * @param {Component} component\n * @returns {boolean}\n * @memberof Component\n */",
|
|
@@ -1729,7 +1779,7 @@
|
|
|
1729
1779
|
"__schema": "PropertyLikeTagSchema",
|
|
1730
1780
|
"location": {
|
|
1731
1781
|
"filePath": "component.ts",
|
|
1732
|
-
"line":
|
|
1782
|
+
"line": 341,
|
|
1733
1783
|
"character": 6
|
|
1734
1784
|
},
|
|
1735
1785
|
"name": "component",
|
|
@@ -1738,7 +1788,7 @@
|
|
|
1738
1788
|
"__schema": "TypeRefSchema",
|
|
1739
1789
|
"location": {
|
|
1740
1790
|
"filePath": "component.ts",
|
|
1741
|
-
"line":
|
|
1791
|
+
"line": 341,
|
|
1742
1792
|
"character": 14
|
|
1743
1793
|
},
|
|
1744
1794
|
"name": "Component"
|
|
@@ -1748,7 +1798,7 @@
|
|
|
1748
1798
|
"__schema": "ReturnTagSchema",
|
|
1749
1799
|
"location": {
|
|
1750
1800
|
"filePath": "component.ts",
|
|
1751
|
-
"line":
|
|
1801
|
+
"line": 342,
|
|
1752
1802
|
"character": 6
|
|
1753
1803
|
},
|
|
1754
1804
|
"tagName": "return",
|
|
@@ -1756,7 +1806,7 @@
|
|
|
1756
1806
|
"__schema": "KeywordTypeSchema",
|
|
1757
1807
|
"location": {
|
|
1758
1808
|
"filePath": "component.ts",
|
|
1759
|
-
"line":
|
|
1809
|
+
"line": 342,
|
|
1760
1810
|
"character": 16
|
|
1761
1811
|
},
|
|
1762
1812
|
"name": "boolean"
|
|
@@ -1766,7 +1816,7 @@
|
|
|
1766
1816
|
"__schema": "TagSchema",
|
|
1767
1817
|
"location": {
|
|
1768
1818
|
"filePath": "component.ts",
|
|
1769
|
-
"line":
|
|
1819
|
+
"line": 343,
|
|
1770
1820
|
"character": 6
|
|
1771
1821
|
},
|
|
1772
1822
|
"tagName": "memberof",
|
|
@@ -1781,7 +1831,7 @@
|
|
|
1781
1831
|
"__schema": "ParameterSchema",
|
|
1782
1832
|
"location": {
|
|
1783
1833
|
"filePath": "component.ts",
|
|
1784
|
-
"line":
|
|
1834
|
+
"line": 346,
|
|
1785
1835
|
"character": 10
|
|
1786
1836
|
},
|
|
1787
1837
|
"name": "component",
|
|
@@ -1789,7 +1839,7 @@
|
|
|
1789
1839
|
"__schema": "TypeRefSchema",
|
|
1790
1840
|
"location": {
|
|
1791
1841
|
"filePath": "component.ts",
|
|
1792
|
-
"line":
|
|
1842
|
+
"line": 346,
|
|
1793
1843
|
"character": 21
|
|
1794
1844
|
},
|
|
1795
1845
|
"name": "Component"
|
|
@@ -1802,7 +1852,7 @@
|
|
|
1802
1852
|
"__schema": "KeywordTypeSchema",
|
|
1803
1853
|
"location": {
|
|
1804
1854
|
"filePath": "component.ts",
|
|
1805
|
-
"line":
|
|
1855
|
+
"line": 346,
|
|
1806
1856
|
"character": 33
|
|
1807
1857
|
},
|
|
1808
1858
|
"name": "boolean"
|
|
@@ -2372,7 +2422,7 @@
|
|
|
2372
2422
|
"_legacy": {
|
|
2373
2423
|
"scope": "teambit.component",
|
|
2374
2424
|
"name": "component",
|
|
2375
|
-
"version": "1.0.
|
|
2425
|
+
"version": "1.0.174"
|
|
2376
2426
|
},
|
|
2377
2427
|
"_scope": "teambit.component"
|
|
2378
2428
|
}
|
|
@@ -7901,7 +7951,7 @@
|
|
|
7901
7951
|
"_legacy": {
|
|
7902
7952
|
"scope": "teambit.component",
|
|
7903
7953
|
"name": "component",
|
|
7904
|
-
"version": "1.0.
|
|
7954
|
+
"version": "1.0.174"
|
|
7905
7955
|
},
|
|
7906
7956
|
"_scope": "teambit.component"
|
|
7907
7957
|
}
|
|
@@ -17551,8 +17601,8 @@
|
|
|
17551
17601
|
"line": 293,
|
|
17552
17602
|
"character": 3
|
|
17553
17603
|
},
|
|
17554
|
-
"raw": "/**\n * id.version can be either a
|
|
17555
|
-
"comment": "id.version can be either a
|
|
17604
|
+
"raw": "/**\n * id.version can be either a tag or a hash.\n * if it's a hash, it may have a tag point to it. if it does, return the tag.\n */",
|
|
17605
|
+
"comment": "id.version can be either a tag or a hash.\nif it's a hash, it may have a tag point to it. if it does, return the tag."
|
|
17556
17606
|
},
|
|
17557
17607
|
"signature": "(method) Component.getTag(): Tag | undefined",
|
|
17558
17608
|
"name": "getTag",
|
|
@@ -17601,6 +17651,56 @@
|
|
|
17601
17651
|
"line": 303,
|
|
17602
17652
|
"character": 3
|
|
17603
17653
|
},
|
|
17654
|
+
"raw": "/**\n * id.version can be either a tag or a hash.\n * if it's a tag, find the hash it points to.\n */",
|
|
17655
|
+
"comment": "id.version can be either a tag or a hash.\nif it's a tag, find the hash it points to."
|
|
17656
|
+
},
|
|
17657
|
+
"signature": "(method) Component.getSnapHash(): string | undefined",
|
|
17658
|
+
"name": "getSnapHash",
|
|
17659
|
+
"params": [],
|
|
17660
|
+
"returnType": {
|
|
17661
|
+
"__schema": "TypeUnionSchema",
|
|
17662
|
+
"location": {
|
|
17663
|
+
"filePath": "component.ts",
|
|
17664
|
+
"line": 307,
|
|
17665
|
+
"character": 18
|
|
17666
|
+
},
|
|
17667
|
+
"types": [
|
|
17668
|
+
{
|
|
17669
|
+
"__schema": "KeywordTypeSchema",
|
|
17670
|
+
"location": {
|
|
17671
|
+
"filePath": "component.ts",
|
|
17672
|
+
"line": 307,
|
|
17673
|
+
"character": 18
|
|
17674
|
+
},
|
|
17675
|
+
"name": "string"
|
|
17676
|
+
},
|
|
17677
|
+
{
|
|
17678
|
+
"__schema": "KeywordTypeSchema",
|
|
17679
|
+
"location": {
|
|
17680
|
+
"filePath": "component.ts",
|
|
17681
|
+
"line": 307,
|
|
17682
|
+
"character": 27
|
|
17683
|
+
},
|
|
17684
|
+
"name": "undefined"
|
|
17685
|
+
}
|
|
17686
|
+
]
|
|
17687
|
+
},
|
|
17688
|
+
"modifiers": []
|
|
17689
|
+
},
|
|
17690
|
+
{
|
|
17691
|
+
"__schema": "FunctionLikeSchema",
|
|
17692
|
+
"location": {
|
|
17693
|
+
"filePath": "component.ts",
|
|
17694
|
+
"line": 318,
|
|
17695
|
+
"character": 3
|
|
17696
|
+
},
|
|
17697
|
+
"doc": {
|
|
17698
|
+
"__schema": "DocSchema",
|
|
17699
|
+
"location": {
|
|
17700
|
+
"filePath": "component.ts",
|
|
17701
|
+
"line": 314,
|
|
17702
|
+
"character": 3
|
|
17703
|
+
},
|
|
17604
17704
|
"raw": "/**\n * checkout the component to a different version in its working tree.\n */",
|
|
17605
17705
|
"comment": "checkout the component to a different version in its working tree."
|
|
17606
17706
|
},
|
|
@@ -17611,7 +17711,7 @@
|
|
|
17611
17711
|
"__schema": "ParameterSchema",
|
|
17612
17712
|
"location": {
|
|
17613
17713
|
"filePath": "component.ts",
|
|
17614
|
-
"line":
|
|
17714
|
+
"line": 318,
|
|
17615
17715
|
"character": 12
|
|
17616
17716
|
},
|
|
17617
17717
|
"name": "version",
|
|
@@ -17619,7 +17719,7 @@
|
|
|
17619
17719
|
"__schema": "TypeRefSchema",
|
|
17620
17720
|
"location": {
|
|
17621
17721
|
"filePath": "component.ts",
|
|
17622
|
-
"line":
|
|
17722
|
+
"line": 318,
|
|
17623
17723
|
"character": 21
|
|
17624
17724
|
},
|
|
17625
17725
|
"name": "SemVer"
|
|
@@ -17632,7 +17732,7 @@
|
|
|
17632
17732
|
"__schema": "InferenceTypeSchema",
|
|
17633
17733
|
"location": {
|
|
17634
17734
|
"filePath": "component.ts",
|
|
17635
|
-
"line":
|
|
17735
|
+
"line": 318,
|
|
17636
17736
|
"character": 3
|
|
17637
17737
|
},
|
|
17638
17738
|
"type": "void"
|
|
@@ -17643,14 +17743,14 @@
|
|
|
17643
17743
|
"__schema": "FunctionLikeSchema",
|
|
17644
17744
|
"location": {
|
|
17645
17745
|
"filePath": "component.ts",
|
|
17646
|
-
"line":
|
|
17746
|
+
"line": 336,
|
|
17647
17747
|
"character": 3
|
|
17648
17748
|
},
|
|
17649
17749
|
"doc": {
|
|
17650
17750
|
"__schema": "DocSchema",
|
|
17651
17751
|
"location": {
|
|
17652
17752
|
"filePath": "component.ts",
|
|
17653
|
-
"line":
|
|
17753
|
+
"line": 320,
|
|
17654
17754
|
"character": 3
|
|
17655
17755
|
},
|
|
17656
17756
|
"raw": "/**\n * examine difference between two components.\n */",
|
|
@@ -17663,7 +17763,7 @@
|
|
|
17663
17763
|
"__schema": "ParameterSchema",
|
|
17664
17764
|
"location": {
|
|
17665
17765
|
"filePath": "component.ts",
|
|
17666
|
-
"line":
|
|
17766
|
+
"line": 336,
|
|
17667
17767
|
"character": 9
|
|
17668
17768
|
},
|
|
17669
17769
|
"name": "path",
|
|
@@ -17671,7 +17771,7 @@
|
|
|
17671
17771
|
"__schema": "KeywordTypeSchema",
|
|
17672
17772
|
"location": {
|
|
17673
17773
|
"filePath": "component.ts",
|
|
17674
|
-
"line":
|
|
17774
|
+
"line": 336,
|
|
17675
17775
|
"character": 15
|
|
17676
17776
|
},
|
|
17677
17777
|
"name": "string"
|
|
@@ -17683,7 +17783,7 @@
|
|
|
17683
17783
|
"__schema": "ParameterSchema",
|
|
17684
17784
|
"location": {
|
|
17685
17785
|
"filePath": "component.ts",
|
|
17686
|
-
"line":
|
|
17786
|
+
"line": 336,
|
|
17687
17787
|
"character": 23
|
|
17688
17788
|
},
|
|
17689
17789
|
"name": "fs",
|
|
@@ -17691,7 +17791,7 @@
|
|
|
17691
17791
|
"__schema": "TypeRefSchema",
|
|
17692
17792
|
"location": {
|
|
17693
17793
|
"filePath": "component.ts",
|
|
17694
|
-
"line":
|
|
17794
|
+
"line": 336,
|
|
17695
17795
|
"character": 28
|
|
17696
17796
|
},
|
|
17697
17797
|
"name": "AnyFS"
|
|
@@ -17704,7 +17804,7 @@
|
|
|
17704
17804
|
"__schema": "InferenceTypeSchema",
|
|
17705
17805
|
"location": {
|
|
17706
17806
|
"filePath": "component.ts",
|
|
17707
|
-
"line":
|
|
17807
|
+
"line": 336,
|
|
17708
17808
|
"character": 3
|
|
17709
17809
|
},
|
|
17710
17810
|
"type": "void"
|
|
@@ -17715,14 +17815,14 @@
|
|
|
17715
17815
|
"__schema": "FunctionLikeSchema",
|
|
17716
17816
|
"location": {
|
|
17717
17817
|
"filePath": "component.ts",
|
|
17718
|
-
"line":
|
|
17818
|
+
"line": 346,
|
|
17719
17819
|
"character": 3
|
|
17720
17820
|
},
|
|
17721
17821
|
"doc": {
|
|
17722
17822
|
"__schema": "DocSchema",
|
|
17723
17823
|
"location": {
|
|
17724
17824
|
"filePath": "component.ts",
|
|
17725
|
-
"line":
|
|
17825
|
+
"line": 338,
|
|
17726
17826
|
"character": 3
|
|
17727
17827
|
},
|
|
17728
17828
|
"raw": "/**\n *\n * Check if 2 components are equal\n * @param {Component} component\n * @returns {boolean}\n * @memberof Component\n */",
|
|
@@ -17732,7 +17832,7 @@
|
|
|
17732
17832
|
"__schema": "PropertyLikeTagSchema",
|
|
17733
17833
|
"location": {
|
|
17734
17834
|
"filePath": "component.ts",
|
|
17735
|
-
"line":
|
|
17835
|
+
"line": 341,
|
|
17736
17836
|
"character": 6
|
|
17737
17837
|
},
|
|
17738
17838
|
"name": "component",
|
|
@@ -17741,7 +17841,7 @@
|
|
|
17741
17841
|
"__schema": "TypeRefSchema",
|
|
17742
17842
|
"location": {
|
|
17743
17843
|
"filePath": "component.ts",
|
|
17744
|
-
"line":
|
|
17844
|
+
"line": 341,
|
|
17745
17845
|
"character": 14
|
|
17746
17846
|
},
|
|
17747
17847
|
"name": "Component"
|
|
@@ -17751,7 +17851,7 @@
|
|
|
17751
17851
|
"__schema": "ReturnTagSchema",
|
|
17752
17852
|
"location": {
|
|
17753
17853
|
"filePath": "component.ts",
|
|
17754
|
-
"line":
|
|
17854
|
+
"line": 342,
|
|
17755
17855
|
"character": 6
|
|
17756
17856
|
},
|
|
17757
17857
|
"tagName": "return",
|
|
@@ -17759,7 +17859,7 @@
|
|
|
17759
17859
|
"__schema": "KeywordTypeSchema",
|
|
17760
17860
|
"location": {
|
|
17761
17861
|
"filePath": "component.ts",
|
|
17762
|
-
"line":
|
|
17862
|
+
"line": 342,
|
|
17763
17863
|
"character": 16
|
|
17764
17864
|
},
|
|
17765
17865
|
"name": "boolean"
|
|
@@ -17769,7 +17869,7 @@
|
|
|
17769
17869
|
"__schema": "TagSchema",
|
|
17770
17870
|
"location": {
|
|
17771
17871
|
"filePath": "component.ts",
|
|
17772
|
-
"line":
|
|
17872
|
+
"line": 343,
|
|
17773
17873
|
"character": 6
|
|
17774
17874
|
},
|
|
17775
17875
|
"tagName": "memberof",
|
|
@@ -17784,7 +17884,7 @@
|
|
|
17784
17884
|
"__schema": "ParameterSchema",
|
|
17785
17885
|
"location": {
|
|
17786
17886
|
"filePath": "component.ts",
|
|
17787
|
-
"line":
|
|
17887
|
+
"line": 346,
|
|
17788
17888
|
"character": 10
|
|
17789
17889
|
},
|
|
17790
17890
|
"name": "component",
|
|
@@ -17792,7 +17892,7 @@
|
|
|
17792
17892
|
"__schema": "TypeRefSchema",
|
|
17793
17893
|
"location": {
|
|
17794
17894
|
"filePath": "component.ts",
|
|
17795
|
-
"line":
|
|
17895
|
+
"line": 346,
|
|
17796
17896
|
"character": 21
|
|
17797
17897
|
},
|
|
17798
17898
|
"name": "Component"
|
|
@@ -17805,7 +17905,7 @@
|
|
|
17805
17905
|
"__schema": "KeywordTypeSchema",
|
|
17806
17906
|
"location": {
|
|
17807
17907
|
"filePath": "component.ts",
|
|
17808
|
-
"line":
|
|
17908
|
+
"line": 346,
|
|
17809
17909
|
"character": 33
|
|
17810
17910
|
},
|
|
17811
17911
|
"name": "boolean"
|
|
@@ -18412,7 +18512,7 @@
|
|
|
18412
18512
|
"_legacy": {
|
|
18413
18513
|
"scope": "teambit.component",
|
|
18414
18514
|
"name": "component",
|
|
18415
|
-
"version": "1.0.
|
|
18515
|
+
"version": "1.0.174"
|
|
18416
18516
|
},
|
|
18417
18517
|
"_scope": "teambit.component"
|
|
18418
18518
|
}
|
|
@@ -23507,7 +23607,7 @@
|
|
|
23507
23607
|
"_legacy": {
|
|
23508
23608
|
"scope": "teambit.component",
|
|
23509
23609
|
"name": "component",
|
|
23510
|
-
"version": "1.0.
|
|
23610
|
+
"version": "1.0.174"
|
|
23511
23611
|
},
|
|
23512
23612
|
"_scope": "teambit.component"
|
|
23513
23613
|
}
|
|
@@ -29707,7 +29807,7 @@
|
|
|
29707
29807
|
"_legacy": {
|
|
29708
29808
|
"scope": "teambit.component",
|
|
29709
29809
|
"name": "component",
|
|
29710
|
-
"version": "1.0.
|
|
29810
|
+
"version": "1.0.174"
|
|
29711
29811
|
},
|
|
29712
29812
|
"_scope": "teambit.component"
|
|
29713
29813
|
}
|
|
@@ -32089,7 +32189,7 @@
|
|
|
32089
32189
|
"componentId": {
|
|
32090
32190
|
"scope": "teambit.component",
|
|
32091
32191
|
"name": "component",
|
|
32092
|
-
"version": "1.0.
|
|
32192
|
+
"version": "1.0.174"
|
|
32093
32193
|
},
|
|
32094
32194
|
"taggedModuleExports": []
|
|
32095
32195
|
}
|
package/dist/component.d.ts
CHANGED
|
@@ -138,10 +138,15 @@ export declare class Component implements IComponent {
|
|
|
138
138
|
*/
|
|
139
139
|
getClosestTag(snapToStartFrom?: string): Promise<Tag | undefined>;
|
|
140
140
|
/**
|
|
141
|
-
* id.version can be either a
|
|
141
|
+
* id.version can be either a tag or a hash.
|
|
142
142
|
* if it's a hash, it may have a tag point to it. if it does, return the tag.
|
|
143
143
|
*/
|
|
144
144
|
getTag(): Tag | undefined;
|
|
145
|
+
/**
|
|
146
|
+
* id.version can be either a tag or a hash.
|
|
147
|
+
* if it's a tag, find the hash it points to.
|
|
148
|
+
*/
|
|
149
|
+
getSnapHash(): string | undefined;
|
|
145
150
|
/**
|
|
146
151
|
* checkout the component to a different version in its working tree.
|
|
147
152
|
*/
|
package/dist/component.js
CHANGED
|
@@ -303,7 +303,7 @@ class Component {
|
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
/**
|
|
306
|
-
* id.version can be either a
|
|
306
|
+
* id.version can be either a tag or a hash.
|
|
307
307
|
* if it's a hash, it may have a tag point to it. if it does, return the tag.
|
|
308
308
|
*/
|
|
309
309
|
getTag() {
|
|
@@ -312,6 +312,17 @@ class Component {
|
|
|
312
312
|
return this.tags.byVersion(currentVersion) || this.tags.byHash(currentVersion);
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
+
/**
|
|
316
|
+
* id.version can be either a tag or a hash.
|
|
317
|
+
* if it's a tag, find the hash it points to.
|
|
318
|
+
*/
|
|
319
|
+
getSnapHash() {
|
|
320
|
+
if (!this.id.hasVersion()) return undefined;
|
|
321
|
+
const tag = this.tags.byVersion(this.id.version);
|
|
322
|
+
if (tag) return tag.hash;
|
|
323
|
+
return this.id.version;
|
|
324
|
+
}
|
|
325
|
+
|
|
315
326
|
/**
|
|
316
327
|
* checkout the component to a different version in its working tree.
|
|
317
328
|
*/
|