@teambit/refactoring 1.0.225 → 1.0.227

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.
@@ -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/refactoring@1.0.225" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.component/refactoring@1.0.227" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -48,11 +48,7 @@
48
48
  "line": 30,
49
49
  "character": 38
50
50
  },
51
- "name": "ComponentMain",
52
- "componentId": {
53
- "scope": "teambit.component",
54
- "name": "component"
55
- }
51
+ "name": "ComponentMain"
56
52
  },
57
53
  "isOptional": false,
58
54
  "isSpread": false
@@ -72,11 +68,7 @@
72
68
  "line": 30,
73
69
  "character": 66
74
70
  },
75
- "name": "PkgMain",
76
- "componentId": {
77
- "scope": "teambit.pkg",
78
- "name": "pkg"
79
- }
71
+ "name": "PkgMain"
80
72
  },
81
73
  "isOptional": false,
82
74
  "isSpread": false
@@ -96,11 +88,7 @@
96
88
  "line": 30,
97
89
  "character": 89
98
90
  },
99
- "name": "EnvsMain",
100
- "componentId": {
101
- "scope": "teambit.envs",
102
- "name": "envs"
103
- }
91
+ "name": "EnvsMain"
104
92
  },
105
93
  "isOptional": false,
106
94
  "isSpread": false
@@ -159,11 +147,7 @@
159
147
  "line": 38,
160
148
  "character": 17
161
149
  },
162
- "name": "Component",
163
- "componentId": {
164
- "scope": "teambit.component",
165
- "name": "component"
166
- }
150
+ "name": "Component"
167
151
  }
168
152
  },
169
153
  "isOptional": false,
@@ -192,11 +176,7 @@
192
176
  "line": 39,
193
177
  "character": 12
194
178
  },
195
- "name": "ComponentID",
196
- "componentId": {
197
- "scope": "teambit.component",
198
- "name": "component"
199
- }
179
+ "name": "ComponentID"
200
180
  },
201
181
  {
202
182
  "__schema": "KeywordTypeSchema",
@@ -235,11 +215,7 @@
235
215
  "line": 40,
236
216
  "character": 12
237
217
  },
238
- "name": "ComponentID",
239
- "componentId": {
240
- "scope": "teambit.component",
241
- "name": "component"
242
- }
218
+ "name": "ComponentID"
243
219
  },
244
220
  {
245
221
  "__schema": "KeywordTypeSchema",
@@ -336,11 +312,7 @@
336
312
  "line": 41,
337
313
  "character": 83
338
314
  },
339
- "name": "Component",
340
- "componentId": {
341
- "scope": "teambit.component",
342
- "name": "component"
343
- }
315
+ "name": "Component"
344
316
  }
345
317
  },
346
318
  "isOptional": false
@@ -388,11 +360,7 @@
388
360
  "line": 61,
389
361
  "character": 16
390
362
  },
391
- "name": "Component",
392
- "componentId": {
393
- "scope": "teambit.component",
394
- "name": "component"
395
- }
363
+ "name": "Component"
396
364
  },
397
365
  "isOptional": false,
398
366
  "isSpread": false
@@ -412,11 +380,7 @@
412
380
  "line": 62,
413
381
  "character": 15
414
382
  },
415
- "name": "ComponentID",
416
- "componentId": {
417
- "scope": "teambit.component",
418
- "name": "component"
419
- }
383
+ "name": "ComponentID"
420
384
  },
421
385
  "isOptional": false,
422
386
  "isSpread": false
@@ -436,11 +400,7 @@
436
400
  "line": 63,
437
401
  "character": 15
438
402
  },
439
- "name": "ComponentID",
440
- "componentId": {
441
- "scope": "teambit.component",
442
- "name": "component"
443
- }
403
+ "name": "ComponentID"
444
404
  },
445
405
  "isOptional": false,
446
406
  "isSpread": false
@@ -525,11 +485,7 @@
525
485
  "line": 77,
526
486
  "character": 15
527
487
  },
528
- "name": "ComponentID",
529
- "componentId": {
530
- "scope": "teambit.component",
531
- "name": "component"
532
- }
488
+ "name": "ComponentID"
533
489
  },
534
490
  "isOptional": false,
535
491
  "isSpread": false
@@ -549,11 +505,7 @@
549
505
  "line": 78,
550
506
  "character": 15
551
507
  },
552
- "name": "ComponentID",
553
- "componentId": {
554
- "scope": "teambit.component",
555
- "name": "component"
556
- }
508
+ "name": "ComponentID"
557
509
  },
