@teambit/remove 1.0.187 → 1.0.189
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/schema.json +259 -53
- package/dist/delete-cmd.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/recover-cmd.js.map +1 -1
- package/dist/remove-cmd.js.map +1 -1
- package/dist/remove-components.js.map +1 -1
- package/dist/remove-template.js.map +1 -1
- package/dist/remove.aspect.js.map +1 -1
- package/dist/remove.fragment.js.map +1 -1
- package/dist/remove.main.runtime.js.map +1 -1
- package/dist/removed-local-objects.js.map +1 -1
- package/package.json +10 -10
- /package/dist/{preview-1709867881461.js → preview-1710224484125.js} +0 -0
|
@@ -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/remove@1.0.
|
|
3
|
+
<testsuite name="teambit.component/remove@1.0.189" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
package/artifacts/schema.json
CHANGED
|
@@ -48,7 +48,11 @@
|
|
|
48
48
|
"line": 38,
|
|
49
49
|
"character": 24
|
|
50
50
|
},
|
|
51
|
-
"name": "Workspace"
|
|
51
|
+
"name": "Workspace",
|
|
52
|
+
"componentId": {
|
|
53
|
+
"scope": "teambit.workspace",
|
|
54
|
+
"name": "workspace"
|
|
55
|
+
}
|
|
52
56
|
},
|
|
53
57
|
"isOptional": false,
|
|
54
58
|
"isSpread": false
|
|
@@ -68,7 +72,11 @@
|
|
|
68
72
|
"line": 39,
|
|
69
73
|
"character": 20
|
|
70
74
|
},
|
|
71
|
-
"name": "Logger"
|
|
75
|
+
"name": "Logger",
|
|
76
|
+
"componentId": {
|
|
77
|
+
"scope": "teambit.harmony",
|
|
78
|
+
"name": "logger"
|
|
79
|
+
}
|
|
72
80
|
},
|
|
73
81
|
"isOptional": false,
|
|
74
82
|
"isSpread": false
|
|
@@ -88,7 +96,11 @@
|
|
|
88
96
|
"line": 40,
|
|
89
97
|
"character": 23
|
|
90
98
|
},
|
|
91
|
-
"name": "ImporterMain"
|
|
99
|
+
"name": "ImporterMain",
|
|
100
|
+
"componentId": {
|
|
101
|
+
"scope": "teambit.scope",
|
|
102
|
+
"name": "importer"
|
|
103
|
+
}
|
|
92
104
|
},
|
|
93
105
|
"isOptional": false,
|
|
94
106
|
"isSpread": false
|
|
@@ -108,7 +120,11 @@
|
|
|
108
120
|
"line": 41,
|
|
109
121
|
"character": 26
|
|
110
122
|
},
|
|
111
|
-
"name": "DependencyResolverMain"
|
|
123
|
+
"name": "DependencyResolverMain",
|
|
124
|
+
"componentId": {
|
|
125
|
+
"scope": "teambit.dependencies",
|
|
126
|
+
"name": "dependency-resolver"
|
|
127
|
+
}
|
|
112
128
|
},
|
|
113
129
|
"isOptional": false,
|
|
114
130
|
"isSpread": false
|
|
@@ -375,7 +391,8 @@
|
|
|
375
391
|
"line": 56,
|
|
376
392
|
"character": 15
|
|
377
393
|
},
|
|
378
|
-
"name": "RemoveComponentsResult"
|
|
394
|
+
"name": "RemoveComponentsResult",
|
|
395
|
+
"internalFilePath": "remove-components.ts"
|
|
379
396
|
}
|
|
380
397
|
]
|
|
381
398
|
},
|
|
@@ -425,7 +442,12 @@
|
|
|
425
442
|
"line": 79,
|
|
426
443
|
"character": 10
|
|
427
444
|
},
|
|
428
|
-
"name": "ComponentID"
|
|
445
|
+
"name": "ComponentID",
|
|
446
|
+
"componentId": {
|
|
447
|
+
"scope": "teambit.component",
|
|
448
|
+
"name": "component-id",
|
|
449
|
+
"version": "1.2.0"
|
|
450
|
+
}
|
|
429
451
|
}
|
|
430
452
|
},
|
|
431
453
|
"isOptional": false,
|
|
@@ -581,7 +603,12 @@
|
|
|
581
603
|
"line": 96,
|
|
582
604
|
"character": 39
|
|
583
605
|
},
|
|
584
|
-
"name": "ComponentID"
|
|
606
|
+
"name": "ComponentID",
|
|
607
|
+
"componentId": {
|
|
608
|
+
"scope": "teambit.component",
|
|
609
|
+
"name": "component-id",
|
|
610
|
+
"version": "1.2.0"
|
|
611
|
+
}
|
|
585
612
|
}
|
|
586
613
|
},
|
|
587
614
|
"isOptional": false,
|
|
@@ -718,7 +745,12 @@
|
|
|
718
745
|
"line": 114,
|
|
719
746
|
"character": 94
|
|
720
747
|
},
|
|
721
|
-
"name": "ComponentID"
|
|
748
|
+
"name": "ComponentID",
|
|
749
|
+
"componentId": {
|
|
750
|
+
"scope": "teambit.component",
|
|
751
|
+
"name": "component-id",
|
|
752
|
+
"version": "1.2.0"
|
|
753
|
+
}
|
|
722
754
|
}
|
|
723
755
|
}
|
|
724
756
|
]
|
|
@@ -782,7 +814,8 @@
|
|
|
782
814
|
"line": 148,
|
|
783
815
|
"character": 45
|
|
784
816
|
},
|
|
785
|
-
"name": "RecoverOptions"
|
|
817
|
+
"name": "RecoverOptions",
|
|
818
|
+
"internalFilePath": "recover-cmd.ts"
|
|
786
819
|
},
|
|
787
820
|
"isOptional": false,
|
|
788
821
|
"isSpread": false
|
|
@@ -837,7 +870,11 @@
|
|
|
837
870
|
"line": 233,
|
|
838
871
|
"character": 28
|
|
839
872
|
},
|
|
840
|
-
"name": "Component"
|
|
873
|
+
"name": "Component",
|
|
874
|
+
"componentId": {
|
|
875
|
+
"scope": "teambit.component",
|
|
876
|
+
"name": "component"
|
|
877
|
+
}
|
|
841
878
|
},
|
|
842
879
|
"isOptional": false,
|
|
843
880
|
"isSpread": false
|
|
@@ -879,7 +916,11 @@
|
|
|
879
916
|
"line": 240,
|
|
880
917
|
"character": 24
|
|
881
918
|
},
|
|
882
|
-
"name": "Component"
|
|
919
|
+
"name": "Component",
|
|
920
|
+
"componentId": {
|
|
921
|
+
"scope": "teambit.component",
|
|
922
|
+
"name": "component"
|
|
923
|
+
}
|
|
883
924
|
},
|
|
884
925
|
"isOptional": false,
|
|
885
926
|
"isSpread": false
|
|
@@ -931,7 +972,12 @@
|
|
|
931
972
|
"line": 247,
|
|
932
973
|
"character": 59
|
|
933
974
|
},
|
|
934
|
-
"name": "ComponentID"
|
|
975
|
+
"name": "ComponentID",
|
|
976
|
+
"componentId": {
|
|
977
|
+
"scope": "teambit.component",
|
|
978
|
+
"name": "component-id",
|
|
979
|
+
"version": "1.2.0"
|
|
980
|
+
}
|
|
935
981
|
},
|
|
936
982
|
"isOptional": false,
|
|
937
983
|
"isSpread": false
|
|
@@ -1004,7 +1050,12 @@
|
|
|
1004
1050
|
"line": 262,
|
|
1005
1051
|
"character": 37
|
|
1006
1052
|
},
|
|
1007
|
-
"name": "ComponentID"
|
|
1053
|
+
"name": "ComponentID",
|
|
1054
|
+
"componentId": {
|
|
1055
|
+
"scope": "teambit.component",
|
|
1056
|
+
"name": "component-id",
|
|
1057
|
+
"version": "1.2.0"
|
|
1058
|
+
}
|
|
1008
1059
|
}
|
|
1009
1060
|
}
|
|
1010
1061
|
]
|
|
@@ -1045,7 +1096,11 @@
|
|
|
1045
1096
|
"line": 266,
|
|
1046
1097
|
"character": 50
|
|
1047
1098
|
},
|
|
1048
|
-
"name": "Component"
|
|
1099
|
+
"name": "Component",
|
|
1100
|
+
"componentId": {
|
|
1101
|
+
"scope": "teambit.component",
|
|
1102
|
+
"name": "component"
|
|
1103
|
+
}
|
|
1049
1104
|
}
|
|
1050
1105
|
},
|
|
1051
1106
|
"isOptional": false,
|
|
@@ -1161,7 +1216,11 @@
|
|
|
1161
1216
|
"line": 348,
|
|
1162
1217
|
"character": 5
|
|
1163
1218
|
},
|
|
1164
|
-
"name": "Workspace"
|
|
1219
|
+
"name": "Workspace",
|
|
1220
|
+
"componentId": {
|
|
1221
|
+
"scope": "teambit.workspace",
|
|
1222
|
+
"name": "workspace"
|
|
1223
|
+
}
|
|
1165
1224
|
},
|
|
1166
1225
|
{
|
|
1167
1226
|
"__schema": "TypeRefSchema",
|
|
@@ -1170,7 +1229,11 @@
|
|
|
1170
1229
|
"line": 349,
|
|
1171
1230
|
"character": 5
|
|
1172
1231
|
},
|
|
1173
|
-
"name": "CLIMain"
|
|
1232
|
+
"name": "CLIMain",
|
|
1233
|
+
"componentId": {
|
|
1234
|
+
"scope": "teambit.harmony",
|
|
1235
|
+
"name": "cli"
|
|
1236
|
+
}
|
|
1174
1237
|
},
|
|
1175
1238
|
{
|
|
1176
1239
|
"__schema": "TypeRefSchema",
|
|
@@ -1179,7 +1242,11 @@
|
|
|
1179
1242
|
"line": 350,
|
|
1180
1243
|
"character": 5
|
|
1181
1244
|
},
|
|
1182
|
-
"name": "LoggerMain"
|
|
1245
|
+
"name": "LoggerMain",
|
|
1246
|
+
"componentId": {
|
|
1247
|
+
"scope": "teambit.harmony",
|
|
1248
|
+
"name": "logger"
|
|
1249
|
+
}
|
|
1183
1250
|
},
|
|
1184
1251
|
{
|
|
1185
1252
|
"__schema": "TypeRefSchema",
|
|
@@ -1188,7 +1255,11 @@
|
|
|
1188
1255
|
"line": 351,
|
|
1189
1256
|
"character": 5
|
|
1190
1257
|
},
|
|
1191
|
-
"name": "ComponentMain"
|
|
1258
|
+
"name": "ComponentMain",
|
|
1259
|
+
"componentId": {
|
|
1260
|
+
"scope": "teambit.component",
|
|
1261
|
+
"name": "component"
|
|
1262
|
+
}
|
|
1192
1263
|
},
|
|
1193
1264
|
{
|
|
1194
1265
|
"__schema": "TypeRefSchema",
|
|
@@ -1197,7 +1268,11 @@
|
|
|
1197
1268
|
"line": 352,
|
|
1198
1269
|
"character": 5
|
|
1199
1270
|
},
|
|
1200
|
-
"name": "ImporterMain"
|
|
1271
|
+
"name": "ImporterMain",
|
|
1272
|
+
"componentId": {
|
|
1273
|
+
"scope": "teambit.scope",
|
|
1274
|
+
"name": "importer"
|
|
1275
|
+
}
|
|
1201
1276
|
},
|
|
1202
1277
|
{
|
|
1203
1278
|
"__schema": "TypeRefSchema",
|
|
@@ -1206,7 +1281,11 @@
|
|
|
1206
1281
|
"line": 353,
|
|
1207
1282
|
"character": 5
|
|
1208
1283
|
},
|
|
1209
|
-
"name": "DependencyResolverMain"
|
|
1284
|
+
"name": "DependencyResolverMain",
|
|
1285
|
+
"componentId": {
|
|
1286
|
+
"scope": "teambit.dependencies",
|
|
1287
|
+
"name": "dependency-resolver"
|
|
1288
|
+
}
|
|
1210
1289
|
},
|
|
1211
1290
|
{
|
|
1212
1291
|
"__schema": "TypeRefSchema",
|
|
@@ -1215,7 +1294,11 @@
|
|
|
1215
1294
|
"line": 354,
|
|
1216
1295
|
"character": 5
|
|
1217
1296
|
},
|
|
1218
|
-
"name": "IssuesMain"
|
|
1297
|
+
"name": "IssuesMain",
|
|
1298
|
+
"componentId": {
|
|
1299
|
+
"scope": "teambit.component",
|
|
1300
|
+
"name": "issues"
|
|
1301
|
+
}
|
|
1219
1302
|
}
|
|
1220
1303
|
]
|
|
1221
1304
|
},
|
|
@@ -1371,7 +1454,12 @@
|
|
|
1371
1454
|
"line": 7,
|
|
1372
1455
|
"character": 27
|
|
1373
1456
|
},
|
|
1374
|
-
"name": "ComponentIdList"
|
|
1457
|
+
"name": "ComponentIdList",
|
|
1458
|
+
"componentId": {
|
|
1459
|
+
"scope": "teambit.component",
|
|
1460
|
+
"name": "component-id",
|
|
1461
|
+
"version": "1.2.0"
|
|
1462
|
+
}
|
|
1375
1463
|
},
|
|
1376
1464
|
"isOptional": true,
|
|
1377
1465
|
"isSpread": false
|
|
@@ -1391,7 +1479,12 @@
|
|
|
1391
1479
|
"line": 8,
|
|
1392
1480
|
"character": 25
|
|
1393
1481
|
},
|
|
1394
|
-
"name": "ComponentIdList"
|
|
1482
|
+
"name": "ComponentIdList",
|
|
1483
|
+
"componentId": {
|
|
1484
|
+
"scope": "teambit.component",
|
|
1485
|
+
"name": "component-id",
|
|
1486
|
+
"version": "1.2.0"
|
|
1487
|
+
}
|
|
1395
1488
|
},
|
|
1396
1489
|
"isOptional": true,
|
|
1397
1490
|
"isSpread": false
|
|
@@ -1411,7 +1504,12 @@
|
|
|
1411
1504
|
"line": 9,
|
|
1412
1505
|
"character": 26
|
|
1413
1506
|
},
|
|
1414
|
-
"name": "ComponentIdList"
|
|
1507
|
+
"name": "ComponentIdList",
|
|
1508
|
+
"componentId": {
|
|
1509
|
+
"scope": "teambit.component",
|
|
1510
|
+
"name": "component-id",
|
|
1511
|
+
"version": "1.2.0"
|
|
1512
|
+
}
|
|
1415
1513
|
},
|
|
1416
1514
|
"isOptional": true,
|
|
1417
1515
|
"isSpread": false
|
|
@@ -1471,7 +1569,12 @@
|
|
|
1471
1569
|
"line": 11,
|
|
1472
1570
|
"character": 23
|
|
1473
1571
|
},
|
|
1474
|
-
"name": "ComponentIdList"
|
|
1572
|
+
"name": "ComponentIdList",
|
|
1573
|
+
"componentId": {
|
|
1574
|
+
"scope": "teambit.component",
|
|
1575
|
+
"name": "component-id",
|
|
1576
|
+
"version": "1.2.0"
|
|
1577
|
+
}
|
|
1475
1578
|
},
|
|
1476
1579
|
"isOptional": true,
|
|
1477
1580
|
"isSpread": false
|
|
@@ -1511,7 +1614,7 @@
|
|
|
1511
1614
|
"_legacy": {
|
|
1512
1615
|
"scope": "teambit.component",
|
|
1513
1616
|
"name": "remove",
|
|
1514
|
-
"version": "1.0.
|
|
1617
|
+
"version": "1.0.189"
|
|
1515
1618
|
},
|
|
1516
1619
|
"_scope": "teambit.component"
|
|
1517
1620
|
}
|
|
@@ -1846,7 +1949,11 @@
|
|
|
1846
1949
|
"line": 38,
|
|
1847
1950
|
"character": 24
|
|
1848
1951
|
},
|
|
1849
|
-
"name": "Workspace"
|
|
1952
|
+
"name": "Workspace",
|
|
1953
|
+
"componentId": {
|
|
1954
|
+
"scope": "teambit.workspace",
|
|
1955
|
+
"name": "workspace"
|
|
1956
|
+
}
|
|
1850
1957
|
},
|
|
1851
1958
|
"isOptional": false,
|
|
1852
1959
|
"isSpread": false
|
|
@@ -1866,7 +1973,11 @@
|
|
|
1866
1973
|
"line": 39,
|
|
1867
1974
|
"character": 20
|
|
1868
1975
|
},
|
|
1869
|
-
"name": "Logger"
|
|
1976
|
+
"name": "Logger",
|
|
1977
|
+
"componentId": {
|
|
1978
|
+
"scope": "teambit.harmony",
|
|
1979
|
+
"name": "logger"
|
|
1980
|
+
}
|
|
1870
1981
|
},
|
|
1871
1982
|
"isOptional": false,
|
|
1872
1983
|
"isSpread": false
|
|
@@ -1886,7 +1997,11 @@
|
|
|
1886
1997
|
"line": 40,
|
|
1887
1998
|
"character": 23
|
|
1888
1999
|
},
|
|
1889
|
-
"name": "ImporterMain"
|
|
2000
|
+
"name": "ImporterMain",
|
|
2001
|
+
"componentId": {
|
|
2002
|
+
"scope": "teambit.scope",
|
|
2003
|
+
"name": "importer"
|
|
2004
|
+
}
|
|
1890
2005
|
},
|
|
1891
2006
|
"isOptional": false,
|
|
1892
2007
|
"isSpread": false
|
|
@@ -1906,7 +2021,11 @@
|
|
|
1906
2021
|
"line": 41,
|
|
1907
2022
|
"character": 26
|
|
1908
2023
|
},
|
|
1909
|
-
"name": "DependencyResolverMain"
|
|
2024
|
+
"name": "DependencyResolverMain",
|
|
2025
|
+
"componentId": {
|
|
2026
|
+
"scope": "teambit.dependencies",
|
|
2027
|
+
"name": "dependency-resolver"
|
|
2028
|
+
}
|
|
1910
2029
|
},
|
|
1911
2030
|
"isOptional": false,
|
|
1912
2031
|
"isSpread": false
|
|
@@ -2173,7 +2292,8 @@
|
|
|
2173
2292
|
"line": 56,
|
|
2174
2293
|
"character": 15
|
|
2175
2294
|
},
|
|
2176
|
-
"name": "RemoveComponentsResult"
|
|
2295
|
+
"name": "RemoveComponentsResult",
|
|
2296
|
+
"internalFilePath": "remove-components.ts"
|
|
2177
2297
|
}
|
|
2178
2298
|
]
|
|
2179
2299
|
},
|
|
@@ -2223,7 +2343,12 @@
|
|
|
2223
2343
|
"line": 79,
|
|
2224
2344
|
"character": 10
|
|
2225
2345
|
},
|
|
2226
|
-
"name": "ComponentID"
|
|
2346
|
+
"name": "ComponentID",
|
|
2347
|
+
"componentId": {
|
|
2348
|
+
"scope": "teambit.component",
|
|
2349
|
+
"name": "component-id",
|
|
2350
|
+
"version": "1.2.0"
|
|
2351
|
+
}
|
|
2227
2352
|
}
|
|
2228
2353
|
},
|
|
2229
2354
|
"isOptional": false,
|
|
@@ -2379,7 +2504,12 @@
|
|
|
2379
2504
|
"line": 96,
|
|
2380
2505
|
"character": 39
|
|
2381
2506
|
},
|
|
2382
|
-
"name": "ComponentID"
|
|
2507
|
+
"name": "ComponentID",
|
|
2508
|
+
"componentId": {
|
|
2509
|
+
"scope": "teambit.component",
|
|
2510
|
+
"name": "component-id",
|
|
2511
|
+
"version": "1.2.0"
|
|
2512
|
+
}
|
|
2383
2513
|
}
|
|
2384
2514
|
},
|
|
2385
2515
|
"isOptional": false,
|
|
@@ -2516,7 +2646,12 @@
|
|
|
2516
2646
|
"line": 114,
|
|
2517
2647
|
"character": 94
|
|
2518
2648
|
},
|
|
2519
|
-
"name": "ComponentID"
|
|
2649
|
+
"name": "ComponentID",
|
|
2650
|
+
"componentId": {
|
|
2651
|
+
"scope": "teambit.component",
|
|
2652
|
+
"name": "component-id",
|
|
2653
|
+
"version": "1.2.0"
|
|
2654
|
+
}
|
|
2520
2655
|
}
|
|
2521
2656
|
}
|
|
2522
2657
|
]
|
|
@@ -2580,7 +2715,8 @@
|
|
|
2580
2715
|
"line": 148,
|
|
2581
2716
|
"character": 45
|
|
2582
2717
|
},
|
|
2583
|
-
"name": "RecoverOptions"
|
|
2718
|
+
"name": "RecoverOptions",
|
|
2719
|
+
"internalFilePath": "recover-cmd.ts"
|
|
2584
2720
|
},
|
|
2585
2721
|
"isOptional": false,
|
|
2586
2722
|
"isSpread": false
|
|
@@ -2635,7 +2771,11 @@
|
|
|
2635
2771
|
"line": 233,
|
|
2636
2772
|
"character": 28
|
|
2637
2773
|
},
|
|
2638
|
-
"name": "Component"
|
|
2774
|
+
"name": "Component",
|
|
2775
|
+
"componentId": {
|
|
2776
|
+
"scope": "teambit.component",
|
|
2777
|
+
"name": "component"
|
|
2778
|
+
}
|
|
2639
2779
|
},
|
|
2640
2780
|
"isOptional": false,
|
|
2641
2781
|
"isSpread": false
|
|
@@ -2677,7 +2817,11 @@
|
|
|
2677
2817
|
"line": 240,
|
|
2678
2818
|
"character": 24
|
|
2679
2819
|
},
|
|
2680
|
-
"name": "Component"
|
|
2820
|
+
"name": "Component",
|
|
2821
|
+
"componentId": {
|
|
2822
|
+
"scope": "teambit.component",
|
|
2823
|
+
"name": "component"
|
|
2824
|
+
}
|
|
2681
2825
|
},
|
|
2682
2826
|
"isOptional": false,
|
|
2683
2827
|
"isSpread": false
|
|
@@ -2729,7 +2873,12 @@
|
|
|
2729
2873
|
"line": 247,
|
|
2730
2874
|
"character": 59
|
|
2731
2875
|
},
|
|
2732
|
-
"name": "ComponentID"
|
|
2876
|
+
"name": "ComponentID",
|
|
2877
|
+
"componentId": {
|
|
2878
|
+
"scope": "teambit.component",
|
|
2879
|
+
"name": "component-id",
|
|
2880
|
+
"version": "1.2.0"
|
|
2881
|
+
}
|
|
2733
2882
|
},
|
|
2734
2883
|
"isOptional": false,
|
|
2735
2884
|
"isSpread": false
|
|
@@ -2802,7 +2951,12 @@
|
|
|
2802
2951
|
"line": 262,
|
|
2803
2952
|
"character": 37
|
|
2804
2953
|
},
|
|
2805
|
-
"name": "ComponentID"
|
|
2954
|
+
"name": "ComponentID",
|
|
2955
|
+
"componentId": {
|
|
2956
|
+
"scope": "teambit.component",
|
|
2957
|
+
"name": "component-id",
|
|
2958
|
+
"version": "1.2.0"
|
|
2959
|
+
}
|
|
2806
2960
|
}
|
|
2807
2961
|
}
|
|
2808
2962
|
]
|
|
@@ -2843,7 +2997,11 @@
|
|
|
2843
2997
|
"line": 266,
|
|
2844
2998
|
"character": 50
|
|
2845
2999
|
},
|
|
2846
|
-
"name": "Component"
|
|
3000
|
+
"name": "Component",
|
|
3001
|
+
"componentId": {
|
|
3002
|
+
"scope": "teambit.component",
|
|
3003
|
+
"name": "component"
|
|
3004
|
+
}
|
|
2847
3005
|
}
|
|
2848
3006
|
},
|
|
2849
3007
|
"isOptional": false,
|
|
@@ -2959,7 +3117,11 @@
|
|
|
2959
3117
|
"line": 348,
|
|
2960
3118
|
"character": 5
|
|
2961
3119
|
},
|
|
2962
|
-
"name": "Workspace"
|
|
3120
|
+
"name": "Workspace",
|
|
3121
|
+
"componentId": {
|
|
3122
|
+
"scope": "teambit.workspace",
|
|
3123
|
+
"name": "workspace"
|
|
3124
|
+
}
|
|
2963
3125
|
},
|
|
2964
3126
|
{
|
|
2965
3127
|
"__schema": "TypeRefSchema",
|
|
@@ -2968,7 +3130,11 @@
|
|
|
2968
3130
|
"line": 349,
|
|
2969
3131
|
"character": 5
|
|
2970
3132
|
},
|
|
2971
|
-
"name": "CLIMain"
|
|
3133
|
+
"name": "CLIMain",
|
|
3134
|
+
"componentId": {
|
|
3135
|
+
"scope": "teambit.harmony",
|
|
3136
|
+
"name": "cli"
|
|
3137
|
+
}
|
|
2972
3138
|
},
|
|
2973
3139
|
{
|
|
2974
3140
|
"__schema": "TypeRefSchema",
|
|
@@ -2977,7 +3143,11 @@
|
|
|
2977
3143
|
"line": 350,
|
|
2978
3144
|
"character": 5
|
|
2979
3145
|
},
|
|
2980
|
-
"name": "LoggerMain"
|
|
3146
|
+
"name": "LoggerMain",
|
|
3147
|
+
"componentId": {
|
|
3148
|
+
"scope": "teambit.harmony",
|
|
3149
|
+
"name": "logger"
|
|
3150
|
+
}
|
|
2981
3151
|
},
|
|
2982
3152
|
{
|
|
2983
3153
|
"__schema": "TypeRefSchema",
|
|
@@ -2986,7 +3156,11 @@
|
|
|
2986
3156
|
"line": 351,
|
|
2987
3157
|
"character": 5
|
|
2988
3158
|
},
|
|
2989
|
-
"name": "ComponentMain"
|
|
3159
|
+
"name": "ComponentMain",
|
|
3160
|
+
"componentId": {
|
|
3161
|
+
"scope": "teambit.component",
|
|
3162
|
+
"name": "component"
|
|
3163
|
+
}
|
|
2990
3164
|
},
|
|
2991
3165
|
{
|
|
2992
3166
|
"__schema": "TypeRefSchema",
|
|
@@ -2995,7 +3169,11 @@
|
|
|
2995
3169
|
"line": 352,
|
|
2996
3170
|
"character": 5
|
|
2997
3171
|
},
|
|
2998
|
-
"name": "ImporterMain"
|
|
3172
|
+
"name": "ImporterMain",
|
|
3173
|
+
"componentId": {
|
|
3174
|
+
"scope": "teambit.scope",
|
|
3175
|
+
"name": "importer"
|
|
3176
|
+
}
|
|
2999
3177
|
},
|
|
3000
3178
|
{
|
|
3001
3179
|
"__schema": "TypeRefSchema",
|
|
@@ -3004,7 +3182,11 @@
|
|
|
3004
3182
|
"line": 353,
|
|
3005
3183
|
"character": 5
|
|
3006
3184
|
},
|
|
3007
|
-
"name": "DependencyResolverMain"
|
|
3185
|
+
"name": "DependencyResolverMain",
|
|
3186
|
+
"componentId": {
|
|
3187
|
+
"scope": "teambit.dependencies",
|
|
3188
|
+
"name": "dependency-resolver"
|
|
3189
|
+
}
|
|
3008
3190
|
},
|
|
3009
3191
|
{
|
|
3010
3192
|
"__schema": "TypeRefSchema",
|
|
@@ -3013,7 +3195,11 @@
|
|
|
3013
3195
|
"line": 354,
|
|
3014
3196
|
"character": 5
|
|
3015
3197
|
},
|
|
3016
|
-
"name": "IssuesMain"
|
|
3198
|
+
"name": "IssuesMain",
|
|
3199
|
+
"componentId": {
|
|
3200
|
+
"scope": "teambit.component",
|
|
3201
|
+
"name": "issues"
|
|
3202
|
+
}
|
|
3017
3203
|
}
|
|
3018
3204
|
]
|
|
3019
3205
|
},
|
|
@@ -3163,7 +3349,12 @@
|
|
|
3163
3349
|
"line": 7,
|
|
3164
3350
|
"character": 27
|
|
3165
3351
|
},
|
|
3166
|
-
"name": "ComponentIdList"
|
|
3352
|
+
"name": "ComponentIdList",
|
|
3353
|
+
"componentId": {
|
|
3354
|
+
"scope": "teambit.component",
|
|
3355
|
+
"name": "component-id",
|
|
3356
|
+
"version": "1.2.0"
|
|
3357
|
+
}
|
|
3167
3358
|
},
|
|
3168
3359
|
"isOptional": true,
|
|
3169
3360
|
"isSpread": false
|
|
@@ -3183,7 +3374,12 @@
|
|
|
3183
3374
|
"line": 8,
|
|
3184
3375
|
"character": 25
|
|
3185
3376
|
},
|
|
3186
|
-
"name": "ComponentIdList"
|
|
3377
|
+
"name": "ComponentIdList",
|
|
3378
|
+
"componentId": {
|
|
3379
|
+
"scope": "teambit.component",
|
|
3380
|
+
"name": "component-id",
|
|
3381
|
+
"version": "1.2.0"
|
|
3382
|
+
}
|
|
3187
3383
|
},
|
|
3188
3384
|
"isOptional": true,
|
|
3189
3385
|
"isSpread": false
|
|
@@ -3203,7 +3399,12 @@
|
|
|
3203
3399
|
"line": 9,
|
|
3204
3400
|
"character": 26
|
|
3205
3401
|
},
|
|
3206
|
-
"name": "ComponentIdList"
|
|
3402
|
+
"name": "ComponentIdList",
|
|
3403
|
+
"componentId": {
|
|
3404
|
+
"scope": "teambit.component",
|
|
3405
|
+
"name": "component-id",
|
|
3406
|
+
"version": "1.2.0"
|
|
3407
|
+
}
|
|
3207
3408
|
},
|
|
3208
3409
|
"isOptional": true,
|
|
3209
3410
|
"isSpread": false
|
|
@@ -3263,7 +3464,12 @@
|
|
|
3263
3464
|
"line": 11,
|
|
3264
3465
|
"character": 23
|
|
3265
3466
|
},
|
|
3266
|
-
"name": "ComponentIdList"
|
|
3467
|
+
"name": "ComponentIdList",
|
|
3468
|
+
"componentId": {
|
|
3469
|
+
"scope": "teambit.component",
|
|
3470
|
+
"name": "component-id",
|
|
3471
|
+
"version": "1.2.0"
|
|
3472
|
+
}
|
|
3267
3473
|
},
|
|
3268
3474
|
"isOptional": true,
|
|
3269
3475
|
"isSpread": false
|
|
@@ -3303,7 +3509,7 @@
|
|
|
3303
3509
|
"_legacy": {
|
|
3304
3510
|
"scope": "teambit.component",
|
|
3305
3511
|
"name": "remove",
|
|
3306
|
-
"version": "1.0.
|
|
3512
|
+
"version": "1.0.189"
|
|
3307
3513
|
},
|
|
3308
3514
|
"_scope": "teambit.component"
|
|
3309
3515
|
}
|
|
@@ -3356,7 +3562,7 @@
|
|
|
3356
3562
|
"componentId": {
|
|
3357
3563
|
"scope": "teambit.component",
|
|
3358
3564
|
"name": "remove",
|
|
3359
|
-
"version": "1.0.
|
|
3565
|
+
"version": "1.0.189"
|
|
3360
3566
|
},
|
|
3361
3567
|
"taggedModuleExports": []
|
|
3362
3568
|
}
|
package/dist/delete-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_yesno","_bitError","_constants","_removeTemplate","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","DeleteCmd","constructor","remove","workspace","name","description","COMPONENT_PATTERN_HELP","report","componentsPattern","force","lane","updateMain","hard","silent","isOnLane","BitError","isOnMain","removePrompt","localResult","remoteResult","remote","localMessage","removeTemplate","paintArray","removedCompIds","deleteComps","chalk","green","join","bold","removedObjectsArray","map","item","logger","clearStatusLine","laneOrMainWarning","remoteOrLocalOutput","ok","yesno","question","exports"],"sources":["delete-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport yesno from 'yesno';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { Workspace } from '@teambit/workspace';\nimport { BitError } from '@teambit/bit-error';\nimport RemovedObjects from '@teambit/legacy/dist/scope/removed-components';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { RemoveMain } from './remove.main.runtime';\nimport { removeTemplate } from './remove-template';\n\nexport class DeleteCmd implements Command {\n name = 'delete <component-pattern>';\n description = 'mark components as deleted on the remote';\n extendedDescription = `to remove components from your local workspace only, use \"bit remove\" command.\nthis command marks the components as deleted, and after snap/tag and export they will be marked as deleted from the remote scope as well.\n`;\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n group = 'collaborate';\n helpUrl = 'reference/components/removing-components';\n skipWorkspace = true;\n alias = '';\n options = [\n ['', 'lane', 'when on a lane, delete the component from this lane only. avoid merging it to main or other lanes'],\n ['', 'update-main', 'EXPERIMENTAL. delete component/s on the main lane after merging this lane into main'],\n ['s', 'silent', 'skip confirmation'],\n [\n '',\n 'hard',\n 'NOT-RECOMMENDED. delete a component completely from a remote scope. careful! this is a permanent change that could corrupt dependents.',\n ],\n [\n 'f',\n 'force',\n 'relevant for --hard. allow the deletion even if used as a dependency. WARNING: components that depend on this component will corrupt',\n ],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n\n constructor(private remove: RemoveMain, private workspace?: Workspace) {}\n\n async report(\n [componentsPattern]: [string],\n {\n force = false,\n lane = false,\n updateMain = false,\n hard = false,\n silent = false,\n }: {\n force?: boolean;\n lane?: boolean;\n updateMain?: boolean;\n hard?: boolean;\n silent?: boolean;\n }\n ) {\n if (this.workspace?.isOnLane() && !hard && !lane && !updateMain) {\n throw new BitError(`error: to delete components when on a lane, use --lane flag`);\n }\n if (this.workspace?.isOnMain() && updateMain) {\n throw new BitError(`--update-main is relevant only when on a lane`);\n }\n\n if (!silent) {\n await this.removePrompt(hard, lane);\n }\n\n if (hard) {\n const { localResult, remoteResult = [] } = await this.remove.remove({ componentsPattern, remote: true, force });\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n let localMessage = removeTemplate(localResult, false);\n if (localMessage !== '') localMessage += '\\n';\n return `${localMessage}${this.paintArray(remoteResult)}`;\n }\n\n const removedCompIds = await this.remove.deleteComps(componentsPattern, { updateMain });\n return `${chalk.green('successfully deleted the following components:')}\n${removedCompIds.join('\\n')}\n\n${chalk.bold('to update the remote, please tag/snap and then export. to revert, please use \"bit recover\"')}`;\n }\n\n private paintArray(removedObjectsArray: RemovedObjects[]) {\n return removedObjectsArray.map((item) => removeTemplate(item, true));\n }\n\n private async removePrompt(hard?: boolean, lane?: boolean) {\n this.remove.logger.clearStatusLine();\n const laneOrMainWarning = lane\n ? `this command will mark the component as removed from this lane, resetting the component to its pre-lane state and content (after tag/snap and export)`\n : `this command will mark the component as deleted, and it won’t be visible on the remote scope (after tag/snap and export).`;\n const remoteOrLocalOutput = hard\n ? `WARNING: the component(s) will be permanently deleted from the remote with no option to recover. prefer omitting --hard to only mark the component as soft deleted`\n : `${laneOrMainWarning}\nif your intent is to remove the component only from your local workspace, refer to bit remove or bit eject.`;\n\n const ok = await yesno({\n question: `${remoteOrLocalOutput}\n${chalk.bold('Would you like to proceed? [yes(y)/no(n)]')}`,\n });\n if (!ok) {\n throw new BitError('the operation has been canceled');\n }\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,UAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,gBAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,eAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAmD,SAAAC,uBAAAM,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAA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tB,MAAM,CAACuB,WAAW,CAACjB,iBAAiB,EAAE;MAAEG;IAAW,CAAC,CAAC;IACvF,OAAQ,GAAEe,gBAAK,CAACC,KAAK,CAAC,gDAAgD,CAAE;AAC5E,EAAEH,cAAc,CAACI,IAAI,CAAC,IAAI,CAAE;AAC5B;AACA,EAAEF,gBAAK,CAACG,IAAI,CAAC,4FAA4F,CAAE,EAAC;EAC1G;EAEQN,UAAUA,CAACO,mBAAqC,EAAE;IACxD,OAAOA,mBAAmB,CAACC,GAAG,CAAEC,IAAI,IAAK,IAAAV,gCAAc,EAACU,IAAI,EAAE,IAAI,CAAC,CAAC;EACtE;EAEA,MAAcf,YAAYA,CAACL,IAAc,EAAEF,IAAc,EAAE;IACzD,IAAI,CAACR,MAAM,CAAC+B,MAAM,CAACC,eAAe,CAAC,CAAC;IACpC,MAAMC,iBAAiB,GAAGzB,IAAI,GACzB,uJAAsJ,GACtJ,2HAA0H;IAC/H,MAAM0B,mBAAmB,GAAGxB,IAAI,GAC3B,oKAAmK,GACnK,GAAEuB,iBAAkB;AAC7B,4GAA4G;IAExG,MAAME,EAAE,GAAG,MAAM,IAAAC,gBAAK,EAAC;MACrBC,QAAQ,EAAG,GAAEH,mBAAoB;AACvC,EAAEV,gBAAK,CAACG,IAAI,CAAC,2CAA2C,CAAE;IACtD,CAAC,CAAC;IACF,IAAI,CAACQ,EAAE,EAAE;MACP,MAAM,KAAItB,oBAAQ,EAAC,iCAAiC,CAAC;IACvD;EACF;AACF;AAACyB,OAAA,CAAAxC,SAAA,GAAAA,SAAA"}
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_yesno","_bitError","_constants","_removeTemplate","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","DeleteCmd","constructor","remove","workspace","name","description","COMPONENT_PATTERN_HELP","report","componentsPattern","force","lane","updateMain","hard","silent","isOnLane","BitError","isOnMain","removePrompt","localResult","remoteResult","remote","localMessage","removeTemplate","paintArray","removedCompIds","deleteComps","chalk","green","join","bold","removedObjectsArray","map","item","logger","clearStatusLine","laneOrMainWarning","remoteOrLocalOutput","ok","yesno","question","exports"],"sources":["delete-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport yesno from 'yesno';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { Workspace } from '@teambit/workspace';\nimport { BitError } from '@teambit/bit-error';\nimport RemovedObjects from '@teambit/legacy/dist/scope/removed-components';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { RemoveMain } from './remove.main.runtime';\nimport { removeTemplate } from './remove-template';\n\nexport class DeleteCmd implements Command {\n name = 'delete <component-pattern>';\n description = 'mark components as deleted on the remote';\n extendedDescription = `to remove components from your local workspace only, use \"bit remove\" command.\nthis command marks the components as deleted, and after snap/tag and export they will be marked as deleted from the remote scope as well.\n`;\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n group = 'collaborate';\n helpUrl = 'reference/components/removing-components';\n skipWorkspace = true;\n alias = '';\n options = [\n ['', 'lane', 'when on a lane, delete the component from this lane only. avoid merging it to main or other lanes'],\n ['', 'update-main', 'EXPERIMENTAL. delete component/s on the main lane after merging this lane into main'],\n ['s', 'silent', 'skip confirmation'],\n [\n '',\n 'hard',\n 'NOT-RECOMMENDED. delete a component completely from a remote scope. careful! this is a permanent change that could corrupt dependents.',\n ],\n [\n 'f',\n 'force',\n 'relevant for --hard. allow the deletion even if used as a dependency. WARNING: components that depend on this component will corrupt',\n ],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n\n constructor(private remove: RemoveMain, private workspace?: Workspace) {}\n\n async report(\n [componentsPattern]: [string],\n {\n force = false,\n lane = false,\n updateMain = false,\n hard = false,\n silent = false,\n }: {\n force?: boolean;\n lane?: boolean;\n updateMain?: boolean;\n hard?: boolean;\n silent?: boolean;\n }\n ) {\n if (this.workspace?.isOnLane() && !hard && !lane && !updateMain) {\n throw new BitError(`error: to delete components when on a lane, use --lane flag`);\n }\n if (this.workspace?.isOnMain() && updateMain) {\n throw new BitError(`--update-main is relevant only when on a lane`);\n }\n\n if (!silent) {\n await this.removePrompt(hard, lane);\n }\n\n if (hard) {\n const { localResult, remoteResult = [] } = await this.remove.remove({ componentsPattern, remote: true, force });\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n let localMessage = removeTemplate(localResult, false);\n if (localMessage !== '') localMessage += '\\n';\n return `${localMessage}${this.paintArray(remoteResult)}`;\n }\n\n const removedCompIds = await this.remove.deleteComps(componentsPattern, { updateMain });\n return `${chalk.green('successfully deleted the following components:')}\n${removedCompIds.join('\\n')}\n\n${chalk.bold('to update the remote, please tag/snap and then export. to revert, please use \"bit recover\"')}`;\n }\n\n private paintArray(removedObjectsArray: RemovedObjects[]) {\n return removedObjectsArray.map((item) => removeTemplate(item, true));\n }\n\n private async removePrompt(hard?: boolean, lane?: boolean) {\n this.remove.logger.clearStatusLine();\n const laneOrMainWarning = lane\n ? `this command will mark the component as removed from this lane, resetting the component to its pre-lane state and content (after tag/snap and export)`\n : `this command will mark the component as deleted, and it won’t be visible on the remote scope (after tag/snap and export).`;\n const remoteOrLocalOutput = hard\n ? `WARNING: the component(s) will be permanently deleted from the remote with no option to recover. prefer omitting --hard to only mark the component as soft deleted`\n : `${laneOrMainWarning}\nif your intent is to remove the component only from your local workspace, refer to bit remove or bit eject.`;\n\n const ok = await yesno({\n question: `${remoteOrLocalOutput}\n${chalk.bold('Would you like to proceed? [yes(y)/no(n)]')}`,\n });\n if (!ok) {\n throw new BitError('the operation has been canceled');\n }\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG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B,GAAGzB,IAAI,GACzB,uJAAsJ,GACtJ,2HAA0H;IAC/H,MAAM0B,mBAAmB,GAAGxB,IAAI,GAC3B,oKAAmK,GACnK,GAAEuB,iBAAkB;AAC7B,4GAA4G;IAExG,MAAME,EAAE,GAAG,MAAM,IAAAC,gBAAK,EAAC;MACrBC,QAAQ,EAAG,GAAEH,mBAAoB;AACvC,EAAEV,gBAAK,CAACG,IAAI,CAAC,2CAA2C,CAAE;IACtD,CAAC,CAAC;IACF,IAAI,CAACQ,EAAE,EAAE;MACP,MAAM,KAAItB,oBAAQ,EAAC,iCAAiC,CAAC;IACvD;EACF;AACF;AAACyB,OAAA,CAAAxC,SAAA,GAAAA,SAAA","ignoreList":[]}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_remove","data","require","_removeTemplate","_default","exports","default","RemoveAspect"],"sources":["index.ts"],"sourcesContent":["import { RemoveAspect } from './remove.aspect';\n\nexport type { RemoveMain, RemoveInfo } from './remove.main.runtime';\nexport type { RemovedLocalObjects } from './removed-local-objects';\nexport { removeTemplate } from './remove-template';\nexport default RemoveAspect;\nexport { RemoveAspect };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAE,gBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,eAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAmD,IAAAG,QAAA,GAAAC,OAAA,CAAAC,OAAA,GACpCC,sBAAY"}
|
|
1
|
+
{"version":3,"names":["_remove","data","require","_removeTemplate","_default","exports","default","RemoveAspect"],"sources":["index.ts"],"sourcesContent":["import { RemoveAspect } from './remove.aspect';\n\nexport type { RemoveMain, RemoveInfo } from './remove.main.runtime';\nexport type { RemovedLocalObjects } from './removed-local-objects';\nexport { removeTemplate } from './remove-template';\nexport default RemoveAspect;\nexport { RemoveAspect };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAE,gBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,eAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAmD,IAAAG,QAAA,GAAAC,OAAA,CAAAC,OAAA,GACpCC,sBAAY","ignoreList":[]}
|
package/dist/recover-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_bitError","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","RecoverCmd","constructor","remove","report","componentName","options","hasRecovered","recover","BitError","chalk","green","exports"],"sources":["recover-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { BitError } from '@teambit/bit-error';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { RemoveMain } from './remove.main.runtime';\n\nexport type RecoverOptions = {\n skipDependencyInstallation?: boolean;\n skipWriteConfigFiles?: boolean;\n};\n\nexport class RecoverCmd implements Command {\n name = 'recover <component-name>';\n description = 'EXPERIMENTAL. recover component(s) soft-deleted from the workspace, or a remote scope';\n group = 'collaborate';\n options = [\n ['x', 'skip-dependency-installation', 'do not install packages in case of importing components'],\n ['', 'skip-write-config-files', 'do not write config files (such as eslint, tsconfig, prettier, etc...)'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private remove: RemoveMain) {}\n\n async report([componentName]: [string], options: RecoverOptions) {\n const hasRecovered = await this.remove.recover(componentName, options);\n if (!hasRecovered) {\n throw new BitError(`component ${componentName} was not soft-deleted, nothing to recover`);\n }\n return chalk.green(`successfully recovered ${componentName}`);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8C,SAAAC,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAJ,GAAA,IAAAO,MAAA,CAAAC,cAAA,CAAAR,GAAA,EAAAI,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAX,GAAA,CAAAI,GAAA,IAAAC,KAAA,WAAAL,GAAA;AAAA,SAAAM,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAE,MAAA,CAAAF,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAI,CAAA,2BAAAJ,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAK,CAAA,GAAAL,CAAA,CAAAM,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAJ,CAAA,GAAAI,CAAA,CAAAG,IAAA,CAAAR,CAAA,EAAAI,CAAA,uCAAAH,CAAA,SAAAA,CAAA,YAAAQ,SAAA,yEAAAL,CAAA,GAAAD,MAAA,GAAAO,MAAA,EAAAV,CAAA;AASvC,MAAMW,UAAU,CAAoB;EAUzCC,WAAWA,CAASC,MAAkB,EAAE;IAAA,KAApBA,MAAkB,GAAlBA,MAAkB;IAAAtB,eAAA,eAT/B,0BAA0B;IAAAA,eAAA,sBACnB,uFAAuF;IAAAA,eAAA,gBAC7F,aAAa;IAAAA,eAAA,kBACX,CACR,CAAC,GAAG,EAAE,8BAA8B,EAAE,yDAAyD,CAAC,EAChG,CAAC,EAAE,EAAE,yBAAyB,EAAE,wEAAwE,CAAC,CAC1G;IAAAA,eAAA,iBACQ,IAAI;EAE4B;EAEzC,MAAMuB,MAAMA,CAAC,CAACC,aAAa,CAAW,EAAEC,OAAuB,EAAE;IAC/D,MAAMC,YAAY,GAAG,MAAM,IAAI,CAACJ,MAAM,CAACK,OAAO,CAACH,aAAa,EAAEC,OAAO,CAAC;IACtE,IAAI,CAACC,YAAY,EAAE;MACjB,MAAM,KAAIE,oBAAQ,EAAE,aAAYJ,aAAc,2CAA0C,CAAC;IAC3F;IACA,OAAOK,gBAAK,CAACC,KAAK,CAAE,0BAAyBN,aAAc,EAAC,CAAC;EAC/D;AACF;AAACO,OAAA,CAAAX,UAAA,GAAAA,UAAA"}
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_bitError","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","RecoverCmd","constructor","remove","report","componentName","options","hasRecovered","recover","BitError","chalk","green","exports"],"sources":["recover-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { BitError } from '@teambit/bit-error';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { RemoveMain } from './remove.main.runtime';\n\nexport type RecoverOptions = {\n skipDependencyInstallation?: boolean;\n skipWriteConfigFiles?: boolean;\n};\n\nexport class RecoverCmd implements Command {\n name = 'recover <component-name>';\n description = 'EXPERIMENTAL. recover component(s) soft-deleted from the workspace, or a remote scope';\n group = 'collaborate';\n options = [\n ['x', 'skip-dependency-installation', 'do not install packages in case of importing components'],\n ['', 'skip-write-config-files', 'do not write config files (such as eslint, tsconfig, prettier, etc...)'],\n ] as CommandOptions;\n loader = true;\n\n constructor(private remove: RemoveMain) {}\n\n async report([componentName]: [string], options: RecoverOptions) {\n const hasRecovered = await this.remove.recover(componentName, options);\n if (!hasRecovered) {\n throw new BitError(`component ${componentName} was not soft-deleted, nothing to recover`);\n }\n return chalk.green(`successfully recovered ${componentName}`);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8C,SAAAC,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAJ,GAAA,IAAAO,MAAA,CAAAC,cAAA,CAAAR,GAAA,EAAAI,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAX,GAAA,CAAAI,GAAA,IAAAC,KAAA,WAAAL,GAAA;AAAA,SAAAM,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAE,MAAA,CAAAF,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAI,CAAA,2BAAAJ,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAK,CAAA,GAAAL,CAAA,CAAAM,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAJ,CAAA,GAAAI,CAAA,CAAAG,IAAA,CAAAR,CAAA,EAAAI,CAAA,uCAAAH,CAAA,SAAAA,CAAA,YAAAQ,SAAA,yEAAAL,CAAA,GAAAD,MAAA,GAAAO,MAAA,EAAAV,CAAA;AASvC,MAAMW,UAAU,CAAoB;EAUzCC,WAAWA,CAASC,MAAkB,EAAE;IAAA,KAApBA,MAAkB,GAAlBA,MAAkB;IAAAtB,eAAA,eAT/B,0BAA0B;IAAAA,eAAA,sBACnB,uFAAuF;IAAAA,eAAA,gBAC7F,aAAa;IAAAA,eAAA,kBACX,CACR,CAAC,GAAG,EAAE,8BAA8B,EAAE,yDAAyD,CAAC,EAChG,CAAC,EAAE,EAAE,yBAAyB,EAAE,wEAAwE,CAAC,CAC1G;IAAAA,eAAA,iBACQ,IAAI;EAE4B;EAEzC,MAAMuB,MAAMA,CAAC,CAACC,aAAa,CAAW,EAAEC,OAAuB,EAAE;IAC/D,MAAMC,YAAY,GAAG,MAAM,IAAI,CAACJ,MAAM,CAACK,OAAO,CAACH,aAAa,EAAEC,OAAO,CAAC;IACtE,IAAI,CAACC,YAAY,EAAE;MACjB,MAAM,KAAIE,oBAAQ,EAAE,aAAYJ,aAAc,2CAA0C,CAAC;IAC3F;IACA,OAAOK,gBAAK,CAACC,KAAK,CAAE,0BAAyBN,aAAc,EAAC,CAAC;EAC/D;AACF;AAACO,OAAA,CAAAX,UAAA,GAAAA,UAAA","ignoreList":[]}
|
package/dist/remove-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_yesno","_bitError","_constants","_removeTemplate","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","RemoveCmd","constructor","remove","workspace","name","description","COMPONENT_PATTERN_HELP","cmd","report","componentsPattern","force","track","silent","keepFiles","removePrompt","localResult","deleteFiles","localMessage","removeTemplate","logger","clearStatusLine","filesDeletionStr","ok","yesno","question","chalk","bold","BitError","exports"],"sources":["remove-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport yesno from 'yesno';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { Workspace } from '@teambit/workspace';\nimport { BitError } from '@teambit/bit-error';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { RemovedLocalObjects } from './removed-local-objects';\nimport { RemoveMain } from './remove.main.runtime';\nimport { removeTemplate } from './remove-template';\n\nexport class RemoveCmd implements Command {\n name = 'remove <component-pattern>';\n description = 'remove component(s) from the local workspace';\n extendedDescription = `to mark components as deleted on the remote scope, use \"bit delete\".`;\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n group = 'collaborate';\n helpUrl = 'reference/components/removing-components';\n skipWorkspace = true;\n alias = 'rm';\n options = [\n ['t', 'track', 'keep tracking component in .bitmap (default = false), helps transform a tagged-component to new'],\n ['', 'keep-files', 'keep component files (just untrack the component)'],\n [\n 'f',\n 'force',\n 'removes the component from the scope, even if used as a dependency. WARNING: you will need to fix the components that depend on this component',\n ],\n ['s', 'silent', 'skip confirmation'],\n ] as CommandOptions;\n loader = true;\n examples = [\n {\n cmd: 'remove \"$deprecated\"',\n description: 'remove all components that are deprecated',\n },\n ];\n remoteOp = true;\n\n constructor(private remove: RemoveMain, private workspace?: Workspace) {}\n\n async report(\n [componentsPattern]: [string],\n {\n force = false,\n track = false,\n silent = false,\n keepFiles = false,\n }: {\n force?: boolean;\n track?: boolean;\n silent?: boolean;\n keepFiles?: boolean;\n }\n ) {\n if (!silent) {\n await this.removePrompt(!keepFiles);\n }\n const {\n localResult,\n }: {\n localResult: RemovedLocalObjects;\n } = await this.remove.remove({ componentsPattern, force, track, deleteFiles: !keepFiles });\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const localMessage = removeTemplate(localResult, false);\n // if (localMessage !== '')\n // localMessage +=\n // '. Note: these components were not deleted from the remote - if you want to delete components run \"bit delete\"\\n';\n return localMessage;\n }\n\n private async removePrompt(deleteFiles?: boolean) {\n this.remove.logger.clearStatusLine();\n const filesDeletionStr = deleteFiles\n ? ' and the files will be deleted from the filesystem (can be avoided by entering --keep-files)'\n : '';\n const ok = await yesno({\n question: `this command will remove the component/s only from your local workspace. if your intent is to delete the component/s also from the remote scope, refer to \"bit delete\".\nthe component(s) will be untracked${filesDeletionStr}.\n${chalk.bold('Would you like to proceed? [yes(y)/no(n)]')}`,\n });\n if (!ok) {\n throw new BitError('the operation has been canceled');\n }\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,UAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAM,gBAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,eAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAmD,SAAAC,uBAAAM,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAA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C;IACvD;EACF;AACF;AAACC,OAAA,CAAA5B,SAAA,GAAAA,SAAA"}
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_yesno","_bitError","_constants","_removeTemplate","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","RemoveCmd","constructor","remove","workspace","name","description","COMPONENT_PATTERN_HELP","cmd","report","componentsPattern","force","track","silent","keepFiles","removePrompt","localResult","deleteFiles","localMessage","removeTemplate","logger","clearStatusLine","filesDeletionStr","ok","yesno","question","chalk","bold","BitError","exports"],"sources":["remove-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport yesno from 'yesno';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { Workspace } from '@teambit/workspace';\nimport { BitError } from '@teambit/bit-error';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { RemovedLocalObjects } from './removed-local-objects';\nimport { RemoveMain } from './remove.main.runtime';\nimport { removeTemplate } from './remove-template';\n\nexport class RemoveCmd implements Command {\n name = 'remove <component-pattern>';\n description = 'remove component(s) from the local workspace';\n extendedDescription = `to mark components as deleted on the remote scope, use \"bit delete\".`;\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n group = 'collaborate';\n helpUrl = 'reference/components/removing-components';\n skipWorkspace = true;\n alias = 'rm';\n options = [\n ['t', 'track', 'keep tracking component in .bitmap (default = false), helps transform a tagged-component to new'],\n ['', 'keep-files', 'keep component files (just untrack the component)'],\n [\n 'f',\n 'force',\n 'removes the component from the scope, even if used as a dependency. WARNING: you will need to fix the components that depend on this component',\n ],\n ['s', 'silent', 'skip confirmation'],\n ] as CommandOptions;\n loader = true;\n examples = [\n {\n cmd: 'remove \"$deprecated\"',\n description: 'remove all components that are deprecated',\n },\n ];\n remoteOp = true;\n\n constructor(private remove: RemoveMain, private workspace?: Workspace) {}\n\n async report(\n [componentsPattern]: [string],\n {\n force = false,\n track = false,\n silent = false,\n keepFiles = false,\n }: {\n force?: boolean;\n track?: boolean;\n silent?: boolean;\n keepFiles?: boolean;\n }\n ) {\n if (!silent) {\n await this.removePrompt(!keepFiles);\n }\n const {\n localResult,\n }: {\n localResult: RemovedLocalObjects;\n } = await this.remove.remove({ componentsPattern, force, track, deleteFiles: !keepFiles });\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const localMessage = removeTemplate(localResult, false);\n // if (localMessage !== '')\n // localMessage +=\n // '. Note: these components were not deleted from the remote - if you want to delete components run \"bit delete\"\\n';\n return localMessage;\n }\n\n private async removePrompt(deleteFiles?: boolean) {\n this.remove.logger.clearStatusLine();\n const filesDeletionStr = deleteFiles\n ? ' and the files will be deleted from the filesystem (can be avoided by entering --keep-files)'\n : '';\n const ok = await yesno({\n question: `this command will remove the component/s only from your local workspace. if your intent is to delete the component/s also from the remote scope, refer to \"bit delete\".\nthe component(s) will be untracked${filesDeletionStr}.\n${chalk.bold('Would you like to proceed? [yes(y)/no(n)]')}`,\n });\n if (!ok) {\n throw new BitError('the operation has been canceled');\n }\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,UAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,U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,CAAC;IACpC,MAAMC,gBAAgB,GAAGL,WAAW,GAChC,8FAA8F,GAC9F,EAAE;IACN,MAAMM,EAAE,GAAG,MAAM,IAAAC,gBAAK,EAAC;MACrBC,QAAQ,EAAG;AACjB,oCAAoCH,gBAAiB;AACrD,EAAEI,gBAAK,CAACC,IAAI,CAAC,2CAA2C,CAAE;IACtD,CAAC,CAAC;IACF,IAAI,CAACJ,EAAE,EAAE;MACP,MAAM,KAAIK,oBAAQ,EAAC,iCAAiC,CAAC;IACvD;EACF;AACF;AAACC,OAAA,CAAA5B,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_groupArray","data","_interopRequireDefault","require","_lodash","_componentId","_lodash2","_constants","_bitError","_enrichContextFromGlobal","_logger","_http","_remotes","_scopeRemotes","_deleteComponentFiles","_componentsList","_consumerComponent","packageJsonUtils","_interopRequireWildcard","_pMapSeries","_removedLocalObjects","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","removeComponents","workspace","ids","force","remote","track","deleteFiles","logger","debugAndAddBreadCrumb","toString","bitIdsLatest","ComponentIdList","fromArray","map","id","changeVersion","LATEST_BIT_VERSION","localIds","remoteIds","partition","isLocal","length","BitError","join","remoteResult","isEmpty","removeRemote","localResult","removeLocal","RemovedLocalObjects","bitIds","groupedBitsByScope","groupArray","remotes","getScopeRemotes","scope","legacyScope","Remotes","getGlobalRemotes","shouldGoToCentralHub","keys","http","Http","connect","CENTRAL_BIT_HUB_URL","CENTRAL_BIT_HUB_NAME","deleteViaCentralHub","idsAreLanes","context","enrichContextFromGlobal","removeP","key","resolvedRemote","resolve","idsStr","toStringWithoutVersion","deleteMany","Promise","all","consumer","modifiedComponents","nonModifiedComponents","pMapSeries","componentStatus","getComponentStatusById","modified","push","err","Component","isComponentInvalidByErrorType","idsToRemove","componentsList","ComponentsList","newComponents","listNewComponents","idsToRemoveFromScope","filter","hasWithoutVersion","idsToCleanFromWorkspace","components","componentsToRemove","invalidComponents","loadComponents","removedComponentIds","missingComponents","dependentBits","removedFromLane","removeMany","deleteComponentsFiles","invalidComponentsIds","removedComponents","c","removeComponentsFromWorkspacesAndDependencies","cleanFromBitMap","cleanFromConfig","uniqFromArray"],"sources":["remove-components.ts"],"sourcesContent":["import groupArray from 'group-array';\nimport partition from 'lodash.partition';\nimport { Workspace } from '@teambit/workspace';\nimport { ComponentIdList } from '@teambit/component-id';\nimport { isEmpty } from 'lodash';\nimport { CENTRAL_BIT_HUB_NAME, CENTRAL_BIT_HUB_URL, LATEST_BIT_VERSION } from '@teambit/legacy/dist/constants';\nimport { BitError } from '@teambit/bit-error';\nimport enrichContextFromGlobal from '@teambit/legacy/dist/hooks/utils/enrich-context-from-global';\nimport logger from '@teambit/legacy/dist/logger/logger';\nimport { Http } from '@teambit/legacy/dist/scope/network/http';\nimport { Remotes } from '@teambit/legacy/dist/remotes';\nimport { getScopeRemotes } from '@teambit/legacy/dist/scope/scope-remotes';\nimport deleteComponentsFiles from '@teambit/legacy/dist/consumer/component-ops/delete-component-files';\nimport ComponentsList from '@teambit/legacy/dist/consumer/component/components-list';\nimport Component from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport RemovedObjects from '@teambit/legacy/dist/scope/removed-components';\nimport * as packageJsonUtils from '@teambit/legacy/dist/consumer/component/package-json-utils';\nimport pMapSeries from 'p-map-series';\nimport { RemovedLocalObjects } from './removed-local-objects';\n\nexport type RemoveComponentsResult = { localResult: RemovedLocalObjects; remoteResult: RemovedObjects[] };\n\n/**\n * Remove components local and remote\n * splits array of ids into local and remote and removes according to flags\n * @param {string[]} ids - list of remote component ids to delete\n * @param {boolean} force - delete component that are used by other components.\n * @param {boolean} remote - delete component from a remote scope\n * @param {boolean} track - keep tracking local staged components in bitmap.\n * @param {boolean} deleteFiles - delete local added files from fs.\n */\nexport async function removeComponents({\n workspace,\n ids,\n force,\n remote,\n track,\n deleteFiles,\n}: {\n workspace?: Workspace; // when remote is false, it's always set\n ids: ComponentIdList;\n force: boolean;\n remote: boolean;\n track: boolean;\n deleteFiles: boolean;\n}): Promise<RemoveComponentsResult> {\n logger.debugAndAddBreadCrumb('removeComponents', `{ids}. force: ${force.toString()}`, { ids: ids.toString() });\n // added this to remove support for remove only one version from a component\n const bitIdsLatest = ComponentIdList.fromArray(\n ids.map((id) => {\n return id.changeVersion(LATEST_BIT_VERSION);\n })\n );\n const [localIds, remoteIds] = partition(bitIdsLatest, (id) => id.isLocal());\n if (remote && localIds.length) {\n throw new BitError(\n `unable to remove the remote components: ${localIds.join(',')} as they don't contain a scope-name`\n );\n }\n const remoteResult = remote && !isEmpty(remoteIds) ? await removeRemote(workspace, remoteIds, force) : [];\n const localResult = !remote\n ? await removeLocal(workspace as Workspace, bitIdsLatest, force, track, deleteFiles)\n : new RemovedLocalObjects();\n\n return { localResult, remoteResult };\n}\n\n/**\n * Remove remote component from the remote\n * this method groups remote components by remote name and deletes remote components together\n * @param {ComponentIdList} bitIds - list of remote component ids to delete\n * @param {boolean} force - delete component that are used by other components.\n */\nasync function removeRemote(\n workspace: Workspace | undefined,\n bitIds: ComponentIdList,\n force: boolean\n): Promise<RemovedObjects[]> {\n const groupedBitsByScope = groupArray(bitIds, 'scope');\n const remotes = workspace ? await getScopeRemotes(workspace.scope.legacyScope) : await Remotes.getGlobalRemotes();\n const shouldGoToCentralHub = remotes.shouldGoToCentralHub(Object.keys(groupedBitsByScope));\n if (shouldGoToCentralHub) {\n const http = await Http.connect(CENTRAL_BIT_HUB_URL, CENTRAL_BIT_HUB_NAME);\n return http.deleteViaCentralHub(\n bitIds.map((id) => id.toString()),\n { force, idsAreLanes: false }\n );\n }\n const context = {};\n enrichContextFromGlobal(context);\n const removeP = Object.keys(groupedBitsByScope).map(async (key) => {\n const resolvedRemote = await remotes.resolve(key, workspace?.scope.legacyScope);\n const idsStr = groupedBitsByScope[key].map((id) => id.toStringWithoutVersion());\n return resolvedRemote.deleteMany(idsStr, force, context);\n });\n\n return Promise.all(removeP);\n}\n\n/**\n * removeLocal - remove local (imported, new staged components) from modules and bitmap according to flags\n * @param {ComponentIdList} bitIds - list of component ids to delete\n * @param {boolean} force - delete component that are used by other components.\n * @param {boolean} deleteFiles - delete component that are used by other components.\n */\nasync function removeLocal(\n workspace: Workspace,\n bitIds: ComponentIdList,\n force: boolean,\n track: boolean,\n deleteFiles: boolean\n): Promise<RemovedLocalObjects> {\n const consumer = workspace.consumer;\n // local remove in case user wants to delete tagged components\n const modifiedComponents = new ComponentIdList();\n const nonModifiedComponents = new ComponentIdList();\n if (!bitIds.length) return new RemovedLocalObjects();\n if (!force) {\n await pMapSeries(bitIds, async (id) => {\n try {\n const componentStatus = await workspace.getComponentStatusById(id);\n if (componentStatus.modified) modifiedComponents.push(id);\n else nonModifiedComponents.push(id);\n } catch (err: any) {\n // if a component has an error, such as, missing main file, we do want to allow removing that component\n if (Component.isComponentInvalidByErrorType(err)) {\n nonModifiedComponents.push(id);\n } else {\n throw err;\n }\n }\n });\n }\n const idsToRemove = force ? bitIds : nonModifiedComponents;\n const componentsList = new ComponentsList(consumer);\n const newComponents = (await componentsList.listNewComponents(false)) as ComponentIdList;\n const idsToRemoveFromScope = ComponentIdList.fromArray(\n idsToRemove.filter((id) => !newComponents.hasWithoutVersion(id))\n );\n const idsToCleanFromWorkspace = ComponentIdList.fromArray(\n idsToRemove.filter((id) => newComponents.hasWithoutVersion(id))\n );\n const { components: componentsToRemove, invalidComponents } = await consumer.loadComponents(idsToRemove, false);\n const { removedComponentIds, missingComponents, dependentBits, removedFromLane } = await consumer.scope.removeMany(\n idsToRemoveFromScope,\n force,\n consumer\n );\n // otherwise, components should still be in .bitmap file\n idsToCleanFromWorkspace.push(...removedComponentIds);\n if (idsToCleanFromWorkspace.length) {\n if (deleteFiles) await deleteComponentsFiles(consumer, idsToCleanFromWorkspace);\n if (!track) {\n const invalidComponentsIds = invalidComponents.map((i) => i.id);\n const removedComponents = componentsToRemove.filter((c) => idsToCleanFromWorkspace.hasWithoutVersion(c.id));\n await packageJsonUtils.removeComponentsFromWorkspacesAndDependencies(\n consumer,\n removedComponents,\n invalidComponentsIds\n );\n await consumer.cleanFromBitMap(idsToCleanFromWorkspace);\n await workspace.cleanFromConfig(idsToCleanFromWorkspace);\n }\n }\n return new RemovedLocalObjects(\n ComponentIdList.uniqFromArray([...idsToCleanFromWorkspace, ...removedComponentIds]),\n missingComponents,\n modifiedComponents,\n dependentBits,\n removedFromLane\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,aAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,YAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,SAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,QAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,WAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,UAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,UAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,SAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,yBAAA;EAAA,MAAAR,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAA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jC,QAAQ,EACR+B,iBAAiB,EACjBD,oBACF,CAAC;MACD,MAAM9B,QAAQ,CAACkC,eAAe,CAACf,uBAAuB,CAAC;MACvD,MAAM7E,SAAS,CAAC6F,eAAe,CAAChB,uBAAuB,CAAC;IAC1D;EACF;EACA,OAAO,KAAIjD,0CAAmB,EAC5BlB,8BAAe,CAACoF,aAAa,CAAC,CAAC,GAAGjB,uBAAuB,EAAE,GAAGK,mBAAmB,CAAC,CAAC,EACnFC,iBAAiB,EACjBxB,kBAAkB,EAClByB,aAAa,EACbC,eACF,CAAC;AACH"}
|
|
1
|
+
{"version":3,"names":["_groupArray","data","_interopRequireDefault","require","_lodash","_componentId","_lodash2","_constants","_bitError","_enrichContextFromGlobal","_logger","_http","_remotes","_scopeRemotes","_deleteComponentFiles","_componentsList","_consumerComponent","packageJsonUtils","_interopRequireWildcard","_pMapSeries","_removedLocalObjects","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","removeComponents","workspace","ids","force","remote","track","deleteFiles","logger","debugAndAddBreadCrumb","toString","bitIdsLatest","ComponentIdList","fromArray","map","id","changeVersion","LATEST_BIT_VERSION","localIds","remoteIds","partition","isLocal","length","BitError","join","remoteResult","isEmpty","removeRemote","localResult","removeLocal","RemovedLocalObjects","bitIds","groupedBitsByScope","groupArray","remotes","getScopeRemotes","scope","legacyScope","Remotes","getGlobalRemotes","shouldGoToCentralHub","keys","http","Http","connect","CENTRAL_BIT_HUB_URL","CENTRAL_BIT_HUB_NAME","deleteViaCentralHub","idsAreLanes","context","enrichContextFromGlobal","removeP","key","resolvedRemote","resolve","idsStr","toStringWithoutVersion","deleteMany","Promise","all","consumer","modifiedComponents","nonModifiedComponents","pMapSeries","componentStatus","getComponentStatusById","modified","push","err","Component","isComponentInvalidByErrorType","idsToRemove","componentsList","ComponentsList","newComponents","listNewComponents","idsToRemoveFromScope","filter","hasWithoutVersion","idsToCleanFromWorkspace","components","componentsToRemove","invalidComponents","loadComponents","removedComponentIds","missingComponents","dependentBits","removedFromLane","removeMany","deleteComponentsFiles","invalidComponentsIds","removedComponents","c","removeComponentsFromWorkspacesAndDependencies","cleanFromBitMap","cleanFromConfig","uniqFromArray"],"sources":["remove-components.ts"],"sourcesContent":["import groupArray from 'group-array';\nimport partition from 'lodash.partition';\nimport { Workspace } from '@teambit/workspace';\nimport { ComponentIdList } from '@teambit/component-id';\nimport { isEmpty } from 'lodash';\nimport { CENTRAL_BIT_HUB_NAME, CENTRAL_BIT_HUB_URL, LATEST_BIT_VERSION } from '@teambit/legacy/dist/constants';\nimport { BitError } from '@teambit/bit-error';\nimport enrichContextFromGlobal from '@teambit/legacy/dist/hooks/utils/enrich-context-from-global';\nimport logger from '@teambit/legacy/dist/logger/logger';\nimport { Http } from '@teambit/legacy/dist/scope/network/http';\nimport { Remotes } from '@teambit/legacy/dist/remotes';\nimport { getScopeRemotes } from '@teambit/legacy/dist/scope/scope-remotes';\nimport deleteComponentsFiles from '@teambit/legacy/dist/consumer/component-ops/delete-component-files';\nimport ComponentsList from '@teambit/legacy/dist/consumer/component/components-list';\nimport Component from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport RemovedObjects from '@teambit/legacy/dist/scope/removed-components';\nimport * as packageJsonUtils from '@teambit/legacy/dist/consumer/component/package-json-utils';\nimport pMapSeries from 'p-map-series';\nimport { RemovedLocalObjects } from './removed-local-objects';\n\nexport type RemoveComponentsResult = { localResult: RemovedLocalObjects; remoteResult: RemovedObjects[] };\n\n/**\n * Remove components local and remote\n * splits array of ids into local and remote and removes according to flags\n * @param {string[]} ids - list of remote component ids to delete\n * @param {boolean} force - delete component that are used by other components.\n * @param {boolean} remote - delete component from a remote scope\n * @param {boolean} track - keep tracking local staged components in bitmap.\n * @param {boolean} deleteFiles - delete local added files from fs.\n */\nexport async function removeComponents({\n workspace,\n ids,\n force,\n remote,\n track,\n deleteFiles,\n}: {\n workspace?: Workspace; // when remote is false, it's always set\n ids: ComponentIdList;\n force: boolean;\n remote: boolean;\n track: boolean;\n deleteFiles: boolean;\n}): Promise<RemoveComponentsResult> {\n logger.debugAndAddBreadCrumb('removeComponents', `{ids}. force: ${force.toString()}`, { ids: ids.toString() });\n // added this to remove support for remove only one version from a component\n const bitIdsLatest = ComponentIdList.fromArray(\n ids.map((id) => {\n return id.changeVersion(LATEST_BIT_VERSION);\n })\n );\n const [localIds, remoteIds] = partition(bitIdsLatest, (id) => id.isLocal());\n if (remote && localIds.length) {\n throw new BitError(\n `unable to remove the remote components: ${localIds.join(',')} as they don't contain a scope-name`\n );\n }\n const remoteResult = remote && !isEmpty(remoteIds) ? await removeRemote(workspace, remoteIds, force) : [];\n const localResult = !remote\n ? await removeLocal(workspace as Workspace, bitIdsLatest, force, track, deleteFiles)\n : new RemovedLocalObjects();\n\n return { localResult, remoteResult };\n}\n\n/**\n * Remove remote component from the remote\n * this method groups remote components by remote name and deletes remote components together\n * @param {ComponentIdList} bitIds - list of remote component ids to delete\n * @param {boolean} force - delete component that are used by other components.\n */\nasync function removeRemote(\n workspace: Workspace | undefined,\n bitIds: ComponentIdList,\n force: boolean\n): Promise<RemovedObjects[]> {\n const groupedBitsByScope = groupArray(bitIds, 'scope');\n const remotes = workspace ? await getScopeRemotes(workspace.scope.legacyScope) : await Remotes.getGlobalRemotes();\n const shouldGoToCentralHub = remotes.shouldGoToCentralHub(Object.keys(groupedBitsByScope));\n if (shouldGoToCentralHub) {\n const http = await Http.connect(CENTRAL_BIT_HUB_URL, CENTRAL_BIT_HUB_NAME);\n return http.deleteViaCentralHub(\n bitIds.map((id) => id.toString()),\n { force, idsAreLanes: false }\n );\n }\n const context = {};\n enrichContextFromGlobal(context);\n const removeP = Object.keys(groupedBitsByScope).map(async (key) => {\n const resolvedRemote = await remotes.resolve(key, workspace?.scope.legacyScope);\n const idsStr = groupedBitsByScope[key].map((id) => id.toStringWithoutVersion());\n return resolvedRemote.deleteMany(idsStr, force, context);\n });\n\n return Promise.all(removeP);\n}\n\n/**\n * removeLocal - remove local (imported, new staged components) from modules and bitmap according to flags\n * @param {ComponentIdList} bitIds - list of component ids to delete\n * @param {boolean} force - delete component that are used by other components.\n * @param {boolean} deleteFiles - delete component that are used by other components.\n */\nasync function removeLocal(\n workspace: Workspace,\n bitIds: ComponentIdList,\n force: boolean,\n track: boolean,\n deleteFiles: boolean\n): Promise<RemovedLocalObjects> {\n const consumer = workspace.consumer;\n // local remove in case user wants to delete tagged components\n const modifiedComponents = new ComponentIdList();\n const nonModifiedComponents = new ComponentIdList();\n if (!bitIds.length) return new RemovedLocalObjects();\n if (!force) {\n await pMapSeries(bitIds, async (id) => {\n try {\n const componentStatus = await workspace.getComponentStatusById(id);\n if (componentStatus.modified) modifiedComponents.push(id);\n else nonModifiedComponents.push(id);\n } catch (err: any) {\n // if a component has an error, such as, missing main file, we do want to allow removing that component\n if (Component.isComponentInvalidByErrorType(err)) {\n nonModifiedComponents.push(id);\n } else {\n throw err;\n }\n }\n });\n }\n const idsToRemove = force ? bitIds : nonModifiedComponents;\n const componentsList = new ComponentsList(consumer);\n const newComponents = (await componentsList.listNewComponents(false)) as ComponentIdList;\n const idsToRemoveFromScope = ComponentIdList.fromArray(\n idsToRemove.filter((id) => !newComponents.hasWithoutVersion(id))\n );\n const idsToCleanFromWorkspace = ComponentIdList.fromArray(\n idsToRemove.filter((id) => newComponents.hasWithoutVersion(id))\n );\n const { components: componentsToRemove, invalidComponents } = await consumer.loadComponents(idsToRemove, false);\n const { removedComponentIds, missingComponents, dependentBits, removedFromLane } = await consumer.scope.removeMany(\n idsToRemoveFromScope,\n force,\n consumer\n );\n // otherwise, components should still be in .bitmap file\n idsToCleanFromWorkspace.push(...removedComponentIds);\n if (idsToCleanFromWorkspace.length) {\n if (deleteFiles) await deleteComponentsFiles(consumer, idsToCleanFromWorkspace);\n if (!track) {\n const invalidComponentsIds = invalidComponents.map((i) => i.id);\n const removedComponents = componentsToRemove.filter((c) => idsToCleanFromWorkspace.hasWithoutVersion(c.id));\n await packageJsonUtils.removeComponentsFromWorkspacesAndDependencies(\n consumer,\n removedComponents,\n invalidComponentsIds\n );\n await consumer.cleanFromBitMap(idsToCleanFromWorkspace);\n await workspace.cleanFromConfig(idsToCleanFromWorkspace);\n }\n }\n return new RemovedLocalObjects(\n ComponentIdList.uniqFromArray([...idsToCleanFromWorkspace, ...removedComponentIds]),\n missingComponents,\n modifiedComponents,\n dependentBits,\n removedFromLane\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,aAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,YAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,SAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,QAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,WAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,UAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,UAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,SAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,yBAAA;EAAA,MAAAR,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAM,wBAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;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C;MACD,MAAM9B,QAAQ,CAACkC,eAAe,CAACf,uBAAuB,CAAC;MACvD,MAAM7E,SAAS,CAAC6F,eAAe,CAAChB,uBAAuB,CAAC;IAC1D;EACF;EACA,OAAO,KAAIjD,0CAAmB,EAC5BlB,8BAAe,CAACoF,aAAa,CAAC,CAAC,GAAGjB,uBAAuB,EAAE,GAAGK,mBAAmB,CAAC,CAAC,EACnFC,iBAAiB,EACjBxB,kBAAkB,EAClByB,aAAa,EACbC,eACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_componentId","data","require","_chalk","_interopRequireDefault","_lodash","obj","__esModule","default","removeTemplate","dependentBits","modifiedComponents","removedComponentIds","missingComponents","removedFromLane","isRemote","paintMissingComponents","isEmpty","chalk","red","map","id","ComponentID","fromObject","version","toStringWithoutVersion","toString","paintRemoved","compToStr","comps","getMsg","isLane","removedFrom","msg","green","newLine","compOutput","laneOutput","paintUnRemovedComponents","Object","keys","key","header","underline","body","join","paintModifiedComponents","modifiedStr"],"sources":["remove-template.ts"],"sourcesContent":["import { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport chalk from 'chalk';\nimport { isEmpty } from 'lodash';\n\nexport function removeTemplate(\n { dependentBits, modifiedComponents = [], removedComponentIds, missingComponents, removedFromLane },\n isRemote\n) {\n const paintMissingComponents = () => {\n if (isEmpty(missingComponents)) return '';\n return (\n chalk.red('missing components:') +\n chalk(\n ` ${missingComponents.map((id) => {\n if (!(id instanceof ComponentID)) id = ComponentID.fromObject(id); // when the id was received from a remote it's not an instance of ComponentID\n return id.version === 'latest' ? id.toStringWithoutVersion() : id.toString();\n })}\\n`\n )\n );\n };\n const paintRemoved = () => {\n if (isEmpty(removedComponentIds) && isEmpty(removedFromLane)) return '';\n const compToStr = (comps: ComponentIdList) =>\n chalk(` ${comps.map((id) => (id.version === 'latest' ? id.toStringWithoutVersion() : id.toString()))}\\n`);\n const getMsg = (isLane = false) => {\n const removedFrom = isLane ? 'lane' : 'scope';\n const msg = isRemote\n ? `successfully removed components from the remote ${removedFrom}:`\n : `successfully removed components from the local ${removedFrom}:`;\n return chalk.green(msg);\n };\n const newLine = '\\n';\n const compOutput = isEmpty(removedComponentIds) ? '' : getMsg(false) + compToStr(removedComponentIds) + newLine;\n const laneOutput = isEmpty(removedFromLane) ? '' : getMsg(true) + compToStr(removedFromLane);\n\n return `${compOutput}${laneOutput}`;\n };\n\n const paintUnRemovedComponents = () => {\n if (isEmpty(dependentBits)) return '';\n return Object.keys(dependentBits)\n .map((key) => {\n const header = chalk.underline.red(\n `error: unable to delete ${key}, because the following components depend on it:`\n );\n const body = dependentBits[key].join('\\n');\n return `${header}\\n${body}`;\n })\n .join('\\n\\n');\n };\n\n const paintModifiedComponents = () => {\n if (isEmpty(modifiedComponents)) return '';\n const modifiedStr = modifiedComponents.map((id: ComponentID) =>\n id.version === 'latest' ? id.toStringWithoutVersion() : id.toString()\n );\n return `${\n chalk.red('error: unable to remove modified components (please use --force to remove modified components)\\n') +\n chalk(`- ${modifiedStr}`)\n }`;\n };\n\n return (\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n paintUnRemovedComponents(dependentBits) +\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n paintRemoved(removedComponentIds) +\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n paintMissingComponents(missingComponents) +\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n paintModifiedComponents(modifiedComponents)\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAA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ACpC,IAAI,IAAA7B,iBAAO,EAACN,kBAAkB,CAAC,EAAE,OAAO,EAAE;IAC1C,MAAMoC,WAAW,GAAGpC,kBAAkB,CAACS,GAAG,CAAEC,EAAe,IACzDA,EAAE,CAACG,OAAO,KAAK,QAAQ,GAAGH,EAAE,CAACI,sBAAsB,CAAC,CAAC,GAAGJ,EAAE,CAACK,QAAQ,CAAC,CACtE,CAAC;IACD,OAAQ,GACNR,gBAAK,CAACC,GAAG,CAAC,kGAAkG,CAAC,GAC7G,IAAAD,gBAAK,EAAE,KAAI6B,WAAY,EAAC,CACzB,EAAC;EACJ,CAAC;EAED;IACE;IACAT,wBAAwB,CAAC5B,aAAa,CAAC;IACvC;IACAiB,YAAY,CAACf,mBAAmB,CAAC;IACjC;IACAI,sBAAsB,CAACH,iBAAiB,CAAC;IACzC;IACAiC,uBAAuB,CAACnC,kBAAkB;EAAC;AAE/C"}
|
|
1
|
+
{"version":3,"names":["_componentId","data","require","_chalk","_interopRequireDefault","_lodash","obj","__esModule","default","removeTemplate","dependentBits","modifiedComponents","removedComponentIds","missingComponents","removedFromLane","isRemote","paintMissingComponents","isEmpty","chalk","red","map","id","ComponentID","fromObject","version","toStringWithoutVersion","toString","paintRemoved","compToStr","comps","getMsg","isLane","removedFrom","msg","green","newLine","compOutput","laneOutput","paintUnRemovedComponents","Object","keys","key","header","underline","body","join","paintModifiedComponents","modifiedStr"],"sources":["remove-template.ts"],"sourcesContent":["import { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport chalk from 'chalk';\nimport { isEmpty } from 'lodash';\n\nexport function removeTemplate(\n { dependentBits, modifiedComponents = [], removedComponentIds, missingComponents, removedFromLane },\n isRemote\n) {\n const paintMissingComponents = () => {\n if (isEmpty(missingComponents)) return '';\n return (\n chalk.red('missing components:') +\n chalk(\n ` ${missingComponents.map((id) => {\n if (!(id instanceof ComponentID)) id = ComponentID.fromObject(id); // when the id was received from a remote it's not an instance of ComponentID\n return id.version === 'latest' ? id.toStringWithoutVersion() : id.toString();\n })}\\n`\n )\n );\n };\n const paintRemoved = () => {\n if (isEmpty(removedComponentIds) && isEmpty(removedFromLane)) return '';\n const compToStr = (comps: ComponentIdList) =>\n chalk(` ${comps.map((id) => (id.version === 'latest' ? id.toStringWithoutVersion() : id.toString()))}\\n`);\n const getMsg = (isLane = false) => {\n const removedFrom = isLane ? 'lane' : 'scope';\n const msg = isRemote\n ? `successfully removed components from the remote ${removedFrom}:`\n : `successfully removed components from the local ${removedFrom}:`;\n return chalk.green(msg);\n };\n const newLine = '\\n';\n const compOutput = isEmpty(removedComponentIds) ? '' : getMsg(false) + compToStr(removedComponentIds) + newLine;\n const laneOutput = isEmpty(removedFromLane) ? '' : getMsg(true) + compToStr(removedFromLane);\n\n return `${compOutput}${laneOutput}`;\n };\n\n const paintUnRemovedComponents = () => {\n if (isEmpty(dependentBits)) return '';\n return Object.keys(dependentBits)\n .map((key) => {\n const header = chalk.underline.red(\n `error: unable to delete ${key}, because the following components depend on it:`\n );\n const body = dependentBits[key].join('\\n');\n return `${header}\\n${body}`;\n })\n .join('\\n\\n');\n };\n\n const paintModifiedComponents = () => {\n if (isEmpty(modifiedComponents)) return '';\n const modifiedStr = modifiedComponents.map((id: ComponentID) =>\n id.version === 'latest' ? id.toStringWithoutVersion() : id.toString()\n );\n return `${\n chalk.red('error: unable to remove modified components (please use --force to remove modified components)\\n') +\n chalk(`- ${modifiedStr}`)\n }`;\n };\n\n return (\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n paintUnRemovedComponents(dependentBits) +\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n paintRemoved(removedComponentIds) +\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n paintMissingComponents(missingComponents) +\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n paintModifiedComponents(modifiedComponents)\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,aAAA;EAA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GAAGlC,aAAa,CAAC+B,GAAG,CAAC,CAACI,IAAI,CAAC,IAAI,CAAC;MAC1C,OAAQ,GAAEH,MAAO,KAAIE,IAAK,EAAC;IAC7B,CAAC,CAAC,CACDC,IAAI,CAAC,MAAM,CAAC;EACjB,CAAC;EAED,MAAMC,uBAAuB,GAAGA,CAAA,KAAM;IACpC,IAAI,IAAA7B,iBAAO,EAACN,kBAAkB,CAAC,EAAE,OAAO,EAAE;IAC1C,MAAMoC,WAAW,GAAGpC,kBAAkB,CAACS,GAAG,CAAEC,EAAe,IACzDA,EAAE,CAACG,OAAO,KAAK,QAAQ,GAAGH,EAAE,CAACI,sBAAsB,CAAC,CAAC,GAAGJ,EAAE,CAACK,QAAQ,CAAC,CACtE,CAAC;IACD,OAAQ,GACNR,gBAAK,CAACC,GAAG,CAAC,kGAAkG,CAAC,GAC7G,IAAAD,gBAAK,EAAE,KAAI6B,WAAY,EAAC,CACzB,EAAC;EACJ,CAAC;EAED;IACE;IACAT,wBAAwB,CAAC5B,aAAa,CAAC;IACvC;IACAiB,YAAY,CAACf,mBAAmB,CAAC;IACjC;IACAI,sBAAsB,CAACH,iBAAiB,CAAC;IACzC;IACAiC,uBAAuB,CAACnC,kBAAkB;EAAC;AAE/C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_harmony","data","require","RemoveAspect","exports","Aspect","create","id"],"sources":["remove.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const RemoveAspect = Aspect.create({\n id: 'teambit.component/remove',\n});\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EACxCC,EAAE,EAAE;AACN,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"names":["_harmony","data","require","RemoveAspect","exports","Aspect","create","id"],"sources":["remove.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const RemoveAspect = Aspect.create({\n id: 'teambit.component/remove',\n});\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EACxCC,EAAE,EAAE;AACN,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RemoveFragment","constructor","remove","_defineProperty","renderRow","component","isRemoved","title","content","toString","json","getRemoveInfo","exports"],"sources":["remove.fragment.ts"],"sourcesContent":["import { Component, ShowFragment } from '@teambit/component';\nimport { RemoveMain } from './remove.main.runtime';\n\nexport class RemoveFragment implements ShowFragment {\n constructor(private remove: RemoveMain) {}\n\n title = 'removed';\n\n async renderRow(component: Component) {\n const isRemoved = this.remove.isRemoved(component);\n return {\n title: this.title,\n // when it's not removed, set as an empty string so then it won't be shown in bit-show\n content: isRemoved ? isRemoved.toString() : '',\n };\n }\n\n async json(component: Component) {\n return {\n title: this.title,\n json: this.remove.getRemoveInfo(component),\n };\n }\n\n weight = 3;\n}\n"],"mappings":";;;;;;;;;AAGO,MAAMA,cAAc,CAAyB;EAClDC,WAAWA,CAASC,MAAkB,EAAE;IAAA,KAApBA,MAAkB,GAAlBA,MAAkB;IAAAC,eAAA,gBAE9B,SAAS;IAAAA,eAAA,iBAkBR,CAAC;EApB+B;EAIzC,MAAMC,SAASA,CAACC,SAAoB,EAAE;IACpC,MAAMC,SAAS,GAAG,IAAI,CAACJ,MAAM,CAACI,SAAS,CAACD,SAAS,CAAC;IAClD,OAAO;MACLE,KAAK,EAAE,IAAI,CAACA,KAAK;MACjB;MACAC,OAAO,EAAEF,SAAS,GAAGA,SAAS,CAACG,QAAQ,CAAC,CAAC,GAAG;IAC9C,CAAC;EACH;EAEA,MAAMC,IAAIA,CAACL,SAAoB,EAAE;IAC/B,OAAO;MACLE,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBG,IAAI,EAAE,IAAI,CAACR,MAAM,CAACS,aAAa,CAACN,SAAS;IAC3C,CAAC;EACH;AAGF;AAACO,OAAA,CAAAZ,cAAA,GAAAA,cAAA"}
|
|
1
|
+
{"version":3,"names":["RemoveFragment","constructor","remove","_defineProperty","renderRow","component","isRemoved","title","content","toString","json","getRemoveInfo","exports"],"sources":["remove.fragment.ts"],"sourcesContent":["import { Component, ShowFragment } from '@teambit/component';\nimport { RemoveMain } from './remove.main.runtime';\n\nexport class RemoveFragment implements ShowFragment {\n constructor(private remove: RemoveMain) {}\n\n title = 'removed';\n\n async renderRow(component: Component) {\n const isRemoved = this.remove.isRemoved(component);\n return {\n title: this.title,\n // when it's not removed, set as an empty string so then it won't be shown in bit-show\n content: isRemoved ? isRemoved.toString() : '',\n };\n }\n\n async json(component: Component) {\n return {\n title: this.title,\n json: this.remove.getRemoveInfo(component),\n };\n }\n\n weight = 3;\n}\n"],"mappings":";;;;;;;;;AAGO,MAAMA,cAAc,CAAyB;EAClDC,WAAWA,CAASC,MAAkB,EAAE;IAAA,KAApBA,MAAkB,GAAlBA,MAAkB;IAAAC,eAAA,gBAE9B,SAAS;IAAAA,eAAA,iBAkBR,CAAC;EApB+B;EAIzC,MAAMC,SAASA,CAACC,SAAoB,EAAE;IACpC,MAAMC,SAAS,GAAG,IAAI,CAACJ,MAAM,CAACI,SAAS,CAACD,SAAS,CAAC;IAClD,OAAO;MACLE,KAAK,EAAE,IAAI,CAACA,KAAK;MACjB;MACAC,OAAO,EAAEF,SAAS,GAAGA,SAAS,CAACG,QAAQ,CAAC,CAAC,GAAG;IAC9C,CAAC;EACH;EAEA,MAAMC,IAAIA,CAACL,SAAoB,EAAE;IAC/B,OAAO;MACLE,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBG,IAAI,EAAE,IAAI,CAACR,MAAM,CAACS,aAAa,CAACN,SAAS;IAC3C,CAAC;EACH;AAGF;AAACO,OAAA,CAAAZ,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_logger","_workspace","_componentId","_exceptions","_importer","_lodash","_hasWildcard","_interopRequireDefault","_listScope","_bitError","_deleteComponentFiles","_dependencyResolver","_componentIssues","_issues","_pMapSeries","_noHeadNoVersion","_component","_packageJsonUtils","_removeCmd","_removeComponents","_remove","_remove2","_recoverCmd","_deleteCmd","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","BEFORE_REMOVE","RemoveMain","constructor","workspace","logger","importer","depResolver","remove","componentsPattern","force","remote","track","deleteFiles","setStatusLine","bitIds","getRemoteBitIdsToRemove","getLocalBitIdsToRemove","consumer","removeResults","removeComponents","ids","ComponentIdList","fromArray","onDestroy","removeLocallyByIds","reasonForRemoval","OutsideWorkspaceError","results","bitMap","write","markRemoveComps","componentIds","shouldUpdateMain","components","getMany","removeComponentsFromNodeModules","map","c","state","_consumer","config","removed","removeOnMain","compId","addComponentConfig","RemoveAspect","id","deleteComponentsFiles","deleteComps","opts","ConsumerNotFound","idsByPattern","newComps","filter","hasVersion","length","BitError","toString","join","currentLane","getCurrentLaneObject","updateMain","isNew","Error","recover","compIdStr","options","bitMapEntry","find","compMap","fullName","toStringWithoutVersion","importComp","idStr","import","installNpmPackages","skipDependencyInstallation","writeConfigFiles","skipWriteConfigFiles","override","setAsRemovedFalse","addSpecificComponentConfig","compFromScope","scope","get","rootDir","removeComponentConfig","comp","isRemoved","resolveComponentId","idOnLane","getComponent","compIdWithPossibleVer","changeVersion","head","_legacy","getRemoteComponent","err","NoHeadNoVersion","throwForMainComponentWhenOnLane","laneComps","toBitIds","mainComps","hasWithoutVersion","getRemoveInfo","component","extensions","findExtension","isRemovedByIdWithoutLoadingComponent","componentId","bitmapEntry","getBitmapEntryIfExist","isRecovered","modelComp","getBitObjectModelComponent","versionObj","getBitObjectVersion","version","getRemovedStaged","isOnMain","getRemovedStagedFromMain","getRemovedStagedFromLane","addRemovedDependenciesIssues","pMapSeries","addRemovedDepIssue","dependencies","getComponentDependencies","removedWithUndefined","Promise","all","dep","undefined","compact","issues","getOrCreate","IssuesClasses","RemovedDependencies","stagedConfig","getStagedConfig","getAll","compConfig","laneIds","toComponentIds","workspaceIds","listIds","laneCompIdsNotInWorkspace","wId","isEqualWithoutVersion","comps","staged","snapDistance","getSnapDistance","warn","name","isSourceAhead","hasWildcard","getRemoteBitIdsByWildcards","ComponentID","fromString","provider","cli","loggerMain","componentAspect","importerMain","createLogger","removeMain","registerAddComponentsIssues","bind","registerShowFragments","RemoveFragment","register","RemoveCmd","DeleteCmd","RecoverCmd","exports","WorkspaceAspect","CLIAspect","LoggerAspect","ComponentAspect","ImporterAspect","DependencyResolverAspect","IssuesAspect","MainRuntime","addRuntime","_default"],"sources":["remove.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport { ImporterAspect, ImporterMain } from '@teambit/importer';\nimport { compact } from 'lodash';\nimport hasWildcard from '@teambit/legacy/dist/utils/string/has-wildcard';\nimport { getRemoteBitIdsByWildcards } from '@teambit/legacy/dist/api/consumer/lib/list-scope';\nimport { BitError } from '@teambit/bit-error';\nimport deleteComponentsFiles from '@teambit/legacy/dist/consumer/component-ops/delete-component-files';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { IssuesAspect, IssuesMain } from '@teambit/issues';\nimport pMapSeries from 'p-map-series';\nimport { NoHeadNoVersion } from '@teambit/legacy/dist/scope/exceptions/no-head-no-version';\nimport { ComponentAspect, Component, ComponentMain } from '@teambit/component';\nimport { removeComponentsFromNodeModules } from '@teambit/legacy/dist/consumer/component/package-json-utils';\nimport { RemoveCmd } from './remove-cmd';\nimport { RemoveComponentsResult, removeComponents } from './remove-components';\nimport { RemoveAspect } from './remove.aspect';\nimport { RemoveFragment } from './remove.fragment';\nimport { RecoverCmd, RecoverOptions } from './recover-cmd';\nimport { DeleteCmd } from './delete-cmd';\n\nconst BEFORE_REMOVE = 'removing components';\n\nexport type RemoveInfo = {\n removed: boolean;\n /**\n * whether to remove the component from default lane once merged\n */\n removeOnMain?: boolean;\n};\n\nexport class RemoveMain {\n constructor(\n private workspace: Workspace,\n public logger: Logger,\n private importer: ImporterMain,\n private depResolver: DependencyResolverMain\n ) {}\n\n async remove({\n componentsPattern,\n force = false,\n remote = false,\n track = false,\n deleteFiles = true,\n }: {\n componentsPattern: string;\n force?: boolean;\n remote?: boolean;\n track?: boolean;\n deleteFiles?: boolean;\n }): Promise<RemoveComponentsResult> {\n this.logger.setStatusLine(BEFORE_REMOVE);\n const bitIds = remote\n ? await this.getRemoteBitIdsToRemove(componentsPattern)\n : await this.getLocalBitIdsToRemove(componentsPattern);\n this.logger.setStatusLine(BEFORE_REMOVE); // again because the loader might changed when talking to the remote\n const consumer = this.workspace?.consumer;\n const removeResults = await removeComponents({\n workspace: this.workspace,\n ids: ComponentIdList.fromArray(bitIds),\n force,\n remote,\n track,\n deleteFiles,\n });\n if (consumer) await consumer.onDestroy('remove');\n return removeResults;\n }\n\n /**\n * remove components from the workspace.\n */\n async removeLocallyByIds(\n ids: ComponentID[],\n { force = false, reasonForRemoval }: { force?: boolean; reasonForRemoval?: string } = {}\n ) {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const results = await removeComponents({\n workspace: this.workspace,\n ids: ComponentIdList.fromArray(ids),\n force,\n remote: false,\n track: false,\n deleteFiles: true,\n });\n await this.workspace.bitMap.write(`remove (by ${reasonForRemoval || 'N/A'})`);\n\n return results;\n }\n\n async markRemoveComps(componentIds: ComponentID[], shouldUpdateMain = false) {\n const components = await this.workspace.getMany(componentIds);\n await removeComponentsFromNodeModules(\n this.workspace.consumer,\n components.map((c) => c.state._consumer)\n );\n // don't use `this.workspace.addSpecificComponentConfig`, if the component has component.json it will be deleted\n // during this removal along with the entire component dir.\n const config: RemoveInfo = { removed: true };\n if (shouldUpdateMain) config.removeOnMain = true;\n componentIds.map((compId) => this.workspace.bitMap.addComponentConfig(compId, RemoveAspect.id, config));\n await this.workspace.bitMap.write('delete');\n const bitIds = ComponentIdList.fromArray(componentIds.map((id) => id));\n await deleteComponentsFiles(this.workspace.consumer, bitIds);\n\n return componentIds;\n }\n\n async deleteComps(componentsPattern: string, opts: { updateMain?: boolean } = {}): Promise<ComponentID[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n const newComps = componentIds.filter((id) => !id.hasVersion());\n if (newComps.length) {\n throw new BitError(\n `no need to delete the following new component(s), please remove them by \"bit remove\"\\n${newComps\n .map((id) => id.toString())\n .join('\\n')}`\n );\n }\n const currentLane = await this.workspace.getCurrentLaneObject();\n const { updateMain } = opts;\n if (!updateMain && currentLane?.isNew) {\n throw new Error(\n 'no need to delete components from an un-exported lane, you can remove them by running \"bit remove\"'\n );\n }\n\n return this.markRemoveComps(componentIds, updateMain);\n }\n\n /**\n * recover a soft-removed component.\n * there are 4 different scenarios.\n * 1. a component was just soft-removed, it wasn't snapped yet. so it's now in .bitmap with the \"removed\" aspect entry.\n * 1.a. the component still exists in the local scope. no need to import. write it from there.\n * 1.b. the component doesn't exist in the local scope. import it.\n * 2. soft-removed and then snapped. It's not in .bitmap now.\n * 3. soft-removed, snapped, exported. it's not in .bitmap now.\n * 4. a soft-removed components was imported, so it's now in .bitmap without the \"removed\" aspect entry.\n * 5. workspace is empty. the soft-removed component is on the remote.\n * returns `true` if it was recovered. `false` if the component wasn't soft-removed, so nothing to recover from.\n */\n async recover(compIdStr: string, options: RecoverOptions): Promise<boolean> {\n if (!this.workspace) throw new ConsumerNotFound();\n const bitMapEntry = this.workspace.consumer.bitMap.components.find((compMap) => {\n return compMap.id.fullName === compIdStr || compMap.id.toStringWithoutVersion() === compIdStr;\n });\n const importComp = async (idStr: string) => {\n await this.importer.import({\n ids: [idStr],\n installNpmPackages: !options.skipDependencyInstallation,\n writeConfigFiles: !options.skipWriteConfigFiles,\n override: true,\n });\n };\n const setAsRemovedFalse = async (compId: ComponentID) => {\n await this.workspace.addSpecificComponentConfig(compId, RemoveAspect.id, { removed: false });\n await this.workspace.bitMap.write('recover');\n };\n if (bitMapEntry) {\n if (bitMapEntry.config?.[RemoveAspect.id]) {\n // case #1\n const compFromScope = await this.workspace.scope.get(bitMapEntry.id);\n if (compFromScope) {\n // in the case the component is in the scope, we prefer to write it from the scope rather than import it.\n // because in some cases the \"import\" throws an error, e.g. when the component is diverged.\n await this.workspace.write(compFromScope, bitMapEntry.rootDir);\n this.workspace.bitMap.removeComponentConfig(bitMapEntry.id, RemoveAspect.id, false);\n await this.workspace.bitMap.write('recover');\n } else {\n delete bitMapEntry.config?.[RemoveAspect.id];\n await importComp(bitMapEntry.id.toString());\n }\n return true;\n }\n // case #4\n const compId = bitMapEntry.id;\n const comp = await this.workspace.get(compId);\n if (!this.isRemoved(comp)) {\n return false;\n }\n await setAsRemovedFalse(compId);\n return true;\n }\n const compId = await this.workspace.scope.resolveComponentId(compIdStr);\n const currentLane = await this.workspace.getCurrentLaneObject();\n const idOnLane = currentLane?.getComponent(compId);\n const compIdWithPossibleVer = idOnLane ? compId.changeVersion(idOnLane.head.toString()) : compId;\n const compFromScope = await this.workspace.scope.get(compIdWithPossibleVer);\n if (compFromScope && this.isRemoved(compFromScope)) {\n // case #2 and #3\n await importComp(compIdWithPossibleVer._legacy.toString());\n await setAsRemovedFalse(compIdWithPossibleVer);\n return true;\n }\n // case #5\n let comp: Component | undefined;\n try {\n comp = await this.workspace.scope.getRemoteComponent(compId);\n } catch (err: any) {\n if (err instanceof NoHeadNoVersion) {\n throw new BitError(\n `unable to find the component ${compIdWithPossibleVer.toString()} in the current lane or main`\n );\n }\n throw err;\n }\n if (!this.isRemoved(comp)) {\n return false;\n }\n await importComp(compId._legacy.toString());\n await setAsRemovedFalse(compId);\n\n return true;\n }\n\n private async throwForMainComponentWhenOnLane(components: Component[]) {\n const currentLane = await this.workspace.getCurrentLaneObject();\n if (!currentLane) return; // user on main\n const laneComps = currentLane.toBitIds();\n const mainComps = components.filter((comp) => !laneComps.hasWithoutVersion(comp.id));\n if (mainComps.length) {\n throw new BitError(`the following components belong to main, they cannot be soft-removed when on a lane. consider removing them without --soft.\n${mainComps.map((c) => c.id.toString()).join('\\n')}`);\n }\n }\n\n getRemoveInfo(component: Component): RemoveInfo {\n const data = component.config.extensions.findExtension(RemoveAspect.id)?.config as RemoveInfo | undefined;\n return {\n removed: data?.removed || false,\n };\n }\n\n isRemoved(component: Component): boolean {\n return this.getRemoveInfo(component).removed;\n }\n\n /**\n * performant version of isRemoved() in case the component object is not available and loading it is expensive.\n */\n async isRemovedByIdWithoutLoadingComponent(componentId: ComponentID): Promise<boolean> {\n if (!componentId.hasVersion()) return false;\n const bitmapEntry = this.workspace.bitMap.getBitmapEntryIfExist(componentId);\n if (bitmapEntry && bitmapEntry.isRemoved()) return true;\n if (bitmapEntry && bitmapEntry.isRecovered()) return false;\n const modelComp = await this.workspace.scope.getBitObjectModelComponent(componentId);\n if (!modelComp) return false;\n const versionObj = await this.workspace.scope.getBitObjectVersion(modelComp, componentId.version as string);\n if (!versionObj) return false;\n return versionObj.isRemoved();\n }\n\n /**\n * get components that were soft-removed and tagged/snapped/merged but not exported yet.\n */\n async getRemovedStaged(): Promise<ComponentID[]> {\n return this.workspace.isOnMain() ? this.getRemovedStagedFromMain() : this.getRemovedStagedFromLane();\n }\n\n async addRemovedDependenciesIssues(components: Component[]) {\n await pMapSeries(components, async (component) => {\n await this.addRemovedDepIssue(component);\n });\n }\n\n private async addRemovedDepIssue(component: Component) {\n const dependencies = await this.depResolver.getComponentDependencies(component);\n const removedWithUndefined = await Promise.all(\n dependencies.map(async (dep) => {\n const isRemoved = await this.isRemovedByIdWithoutLoadingComponent(dep.componentId);\n if (isRemoved) return dep.componentId;\n return undefined;\n })\n );\n const removed = compact(removedWithUndefined).map((id) => id.toString());\n if (removed.length) {\n component.state.issues.getOrCreate(IssuesClasses.RemovedDependencies).data = removed;\n }\n }\n\n private async getRemovedStagedFromMain(): Promise<ComponentID[]> {\n const stagedConfig = await this.workspace.scope.getStagedConfig();\n return stagedConfig\n .getAll()\n .filter((compConfig) => compConfig.config?.[RemoveAspect.id]?.removed)\n .map((compConfig) => compConfig.id);\n }\n\n private async getRemovedStagedFromLane(): Promise<ComponentID[]> {\n const currentLane = await this.workspace.getCurrentLaneObject();\n if (!currentLane) return [];\n const laneIds = currentLane.toComponentIds();\n const workspaceIds = this.workspace.listIds();\n const laneCompIdsNotInWorkspace = laneIds.filter(\n (id) => !workspaceIds.find((wId) => wId.isEqualWithoutVersion(id))\n );\n if (!laneCompIdsNotInWorkspace.length) return [];\n const comps = await this.workspace.scope.getMany(laneCompIdsNotInWorkspace);\n const removed = comps.filter((c) => this.isRemoved(c));\n const staged = await Promise.all(\n removed.map(async (c) => {\n const snapDistance = await this.workspace.scope.getSnapDistance(c.id, false);\n if (snapDistance.err) {\n this.logger.warn(\n `getRemovedStagedFromLane unable to get snapDistance for ${c.id.toString()} due to ${snapDistance.err.name}`\n );\n // todo: not clear what should be done here. should we consider it as removed-staged or not.\n }\n if (snapDistance.isSourceAhead()) return c.id;\n return undefined;\n })\n );\n return compact(staged);\n }\n\n private async getLocalBitIdsToRemove(componentsPattern: string): Promise<ComponentID[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n return componentIds.map((id) => id);\n }\n\n private async getRemoteBitIdsToRemove(componentsPattern: string): Promise<ComponentID[]> {\n if (hasWildcard(componentsPattern)) {\n return getRemoteBitIdsByWildcards(componentsPattern);\n }\n return [ComponentID.fromString(componentsPattern)];\n }\n\n static slots = [];\n static dependencies = [\n WorkspaceAspect,\n CLIAspect,\n LoggerAspect,\n ComponentAspect,\n ImporterAspect,\n DependencyResolverAspect,\n IssuesAspect,\n ];\n static runtime = MainRuntime;\n\n static async provider([workspace, cli, loggerMain, componentAspect, importerMain, depResolver, issues]: [\n Workspace,\n CLIMain,\n LoggerMain,\n ComponentMain,\n ImporterMain,\n DependencyResolverMain,\n IssuesMain\n ]) {\n const logger = loggerMain.createLogger(RemoveAspect.id);\n const removeMain = new RemoveMain(workspace, logger, importerMain, depResolver);\n issues.registerAddComponentsIssues(removeMain.addRemovedDependenciesIssues.bind(removeMain));\n componentAspect.registerShowFragments([new RemoveFragment(removeMain)]);\n cli.register(\n new RemoveCmd(removeMain, workspace),\n new DeleteCmd(removeMain, workspace),\n new RecoverCmd(removeMain)\n );\n return removeMain;\n }\n}\n\nRemoveAspect.addRuntime(RemoveMain);\n\nexport default RemoveMain;\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,aAAA;EAAA,MAAAJ,IAAA,G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,GAAAA,UAAA;AAAArB,eAAA,CA3UYqB,UAAU,WA2SN,EAAE;AAAArB,eAAA,CA3SNqB,UAAU,kBA4SC,CACpB8K,4BAAe,EACfC,gBAAS,EACTC,sBAAY,EACZC,4BAAe,EACfC,0BAAc,EACdC,8CAAwB,EACxBC,sBAAY,CACb;AAAAzM,eAAA,CApTUqB,UAAU,aAqTJqL,kBAAW;AAwB9BzI,sBAAY,CAAC0I,UAAU,CAACtL,UAAU,CAAC;AAAC,IAAAuL,QAAA,GAAAV,OAAA,CAAAnM,OAAA,GAErBsB,UAAU"}
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_logger","_workspace","_componentId","_exceptions","_importer","_lodash","_hasWildcard","_interopRequireDefault","_listScope","_bitError","_deleteComponentFiles","_dependencyResolver","_componentIssues","_issues","_pMapSeries","_noHeadNoVersion","_component","_packageJsonUtils","_removeCmd","_removeComponents","_remove","_remove2","_recoverCmd","_deleteCmd","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","BEFORE_REMOVE","RemoveMain","constructor","workspace","logger","importer","depResolver","remove","componentsPattern","force","remote","track","deleteFiles","setStatusLine","bitIds","getRemoteBitIdsToRemove","getLocalBitIdsToRemove","consumer","removeResults","removeComponents","ids","ComponentIdList","fromArray","onDestroy","removeLocallyByIds","reasonForRemoval","OutsideWorkspaceError","results","bitMap","write","markRemoveComps","componentIds","shouldUpdateMain","components","getMany","removeComponentsFromNodeModules","map","c","state","_consumer","config","removed","removeOnMain","compId","addComponentConfig","RemoveAspect","id","deleteComponentsFiles","deleteComps","opts","ConsumerNotFound","idsByPattern","newComps","filter","hasVersion","length","BitError","toString","join","currentLane","getCurrentLaneObject","updateMain","isNew","Error","recover","compIdStr","options","bitMapEntry","find","compMap","fullName","toStringWithoutVersion","importComp","idStr","import","installNpmPackages","skipDependencyInstallation","writeConfigFiles","skipWriteConfigFiles","override","setAsRemovedFalse","addSpecificComponentConfig","compFromScope","scope","get","rootDir","removeComponentConfig","comp","isRemoved","resolveComponentId","idOnLane","getComponent","compIdWithPossibleVer","changeVersion","head","_legacy","getRemoteComponent","err","NoHeadNoVersion","throwForMainComponentWhenOnLane","laneComps","toBitIds","mainComps","hasWithoutVersion","getRemoveInfo","component","extensions","findExtension","isRemovedByIdWithoutLoadingComponent","componentId","bitmapEntry","getBitmapEntryIfExist","isRecovered","modelComp","getBitObjectModelComponent","versionObj","getBitObjectVersion","version","getRemovedStaged","isOnMain","getRemovedStagedFromMain","getRemovedStagedFromLane","addRemovedDependenciesIssues","pMapSeries","addRemovedDepIssue","dependencies","getComponentDependencies","removedWithUndefined","Promise","all","dep","undefined","compact","issues","getOrCreate","IssuesClasses","RemovedDependencies","stagedConfig","getStagedConfig","getAll","compConfig","laneIds","toComponentIds","workspaceIds","listIds","laneCompIdsNotInWorkspace","wId","isEqualWithoutVersion","comps","staged","snapDistance","getSnapDistance","warn","name","isSourceAhead","hasWildcard","getRemoteBitIdsByWildcards","ComponentID","fromString","provider","cli","loggerMain","componentAspect","importerMain","createLogger","removeMain","registerAddComponentsIssues","bind","registerShowFragments","RemoveFragment","register","RemoveCmd","DeleteCmd","RecoverCmd","exports","WorkspaceAspect","CLIAspect","LoggerAspect","ComponentAspect","ImporterAspect","DependencyResolverAspect","IssuesAspect","MainRuntime","addRuntime","_default"],"sources":["remove.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport { ImporterAspect, ImporterMain } from '@teambit/importer';\nimport { compact } from 'lodash';\nimport hasWildcard from '@teambit/legacy/dist/utils/string/has-wildcard';\nimport { getRemoteBitIdsByWildcards } from '@teambit/legacy/dist/api/consumer/lib/list-scope';\nimport { BitError } from '@teambit/bit-error';\nimport deleteComponentsFiles from '@teambit/legacy/dist/consumer/component-ops/delete-component-files';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { IssuesAspect, IssuesMain } from '@teambit/issues';\nimport pMapSeries from 'p-map-series';\nimport { NoHeadNoVersion } from '@teambit/legacy/dist/scope/exceptions/no-head-no-version';\nimport { ComponentAspect, Component, ComponentMain } from '@teambit/component';\nimport { removeComponentsFromNodeModules } from '@teambit/legacy/dist/consumer/component/package-json-utils';\nimport { RemoveCmd } from './remove-cmd';\nimport { RemoveComponentsResult, removeComponents } from './remove-components';\nimport { RemoveAspect } from './remove.aspect';\nimport { RemoveFragment } from './remove.fragment';\nimport { RecoverCmd, RecoverOptions } from './recover-cmd';\nimport { DeleteCmd } from './delete-cmd';\n\nconst BEFORE_REMOVE = 'removing components';\n\nexport type RemoveInfo = {\n removed: boolean;\n /**\n * whether to remove the component from default lane once merged\n */\n removeOnMain?: boolean;\n};\n\nexport class RemoveMain {\n constructor(\n private workspace: Workspace,\n public logger: Logger,\n private importer: ImporterMain,\n private depResolver: DependencyResolverMain\n ) {}\n\n async remove({\n componentsPattern,\n force = false,\n remote = false,\n track = false,\n deleteFiles = true,\n }: {\n componentsPattern: string;\n force?: boolean;\n remote?: boolean;\n track?: boolean;\n deleteFiles?: boolean;\n }): Promise<RemoveComponentsResult> {\n this.logger.setStatusLine(BEFORE_REMOVE);\n const bitIds = remote\n ? await this.getRemoteBitIdsToRemove(componentsPattern)\n : await this.getLocalBitIdsToRemove(componentsPattern);\n this.logger.setStatusLine(BEFORE_REMOVE); // again because the loader might changed when talking to the remote\n const consumer = this.workspace?.consumer;\n const removeResults = await removeComponents({\n workspace: this.workspace,\n ids: ComponentIdList.fromArray(bitIds),\n force,\n remote,\n track,\n deleteFiles,\n });\n if (consumer) await consumer.onDestroy('remove');\n return removeResults;\n }\n\n /**\n * remove components from the workspace.\n */\n async removeLocallyByIds(\n ids: ComponentID[],\n { force = false, reasonForRemoval }: { force?: boolean; reasonForRemoval?: string } = {}\n ) {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const results = await removeComponents({\n workspace: this.workspace,\n ids: ComponentIdList.fromArray(ids),\n force,\n remote: false,\n track: false,\n deleteFiles: true,\n });\n await this.workspace.bitMap.write(`remove (by ${reasonForRemoval || 'N/A'})`);\n\n return results;\n }\n\n async markRemoveComps(componentIds: ComponentID[], shouldUpdateMain = false) {\n const components = await this.workspace.getMany(componentIds);\n await removeComponentsFromNodeModules(\n this.workspace.consumer,\n components.map((c) => c.state._consumer)\n );\n // don't use `this.workspace.addSpecificComponentConfig`, if the component has component.json it will be deleted\n // during this removal along with the entire component dir.\n const config: RemoveInfo = { removed: true };\n if (shouldUpdateMain) config.removeOnMain = true;\n componentIds.map((compId) => this.workspace.bitMap.addComponentConfig(compId, RemoveAspect.id, config));\n await this.workspace.bitMap.write('delete');\n const bitIds = ComponentIdList.fromArray(componentIds.map((id) => id));\n await deleteComponentsFiles(this.workspace.consumer, bitIds);\n\n return componentIds;\n }\n\n async deleteComps(componentsPattern: string, opts: { updateMain?: boolean } = {}): Promise<ComponentID[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n const newComps = componentIds.filter((id) => !id.hasVersion());\n if (newComps.length) {\n throw new BitError(\n `no need to delete the following new component(s), please remove them by \"bit remove\"\\n${newComps\n .map((id) => id.toString())\n .join('\\n')}`\n );\n }\n const currentLane = await this.workspace.getCurrentLaneObject();\n const { updateMain } = opts;\n if (!updateMain && currentLane?.isNew) {\n throw new Error(\n 'no need to delete components from an un-exported lane, you can remove them by running \"bit remove\"'\n );\n }\n\n return this.markRemoveComps(componentIds, updateMain);\n }\n\n /**\n * recover a soft-removed component.\n * there are 4 different scenarios.\n * 1. a component was just soft-removed, it wasn't snapped yet. so it's now in .bitmap with the \"removed\" aspect entry.\n * 1.a. the component still exists in the local scope. no need to import. write it from there.\n * 1.b. the component doesn't exist in the local scope. import it.\n * 2. soft-removed and then snapped. It's not in .bitmap now.\n * 3. soft-removed, snapped, exported. it's not in .bitmap now.\n * 4. a soft-removed components was imported, so it's now in .bitmap without the \"removed\" aspect entry.\n * 5. workspace is empty. the soft-removed component is on the remote.\n * returns `true` if it was recovered. `false` if the component wasn't soft-removed, so nothing to recover from.\n */\n async recover(compIdStr: string, options: RecoverOptions): Promise<boolean> {\n if (!this.workspace) throw new ConsumerNotFound();\n const bitMapEntry = this.workspace.consumer.bitMap.components.find((compMap) => {\n return compMap.id.fullName === compIdStr || compMap.id.toStringWithoutVersion() === compIdStr;\n });\n const importComp = async (idStr: string) => {\n await this.importer.import({\n ids: [idStr],\n installNpmPackages: !options.skipDependencyInstallation,\n writeConfigFiles: !options.skipWriteConfigFiles,\n override: true,\n });\n };\n const setAsRemovedFalse = async (compId: ComponentID) => {\n await this.workspace.addSpecificComponentConfig(compId, RemoveAspect.id, { removed: false });\n await this.workspace.bitMap.write('recover');\n };\n if (bitMapEntry) {\n if (bitMapEntry.config?.[RemoveAspect.id]) {\n // case #1\n const compFromScope = await this.workspace.scope.get(bitMapEntry.id);\n if (compFromScope) {\n // in the case the component is in the scope, we prefer to write it from the scope rather than import it.\n // because in some cases the \"import\" throws an error, e.g. when the component is diverged.\n await this.workspace.write(compFromScope, bitMapEntry.rootDir);\n this.workspace.bitMap.removeComponentConfig(bitMapEntry.id, RemoveAspect.id, false);\n await this.workspace.bitMap.write('recover');\n } else {\n delete bitMapEntry.config?.[RemoveAspect.id];\n await importComp(bitMapEntry.id.toString());\n }\n return true;\n }\n // case #4\n const compId = bitMapEntry.id;\n const comp = await this.workspace.get(compId);\n if (!this.isRemoved(comp)) {\n return false;\n }\n await setAsRemovedFalse(compId);\n return true;\n }\n const compId = await this.workspace.scope.resolveComponentId(compIdStr);\n const currentLane = await this.workspace.getCurrentLaneObject();\n const idOnLane = currentLane?.getComponent(compId);\n const compIdWithPossibleVer = idOnLane ? compId.changeVersion(idOnLane.head.toString()) : compId;\n const compFromScope = await this.workspace.scope.get(compIdWithPossibleVer);\n if (compFromScope && this.isRemoved(compFromScope)) {\n // case #2 and #3\n await importComp(compIdWithPossibleVer._legacy.toString());\n await setAsRemovedFalse(compIdWithPossibleVer);\n return true;\n }\n // case #5\n let comp: Component | undefined;\n try {\n comp = await this.workspace.scope.getRemoteComponent(compId);\n } catch (err: any) {\n if (err instanceof NoHeadNoVersion) {\n throw new BitError(\n `unable to find the component ${compIdWithPossibleVer.toString()} in the current lane or main`\n );\n }\n throw err;\n }\n if (!this.isRemoved(comp)) {\n return false;\n }\n await importComp(compId._legacy.toString());\n await setAsRemovedFalse(compId);\n\n return true;\n }\n\n private async throwForMainComponentWhenOnLane(components: Component[]) {\n const currentLane = await this.workspace.getCurrentLaneObject();\n if (!currentLane) return; // user on main\n const laneComps = currentLane.toBitIds();\n const mainComps = components.filter((comp) => !laneComps.hasWithoutVersion(comp.id));\n if (mainComps.length) {\n throw new BitError(`the following components belong to main, they cannot be soft-removed when on a lane. consider removing them without --soft.\n${mainComps.map((c) => c.id.toString()).join('\\n')}`);\n }\n }\n\n getRemoveInfo(component: Component): RemoveInfo {\n const data = component.config.extensions.findExtension(RemoveAspect.id)?.config as RemoveInfo | undefined;\n return {\n removed: data?.removed || false,\n };\n }\n\n isRemoved(component: Component): boolean {\n return this.getRemoveInfo(component).removed;\n }\n\n /**\n * performant version of isRemoved() in case the component object is not available and loading it is expensive.\n */\n async isRemovedByIdWithoutLoadingComponent(componentId: ComponentID): Promise<boolean> {\n if (!componentId.hasVersion()) return false;\n const bitmapEntry = this.workspace.bitMap.getBitmapEntryIfExist(componentId);\n if (bitmapEntry && bitmapEntry.isRemoved()) return true;\n if (bitmapEntry && bitmapEntry.isRecovered()) return false;\n const modelComp = await this.workspace.scope.getBitObjectModelComponent(componentId);\n if (!modelComp) return false;\n const versionObj = await this.workspace.scope.getBitObjectVersion(modelComp, componentId.version as string);\n if (!versionObj) return false;\n return versionObj.isRemoved();\n }\n\n /**\n * get components that were soft-removed and tagged/snapped/merged but not exported yet.\n */\n async getRemovedStaged(): Promise<ComponentID[]> {\n return this.workspace.isOnMain() ? this.getRemovedStagedFromMain() : this.getRemovedStagedFromLane();\n }\n\n async addRemovedDependenciesIssues(components: Component[]) {\n await pMapSeries(components, async (component) => {\n await this.addRemovedDepIssue(component);\n });\n }\n\n private async addRemovedDepIssue(component: Component) {\n const dependencies = await this.depResolver.getComponentDependencies(component);\n const removedWithUndefined = await Promise.all(\n dependencies.map(async (dep) => {\n const isRemoved = await this.isRemovedByIdWithoutLoadingComponent(dep.componentId);\n if (isRemoved) return dep.componentId;\n return undefined;\n })\n );\n const removed = compact(removedWithUndefined).map((id) => id.toString());\n if (removed.length) {\n component.state.issues.getOrCreate(IssuesClasses.RemovedDependencies).data = removed;\n }\n }\n\n private async getRemovedStagedFromMain(): Promise<ComponentID[]> {\n const stagedConfig = await this.workspace.scope.getStagedConfig();\n return stagedConfig\n .getAll()\n .filter((compConfig) => compConfig.config?.[RemoveAspect.id]?.removed)\n .map((compConfig) => compConfig.id);\n }\n\n private async getRemovedStagedFromLane(): Promise<ComponentID[]> {\n const currentLane = await this.workspace.getCurrentLaneObject();\n if (!currentLane) return [];\n const laneIds = currentLane.toComponentIds();\n const workspaceIds = this.workspace.listIds();\n const laneCompIdsNotInWorkspace = laneIds.filter(\n (id) => !workspaceIds.find((wId) => wId.isEqualWithoutVersion(id))\n );\n if (!laneCompIdsNotInWorkspace.length) return [];\n const comps = await this.workspace.scope.getMany(laneCompIdsNotInWorkspace);\n const removed = comps.filter((c) => this.isRemoved(c));\n const staged = await Promise.all(\n removed.map(async (c) => {\n const snapDistance = await this.workspace.scope.getSnapDistance(c.id, false);\n if (snapDistance.err) {\n this.logger.warn(\n `getRemovedStagedFromLane unable to get snapDistance for ${c.id.toString()} due to ${snapDistance.err.name}`\n );\n // todo: not clear what should be done here. should we consider it as removed-staged or not.\n }\n if (snapDistance.isSourceAhead()) return c.id;\n return undefined;\n })\n );\n return compact(staged);\n }\n\n private async getLocalBitIdsToRemove(componentsPattern: string): Promise<ComponentID[]> {\n if (!this.workspace) throw new ConsumerNotFound();\n const componentIds = await this.workspace.idsByPattern(componentsPattern);\n return componentIds.map((id) => id);\n }\n\n private async getRemoteBitIdsToRemove(componentsPattern: string): Promise<ComponentID[]> {\n if (hasWildcard(componentsPattern)) {\n return getRemoteBitIdsByWildcards(componentsPattern);\n }\n return [ComponentID.fromString(componentsPattern)];\n }\n\n static slots = [];\n static dependencies = [\n WorkspaceAspect,\n CLIAspect,\n LoggerAspect,\n ComponentAspect,\n ImporterAspect,\n DependencyResolverAspect,\n IssuesAspect,\n ];\n static runtime = MainRuntime;\n\n static async provider([workspace, cli, loggerMain, componentAspect, importerMain, depResolver, issues]: [\n Workspace,\n CLIMain,\n LoggerMain,\n ComponentMain,\n ImporterMain,\n DependencyResolverMain,\n IssuesMain\n ]) {\n const logger = loggerMain.createLogger(RemoveAspect.id);\n const removeMain = new RemoveMain(workspace, logger, importerMain, depResolver);\n issues.registerAddComponentsIssues(removeMain.addRemovedDependenciesIssues.bind(removeMain));\n componentAspect.registerShowFragments([new RemoveFragment(removeMain)]);\n cli.register(\n new RemoveCmd(removeMain, workspace),\n new DeleteCmd(removeMain, workspace),\n new RecoverCmd(removeMain)\n );\n return removeMain;\n }\n}\n\nRemoveAspect.addRuntime(RemoveMain);\n\nexport default RemoveMain;\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,M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K,sBAAS,EAACP,UAAU,EAAElK,SAAS,CAAC,EACpC,KAAI0K,wBAAU,EAACR,UAAU,CAC3B,CAAC;IACD,OAAOA,UAAU;EACnB;AACF;AAACS,OAAA,CAAA7K,UAAA,GAAAA,UAAA;AAAArB,eAAA,CA3UYqB,UAAU,WA2SN,EAAE;AAAArB,eAAA,CA3SNqB,UAAU,kBA4SC,CACpB8K,4BAAe,EACfC,gBAAS,EACTC,sBAAY,EACZC,4BAAe,EACfC,0BAAc,EACdC,8CAAwB,EACxBC,sBAAY,CACb;AAAAzM,eAAA,CApTUqB,UAAU,aAqTJqL,kBAAW;AAwB9BzI,sBAAY,CAAC0I,UAAU,CAACtL,UAAU,CAAC;AAAC,IAAAuL,QAAA,GAAAV,OAAA,CAAAnM,OAAA,GAErBsB,UAAU","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_removedComponents","data","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","RemovedLocalObjects","RemovedObjects","constructor","removedComponentIds","missingComponents","modifiedComponents","dependentBits","removedFromLane","exports"],"sources":["removed-local-objects.ts"],"sourcesContent":["import { ComponentIdList } from '@teambit/component-id';\nimport RemovedObjects from '@teambit/legacy/dist/scope/removed-components';\n\nexport class RemovedLocalObjects extends RemovedObjects {\n modifiedComponents: ComponentIdList;\n constructor(\n removedComponentIds?: ComponentIdList,\n missingComponents?: ComponentIdList,\n modifiedComponents?: ComponentIdList,\n dependentBits?: Record<string, any>,\n removedFromLane?: ComponentIdList\n ) {\n super({ removedComponentIds, missingComponents, dependentBits, removedFromLane });\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n this.modifiedComponents = modifiedComponents;\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,mBAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAA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AAA,CAAAR,mBAAA,GAAAA,mBAAA"}
|
|
1
|
+
{"version":3,"names":["_removedComponents","data","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","RemovedLocalObjects","RemovedObjects","constructor","removedComponentIds","missingComponents","modifiedComponents","dependentBits","removedFromLane","exports"],"sources":["removed-local-objects.ts"],"sourcesContent":["import { ComponentIdList } from '@teambit/component-id';\nimport RemovedObjects from '@teambit/legacy/dist/scope/removed-components';\n\nexport class RemovedLocalObjects extends RemovedObjects {\n modifiedComponents: ComponentIdList;\n constructor(\n removedComponentIds?: ComponentIdList,\n missingComponents?: ComponentIdList,\n modifiedComponents?: ComponentIdList,\n dependentBits?: Record<string, any>,\n removedFromLane?: ComponentIdList\n ) {\n super({ removedComponentIds, missingComponents, dependentBits, removedFromLane });\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n this.modifiedComponents = modifiedComponents;\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,mBAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,kBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA2E,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAJ,GAAA,IAAAO,MAAA,CAAAC,cAAA,CAAAR,GAAA,EAAAI,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAX,GAAA,CAAAI,GAAA,IAAAC,KAAA,WAAAL,GAAA;AAAA,SAAAM,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAE,MAAA,CAAAF,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAI,CAAA,2BAAAJ,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAK,CAAA,GAAAL,CAAA,CAAAM,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAJ,CAAA,GAAAI,CAAA,CAAAG,IAAA,CAAAR,CAAA,EAAAI,CAAA,uCAAAH,CAAA,SAAAA,CAAA,YAAAQ,SAAA,yEAAAL,CAAA,GAAAD,MAAA,GAAAO,MAAA,EAAAV,CAAA;AAEpE,MAAMW,mBAAmB,SAASC,4BAAc,CAAC;EAEtDC,WAAWA,CACTC,mBAAqC,EACrCC,iBAAmC,EACnCC,kBAAoC,EACpCC,aAAmC,EACnCC,eAAiC,EACjC;IACA,KAAK,CAAC;MAAEJ,mBAAmB;MAAEC,iBAAiB;MAAEE,aAAa;MAAEC;IAAgB,CAAC,CAAC;IACjF;IAAA3B,eAAA;IACA,IAAI,CAACyB,kBAAkB,GAAGA,kBAAkB;EAC9C;AACF;AAACG,OAAA,CAAAR,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/remove",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.189",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/component/remove",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "remove",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.189"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -18,20 +18,20 @@
|
|
|
18
18
|
"@teambit/bit-error": "0.0.404",
|
|
19
19
|
"@teambit/component-id": "1.2.0",
|
|
20
20
|
"@teambit/harmony": "0.4.6",
|
|
21
|
-
"@teambit/cli": "0.0.
|
|
22
|
-
"@teambit/workspace": "1.0.
|
|
23
|
-
"@teambit/component": "1.0.
|
|
21
|
+
"@teambit/cli": "0.0.856",
|
|
22
|
+
"@teambit/workspace": "1.0.189",
|
|
23
|
+
"@teambit/component": "1.0.189",
|
|
24
24
|
"@teambit/component-issues": "0.0.141",
|
|
25
|
-
"@teambit/dependency-resolver": "1.0.
|
|
26
|
-
"@teambit/importer": "1.0.
|
|
27
|
-
"@teambit/issues": "1.0.
|
|
28
|
-
"@teambit/logger": "0.0.
|
|
25
|
+
"@teambit/dependency-resolver": "1.0.189",
|
|
26
|
+
"@teambit/importer": "1.0.189",
|
|
27
|
+
"@teambit/issues": "1.0.189",
|
|
28
|
+
"@teambit/logger": "0.0.949"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/lodash": "4.14.165",
|
|
32
32
|
"@types/mocha": "9.1.0",
|
|
33
33
|
"chai": "4.3.0",
|
|
34
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
34
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.27"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@teambit/legacy": "1.0.624"
|
|
File without changes
|