558
510
  "isOptional": false,
559
511
  "isSpread": false
@@ -595,11 +547,7 @@
595
547
  "line": 96,
596
548
  "character": 55
597
549
  },
598
- "name": "Component",
599
- "componentId": {
600
- "scope": "teambit.component",
601
- "name": "component"
602
- }
550
+ "name": "Component"
603
551
  },
604
552
  "isOptional": false,
605
553
  "isSpread": false
@@ -619,11 +567,7 @@
619
567
  "line": 96,
620
568
  "character": 76
621
569
  },
622
- "name": "ComponentID",
623
- "componentId": {
624
- "scope": "teambit.component",
625
- "name": "component"
626
- }
570
+ "name": "ComponentID"
627
571
  },
628
572
  "isOptional": false,
629
573
  "isSpread": false
@@ -643,11 +587,7 @@
643
587
  "line": 96,
644
588
  "character": 99
645
589
  },
646
- "name": "ComponentID",
647
- "componentId": {
648
- "scope": "teambit.component",
649
- "name": "component"
650
- }
590
+ "name": "ComponentID"
651
591
  },
652
592
  "isOptional": false,
653
593
  "isSpread": false
@@ -691,11 +631,7 @@
691
631
  "line": 150,
692
632
  "character": 32
693
633
  },
694
- "name": "Component",
695
- "componentId": {
696
- "scope": "teambit.component",
697
- "name": "component"
698
- }
634
+ "name": "Component"
699
635
  },
700
636
  "isOptional": false,
701
637
  "isSpread": false
@@ -715,11 +651,7 @@
715
651
  "line": 150,
716
652
  "character": 53
717
653
  },
718
- "name": "ComponentID",
719
- "componentId": {
720
- "scope": "teambit.component",
721
- "name": "component"
722
- }
654
+ "name": "ComponentID"
723
655
  },
724
656
  "isOptional": false,
725
657
  "isSpread": false
@@ -739,11 +671,7 @@
739
671
  "line": 150,
740
672
  "character": 76
741
673
  },
742
- "name": "ComponentID",
743
- "componentId": {
744
- "scope": "teambit.component",
745
- "name": "component"
746
- }
674
+ "name": "ComponentID"
747
675
  },
748
676
  "isOptional": false,
749
677
  "isSpread": false
@@ -802,11 +730,7 @@
802
730
  "line": 163,
803
731
  "character": 17
804
732
  },
805
- "name": "Component",
806
- "componentId": {
807
- "scope": "teambit.component",
808
- "name": "component"
809
- }
733
+ "name": "Component"
810
734
  }
811
735
  },
812
736
  "isOptional": false,
@@ -855,11 +779,7 @@
855
779
  "line": 165,
856
780
  "character": 20
857
781
  },
858
- "name": "SourceFileTransformer",
859
- "componentId": {
860
- "scope": "teambit.typescript",
861
- "name": "typescript"
862
- }
782
+ "name": "SourceFileTransformer"
863
783
  }
864
784
  },
865
785
  "isOptional": true,
@@ -927,11 +847,7 @@
927
847
  "line": 168,
928
848
  "character": 24
929
849
  },
930
- "name": "Component",
931
- "componentId": {
932
- "scope": "teambit.component",
933
- "name": "component"
934
- }
850
+ "name": "Component"
935
851
  }
936
852
  },
937
853
  "isOptional": false
@@ -1040,11 +956,7 @@
1040
956
  "line": 316,
1041
957
  "character": 62
1042
958
  },
1043
- "name": "ComponentMain",
1044
- "componentId": {
1045
- "scope": "teambit.component",
1046
- "name": "component"
1047
- }
959
+ "name": "ComponentMain"
1048
960
  },
1049
961
  {
1050
962
  "__schema": "TypeRefSchema",
@@ -1053,11 +965,7 @@
1053
965
  "line": 316,
1054
966
  "character": 77
1055
967
  },
1056
- "name": "PkgMain",
1057
- "componentId": {
1058
- "scope": "teambit.pkg",
1059
- "name": "pkg"
1060
- }
968
+ "name": "PkgMain"
1061
969
  },
1062
970
  {
1063
971
  "__schema": "TypeRefSchema",
@@ -1066,11 +974,7 @@
1066
974
  "line": 316,
1067
975
  "character": 86
1068
976
  },
1069
- "name": "CLIMain",
1070
- "componentId": {
1071
- "scope": "teambit.harmony",
1072
- "name": "cli"
1073
- }
977
+ "name": "CLIMain"
1074
978
  },
1075
979
  {
1076
980
  "__schema": "TypeRefSchema",
@@ -1079,11 +983,7 @@
1079
983
  "line": 316,
1080
984
  "character": 95
1081
985
  },
1082
- "name": "EnvsMain",
1083
- "componentId": {
1084
- "scope": "teambit.envs",
1085
- "name": "envs"
1086
- }
986
+ "name": "EnvsMain"
1087
987
  }
1088
988
  ]
1089
989
  },
@@ -1334,11 +1234,7 @@
1334
1234
  "line": 30,
1335
1235
  "character": 38
1336
1236
  },
1337
- "name": "ComponentMain",
1338
- "componentId": {
1339
- "scope": "teambit.component",
1340
- "name": "component"
1341
- }
1237
+ "name": "ComponentMain"
1342
1238
  },
1343
1239
  "isOptional": false,
1344
1240
  "isSpread": false
@@ -1358,11 +1254,7 @@
1358
1254
  "line": 30,
1359
1255
  "character": 66
1360
1256
  },
1361
- "name": "PkgMain",
1362
- "componentId": {
1363
- "scope": "teambit.pkg",
1364
- "name": "pkg"
1365
- }
1257
+ "name": "PkgMain"
1366
1258
  },
1367
1259
  "isOptional": false,
1368
1260
  "isSpread": false
@@ -1382,11 +1274,7 @@
1382
1274
  "line": 30,
1383
1275
  "character": 89
1384
1276
  },
1385
- "name": "EnvsMain",
1386
- "componentId": {
1387
- "scope": "teambit.envs",
1388
- "name": "envs"
1389
- }
1277
+ "name": "EnvsMain"
1390
1278
  },
1391
1279
  "isOptional": false,
1392
1280
  "isSpread": false
@@ -1445,11 +1333,7 @@
1445
1333
  "line": 38,
1446
1334
  "character": 17
1447
1335
  },
1448
- "name": "Component",
1449
- "componentId": {
1450
- "scope": "teambit.component",
1451
- "name": "component"
1452
- }
1336
+ "name": "Component"
1453
1337
  }
1454
1338
  },
1455
1339
  "isOptional": false,
@@ -1478,11 +1362,7 @@
1478
1362
  "line": 39,
1479
1363
  "character": 12
1480
1364
  },
1481
- "name": "ComponentID",
1482
- "componentId": {
1483
- "scope": "teambit.component",
1484
- "name": "component"
1485
- }
1365
+ "name": "ComponentID"
1486
1366
  },
1487
1367
  {
1488
1368
  "__schema": "KeywordTypeSchema",
@@ -1521,11 +1401,7 @@
1521
1401
  "line": 40,
1522
1402
  "character": 12
1523
1403
  },
1524
- "name": "ComponentID",
1525
- "componentId": {
1526
- "scope": "teambit.component",
1527
- "name": "component"
1528
- }
1404
+ "name": "ComponentID"
1529
1405
  },
1530
1406
  {
1531
1407
  "__schema": "KeywordTypeSchema",
@@ -1622,11 +1498,7 @@
1622
1498
  "line": 41,
1623
1499
  "character": 83
1624
1500
  },
1625
- "name": "Component",
1626
- "componentId": {
1627
- "scope": "teambit.component",
1628
- "name": "component"
1629
- }
1501
+ "name": "Component"
1630
1502
  }
1631
1503
  },
1632
1504
  "isOptional": false
@@ -1674,11 +1546,7 @@
1674
1546
  "line": 61,
1675
1547
  "character": 16
1676
1548
  },
1677
- "name": "Component",
1678
- "componentId": {
1679
- "scope": "teambit.component",
1680
- "name": "component"
1681
- }
1549
+ "name": "Component"
1682
1550
  },
1683
1551
  "isOptional": false,
1684
1552
  "isSpread": false
@@ -1698,11 +1566,7 @@
1698
1566
  "line": 62,
1699
1567
  "character": 15
1700
1568
  },
1701
- "name": "ComponentID",
1702
- "componentId": {
1703
- "scope": "teambit.component",
1704
- "name": "component"
1705
- }
1569
+ "name": "ComponentID"
1706
1570
  },
1707
1571
  "isOptional": false,
1708
1572
  "isSpread": false
@@ -1722,11 +1586,7 @@
1722
1586
  "line": 63,
1723
1587
  "character": 15
1724
1588
  },
1725
- "name": "ComponentID",
1726
- "componentId": {
1727
- "scope": "teambit.component",
1728
- "name": "component"
1729
- }
1589
+ "name": "ComponentID"
1730
1590
  },
1731
1591
  "isOptional": false,
1732
1592
  "isSpread": false
@@ -1811,11 +1671,7 @@
1811
1671
  "line": 77,
1812
1672
  "character": 15
1813
1673
  },
1814
- "name": "ComponentID",
1815
- "componentId": {
1816
- "scope": "teambit.component",
1817
- "name": "component"
1818
- }
1674
+ "name": "ComponentID"
1819
1675
  },
1820
1676
  "isOptional": false,
1821
1677
  "isSpread": false
@@ -1835,11 +1691,7 @@
1835
1691
  "line": 78,
1836
1692
  "character": 15
1837
1693
  },
1838
- "name": "ComponentID",
1839
- "componentId": {
1840
- "scope": "teambit.component",
1841
- "name": "component"
1842
- }
1694
+ "name": "ComponentID"
1843
1695
  },
1844
1696
  "isOptional": false,
1845
1697
  "isSpread": false
@@ -1881,11 +1733,7 @@
1881
1733
  "line": 96,
1882
1734
  "character": 55
1883
1735
  },
1884
- "name": "Component",
1885
- "componentId": {
1886
- "scope": "teambit.component",
1887
- "name": "component"
1888
- }
1736
+ "name": "Component"
1889
1737
  },
1890
1738
  "isOptional": false,
1891
1739
  "isSpread": false
@@ -1905,11 +1753,7 @@
1905
1753
  "line": 96,
1906
1754
  "character": 76
1907
1755
  },
1908
- "name": "ComponentID",
1909
- "componentId": {
1910
- "scope": "teambit.component",
1911
- "name": "component"
1912
- }
1756
+ "name": "ComponentID"
1913
1757
  },
1914
1758
  "isOptional": false,
1915
1759
  "isSpread": false
@@ -1929,11 +1773,7 @@
1929
1773
  "line": 96,
1930
1774
  "character": 99
1931
1775
  },
1932
- "name": "ComponentID",
1933
- "componentId": {
1934
- "scope": "teambit.component",
1935
- "name": "component"
1936
- }
1776
+ "name": "ComponentID"
1937
1777
  },
1938
1778
  "isOptional": false,
1939
1779
  "isSpread": false
@@ -1977,11 +1817,7 @@
1977
1817
  "line": 150,
1978
1818
  "character": 32
1979
1819
  },
1980
- "name": "Component",
1981
- "componentId": {
1982
- "scope": "teambit.component",
1983
- "name": "component"
1984
- }
1820
+ "name": "Component"
1985
1821
  },
1986
1822
  "isOptional": false,
1987
1823
  "isSpread": false
@@ -2001,11 +1837,7 @@
2001
1837
  "line": 150,
2002
1838
  "character": 53
2003
1839
  },
2004
- "name": "ComponentID",
2005
- "componentId": {
2006
- "scope": "teambit.component",
2007
- "name": "component"
2008
- }
1840
+ "name": "ComponentID"
2009
1841
  },
2010
1842
  "isOptional": false,
2011
1843
  "isSpread": false
@@ -2025,11 +1857,7 @@
2025
1857
  "line": 150,
2026
1858
  "character": 76
2027
1859
  },
2028
- "name": "ComponentID",
2029
- "componentId": {
2030
- "scope": "teambit.component",
2031
- "name": "component"
2032
- }
1860
+ "name": "ComponentID"
2033
1861
  },
2034
1862
  "isOptional": false,
2035
1863
  "isSpread": false
@@ -2088,11 +1916,7 @@
2088
1916
  "line": 163,
2089
1917
  "character": 17
2090
1918
  },
2091
- "name": "Component",
2092
- "componentId": {
2093
- "scope": "teambit.component",
2094
- "name": "component"
2095
- }
1919
+ "name": "Component"
2096
1920
  }
2097
1921
  },
2098
1922
  "isOptional": false,
@@ -2141,11 +1965,7 @@
2141
1965
  "line": 165,
2142
1966
  "character": 20
2143
1967
  },
2144
- "name": "SourceFileTransformer",
2145
- "componentId": {
2146
- "scope": "teambit.typescript",
2147
- "name": "typescript"
2148
- }
1968
+ "name": "SourceFileTransformer"
2149
1969
  }
2150
1970
  },
2151
1971
  "isOptional": true,
@@ -2213,11 +2033,7 @@
2213
2033
  "line": 168,
2214
2034
  "character": 24
2215
2035
  },
2216
- "name": "Component",
2217
- "componentId": {
2218
- "scope": "teambit.component",
2219
- "name": "component"
2220
- }
2036
+ "name": "Component"
2221
2037
  }
2222
2038
  },
2223
2039
  "isOptional": false
@@ -2326,11 +2142,7 @@
2326
2142
  "line": 316,
2327
2143
  "character": 62
2328
2144
  },
2329
- "name": "ComponentMain",
2330
- "componentId": {
2331
- "scope": "teambit.component",
2332
- "name": "component"
2333
- }
2145
+ "name": "ComponentMain"
2334
2146
  },
2335
2147
  {
2336
2148
  "__schema": "TypeRefSchema",
@@ -2339,11 +2151,7 @@
2339
2151
  "line": 316,
2340
2152
  "character": 77
2341
2153
  },
2342
- "name": "PkgMain",
2343
- "componentId": {
2344
- "scope": "teambit.pkg",
2345
- "name": "pkg"
2346
- }
2154
+ "name": "PkgMain"
2347
2155
  },
2348
2156
  {
2349
2157
  "__schema": "TypeRefSchema",
@@ -2352,11 +2160,7 @@
2352
2160
  "line": 316,
2353
2161
  "character": 86
2354
2162
  },
2355
- "name": "CLIMain",
2356
- "componentId": {
2357
- "scope": "teambit.harmony",
2358
- "name": "cli"
2359
- }
2163
+ "name": "CLIMain"
2360
2164
  },
2361
2165
  {
2362
2166
  "__schema": "TypeRefSchema",
@@ -2365,11 +2169,7 @@
2365
2169
  "line": 316,
2366
2170
  "character": 95
2367
2171
  },
2368
- "name": "EnvsMain",
2369
- "componentId": {
2370
- "scope": "teambit.envs",
2371
- "name": "envs"
2372
- }
2172
+ "name": "EnvsMain"
2373
2173
  }
2374
2174
  ]
2375
2175
  },
@@ -2450,7 +2250,7 @@
2450
2250
  "componentId": {
2451
2251
  "scope": "teambit.component",
2452
2252
  "name": "refactoring",
2453
- "version": "1.0.225"
2253
+ "version": "1.0.227"
2454
2254
  },
2455
2255
  "taggedModuleExports": []
2456
2256
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/refactoring",
3
- "version": "1.0.225",
3
+ "version": "1.0.227",
4
4
  "homepage": "https://bit.cloud/teambit/component/refactoring",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "refactoring",
9
- "version": "1.0.225"
9
+ "version": "1.0.227"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -15,17 +15,17 @@
15
15
  "lodash": "4.17.21",
16
16
  "@teambit/harmony": "0.4.6",
17
17
  "@teambit/bit-error": "0.0.404",
18
- "@teambit/cli": "0.0.859",
19
- "@teambit/component": "1.0.225",
20
- "@teambit/envs": "1.0.225",
21
- "@teambit/pkg": "1.0.225",
22
- "@teambit/typescript": "1.0.225"
18
+ "@teambit/cli": "0.0.860",
19
+ "@teambit/component": "1.0.227",
20
+ "@teambit/envs": "1.0.227",
21
+ "@teambit/pkg": "1.0.227",
22
+ "@teambit/typescript": "1.0.227"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/lodash": "4.14.165",
26
26
  "@types/mocha": "9.1.0",
27
27
  "chai": "4.3.0",
28
- "@teambit/harmony.envs.core-aspect-env": "0.0.27"
28
+ "@teambit/harmony.envs.core-aspect-env": "0.0.30"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@teambit/legacy": "1.0.624"
package/tsconfig.json CHANGED
@@ -20,7 +20,8 @@
20
20
  "emitDeclarationOnly": true,
21
21
  "strict": true,
22
22
  "strictPropertyInitialization": false,
23
- "noImplicitAny": false
23
+ "noImplicitAny": false,
24
+ "composite": true
24
25
  },
25
26
  "exclude": [
26
27
  "artifacts",
@@ -35,5 +36,22 @@
35
36
  "include": [
36
37
  "**/*",
37
38
  "**/*.json"
39
+ ],
40
+ "references": [
41
+ {
42
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.860"
43
+ },
44
+ {
45
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.227"
46
+ },
47
+ {
48
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.envs_envs@1.0.227"
49
+ },
50
+ {
51
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pkg_pkg@1.0.227"
52
+ },
53
+ {
54
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.typescript_typescript@1.0.227"
55
+ }
38
56
  ]
39
57
  }
package/dist/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { RefactoringAspect } from './refactoring.aspect';
2
- export type { RefactoringMain, MultipleStringsReplacement } from './refactoring.main.runtime';
3
- export default RefactoringAspect;
4
- export { RefactoringAspect };
@@ -1,23 +0,0 @@
1
- import { Command, CommandOptions } from '@teambit/cli';
2
- import { ComponentMain } from '@teambit/component';
3
- import { RefactoringMain } from './refactoring.main.runtime';
4
- export declare class DependencyNameRefactorCmd implements Command {
5
- private refactoringMain;
6
- private componentMain;
7
- name: string;
8
- description: string;
9
- options: CommandOptions;
10
- group: string;
11
- extendedDescription: string;
12
- constructor(refactoringMain: RefactoringMain, componentMain: ComponentMain);
13
- report([oldId, newId]: [string, string]): Promise<string>;
14
- }
15
- export declare class RefactorCmd implements Command {
16
- name: string;
17
- alias: string;
18
- description: string;
19
- options: never[];
20
- group: string;
21
- commands: Command[];
22
- report([unrecognizedSubcommand]: [string]): Promise<string>;
23
- }
@@ -1,2 +0,0 @@
1
- import { Aspect } from '@teambit/harmony';
2
- export declare const RefactoringAspect: Aspect;
@@ -1,52 +0,0 @@
1
- import { CLIMain } from '@teambit/cli';
2
- import { Component, ComponentID, ComponentMain } from '@teambit/component';
3
- import { PkgMain } from '@teambit/pkg';
4
- import { EnvsMain } from '@teambit/envs';
5
- import { SourceFileTransformer } from '@teambit/typescript';
6
- export type MultipleStringsReplacement = Array<{
7
- oldStr: string;
8
- newStr: string;
9
- }>;
10
- export declare class RefactoringMain {
11
- private componentMain;
12
- private pkg;
13
- private envs;
14
- constructor(componentMain: ComponentMain, pkg: PkgMain, envs: EnvsMain);
15
- /**
16
- * refactor the dependency name of a component.
17
- * oldId and newId can be either a component-id or a package-name.
18
- * this method changes the source code of the component, but doesn't write to the filesystem.
19
- */
20
- refactorDependencyName(components: Component[], oldId: ComponentID | string, newId: ComponentID | string): Promise<{
21
- oldPackageName: string;
22
- newPackageName: string;
23
- changedComponents: Component[];
24
- }>;
25
- /**
26
- * replaces the old-name inside the source code of the given component with the new name.
27
- * helpful when renaming/forking an aspect/env where the component-name is used as the class-name and variable-name.
28
- */
29
- refactorVariableAndClasses(component: Component, sourceId: ComponentID, targetId: ComponentID, options?: {
30
- ast?: boolean;
31
- }): Promise<void>;
32
- getStringReplacementsForVariablesAndClasses(sourceId: ComponentID, targetId: ComponentID): MultipleStringsReplacement;
33
- refactorVariableAndClassesUsingAST(component: Component, sourceId: ComponentID, targetId: ComponentID): Promise<void>;
34
- refactorFilenames(component: Component, sourceId: ComponentID, targetId: ComponentID): void;
35
- /**
36
- * rename multiple packages dependencies.
37
- * this method changes the source code of the component, but doesn't write to the filesystem.
38
- */
39
- replaceMultipleStrings(components: Component[], stringsToReplace?: MultipleStringsReplacement, transformers?: SourceFileTransformer[], shouldAvoidPackageNames?: boolean): Promise<{
40
- changedComponents: Component[];
41
- }>;
42
- private getPackageNameByUnknownId;
43
- private getPackageNameByComponentID;
44
- private isValidScopedPackageName;
45
- private replaceString;
46
- private replacePackageNameInComponent;
47
- private replaceMultipleStringsInOneComp;
48
- static slots: never[];
49
- static dependencies: import("@teambit/harmony").Aspect[];
50
- static runtime: import("@teambit/harmony").RuntimeDefinition;
51
- static provider([componentMain, pkg, cli, envMain]: [ComponentMain, PkgMain, CLIMain, EnvsMain]): Promise<RefactoringMain>;
52
- }