@teambit/watcher 1.0.468 → 1.0.470
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 +122 -256
- package/dist/watch.cmd.d.ts +1 -0
- package/dist/watch.cmd.js +3 -2
- package/dist/watch.cmd.js.map +1 -1
- package/dist/watcher.d.ts +1 -0
- package/dist/watcher.js.map +1 -1
- package/package.json +11 -11
- /package/dist/{preview-1732072955804.js → preview-1732245631025.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.workspace/watcher@1.0.
|
3
|
+
<testsuite name="teambit.workspace/watcher@1.0.470" tests="0" failures="0" errors="0" skipped="0"/>
|
4
4
|
</testsuites>
|
package/artifacts/schema.json
CHANGED
@@ -20,7 +20,7 @@
|
|
20
20
|
"line": 3,
|
21
21
|
"character": 15
|
22
22
|
},
|
23
|
-
"signature": "type WatchOptions = {\n msgs?: EventMessages | undefined;\n initiator?: CompilationInitiator | undefined;\n verbose?: boolean | undefined;\n spawnTSServer?: boolean | undefined;\n ...
|
23
|
+
"signature": "type WatchOptions = {\n msgs?: EventMessages | undefined;\n initiator?: CompilationInitiator | undefined;\n verbose?: boolean | undefined;\n spawnTSServer?: boolean | undefined;\n ... 5 more ...;\n trigger?: ComponentID | undefined;\n}",
|
24
24
|
"name": "WatchOptions",
|
25
25
|
"exportNode": {
|
26
26
|
"__schema": "TypeSchema",
|
@@ -29,7 +29,7 @@
|
|
29
29
|
"line": 50,
|
30
30
|
"character": 1
|
31
31
|
},
|
32
|
-
"signature": "type WatchOptions = {\n msgs?: EventMessages | undefined;\n initiator?: CompilationInitiator | undefined;\n verbose?: boolean | undefined;\n spawnTSServer?: boolean | undefined;\n ...
|
32
|
+
"signature": "type WatchOptions = {\n msgs?: EventMessages | undefined;\n initiator?: CompilationInitiator | undefined;\n verbose?: boolean | undefined;\n spawnTSServer?: boolean | undefined;\n ... 5 more ...;\n trigger?: ComponentID | undefined;\n}",
|
33
33
|
"name": "WatchOptions",
|
34
34
|
"type": {
|
35
35
|
"__schema": "TypeLiteralSchema",
|
@@ -55,8 +55,7 @@
|
|
55
55
|
"line": 51,
|
56
56
|
"character": 10
|
57
57
|
},
|
58
|
-
"name": "EventMessages"
|
59
|
-
"internalFilePath": "watcher.ts"
|
58
|
+
"name": "EventMessages"
|
60
59
|
},
|
61
60
|
"isOptional": true
|
62
61
|
},
|
@@ -76,11 +75,7 @@
|
|
76
75
|
"line": 52,
|
77
76
|
"character": 15
|
78
77
|
},
|
79
|
-
"name": "CompilationInitiator"
|
80
|
-
"componentId": {
|
81
|
-
"scope": "teambit.compilation",
|
82
|
-
"name": "compiler"
|
83
|
-
}
|
78
|
+
"name": "CompilationInitiator"
|
84
79
|
},
|
85
80
|
"isOptional": true
|
86
81
|
},
|
@@ -211,21 +206,36 @@
|
|
211
206
|
"line": 59,
|
212
207
|
"character": 3
|
213
208
|
},
|
209
|
+
"signature": "(property) generateTypes?: boolean | undefined",
|
210
|
+
"name": "generateTypes",
|
211
|
+
"type": {
|
212
|
+
"__schema": "KeywordTypeSchema",
|
213
|
+
"location": {
|
214
|
+
"filePath": "watcher.ts",
|
215
|
+
"line": 59,
|
216
|
+
"character": 19
|
217
|
+
},
|
218
|
+
"name": "boolean"
|
219
|
+
},
|
220
|
+
"isOptional": true
|
221
|
+
},
|
222
|
+
{
|
223
|
+
"__schema": "VariableLikeSchema",
|
224
|
+
"location": {
|
225
|
+
"filePath": "watcher.ts",
|
226
|
+
"line": 60,
|
227
|
+
"character": 3
|
228
|
+
},
|
214
229
|
"signature": "(property) trigger?: ComponentID | undefined",
|
215
230
|
"name": "trigger",
|
216
231
|
"type": {
|
217
232
|
"__schema": "TypeRefSchema",
|
218
233
|
"location": {
|
219
234
|
"filePath": "watcher.ts",
|
220
|
-
"line":
|
235
|
+
"line": 60,
|
221
236
|
"character": 13
|
222
237
|
},
|
223
|
-
"name": "ComponentID"
|
224
|
-
"componentId": {
|
225
|
-
"scope": "teambit.component",
|
226
|
-
"name": "component-id",
|
227
|
-
"version": "1.2.2"
|
228
|
-
}
|
238
|
+
"name": "ComponentID"
|
229
239
|
},
|
230
240
|
"isOptional": true
|
231
241
|
}
|
@@ -329,11 +339,7 @@
|
|
329
339
|
"line": 20,
|
330
340
|
"character": 24
|
331
341
|
},
|
332
|
-
"name": "Workspace"
|
333
|
-
"componentId": {
|
334
|
-
"scope": "teambit.workspace",
|
335
|
-
"name": "workspace"
|
336
|
-
}
|
342
|
+
"name": "Workspace"
|
337
343
|
},
|
338
344
|
"isOptional": false,
|
339
345
|
"isSpread": false
|
@@ -353,11 +359,7 @@
|
|
353
359
|
"line": 21,
|
354
360
|
"character": 20
|
355
361
|
},
|
356
|
-
"name": "ScopeMain"
|
357
|
-
"componentId": {
|
358
|
-
"scope": "teambit.scope",
|
359
|
-
"name": "scope"
|
360
|
-
}
|
362
|
+
"name": "ScopeMain"
|
361
363
|
},
|
362
364
|
"isOptional": false,
|
363
365
|
"isSpread": false
|
@@ -377,11 +379,7 @@
|
|
377
379
|
"line": 22,
|
378
380
|
"character": 21
|
379
381
|
},
|
380
|
-
"name": "PubsubMain"
|
381
|
-
"componentId": {
|
382
|
-
"scope": "teambit.harmony",
|
383
|
-
"name": "pubsub"
|
384
|
-
}
|
382
|
+
"name": "PubsubMain"
|
385
383
|
},
|
386
384
|
"isOptional": false,
|
387
385
|
"isSpread": false
|
@@ -401,8 +399,7 @@
|
|
401
399
|
"line": 23,
|
402
400
|
"character": 29
|
403
401
|
},
|
404
|
-
"name": "OnPreWatchSlot"
|
405
|
-
"internalFilePath": "watcher.main.runtime.ts"
|
402
|
+
"name": "OnPreWatchSlot"
|
406
403
|
},
|
407
404
|
"isOptional": false,
|
408
405
|
"isSpread": false
|
@@ -422,11 +419,7 @@
|
|
422
419
|
"line": 24,
|
423
420
|
"character": 25
|
424
421
|
},
|
425
|
-
"name": "IpcEventsMain"
|
426
|
-
"componentId": {
|
427
|
-
"scope": "teambit.harmony",
|
428
|
-
"name": "ipc-events"
|
429
|
-
}
|
422
|
+
"name": "IpcEventsMain"
|
430
423
|
},
|
431
424
|
"isOptional": false,
|
432
425
|
"isSpread": false
|
@@ -446,11 +439,7 @@
|
|
446
439
|
"line": 25,
|
447
440
|
"character": 22
|
448
441
|
},
|
449
|
-
"name": "Logger"
|
450
|
-
"componentId": {
|
451
|
-
"scope": "teambit.harmony",
|
452
|
-
"name": "logger"
|
453
|
-
}
|
442
|
+
"name": "Logger"
|
454
443
|
},
|
455
444
|
"isOptional": false,
|
456
445
|
"isSpread": false
|
@@ -470,11 +459,7 @@
|
|
470
459
|
"line": 26,
|
471
460
|
"character": 28
|
472
461
|
},
|
473
|
-
"name": "GlobalConfigMain"
|
474
|
-
"componentId": {
|
475
|
-
"scope": "teambit.harmony",
|
476
|
-
"name": "global-config"
|
477
|
-
}
|
462
|
+
"name": "GlobalConfigMain"
|
478
463
|
},
|
479
464
|
"isOptional": false,
|
480
465
|
"isSpread": false
|
@@ -590,12 +575,7 @@
|
|
590
575
|
"line": 39,
|
591
576
|
"character": 41
|
592
577
|
},
|
593
|
-
"name": "ComponentID"
|
594
|
-
"componentId": {
|
595
|
-
"scope": "teambit.component",
|
596
|
-
"name": "component-id",
|
597
|
-
"version": "1.2.2"
|
598
|
-
}
|
578
|
+
"name": "ComponentID"
|
599
579
|
}
|
600
580
|
},
|
601
581
|
"isOptional": false,
|
@@ -660,8 +640,7 @@
|
|
660
640
|
"line": 46,
|
661
641
|
"character": 38
|
662
642
|
},
|
663
|
-
"name": "OnPreWatch"
|
664
|
-
"internalFilePath": "watcher.main.runtime.ts"
|
643
|
+
"name": "OnPreWatch"
|
665
644
|
},
|
666
645
|
"isOptional": false,
|
667
646
|
"isSpread": false
|
@@ -774,11 +753,7 @@
|
|
774
753
|
"line": 65,
|
775
754
|
"character": 7
|
776
755
|
},
|
777
|
-
"name": "CLIMain"
|
778
|
-
"componentId": {
|
779
|
-
"scope": "teambit.harmony",
|
780
|
-
"name": "cli"
|
781
|
-
}
|
756
|
+
"name": "CLIMain"
|
782
757
|
},
|
783
758
|
{
|
784
759
|
"__schema": "TypeRefSchema",
|
@@ -787,11 +762,7 @@
|
|
787
762
|
"line": 66,
|
788
763
|
"character": 7
|
789
764
|
},
|
790
|
-
"name": "Workspace"
|
791
|
-
"componentId": {
|
792
|
-
"scope": "teambit.workspace",
|
793
|
-
"name": "workspace"
|
794
|
-
}
|
765
|
+
"name": "Workspace"
|
795
766
|
},
|
796
767
|
{
|
797
768
|
"__schema": "TypeRefSchema",
|
@@ -800,11 +771,7 @@
|
|
800
771
|
"line": 67,
|
801
772
|
"character": 7
|
802
773
|
},
|
803
|
-
"name": "ScopeMain"
|
804
|
-
"componentId": {
|
805
|
-
"scope": "teambit.scope",
|
806
|
-
"name": "scope"
|
807
|
-
}
|
774
|
+
"name": "ScopeMain"
|
808
775
|
},
|
809
776
|
{
|
810
777
|
"__schema": "TypeRefSchema",
|
@@ -813,11 +780,7 @@
|
|
813
780
|
"line": 68,
|
814
781
|
"character": 7
|
815
782
|
},
|
816
|
-
"name": "PubsubMain"
|
817
|
-
"componentId": {
|
818
|
-
"scope": "teambit.harmony",
|
819
|
-
"name": "pubsub"
|
820
|
-
}
|
783
|
+
"name": "PubsubMain"
|
821
784
|
},
|
822
785
|
{
|
823
786
|
"__schema": "TypeRefSchema",
|
@@ -826,11 +789,7 @@
|
|
826
789
|
"line": 69,
|
827
790
|
"character": 7
|
828
791
|
},
|
829
|
-
"name": "LoggerMain"
|
830
|
-
"componentId": {
|
831
|
-
"scope": "teambit.harmony",
|
832
|
-
"name": "logger"
|
833
|
-
}
|
792
|
+
"name": "LoggerMain"
|
834
793
|
},
|
835
794
|
{
|
836
795
|
"__schema": "TypeRefSchema",
|
@@ -839,11 +798,7 @@
|
|
839
798
|
"line": 70,
|
840
799
|
"character": 7
|
841
800
|
},
|
842
|
-
"name": "IpcEventsMain"
|
843
|
-
"componentId": {
|
844
|
-
"scope": "teambit.harmony",
|
845
|
-
"name": "ipc-events"
|
846
|
-
}
|
801
|
+
"name": "IpcEventsMain"
|
847
802
|
},
|
848
803
|
{
|
849
804
|
"__schema": "TypeRefSchema",
|
@@ -852,11 +807,7 @@
|
|
852
807
|
"line": 71,
|
853
808
|
"character": 7
|
854
809
|
},
|
855
|
-
"name": "GlobalConfigMain"
|
856
|
-
"componentId": {
|
857
|
-
"scope": "teambit.harmony",
|
858
|
-
"name": "global-config"
|
859
|
-
}
|
810
|
+
"name": "GlobalConfigMain"
|
860
811
|
}
|
861
812
|
]
|
862
813
|
},
|
@@ -906,8 +857,7 @@
|
|
906
857
|
"line": 74,
|
907
858
|
"character": 24
|
908
859
|
},
|
909
|
-
"name": "OnPreWatchSlot"
|
910
|
-
"internalFilePath": "watcher.main.runtime.ts"
|
860
|
+
"name": "OnPreWatchSlot"
|
911
861
|
}
|
912
862
|
]
|
913
863
|
},
|
@@ -1078,12 +1028,7 @@
|
|
1078
1028
|
"line": 30,
|
1079
1029
|
"character": 103
|
1080
1030
|
},
|
1081
|
-
"name": "ComponentID"
|
1082
|
-
"componentId": {
|
1083
|
-
"scope": "teambit.component",
|
1084
|
-
"name": "component-id",
|
1085
|
-
"version": "1.2.2"
|
1086
|
-
}
|
1031
|
+
"name": "ComponentID"
|
1087
1032
|
}
|
1088
1033
|
},
|
1089
1034
|
"isOptional": false
|
@@ -1270,7 +1215,7 @@
|
|
1270
1215
|
"line": 42,
|
1271
1216
|
"character": 31
|
1272
1217
|
},
|
1273
|
-
"signature": "(filePaths: string[], buildResults:
|
1218
|
+
"signature": "(filePaths: string[], buildResults: OnComponentEventResult[], verbose: boolean, duration: number, failureMsg?: string): void",
|
1274
1219
|
"name": "",
|
1275
1220
|
"params": [
|
1276
1221
|
{
|
@@ -1323,11 +1268,7 @@
|
|
1323
1268
|
"line": 44,
|
1324
1269
|
"character": 17
|
1325
1270
|
},
|
1326
|
-
"name": "OnComponentEventResult"
|
1327
|
-
"componentId": {
|
1328
|
-
"scope": "teambit.workspace",
|
1329
|
-
"name": "workspace"
|
1330
|
-
}
|
1271
|
+
"name": "OnComponentEventResult"
|
1331
1272
|
}
|
1332
1273
|
},
|
1333
1274
|
"isOptional": false,
|
@@ -1413,7 +1354,7 @@
|
|
1413
1354
|
"line": 50,
|
1414
1355
|
"character": 1
|
1415
1356
|
},
|
1416
|
-
"signature": "type WatchOptions = {\n msgs?: EventMessages | undefined;\n initiator?: CompilationInitiator | undefined;\n verbose?: boolean | undefined;\n spawnTSServer?: boolean | undefined;\n ...
|
1357
|
+
"signature": "type WatchOptions = {\n msgs?: EventMessages | undefined;\n initiator?: CompilationInitiator | undefined;\n verbose?: boolean | undefined;\n spawnTSServer?: boolean | undefined;\n ... 5 more ...;\n trigger?: ComponentID | undefined;\n}",
|
1417
1358
|
"name": "WatchOptions",
|
1418
1359
|
"type": {
|
1419
1360
|
"__schema": "TypeLiteralSchema",
|
@@ -1439,8 +1380,7 @@
|
|
1439
1380
|
"line": 51,
|
1440
1381
|
"character": 10
|
1441
1382
|
},
|
1442
|
-
"name": "EventMessages"
|
1443
|
-
"internalFilePath": "watcher.ts"
|
1383
|
+
"name": "EventMessages"
|
1444
1384
|
},
|
1445
1385
|
"isOptional": true
|
1446
1386
|
},
|
@@ -1460,11 +1400,7 @@
|
|
1460
1400
|
"line": 52,
|
1461
1401
|
"character": 15
|
1462
1402
|
},
|
1463
|
-
"name": "CompilationInitiator"
|
1464
|
-
"componentId": {
|
1465
|
-
"scope": "teambit.compilation",
|
1466
|
-
"name": "compiler"
|
1467
|
-
}
|
1403
|
+
"name": "CompilationInitiator"
|
1468
1404
|
},
|
1469
1405
|
"isOptional": true
|
1470
1406
|
},
|
@@ -1595,21 +1531,36 @@
|
|
1595
1531
|
"line": 59,
|
1596
1532
|
"character": 3
|
1597
1533
|
},
|
1534
|
+
"signature": "(property) generateTypes?: boolean | undefined",
|
1535
|
+
"name": "generateTypes",
|
1536
|
+
"type": {
|
1537
|
+
"__schema": "KeywordTypeSchema",
|
1538
|
+
"location": {
|
1539
|
+
"filePath": "watcher.ts",
|
1540
|
+
"line": 59,
|
1541
|
+
"character": 19
|
1542
|
+
},
|
1543
|
+
"name": "boolean"
|
1544
|
+
},
|
1545
|
+
"isOptional": true
|
1546
|
+
},
|
1547
|
+
{
|
1548
|
+
"__schema": "VariableLikeSchema",
|
1549
|
+
"location": {
|
1550
|
+
"filePath": "watcher.ts",
|
1551
|
+
"line": 60,
|
1552
|
+
"character": 3
|
1553
|
+
},
|
1598
1554
|
"signature": "(property) trigger?: ComponentID | undefined",
|
1599
1555
|
"name": "trigger",
|
1600
1556
|
"type": {
|
1601
1557
|
"__schema": "TypeRefSchema",
|
1602
1558
|
"location": {
|
1603
1559
|
"filePath": "watcher.ts",
|
1604
|
-
"line":
|
1560
|
+
"line": 60,
|
1605
1561
|
"character": 13
|
1606
1562
|
},
|
1607
|
-
"name": "ComponentID"
|
1608
|
-
"componentId": {
|
1609
|
-
"scope": "teambit.component",
|
1610
|
-
"name": "component-id",
|
1611
|
-
"version": "1.2.2"
|
1612
|
-
}
|
1563
|
+
"name": "ComponentID"
|
1613
1564
|
},
|
1614
1565
|
"isOptional": true
|
1615
1566
|
}
|
@@ -1620,7 +1571,7 @@
|
|
1620
1571
|
"__schema": "TypeSchema",
|
1621
1572
|
"location": {
|
1622
1573
|
"filePath": "watcher.ts",
|
1623
|
-
"line":
|
1574
|
+
"line": 63,
|
1624
1575
|
"character": 1
|
1625
1576
|
},
|
1626
1577
|
"signature": "type RootDirs = {\n [dir: string]: ComponentID;\n}",
|
@@ -1629,7 +1580,7 @@
|
|
1629
1580
|
"__schema": "TypeLiteralSchema",
|
1630
1581
|
"location": {
|
1631
1582
|
"filePath": "watcher.ts",
|
1632
|
-
"line":
|
1583
|
+
"line": 63,
|
1633
1584
|
"character": 24
|
1634
1585
|
},
|
1635
1586
|
"members": [
|
@@ -1637,14 +1588,14 @@
|
|
1637
1588
|
"__schema": "IndexSignatureSchema",
|
1638
1589
|
"location": {
|
1639
1590
|
"filePath": "watcher.ts",
|
1640
|
-
"line":
|
1591
|
+
"line": 63,
|
1641
1592
|
"character": 26
|
1642
1593
|
},
|
1643
1594
|
"keyType": {
|
1644
1595
|
"__schema": "ParameterSchema",
|
1645
1596
|
"location": {
|
1646
1597
|
"filePath": "watcher.ts",
|
1647
|
-
"line":
|
1598
|
+
"line": 63,
|
1648
1599
|
"character": 27
|
1649
1600
|
},
|
1650
1601
|
"name": "dir",
|
@@ -1652,11 +1603,10 @@
|
|
1652
1603
|
"__schema": "TypeRefSchema",
|
1653
1604
|
"location": {
|
1654
1605
|
"filePath": "watcher.ts",
|
1655
|
-
"line":
|
1606
|
+
"line": 63,
|
1656
1607
|
"character": 32
|
1657
1608
|
},
|
1658
|
-
"name": "PathLinux"
|
1659
|
-
"internalFilePath": "watcher.ts"
|
1609
|
+
"name": "PathLinux"
|
1660
1610
|
},
|
1661
1611
|
"isOptional": false,
|
1662
1612
|
"isSpread": false
|
@@ -1665,15 +1615,10 @@
|
|
1665
1615
|
"__schema": "TypeRefSchema",
|
1666
1616
|
"location": {
|
1667
1617
|
"filePath": "watcher.ts",
|
1668
|
-
"line":
|
1618
|
+
"line": 63,
|
1669
1619
|
"character": 44
|
1670
1620
|
},
|
1671
|
-
"name": "ComponentID"
|
1672
|
-
"componentId": {
|
1673
|
-
"scope": "teambit.component",
|
1674
|
-
"name": "component-id",
|
1675
|
-
"version": "1.2.2"
|
1676
|
-
}
|
1621
|
+
"name": "ComponentID"
|
1677
1622
|
}
|
1678
1623
|
}
|
1679
1624
|
]
|
@@ -1683,7 +1628,7 @@
|
|
1683
1628
|
"__schema": "ClassSchema",
|
1684
1629
|
"location": {
|
1685
1630
|
"filePath": "watcher.ts",
|
1686
|
-
"line":
|
1631
|
+
"line": 68,
|
1687
1632
|
"character": 1
|
1688
1633
|
},
|
1689
1634
|
"signature": "class Watcher",
|
@@ -1693,7 +1638,7 @@
|
|
1693
1638
|
"__schema": "ConstructorSchema",
|
1694
1639
|
"location": {
|
1695
1640
|
"filePath": "watcher.ts",
|
1696
|
-
"line":
|
1641
|
+
"line": 77,
|
1697
1642
|
"character": 3
|
1698
1643
|
},
|
1699
1644
|
"signature": "constructor Watcher(workspace: Workspace, pubsub: PubsubMain, watcherMain: WatcherMain, options: WatchOptions): Watcher",
|
@@ -1703,7 +1648,7 @@
|
|
1703
1648
|
"__schema": "ParameterSchema",
|
1704
1649
|
"location": {
|
1705
1650
|
"filePath": "watcher.ts",
|
1706
|
-
"line":
|
1651
|
+
"line": 78,
|
1707
1652
|
"character": 5
|
1708
1653
|
},
|
1709
1654
|
"name": "workspace",
|
@@ -1711,14 +1656,10 @@
|
|
1711
1656
|
"__schema": "TypeRefSchema",
|
1712
1657
|
"location": {
|
1713
1658
|
"filePath": "watcher.ts",
|
1714
|
-
"line":
|
1659
|
+
"line": 78,
|
1715
1660
|
"character": 24
|
1716
1661
|
},
|
1717
|
-
"name": "Workspace"
|
1718
|
-
"componentId": {
|
1719
|
-
"scope": "teambit.workspace",
|
1720
|
-
"name": "workspace"
|
1721
|
-
}
|
1662
|
+
"name": "Workspace"
|
1722
1663
|
},
|
1723
1664
|
"isOptional": false,
|
1724
1665
|
"isSpread": false
|
@@ -1727,7 +1668,7 @@
|
|
1727
1668
|
"__schema": "ParameterSchema",
|
1728
1669
|
"location": {
|
1729
1670
|
"filePath": "watcher.ts",
|
1730
|
-
"line":
|
1671
|
+
"line": 79,
|
1731
1672
|
"character": 5
|
1732
1673
|
},
|
1733
1674
|
"name": "pubsub",
|
@@ -1735,14 +1676,10 @@
|
|
1735
1676
|
"__schema": "TypeRefSchema",
|
1736
1677
|
"location": {
|
1737
1678
|
"filePath": "watcher.ts",
|
1738
|
-
"line":
|
1679
|
+
"line": 79,
|
1739
1680
|
"character": 21
|
1740
1681
|
},
|
1741
|
-
"name": "PubsubMain"
|
1742
|
-
"componentId": {
|
1743
|
-
"scope": "teambit.harmony",
|
1744
|
-
"name": "pubsub"
|
1745
|
-
}
|
1682
|
+
"name": "PubsubMain"
|
1746
1683
|
},
|
1747
1684
|
"isOptional": false,
|
1748
1685
|
"isSpread": false
|
@@ -1751,7 +1688,7 @@
|
|
1751
1688
|
"__schema": "ParameterSchema",
|
1752
1689
|
"location": {
|
1753
1690
|
"filePath": "watcher.ts",
|
1754
|
-
"line":
|
1691
|
+
"line": 80,
|
1755
1692
|
"character": 5
|
1756
1693
|
},
|
1757
1694
|
"name": "watcherMain",
|
@@ -1759,7 +1696,7 @@
|
|
1759
1696
|
"__schema": "TypeRefSchema",
|
1760
1697
|
"location": {
|
1761
1698
|
"filePath": "watcher.ts",
|
1762
|
-
"line":
|
1699
|
+
"line": 80,
|
1763
1700
|
"character": 26
|
1764
1701
|
},
|
1765
1702
|
"name": "WatcherMain"
|
@@ -1771,7 +1708,7 @@
|
|
1771
1708
|
"__schema": "ParameterSchema",
|
1772
1709
|
"location": {
|
1773
1710
|
"filePath": "watcher.ts",
|
1774
|
-
"line":
|
1711
|
+
"line": 81,
|
1775
1712
|
"character": 5
|
1776
1713
|
},
|
1777
1714
|
"name": "options",
|
@@ -1779,7 +1716,7 @@
|
|
1779
1716
|
"__schema": "TypeRefSchema",
|
1780
1717
|
"location": {
|
1781
1718
|
"filePath": "watcher.ts",
|
1782
|
-
"line":
|
1719
|
+
"line": 81,
|
1783
1720
|
"character": 22
|
1784
1721
|
},
|
1785
1722
|
"name": "WatchOptions"
|
@@ -1792,7 +1729,7 @@
|
|
1792
1729
|
"__schema": "ThisTypeSchema",
|
1793
1730
|
"location": {
|
1794
1731
|
"filePath": "watcher.ts",
|
1795
|
-
"line":
|
1732
|
+
"line": 68,
|
1796
1733
|
"character": 1
|
1797
1734
|
},
|
1798
1735
|
"name": "Watcher"
|
@@ -1803,7 +1740,7 @@
|
|
1803
1740
|
"__schema": "GetAccessorSchema",
|
1804
1741
|
"location": {
|
1805
1742
|
"filePath": "watcher.ts",
|
1806
|
-
"line":
|
1743
|
+
"line": 87,
|
1807
1744
|
"character": 3
|
1808
1745
|
},
|
1809
1746
|
"signature": "(getter) Watcher.consumer: Consumer",
|
@@ -1812,7 +1749,7 @@
|
|
1812
1749
|
"__schema": "TypeRefSchema",
|
1813
1750
|
"location": {
|
1814
1751
|
"filePath": "watcher.ts",
|
1815
|
-
"line":
|
1752
|
+
"line": 87,
|
1816
1753
|
"character": 3
|
1817
1754
|
},
|
1818
1755
|
"name": "Consumer",
|
@@ -1823,7 +1760,7 @@
|
|
1823
1760
|
"__schema": "FunctionLikeSchema",
|
1824
1761
|
"location": {
|
1825
1762
|
"filePath": "watcher.ts",
|
1826
|
-
"line":
|
1763
|
+
"line": 91,
|
1827
1764
|
"character": 3
|
1828
1765
|
},
|
1829
1766
|
"signature": "(method) Watcher.watch(): Promise<unknown>",
|
@@ -1833,7 +1770,7 @@
|
|
1833
1770
|
"__schema": "InferenceTypeSchema",
|
1834
1771
|
"location": {
|
1835
1772
|
"filePath": "watcher.ts",
|
1836
|
-
"line":
|
1773
|
+
"line": 91,
|
1837
1774
|
"character": 3
|
1838
1775
|
},
|
1839
1776
|
"type": "Promise<unknown>"
|
@@ -1852,7 +1789,7 @@
|
|
1852
1789
|
"__schema": "ModuleSchema",
|
1853
1790
|
"location": {
|
1854
1791
|
"filePath": "watcher.ts",
|
1855
|
-
"line":
|
1792
|
+
"line": 65,
|
1856
1793
|
"character": 1
|
1857
1794
|
},
|
1858
1795
|
"exports": [
|
@@ -1860,7 +1797,7 @@
|
|
1860
1797
|
"__schema": "VariableLikeSchema",
|
1861
1798
|
"location": {
|
1862
1799
|
"filePath": "watcher.ts",
|
1863
|
-
"line":
|
1800
|
+
"line": 65,
|
1864
1801
|
"character": 7
|
1865
1802
|
},
|
1866
1803
|
"signature": "const DEBOUNCE_WAIT_MS: 100",
|
@@ -1869,7 +1806,7 @@
|
|
1869
1806
|
"__schema": "InferenceTypeSchema",
|
1870
1807
|
"location": {
|
1871
1808
|
"filePath": "watcher.ts",
|
1872
|
-
"line":
|
1809
|
+
"line": 65,
|
1873
1810
|
"character": 7
|
1874
1811
|
},
|
1875
1812
|
"type": "100"
|
@@ -1884,7 +1821,7 @@
|
|
1884
1821
|
"__schema": "TypeSchema",
|
1885
1822
|
"location": {
|
1886
1823
|
"filePath": "watcher.ts",
|
1887
|
-
"line":
|
1824
|
+
"line": 66,
|
1888
1825
|
"character": 1
|
1889
1826
|
},
|
1890
1827
|
"signature": "type PathLinux = string",
|
@@ -1893,7 +1830,7 @@
|
|
1893
1830
|
"__schema": "KeywordTypeSchema",
|
1894
1831
|
"location": {
|
1895
1832
|
"filePath": "watcher.ts",
|
1896
|
-
"line":
|
1833
|
+
"line": 66,
|
1897
1834
|
"character": 18
|
1898
1835
|
},
|
1899
1836
|
"name": "string"
|
@@ -1925,7 +1862,7 @@
|
|
1925
1862
|
"line": 15,
|
1926
1863
|
"character": 26
|
1927
1864
|
},
|
1928
|
-
"signature": "(componentIds:
|
1865
|
+
"signature": "(componentIds: ComponentID[], watchOpts: WatchOptions): Promise<void>",
|
1929
1866
|
"name": "",
|
1930
1867
|
"params": [
|
1931
1868
|
{
|
@@ -1950,12 +1887,7 @@
|
|
1950
1887
|
"line": 15,
|
1951
1888
|
"character": 41
|
1952
1889
|
},
|
1953
|
-
"name": "ComponentID"
|
1954
|
-
"componentId": {
|
1955
|
-
"scope": "teambit.component",
|
1956
|
-
"name": "component-id",
|
1957
|
-
"version": "1.2.2"
|
1958
|
-
}
|
1890
|
+
"name": "ComponentID"
|
1959
1891
|
}
|
1960
1892
|
},
|
1961
1893
|
"isOptional": false,
|
@@ -2022,11 +1954,6 @@
|
|
2022
1954
|
"character": 30
|
2023
1955
|
},
|
2024
1956
|
"name": "SlotRegistry",
|
2025
|
-
"componentId": {
|
2026
|
-
"scope": "teambit.harmony",
|
2027
|
-
"name": "harmony",
|
2028
|
-
"version": "0.4.6"
|
2029
|
-
},
|
2030
1957
|
"typeArgs": [
|
2031
1958
|
{
|
2032
1959
|
"__schema": "TypeRefSchema",
|
@@ -2035,8 +1962,7 @@
|
|
2035
1962
|
"line": 16,
|
2036
1963
|
"character": 43
|
2037
1964
|
},
|
2038
|
-
"name": "OnPreWatch"
|
2039
|
-
"internalFilePath": "watcher.main.runtime.ts"
|
1965
|
+
"name": "OnPreWatch"
|
2040
1966
|
}
|
2041
1967
|
]
|
2042
1968
|
}
|
@@ -2076,11 +2002,7 @@
|
|
2076
2002
|
"line": 20,
|
2077
2003
|
"character": 24
|
2078
2004
|
},
|
2079
|
-
"name": "Workspace"
|
2080
|
-
"componentId": {
|
2081
|
-
"scope": "teambit.workspace",
|
2082
|
-
"name": "workspace"
|
2083
|
-
}
|
2005
|
+
"name": "Workspace"
|
2084
2006
|
},
|
2085
2007
|
"isOptional": false,
|
2086
2008
|
"isSpread": false
|
@@ -2100,11 +2022,7 @@
|
|
2100
2022
|
"line": 21,
|
2101
2023
|
"character": 20
|
2102
2024
|
},
|
2103
|
-
"name": "ScopeMain"
|
2104
|
-
"componentId": {
|
2105
|
-
"scope": "teambit.scope",
|
2106
|
-
"name": "scope"
|
2107
|
-
}
|
2025
|
+
"name": "ScopeMain"
|
2108
2026
|
},
|
2109
2027
|
"isOptional": false,
|
2110
2028
|
"isSpread": false
|
@@ -2124,11 +2042,7 @@
|
|
2124
2042
|
"line": 22,
|
2125
2043
|
"character": 21
|
2126
2044
|
},
|
2127
|
-
"name": "PubsubMain"
|
2128
|
-
"componentId": {
|
2129
|
-
"scope": "teambit.harmony",
|
2130
|
-
"name": "pubsub"
|
2131
|
-
}
|
2045
|
+
"name": "PubsubMain"
|
2132
2046
|
},
|
2133
2047
|
"isOptional": false,
|
2134
2048
|
"isSpread": false
|
@@ -2148,8 +2062,7 @@
|
|
2148
2062
|
"line": 23,
|
2149
2063
|
"character": 29
|
2150
2064
|
},
|
2151
|
-
"name": "OnPreWatchSlot"
|
2152
|
-
"internalFilePath": "watcher.main.runtime.ts"
|
2065
|
+
"name": "OnPreWatchSlot"
|
2153
2066
|
},
|
2154
2067
|
"isOptional": false,
|
2155
2068
|
"isSpread": false
|
@@ -2169,11 +2082,7 @@
|
|
2169
2082
|
"line": 24,
|
2170
2083
|
"character": 25
|
2171
2084
|
},
|
2172
|
-
"name": "IpcEventsMain"
|
2173
|
-
"componentId": {
|
2174
|
-
"scope": "teambit.harmony",
|
2175
|
-
"name": "ipc-events"
|
2176
|
-
}
|
2085
|
+
"name": "IpcEventsMain"
|
2177
2086
|
},
|
2178
2087
|
"isOptional": false,
|
2179
2088
|
"isSpread": false
|
@@ -2193,11 +2102,7 @@
|
|
2193
2102
|
"line": 25,
|
2194
2103
|
"character": 22
|
2195
2104
|
},
|
2196
|
-
"name": "Logger"
|
2197
|
-
"componentId": {
|
2198
|
-
"scope": "teambit.harmony",
|
2199
|
-
"name": "logger"
|
2200
|
-
}
|
2105
|
+
"name": "Logger"
|
2201
2106
|
},
|
2202
2107
|
"isOptional": false,
|
2203
2108
|
"isSpread": false
|
@@ -2217,11 +2122,7 @@
|
|
2217
2122
|
"line": 26,
|
2218
2123
|
"character": 28
|
2219
2124
|
},
|
2220
|
-
"name": "GlobalConfigMain"
|
2221
|
-
"componentId": {
|
2222
|
-
"scope": "teambit.harmony",
|
2223
|
-
"name": "global-config"
|
2224
|
-
}
|
2125
|
+
"name": "GlobalConfigMain"
|
2225
2126
|
},
|
2226
2127
|
"isOptional": false,
|
2227
2128
|
"isSpread": false
|
@@ -2337,12 +2238,7 @@
|
|
2337
2238
|
"line": 39,
|
2338
2239
|
"character": 41
|
2339
2240
|
},
|
2340
|
-
"name": "ComponentID"
|
2341
|
-
"componentId": {
|
2342
|
-
"scope": "teambit.component",
|
2343
|
-
"name": "component-id",
|
2344
|
-
"version": "1.2.2"
|
2345
|
-
}
|
2241
|
+
"name": "ComponentID"
|
2346
2242
|
}
|
2347
2243
|
},
|
2348
2244
|
"isOptional": false,
|
@@ -2407,8 +2303,7 @@
|
|
2407
2303
|
"line": 46,
|
2408
2304
|
"character": 38
|
2409
2305
|
},
|
2410
|
-
"name": "OnPreWatch"
|
2411
|
-
"internalFilePath": "watcher.main.runtime.ts"
|
2306
|
+
"name": "OnPreWatch"
|
2412
2307
|
},
|
2413
2308
|
"isOptional": false,
|
2414
2309
|
"isSpread": false
|
@@ -2521,11 +2416,7 @@
|
|
2521
2416
|
"line": 65,
|
2522
2417
|
"character": 7
|
2523
2418
|
},
|
2524
|
-
"name": "CLIMain"
|
2525
|
-
"componentId": {
|
2526
|
-
"scope": "teambit.harmony",
|
2527
|
-
"name": "cli"
|
2528
|
-
}
|
2419
|
+
"name": "CLIMain"
|
2529
2420
|
},
|
2530
2421
|
{
|
2531
2422
|
"__schema": "TypeRefSchema",
|
@@ -2534,11 +2425,7 @@
|
|
2534
2425
|
"line": 66,
|
2535
2426
|
"character": 7
|
2536
2427
|
},
|
2537
|
-
"name": "Workspace"
|
2538
|
-
"componentId": {
|
2539
|
-
"scope": "teambit.workspace",
|
2540
|
-
"name": "workspace"
|
2541
|
-
}
|
2428
|
+
"name": "Workspace"
|
2542
2429
|
},
|
2543
2430
|
{
|
2544
2431
|
"__schema": "TypeRefSchema",
|
@@ -2547,11 +2434,7 @@
|
|
2547
2434
|
"line": 67,
|
2548
2435
|
"character": 7
|
2549
2436
|
},
|
2550
|
-
"name": "ScopeMain"
|
2551
|
-
"componentId": {
|
2552
|
-
"scope": "teambit.scope",
|
2553
|
-
"name": "scope"
|
2554
|
-
}
|
2437
|
+
"name": "ScopeMain"
|
2555
2438
|
},
|
2556
2439
|
{
|
2557
2440
|
"__schema": "TypeRefSchema",
|
@@ -2560,11 +2443,7 @@
|
|
2560
2443
|
"line": 68,
|
2561
2444
|
"character": 7
|
2562
2445
|
},
|
2563
|
-
"name": "PubsubMain"
|
2564
|
-
"componentId": {
|
2565
|
-
"scope": "teambit.harmony",
|
2566
|
-
"name": "pubsub"
|
2567
|
-
}
|
2446
|
+
"name": "PubsubMain"
|
2568
2447
|
},
|
2569
2448
|
{
|
2570
2449
|
"__schema": "TypeRefSchema",
|
@@ -2573,11 +2452,7 @@
|
|
2573
2452
|
"line": 69,
|
2574
2453
|
"character": 7
|
2575
2454
|
},
|
2576
|
-
"name": "LoggerMain"
|
2577
|
-
"componentId": {
|
2578
|
-
"scope": "teambit.harmony",
|
2579
|
-
"name": "logger"
|
2580
|
-
}
|
2455
|
+
"name": "LoggerMain"
|
2581
2456
|
},
|
2582
2457
|
{
|
2583
2458
|
"__schema": "TypeRefSchema",
|
@@ -2586,11 +2461,7 @@
|
|
2586
2461
|
"line": 70,
|
2587
2462
|
"character": 7
|
2588
2463
|
},
|
2589
|
-
"name": "IpcEventsMain"
|
2590
|
-
"componentId": {
|
2591
|
-
"scope": "teambit.harmony",
|
2592
|
-
"name": "ipc-events"
|
2593
|
-
}
|
2464
|
+
"name": "IpcEventsMain"
|
2594
2465
|
},
|
2595
2466
|
{
|
2596
2467
|
"__schema": "TypeRefSchema",
|
@@ -2599,11 +2470,7 @@
|
|
2599
2470
|
"line": 71,
|
2600
2471
|
"character": 7
|
2601
2472
|
},
|
2602
|
-
"name": "GlobalConfigMain"
|
2603
|
-
"componentId": {
|
2604
|
-
"scope": "teambit.harmony",
|
2605
|
-
"name": "global-config"
|
2606
|
-
}
|
2473
|
+
"name": "GlobalConfigMain"
|
2607
2474
|
}
|
2608
2475
|
]
|
2609
2476
|
},
|
@@ -2653,8 +2520,7 @@
|
|
2653
2520
|
"line": 74,
|
2654
2521
|
"character": 24
|
2655
2522
|
},
|
2656
|
-
"name": "OnPreWatchSlot"
|
2657
|
-
"internalFilePath": "watcher.main.runtime.ts"
|
2523
|
+
"name": "OnPreWatchSlot"
|
2658
2524
|
}
|
2659
2525
|
]
|
2660
2526
|
},
|
@@ -2745,7 +2611,7 @@
|
|
2745
2611
|
"componentId": {
|
2746
2612
|
"scope": "teambit.workspace",
|
2747
2613
|
"name": "watcher",
|
2748
|
-
"version": "1.0.
|
2614
|
+
"version": "1.0.470"
|
2749
2615
|
},
|
2750
2616
|
"taggedModuleExports": []
|
2751
2617
|
}
|
package/dist/watch.cmd.d.ts
CHANGED
package/dist/watch.cmd.js
CHANGED
@@ -74,7 +74,7 @@ if this doesn't work well for you, run "bit config set watch_use_polling true" t
|
|
74
74
|
_defineProperty(this, "helpUrl", 'reference/compiling/compiler-overview');
|
75
75
|
_defineProperty(this, "alias", '');
|
76
76
|
_defineProperty(this, "group", 'development');
|
77
|
-
_defineProperty(this, "options", [['v', 'verbose', 'show all watch events and compiler verbose output'], ['', 'skip-pre-compilation', 'skip compilation step before starting to watch'], ['t', 'check-types [string]', 'show errors/warnings for types. options are [file, project] to investigate only changed file or entire project. defaults to project'], ['i', 'import', 'DEPRECATED. it is now the default. helpful when using git. import component objects if .bitmap changed not by bit'], ['', 'skip-import', 'do not import component objects if .bitmap changed not by bit'], ['', 'trigger <comp-id>', 'trigger recompilation of the specified component regardless of what changed. helpful when this comp-id must be a bundle']]);
|
77
|
+
_defineProperty(this, "options", [['v', 'verbose', 'show all watch events and compiler verbose output'], ['', 'skip-pre-compilation', 'skip compilation step before starting to watch'], ['t', 'check-types [string]', 'show errors/warnings for types. options are [file, project] to investigate only changed file or entire project. defaults to project'], ['i', 'import', 'DEPRECATED. it is now the default. helpful when using git. import component objects if .bitmap changed not by bit'], ['', 'skip-import', 'do not import component objects if .bitmap changed not by bit'], ['', 'generate-types', 'EXPERIMENTAL. generate d.ts files for typescript components (hurts performance)'], ['', 'trigger <comp-id>', 'trigger recompilation of the specified component regardless of what changed. helpful when this comp-id must be a bundle']]);
|
78
78
|
_defineProperty(this, "eventsListener", event => {
|
79
79
|
switch (event.type) {
|
80
80
|
case _compiler().CompilerErrorEvent.TYPE:
|
@@ -123,7 +123,8 @@ if this doesn't work well for you, run "bit config set watch_use_polling true" t
|
|
123
123
|
// if check-types is enabled, it must spawn the tsserver.
|
124
124
|
checkTypes: getCheckTypesEnum(),
|
125
125
|
import: !skipImport,
|
126
|
-
trigger: trigger ? _componentId().ComponentID.fromString(trigger) : undefined
|
126
|
+
trigger: trigger ? _componentId().ComponentID.fromString(trigger) : undefined,
|
127
|
+
generateTypes: watchCmdOpts.generateTypes
|
127
128
|
};
|
128
129
|
await this.watcher.watch(watchOpts);
|
129
130
|
return 'watcher terminated';
|
package/dist/watch.cmd.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_moment","_componentId","_compiler","_outputFormatter","_checkTypes","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","WatchCommand","constructor","pubsub","logger","watcher","event","type","CompilerErrorEvent","TYPE","console","error","registerToEvents","sub","CompilerAspect","id","eventsListener","report","cliArgs","watchCmdOpts","verbose","checkTypes","import","importIfNeeded","skipImport","trigger","consoleWarning","getCheckTypesEnum","undefined","CheckTypes","None","EntireProject","ChangedFile","Error","watchOpts","msgs","getMessages","compile","preCompile","skipPreCompilation","spawnTSServer","Boolean","ComponentID","fromString","watch","exports","onAll","path","onStart","onReady","workspace","watchPathsSortByComponent","clearOutdatedData","formatWatchPathsSortByComponent","chalk","yellow","name","moment","format","onChange","args","printOnFileEvent","onAdd","onUnlink","onError","err","eventMsgPlaceholder","filePaths","buildResults","duration","failureMsg","files","join","length","formatCompileResults","process","stdout","write"],"sources":["watch.cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport moment from 'moment';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport type { Logger } from '@teambit/logger';\nimport type { BitBaseEvent, PubsubMain } from '@teambit/pubsub';\nimport { OnComponentEventResult, Workspace } from '@teambit/workspace';\nimport { ComponentID } from '@teambit/component-id';\nimport { CompilerAspect, CompilerErrorEvent } from '@teambit/compiler';\nimport { EventMessages, RootDirs, WatchOptions } from './watcher';\nimport { formatCompileResults, formatWatchPathsSortByComponent } from './output-formatter';\nimport { CheckTypes } from './check-types';\nimport { WatcherMain } from './watcher.main.runtime';\n\ntype WatchCmdOpts = {\n verbose?: boolean;\n skipPreCompilation?: boolean;\n checkTypes?: string | boolean;\n import?: boolean;\n skipImport?: boolean;\n trigger?: string;\n};\n\nexport class WatchCommand implements Command {\n name = 'watch';\n description = 'automatically recompile modified components (on save)';\n extendedDescription = `by default, the watcher doesn't use polling, to keep the CPU idle.\nif this doesn't work well for you, run \"bit config set watch_use_polling true\" to use polling.`;\n helpUrl = 'reference/compiling/compiler-overview';\n alias = '';\n group = 'development';\n options = [\n ['v', 'verbose', 'show all watch events and compiler verbose output'],\n ['', 'skip-pre-compilation', 'skip compilation step before starting to watch'],\n [\n 't',\n 'check-types [string]',\n 'show errors/warnings for types. options are [file, project] to investigate only changed file or entire project. defaults to project',\n ],\n [\n 'i',\n 'import',\n 'DEPRECATED. it is now the default. helpful when using git. import component objects if .bitmap changed not by bit',\n ],\n ['', 'skip-import', 'do not import component objects if .bitmap changed not by bit'],\n [\n '',\n 'trigger <comp-id>',\n 'trigger recompilation of the specified component regardless of what changed. helpful when this comp-id must be a bundle',\n ],\n ] as CommandOptions;\n\n constructor(\n /**\n * logger extension.\n */\n private pubsub: PubsubMain,\n\n /**\n * logger extension.\n */\n private logger: Logger,\n\n /**\n * watcher extension.\n */\n private watcher: WatcherMain\n ) {\n this.registerToEvents();\n }\n\n private registerToEvents() {\n this.pubsub.sub(CompilerAspect.id, this.eventsListener);\n }\n\n private eventsListener = (event: BitBaseEvent<any>) => {\n switch (event.type) {\n case CompilerErrorEvent.TYPE:\n this.logger.console(`Watcher error ${event.data.error}, 'error'`);\n break;\n default:\n }\n };\n\n async report(cliArgs: [], watchCmdOpts: WatchCmdOpts) {\n const { verbose, checkTypes, import: importIfNeeded, skipImport, trigger } = watchCmdOpts;\n if (importIfNeeded) {\n this.logger.consoleWarning('the \"--import\" flag is deprecated and is now the default behavior');\n }\n const getCheckTypesEnum = () => {\n switch (checkTypes) {\n case undefined:\n case false:\n return CheckTypes.None;\n case 'project':\n case true: // project is the default\n return CheckTypes.EntireProject;\n case 'file':\n return CheckTypes.ChangedFile;\n default:\n throw new Error(`check-types can be either \"file\" or \"project\". got \"${checkTypes}\"`);\n }\n };\n const watchOpts: WatchOptions = {\n msgs: getMessages(this.logger),\n verbose,\n compile: true,\n preCompile: !watchCmdOpts.skipPreCompilation,\n spawnTSServer: Boolean(checkTypes), // if check-types is enabled, it must spawn the tsserver.\n checkTypes: getCheckTypesEnum(),\n import: !skipImport,\n trigger: trigger ? ComponentID.fromString(trigger) : undefined,\n };\n await this.watcher.watch(watchOpts);\n return 'watcher terminated';\n }\n}\n\nfunction getMessages(logger: Logger): EventMessages {\n return {\n onAll: (event: string, path: string) => logger.console(`Event: \"${event}\". Path: ${path}`),\n onStart: () => {},\n onReady: (workspace: Workspace, watchPathsSortByComponent: RootDirs, verbose?: boolean) => {\n clearOutdatedData();\n if (verbose) {\n logger.console(formatWatchPathsSortByComponent(watchPathsSortByComponent));\n }\n logger.console(\n chalk.yellow(\n `Watching for component changes in workspace ${workspace.name} (${moment().format('HH:mm:ss')})...\\n`\n )\n );\n },\n onChange: (...args) => {\n printOnFileEvent(logger, 'changed', ...args);\n },\n onAdd: (...args) => {\n printOnFileEvent(logger, 'added', ...args);\n },\n onUnlink: (...args) => {\n printOnFileEvent(logger, 'removed', ...args);\n },\n onError: (err) => {\n logger.console(`Watcher error ${err}`);\n },\n };\n}\n\nfunction printOnFileEvent(\n logger: Logger,\n eventMsgPlaceholder: 'changed' | 'added' | 'removed',\n filePaths: string[],\n buildResults: OnComponentEventResult[],\n verbose: boolean,\n duration: number,\n failureMsg?: string\n) {\n const files = filePaths.join(', ');\n if (!buildResults.length) {\n if (!failureMsg) {\n if (verbose) logger.console(`The files ${files} have been ${eventMsgPlaceholder}, but nothing to compile\\n\\n`);\n return;\n }\n logger.console(`${failureMsg}\\n\\n`);\n return;\n }\n logger.console(`The file(s) ${files} have been ${eventMsgPlaceholder}.\\n`);\n logger.console(formatCompileResults(buildResults));\n logger.console(`Finished (${duration}ms).`);\n logger.console(chalk.yellow(`Watching for component changes (${moment().format('HH:mm:ss')})...`));\n}\n\n/**\n * with console.clear() all history is deleted from the console. this function preserver the history.\n */\nfunction clearOutdatedData() {\n process.stdout.write('\\x1Bc');\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,QAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAI,aAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,YAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,iBAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,gBAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,YAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,WAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA2C,SAAAC,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI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IAAI,KAAK;MACrBC,gBAAgB,CAACzD,MAAM,EAAE,SAAS,EAAE,GAAGwD,IAAI,CAAC;IAC9C,CAAC;IACDI,OAAO,EAAGC,GAAG,IAAK;MAChB7D,MAAM,CAACM,OAAO,CAAC,iBAAiBuD,GAAG,EAAE,CAAC;IACxC;EACF,CAAC;AACH;AAEA,SAASJ,gBAAgBA,CACvBzD,MAAc,EACd8D,mBAAoD,EACpDC,SAAmB,EACnBC,YAAsC,EACtChD,OAAgB,EAChBiD,QAAgB,EAChBC,UAAmB,EACnB;EACA,MAAMC,KAAK,GAAGJ,SAAS,CAACK,IAAI,CAAC,IAAI,CAAC;EAClC,IAAI,CAACJ,YAAY,CAACK,MAAM,EAAE;IACxB,IAAI,CAACH,UAAU,EAAE;MACf,IAAIlD,OAAO,EAAEhB,MAAM,CAACM,OAAO,CAAC,aAAa6D,KAAK,cAAcL,mBAAmB,8BAA8B,CAAC;MAC9G;IACF;IACA9D,MAAM,CAACM,OAAO,CAAC,GAAG4D,UAAU,MAAM,CAAC;IACnC;EACF;EACAlE,MAAM,CAACM,OAAO,CAAC,eAAe6D,KAAK,cAAcL,mBAAmB,KAAK,CAAC;EAC1E9D,MAAM,CAACM,OAAO,CAAC,IAAAgE,uCAAoB,EAACN,YAAY,CAAC,CAAC;EAClDhE,MAAM,CAACM,OAAO,CAAC,aAAa2D,QAAQ,MAAM,CAAC;EAC3CjE,MAAM,CAACM,OAAO,CAAC4C,gBAAK,CAACC,MAAM,CAAC,mCAAmC,IAAAE,iBAAM,EAAC,CAAC,CAACC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AACpG;;AAEA;AACA;AACA;AACA,SAASN,iBAAiBA,CAAA,EAAG;EAC3BuB,OAAO,CAACC,MAAM,CAACC,KAAK,CAAC,OAAO,CAAC;AAC/B","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_moment","_componentId","_compiler","_outputFormatter","_checkTypes","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","WatchCommand","constructor","pubsub","logger","watcher","event","type","CompilerErrorEvent","TYPE","console","error","registerToEvents","sub","CompilerAspect","id","eventsListener","report","cliArgs","watchCmdOpts","verbose","checkTypes","import","importIfNeeded","skipImport","trigger","consoleWarning","getCheckTypesEnum","undefined","CheckTypes","None","EntireProject","ChangedFile","Error","watchOpts","msgs","getMessages","compile","preCompile","skipPreCompilation","spawnTSServer","Boolean","ComponentID","fromString","generateTypes","watch","exports","onAll","path","onStart","onReady","workspace","watchPathsSortByComponent","clearOutdatedData","formatWatchPathsSortByComponent","chalk","yellow","name","moment","format","onChange","args","printOnFileEvent","onAdd","onUnlink","onError","err","eventMsgPlaceholder","filePaths","buildResults","duration","failureMsg","files","join","length","formatCompileResults","process","stdout","write"],"sources":["watch.cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport moment from 'moment';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport type { Logger } from '@teambit/logger';\nimport type { BitBaseEvent, PubsubMain } from '@teambit/pubsub';\nimport { OnComponentEventResult, Workspace } from '@teambit/workspace';\nimport { ComponentID } from '@teambit/component-id';\nimport { CompilerAspect, CompilerErrorEvent } from '@teambit/compiler';\nimport { EventMessages, RootDirs, WatchOptions } from './watcher';\nimport { formatCompileResults, formatWatchPathsSortByComponent } from './output-formatter';\nimport { CheckTypes } from './check-types';\nimport { WatcherMain } from './watcher.main.runtime';\n\ntype WatchCmdOpts = {\n verbose?: boolean;\n skipPreCompilation?: boolean;\n checkTypes?: string | boolean;\n import?: boolean;\n skipImport?: boolean;\n generateTypes?: boolean;\n trigger?: string;\n};\n\nexport class WatchCommand implements Command {\n name = 'watch';\n description = 'automatically recompile modified components (on save)';\n extendedDescription = `by default, the watcher doesn't use polling, to keep the CPU idle.\nif this doesn't work well for you, run \"bit config set watch_use_polling true\" to use polling.`;\n helpUrl = 'reference/compiling/compiler-overview';\n alias = '';\n group = 'development';\n options = [\n ['v', 'verbose', 'show all watch events and compiler verbose output'],\n ['', 'skip-pre-compilation', 'skip compilation step before starting to watch'],\n [\n 't',\n 'check-types [string]',\n 'show errors/warnings for types. options are [file, project] to investigate only changed file or entire project. defaults to project',\n ],\n [\n 'i',\n 'import',\n 'DEPRECATED. it is now the default. helpful when using git. import component objects if .bitmap changed not by bit',\n ],\n ['', 'skip-import', 'do not import component objects if .bitmap changed not by bit'],\n ['', 'generate-types', 'EXPERIMENTAL. generate d.ts files for typescript components (hurts performance)'],\n [\n '',\n 'trigger <comp-id>',\n 'trigger recompilation of the specified component regardless of what changed. helpful when this comp-id must be a bundle',\n ],\n ] as CommandOptions;\n\n constructor(\n /**\n * logger extension.\n */\n private pubsub: PubsubMain,\n\n /**\n * logger extension.\n */\n private logger: Logger,\n\n /**\n * watcher extension.\n */\n private watcher: WatcherMain\n ) {\n this.registerToEvents();\n }\n\n private registerToEvents() {\n this.pubsub.sub(CompilerAspect.id, this.eventsListener);\n }\n\n private eventsListener = (event: BitBaseEvent<any>) => {\n switch (event.type) {\n case CompilerErrorEvent.TYPE:\n this.logger.console(`Watcher error ${event.data.error}, 'error'`);\n break;\n default:\n }\n };\n\n async report(cliArgs: [], watchCmdOpts: WatchCmdOpts) {\n const { verbose, checkTypes, import: importIfNeeded, skipImport, trigger } = watchCmdOpts;\n if (importIfNeeded) {\n this.logger.consoleWarning('the \"--import\" flag is deprecated and is now the default behavior');\n }\n const getCheckTypesEnum = () => {\n switch (checkTypes) {\n case undefined:\n case false:\n return CheckTypes.None;\n case 'project':\n case true: // project is the default\n return CheckTypes.EntireProject;\n case 'file':\n return CheckTypes.ChangedFile;\n default:\n throw new Error(`check-types can be either \"file\" or \"project\". got \"${checkTypes}\"`);\n }\n };\n const watchOpts: WatchOptions = {\n msgs: getMessages(this.logger),\n verbose,\n compile: true,\n preCompile: !watchCmdOpts.skipPreCompilation,\n spawnTSServer: Boolean(checkTypes), // if check-types is enabled, it must spawn the tsserver.\n checkTypes: getCheckTypesEnum(),\n import: !skipImport,\n trigger: trigger ? ComponentID.fromString(trigger) : undefined,\n generateTypes: watchCmdOpts.generateTypes,\n };\n await this.watcher.watch(watchOpts);\n return 'watcher terminated';\n }\n}\n\nfunction getMessages(logger: Logger): EventMessages {\n return {\n onAll: (event: string, path: string) => logger.console(`Event: \"${event}\". Path: ${path}`),\n onStart: () => {},\n onReady: (workspace: Workspace, watchPathsSortByComponent: RootDirs, verbose?: boolean) => {\n clearOutdatedData();\n if (verbose) {\n logger.console(formatWatchPathsSortByComponent(watchPathsSortByComponent));\n }\n logger.console(\n chalk.yellow(\n `Watching for component changes in workspace ${workspace.name} (${moment().format('HH:mm:ss')})...\\n`\n )\n );\n },\n onChange: (...args) => {\n printOnFileEvent(logger, 'changed', ...args);\n },\n onAdd: (...args) => {\n printOnFileEvent(logger, 'added', ...args);\n },\n onUnlink: (...args) => {\n printOnFileEvent(logger, 'removed', ...args);\n },\n onError: (err) => {\n logger.console(`Watcher error ${err}`);\n },\n };\n}\n\nfunction printOnFileEvent(\n logger: Logger,\n eventMsgPlaceholder: 'changed' | 'added' | 'removed',\n filePaths: string[],\n buildResults: OnComponentEventResult[],\n verbose: boolean,\n duration: number,\n failureMsg?: string\n) {\n const files = filePaths.join(', ');\n if (!buildResults.length) {\n if (!failureMsg) {\n if (verbose) logger.console(`The files ${files} have been ${eventMsgPlaceholder}, but nothing to compile\\n\\n`);\n return;\n }\n logger.console(`${failureMsg}\\n\\n`);\n return;\n }\n logger.console(`The file(s) ${files} have been ${eventMsgPlaceholder}.\\n`);\n logger.console(formatCompileResults(buildResults));\n logger.console(`Finished (${duration}ms).`);\n logger.console(chalk.yellow(`Watching for component changes (${moment().format('HH:mm:ss')})...`));\n}\n\n/**\n * with console.clear() all history is deleted from the console. this function preserver the history.\n */\nfunction clearOutdatedData() {\n process.stdout.write('\\x1Bc');\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,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AAO,EAAGC,GAAG,IAAK;MAChB9D,MAAM,CAACM,OAAO,CAAC,iBAAiBwD,GAAG,EAAE,CAAC;IACxC;EACF,CAAC;AACH;AAEA,SAASJ,gBAAgBA,CACvB1D,MAAc,EACd+D,mBAAoD,EACpDC,SAAmB,EACnBC,YAAsC,EACtCjD,OAAgB,EAChBkD,QAAgB,EAChBC,UAAmB,EACnB;EACA,MAAMC,KAAK,GAAGJ,SAAS,CAACK,IAAI,CAAC,IAAI,CAAC;EAClC,IAAI,CAACJ,YAAY,CAACK,MAAM,EAAE;IACxB,IAAI,CAACH,UAAU,EAAE;MACf,IAAInD,OAAO,EAAEhB,MAAM,CAACM,OAAO,CAAC,aAAa8D,KAAK,cAAcL,mBAAmB,8BAA8B,CAAC;MAC9G;IACF;IACA/D,MAAM,CAACM,OAAO,CAAC,GAAG6D,UAAU,MAAM,CAAC;IACnC;EACF;EACAnE,MAAM,CAACM,OAAO,CAAC,eAAe8D,KAAK,cAAcL,mBAAmB,KAAK,CAAC;EAC1E/D,MAAM,CAACM,OAAO,CAAC,IAAAiE,uCAAoB,EAACN,YAAY,CAAC,CAAC;EAClDjE,MAAM,CAACM,OAAO,CAAC,aAAa4D,QAAQ,MAAM,CAAC;EAC3ClE,MAAM,CAACM,OAAO,CAAC6C,gBAAK,CAACC,MAAM,CAAC,mCAAmC,IAAAE,iBAAM,EAAC,CAAC,CAACC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AACpG;;AAEA;AACA;AACA;AACA,SAASN,iBAAiBA,CAAA,EAAG;EAC3BuB,OAAO,CAACC,MAAM,CAACC,KAAK,CAAC,OAAO,CAAC;AAC/B","ignoreList":[]}
|
package/dist/watcher.d.ts
CHANGED
package/dist/watcher.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_path","_lodash","_loader","_constants","_logger","_legacy","_pMapSeries","_chalk","_unmergedComponents","_chokidar","_workspace","_watchQueue","_excluded","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_objectWithoutProperties","i","_objectWithoutPropertiesLoose","s","includes","propertyIsEnumerable","call","n","hasOwnProperty","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","DEBOUNCE_WAIT_MS","Watcher","constructor","workspace","pubsub","watcherMain","options","WatchQueue","ipcEventsDir","ipcEvents","eventsDir","verbose","consumer","watch","_this$options","msgs","watchOpts","setRootDirs","componentIds","values","rootDirs","triggerOnPreWatch","createWatcher","watcher","fsWatcher","onStart","scope","watchScopeInternalFiles","Promise","resolve","reject","onAll","on","onReady","watched","getWatched","totalWatched","flat","logger","console","chalk","bold","JSON","stringify","toString","loader","stop","event","filePath","startTime","Date","getTime","files","results","debounced","irrelevant","failureMsg","handleChange","duration","onChange","err","onError","endsWith","BIT_MAP","bitMapChangesInProgress","buildResults","watchQueue","add","handleBitmapChanges","onIdle","dirname","eventName","basename","warn","triggerGotEvent","WORKSPACE_JSONC","triggerOnWorkspaceConfigChange","UNMERGED_FILENAME","clearCache","componentId","getComponentIdByPath","compIdStr","changedFilesPerComponent","sleep","triggerCompChanges","undefined","join","msg","error","message","ms","setTimeout","updatedComponentId","hasId","ids","listIds","find","id","isEqual","ignoreVersion","debug","clearComponentCache","component","get","componentMap","state","_consumer","Error","compFilesRelativeToWorkspace","getFilesRelativeToConsumer","compFiles","nonCompFiles","partition","relativeFile","getRelativePathLinux","Boolean","p","removedFiles","compact","all","map","fs","pathExists","toStringWithoutVersion","bitMap","updateComponentPaths","f","getPathRelativeToConsumer","executeWatchOperationsOnComponent","trigger","triggerOnComponentChange","previewsRootDirs","previewsIds","getAllBitIds","_reloadConsumer","importObjectsIfNeeded","triggerOnBitmapChange","newDirs","difference","removedDirs","addResults","mapSeries","dir","executeWatchOperationsOnRemove","import","currentIds","hasVersionChanges","prevId","searchWithoutVersion","version","existsInScope","isComponentInScope","useCache","lane","getCurrentLaneObject","pub","WorkspaceAspect","createOnComponentRemovedEvent","triggerOnComponentRemove","isChange","isComponentWatchedExternally","idStr","createOnComponentChangeEvent","createOnComponentAddEvent","triggerOnComponentAdd","OnComponentRemovedEvent","now","hook","OnComponentChangeEvent","OnComponentAddEvent","watcherData","multipleWatchers","m","compilerId","rootDir","findRootDirByFilePathRecursively","pathNormalizeToLinux","parentDir","usePollingConf","globalConfig","CFG_WATCH_USE_POLLING","usePolling","workspacePathLinux","path","ignoreLocalScope","pathToCheck","startsWith","chokidar","ignoreInitial","ignored","persistent","componentsFromBitMap","getAllComponents","getRootDir","exports"],"sources":["watcher.ts"],"sourcesContent":["import { PubsubMain } from '@teambit/pubsub';\nimport fs from 'fs-extra';\nimport { dirname, basename } from 'path';\nimport { compact, difference, partition } from 'lodash';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport loader from '@teambit/legacy/dist/cli/loader';\nimport { BIT_MAP, CFG_WATCH_USE_POLLING, WORKSPACE_JSONC } from '@teambit/legacy/dist/constants';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport logger from '@teambit/legacy/dist/logger/logger';\nimport { pathNormalizeToLinux, PathOsBasedAbsolute } from '@teambit/legacy.utils';\nimport mapSeries from 'p-map-series';\nimport chalk from 'chalk';\nimport { ChildProcess } from 'child_process';\nimport { UNMERGED_FILENAME } from '@teambit/legacy/dist/scope/lanes/unmerged-components';\nimport chokidar, { FSWatcher } from 'chokidar';\nimport { ComponentMap } from '@teambit/legacy.bit-map';\nimport { CompilationInitiator } from '@teambit/compiler';\nimport {\n WorkspaceAspect,\n Workspace,\n OnComponentEventResult,\n OnComponentChangeEvent,\n OnComponentAddEvent,\n OnComponentRemovedEvent,\n} from '@teambit/workspace';\nimport { CheckTypes } from './check-types';\nimport { WatcherMain } from './watcher.main.runtime';\nimport { WatchQueue } from './watch-queue';\n\nexport type WatcherProcessData = { watchProcess: ChildProcess; compilerId: ComponentID; componentIds: ComponentID[] };\n\nexport type EventMessages = {\n onAll: Function;\n onStart: Function;\n onReady: Function;\n onChange: OnFileEventFunc;\n onAdd: OnFileEventFunc;\n onUnlink: OnFileEventFunc;\n onError: Function;\n};\n\nexport type OnFileEventFunc = (\n filePaths: string[],\n buildResults: OnComponentEventResult[],\n verbose: boolean,\n duration: number,\n failureMsg?: string\n) => void;\n\nexport type WatchOptions = {\n msgs?: EventMessages;\n initiator?: CompilationInitiator;\n verbose?: boolean; // print watch events to the console. (also ts-server events if spawnTSServer is true)\n spawnTSServer?: boolean; // needed for check types and extract API/docs.\n checkTypes?: CheckTypes; // if enabled, the spawnTSServer becomes true.\n preCompile?: boolean; // whether compile all components before start watching\n compile?: boolean; // whether compile modified/added components during watch process\n import?: boolean; // whether import objects when .bitmap got version changes\n trigger?: ComponentID; // trigger onComponentChange for the specified component-id. helpful when this comp must be a bundle, and needs to be recompile on any dep change.\n};\n\nexport type RootDirs = { [dir: PathLinux]: ComponentID };\n\nconst DEBOUNCE_WAIT_MS = 100;\ntype PathLinux = string; // ts fails when importing it from @teambit/legacy/dist/utils/path.\n\nexport class Watcher {\n private fsWatcher: FSWatcher;\n private changedFilesPerComponent: { [componentId: string]: string[] } = {};\n private watchQueue = new WatchQueue();\n private bitMapChangesInProgress = false;\n private ipcEventsDir: string;\n private rootDirs: RootDirs = {};\n private verbose = false;\n private multipleWatchers: WatcherProcessData[] = [];\n constructor(\n private workspace: Workspace,\n private pubsub: PubsubMain,\n private watcherMain: WatcherMain,\n private options: WatchOptions\n ) {\n this.ipcEventsDir = this.watcherMain.ipcEvents.eventsDir;\n this.verbose = this.options.verbose || false;\n }\n\n get consumer(): Consumer {\n return this.workspace.consumer;\n }\n\n async watch() {\n const { msgs, ...watchOpts } = this.options;\n await this.setRootDirs();\n const componentIds = Object.values(this.rootDirs);\n await this.watcherMain.triggerOnPreWatch(componentIds, watchOpts);\n await this.createWatcher();\n const watcher = this.fsWatcher;\n msgs?.onStart(this.workspace);\n\n await this.workspace.scope.watchScopeInternalFiles();\n\n return new Promise((resolve, reject) => {\n if (this.verbose) {\n // @ts-ignore\n if (msgs?.onAll) watcher.on('all', msgs?.onAll);\n }\n watcher.on('ready', () => {\n msgs?.onReady(this.workspace, this.rootDirs, this.verbose);\n if (this.verbose) {\n const watched = this.fsWatcher.getWatched();\n const totalWatched = Object.values(watched).flat().length;\n logger.console(\n `${chalk.bold('the following files are being watched:')}\\n${JSON.stringify(watched, null, 2)}`\n );\n logger.console(`\\nTotal files being watched: ${chalk.bold(totalWatched.toString())}`);\n }\n\n loader.stop();\n });\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n watcher.on('all', async (event, filePath) => {\n if (event !== 'change' && event !== 'add' && event !== 'unlink') return;\n const startTime = new Date().getTime();\n const { files, results, debounced, irrelevant, failureMsg } = await this.handleChange(filePath);\n if (debounced || irrelevant) {\n return;\n }\n const duration = new Date().getTime() - startTime;\n msgs?.onChange(files, results, this.verbose, duration, failureMsg);\n });\n watcher.on('error', (err) => {\n msgs?.onError(err);\n reject(err);\n });\n });\n }\n\n /**\n * *** DEBOUNCING ***\n * some actions trigger multiple files changes at (almost) the same time. e.g. \"git pull\".\n * this causes some performance and instability issues. a debouncing mechanism was implemented to help with this.\n * the way how it works is that the first file of the same component starts the execution with a delay (e.g. 200ms).\n * if, in the meanwhile, another file of the same component was changed, it won't start a new execution, instead,\n * it'll only add the file to `this.changedFilesPerComponent` prop.\n * once the execution starts, it'll delete this component-id from the `this.changedFilesPerComponent` array,\n * indicating the next file-change to start a new execution.\n *\n * implementation wise, `lodash.debounce` doesn't help here, because:\n * A) it doesn't return the results, unless \"leading\" option is true. here, it must be false, otherwise, it'll start\n * the execution immediately.\n * B) it debounces the method regardless the param passes to it. so it'll disregard the component-id and will delay\n * other components undesirably.\n *\n * *** QUEUE ***\n * the debouncing helps to not execute the same component multiple times concurrently. however, multiple components\n * and .bitmap changes execution can still be processed concurrently.\n * the following example explains why this is an issue.\n * compA is changed in the .bitmap file from version 0.0.1 to 0.0.2. its files were changed as well.\n * all these changes get pulled at the same time by \"git pull\", as a result, the execution of compA and the .bitmap\n * happen at the same time.\n * during the execution of compA, the component id is parsed as compA@0.0.1, later, it asks for the Workspace for this\n * id. while the workspace is looking for this id, the .bitmap execution reloaded the consumer and changed all versions.\n * after this change, the workspace doesn't have this id anymore, which will trigger an error.\n * to ensure this won't happen, we keep a flag to indicate whether the .bitmap execution is running, and if so, all\n * other executions are paused until the queue is empty (this is done by awaiting for queue.onIdle).\n * once the queue is empty, we know the .bitmap process was done and the workspace has all new ids.\n * in the example above, at this stage, the id will be resolved to compA@0.0.2.\n * one more thing, the queue is configured to have concurrency of 1. to make sure two components are not processed at\n * the same time. (the same way is done when loading all components from the filesystem/scope).\n * this way we can also ensure that if compA was started before the .bitmap execution, it will complete before the\n * .bitmap execution starts.\n */\n private async handleChange(filePath: string): Promise<{\n results: OnComponentEventResult[];\n files: string[];\n failureMsg?: string;\n debounced?: boolean;\n irrelevant?: boolean; // file/dir is not part of any component\n }> {\n try {\n if (filePath.endsWith(BIT_MAP)) {\n this.bitMapChangesInProgress = true;\n const buildResults = await this.watchQueue.add(() => this.handleBitmapChanges());\n this.bitMapChangesInProgress = false;\n loader.stop();\n return { results: buildResults, files: [filePath] };\n }\n if (this.bitMapChangesInProgress) {\n await this.watchQueue.onIdle();\n }\n if (dirname(filePath) === this.ipcEventsDir) {\n const eventName = basename(filePath);\n if (eventName !== 'onPostInstall') {\n this.watcherMain.logger.warn(`eventName ${eventName} is not recognized, please handle it`);\n }\n await this.watcherMain.ipcEvents.triggerGotEvent(eventName as 'onPostInstall');\n return { results: [], files: [filePath] };\n }\n if (filePath.endsWith(WORKSPACE_JSONC)) {\n await this.workspace.triggerOnWorkspaceConfigChange();\n return { results: [], files: [filePath] };\n }\n if (filePath.endsWith(UNMERGED_FILENAME)) {\n await this.workspace.clearCache();\n return { results: [], files: [filePath] };\n }\n const componentId = this.getComponentIdByPath(filePath);\n if (!componentId) {\n loader.stop();\n return { results: [], files: [], irrelevant: true };\n }\n const compIdStr = componentId.toString();\n if (this.changedFilesPerComponent[compIdStr]) {\n this.changedFilesPerComponent[compIdStr].push(filePath);\n loader.stop();\n return { results: [], files: [], debounced: true };\n }\n this.changedFilesPerComponent[compIdStr] = [filePath];\n await this.sleep(DEBOUNCE_WAIT_MS);\n const files = this.changedFilesPerComponent[compIdStr];\n delete this.changedFilesPerComponent[compIdStr];\n\n const buildResults = await this.watchQueue.add(() => this.triggerCompChanges(componentId, files));\n const failureMsg = buildResults.length\n ? undefined\n : `files ${files.join(', ')} are inside the component ${compIdStr} but configured to be ignored`;\n loader.stop();\n return { results: buildResults, files, failureMsg };\n } catch (err: any) {\n const msg = `watcher found an error while handling ${filePath}`;\n logger.error(msg, err);\n logger.console(`${msg}, ${err.message}`);\n loader.stop();\n return { results: [], files: [filePath], failureMsg: err.message };\n }\n }\n\n private async sleep(ms: number) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n\n private async triggerCompChanges(\n componentId: ComponentID,\n files: PathOsBasedAbsolute[]\n ): Promise<OnComponentEventResult[]> {\n let updatedComponentId: ComponentID | undefined = componentId;\n if (!this.workspace.hasId(componentId)) {\n // bitmap has changed meanwhile, which triggered `handleBitmapChanges`, which re-loaded consumer and updated versions\n // so the original componentId might not be in the workspace now, and we need to find the updated one\n const ids = this.workspace.listIds();\n updatedComponentId = ids.find((id) => id.isEqual(componentId, { ignoreVersion: true }));\n if (!updatedComponentId) {\n logger.debug(`triggerCompChanges, the component ${componentId.toString()} was probably removed from .bitmap`);\n return [];\n }\n }\n this.workspace.clearComponentCache(updatedComponentId);\n const component = await this.workspace.get(updatedComponentId);\n const componentMap: ComponentMap = component.state._consumer.componentMap;\n if (!componentMap) {\n throw new Error(\n `unable to find componentMap for ${updatedComponentId.toString()}, make sure this component is in .bitmap`\n );\n }\n const compFilesRelativeToWorkspace = componentMap.getFilesRelativeToConsumer();\n const [compFiles, nonCompFiles] = partition(files, (filePath) => {\n const relativeFile = this.getRelativePathLinux(filePath);\n return Boolean(compFilesRelativeToWorkspace.find((p) => p === relativeFile));\n });\n // nonCompFiles are either, files that were removed from the filesystem or existing files that are ignored.\n // the compiler takes care of removedFiles differently, e.g. removes dists dir and old symlinks.\n const removedFiles = compact(\n await Promise.all(nonCompFiles.map(async (filePath) => ((await fs.pathExists(filePath)) ? null : filePath)))\n );\n\n if (!compFiles.length && !removedFiles.length) {\n logger.debug(\n `the following files are part of the component ${componentId.toStringWithoutVersion()} but configured to be ignored:\\n${files.join(\n '\\n'\n )}'`\n );\n return [];\n }\n this.consumer.bitMap.updateComponentPaths(\n componentId,\n compFiles.map((f) => this.consumer.getPathRelativeToConsumer(f)),\n removedFiles.map((f) => this.consumer.getPathRelativeToConsumer(f))\n );\n const buildResults = await this.executeWatchOperationsOnComponent(\n updatedComponentId,\n compFiles,\n removedFiles,\n true\n );\n if (this.options.trigger && !updatedComponentId.isEqual(this.options.trigger)) {\n await this.workspace.triggerOnComponentChange(this.options.trigger, [], [], this.options);\n }\n\n return buildResults;\n }\n\n /**\n * if .bitmap changed, it's possible that a new component has been added. trigger onComponentAdd.\n */\n private async handleBitmapChanges(): Promise<OnComponentEventResult[]> {\n const previewsRootDirs = { ...this.rootDirs };\n const previewsIds = this.consumer.bitMap.getAllBitIds();\n await this.workspace._reloadConsumer();\n await this.setRootDirs();\n await this.importObjectsIfNeeded(previewsIds);\n await this.workspace.triggerOnBitmapChange();\n const newDirs: string[] = difference(Object.keys(this.rootDirs), Object.keys(previewsRootDirs));\n const removedDirs: string[] = difference(Object.keys(previewsRootDirs), Object.keys(this.rootDirs));\n const results: OnComponentEventResult[] = [];\n if (newDirs.length) {\n const addResults = await mapSeries(newDirs, async (dir) =>\n this.executeWatchOperationsOnComponent(this.rootDirs[dir], [], [], false)\n );\n results.push(...addResults.flat());\n }\n if (removedDirs.length) {\n await mapSeries(removedDirs, (dir) => this.executeWatchOperationsOnRemove(previewsRootDirs[dir]));\n }\n\n return results;\n }\n\n /**\n * needed when using git.\n * it resolves the following issue - a user is running `git pull` which updates the components and the .bitmap file.\n * because the objects locally are not updated, the .bitmap has new versions that don't exist in the local scope.\n * as soon as the watcher gets an event about a file change, it loads the component which throws\n * ComponentsPendingImport error.\n * to resolve this, we import the new objects as soon as the .bitmap file changes.\n * for performance reasons, we import only when: 1) the .bitmap file has version changes and 2) this new version is\n * not already in the scope.\n */\n private async importObjectsIfNeeded(previewsIds: ComponentIdList) {\n if (!this.options.import) {\n return;\n }\n const currentIds = this.consumer.bitMap.getAllBitIds();\n const hasVersionChanges = currentIds.find((id) => {\n const prevId = previewsIds.searchWithoutVersion(id);\n return prevId && prevId.version !== id.version;\n });\n if (!hasVersionChanges) {\n return;\n }\n const existsInScope = await this.workspace.scope.isComponentInScope(hasVersionChanges);\n if (existsInScope) {\n // the .bitmap change was probably a result of tag/snap/merge, no need to import.\n return;\n }\n if (this.options.verbose) {\n logger.console(\n `Watcher: .bitmap has changed with new versions which do not exist locally, importing the objects...`\n );\n }\n await this.workspace.scope.import(currentIds, {\n useCache: true,\n lane: await this.workspace.getCurrentLaneObject(),\n });\n }\n\n private async executeWatchOperationsOnRemove(componentId: ComponentID) {\n logger.debug(`running OnComponentRemove hook for ${chalk.bold(componentId.toString())}`);\n this.pubsub.pub(WorkspaceAspect.id, this.createOnComponentRemovedEvent(componentId.toString()));\n await this.workspace.triggerOnComponentRemove(componentId);\n }\n\n private async executeWatchOperationsOnComponent(\n componentId: ComponentID,\n files: PathOsBasedAbsolute[],\n removedFiles: PathOsBasedAbsolute[] = [],\n isChange = true\n ): Promise<OnComponentEventResult[]> {\n if (this.isComponentWatchedExternally(componentId)) {\n // update capsule, once done, it automatically triggers the external watcher\n await this.workspace.get(componentId);\n return [];\n }\n const idStr = componentId.toString();\n\n if (isChange) {\n logger.debug(`running OnComponentChange hook for ${chalk.bold(idStr)}`);\n this.pubsub.pub(WorkspaceAspect.id, this.createOnComponentChangeEvent(idStr, 'OnComponentChange'));\n } else {\n logger.debug(`running OnComponentAdd hook for ${chalk.bold(idStr)}`);\n this.pubsub.pub(WorkspaceAspect.id, this.createOnComponentAddEvent(idStr, 'OnComponentAdd'));\n }\n\n const buildResults = isChange\n ? await this.workspace.triggerOnComponentChange(componentId, files, removedFiles, this.options)\n : await this.workspace.triggerOnComponentAdd(componentId, this.options);\n\n return buildResults;\n }\n\n private createOnComponentRemovedEvent(idStr) {\n return new OnComponentRemovedEvent(Date.now(), idStr);\n }\n\n private createOnComponentChangeEvent(idStr, hook) {\n return new OnComponentChangeEvent(Date.now(), idStr, hook);\n }\n\n private createOnComponentAddEvent(idStr, hook) {\n return new OnComponentAddEvent(Date.now(), idStr, hook);\n }\n\n private isComponentWatchedExternally(componentId: ComponentID) {\n const watcherData = this.multipleWatchers.find((m) => m.componentIds.find((id) => id.isEqual(componentId)));\n if (watcherData) {\n logger.debug(`${componentId.toString()} is watched by ${watcherData.compilerId.toString()}`);\n return true;\n }\n return false;\n }\n\n private getComponentIdByPath(filePath: string): ComponentID | null {\n const relativeFile = this.getRelativePathLinux(filePath);\n const rootDir = this.findRootDirByFilePathRecursively(relativeFile);\n if (!rootDir) {\n // the file is not part of any component. If it was a new component, or a new file of\n // existing component, then, handleBitmapChanges() should deal with it.\n return null;\n }\n return this.rootDirs[rootDir];\n }\n\n private getRelativePathLinux(filePath: string) {\n return pathNormalizeToLinux(this.consumer.getPathRelativeToConsumer(filePath));\n }\n\n private findRootDirByFilePathRecursively(filePath: string): string | null {\n if (this.rootDirs[filePath]) return filePath;\n const parentDir = dirname(filePath);\n if (parentDir === filePath) return null;\n return this.findRootDirByFilePathRecursively(parentDir);\n }\n\n private async createWatcher() {\n const usePollingConf = await this.watcherMain.globalConfig.get(CFG_WATCH_USE_POLLING);\n const usePolling = usePollingConf === 'true';\n const workspacePathLinux = pathNormalizeToLinux(this.workspace.path);\n const ignoreLocalScope = (pathToCheck: string) => {\n if (pathToCheck.startsWith(this.ipcEventsDir) || pathToCheck.endsWith(UNMERGED_FILENAME)) return false;\n return (\n pathToCheck.startsWith(`${workspacePathLinux}/.git/`) || pathToCheck.startsWith(`${workspacePathLinux}/.bit/`)\n );\n };\n this.fsWatcher = chokidar.watch(this.workspace.path, {\n ignoreInitial: true,\n // `chokidar` matchers have Bash-parity, so Windows-style backslashes are not supported as separators.\n // (windows-style backslashes are converted to forward slashes)\n ignored: ['**/node_modules/**', '**/package.json', ignoreLocalScope],\n usePolling,\n // useFsEvents,\n persistent: true,\n });\n if (this.verbose) {\n logger.console(`${chalk.bold('chokidar.options:\\n')} ${JSON.stringify(this.fsWatcher.options, undefined, 2)}`);\n }\n }\n\n private async setRootDirs() {\n this.rootDirs = {};\n const componentsFromBitMap = this.consumer.bitMap.getAllComponents();\n componentsFromBitMap.map((componentMap) => {\n const componentId = componentMap.id;\n const rootDir = componentMap.getRootDir();\n this.rootDirs[rootDir] = componentId;\n });\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAG,OAAA,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;E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AAU,CAAC,GAAGJ,kBAAkB,QAAQ,CAAC;IAElH,CAAC;IACD,IAAI,CAAC9J,SAAS,GAAGmK,mBAAQ,CAAC9K,KAAK,CAAC,IAAI,CAACV,SAAS,CAACoL,IAAI,EAAE;MACnDK,aAAa,EAAE,IAAI;MACnB;MACA;MACAC,OAAO,EAAE,CAAC,oBAAoB,EAAE,iBAAiB,EAAEL,gBAAgB,CAAC;MACpEH,UAAU;MACV;MACAS,UAAU,EAAE;IACd,CAAC,CAAC;IACF,IAAI,IAAI,CAACnL,OAAO,EAAE;MAChB2B,iBAAM,CAACC,OAAO,CAAC,GAAGC,gBAAK,CAACC,IAAI,CAAC,qBAAqB,CAAC,IAAIC,IAAI,CAACC,SAAS,CAAC,IAAI,CAACnB,SAAS,CAAClB,OAAO,EAAE+E,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IAChH;EACF;EAEA,MAAcpE,WAAWA,CAAA,EAAG;IAC1B,IAAI,CAACG,QAAQ,GAAG,CAAC,CAAC;IAClB,MAAM2K,oBAAoB,GAAG,IAAI,CAACnL,QAAQ,CAACgH,MAAM,CAACoE,gBAAgB,CAAC,CAAC;IACpED,oBAAoB,CAACvE,GAAG,CAAEhB,YAAY,IAAK;MACzC,MAAMzB,WAAW,GAAGyB,YAAY,CAACP,EAAE;MACnC,MAAM6E,OAAO,GAAGtE,YAAY,CAACyF,UAAU,CAAC,CAAC;MACzC,IAAI,CAAC7K,QAAQ,CAAC0J,OAAO,CAAC,GAAG/F,WAAW;IACtC,CAAC,CAAC;EACJ;AACF;AAACmH,OAAA,CAAAjM,OAAA,GAAAA,OAAA","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_path","_lodash","_loader","_constants","_logger","_legacy","_pMapSeries","_chalk","_unmergedComponents","_chokidar","_workspace","_watchQueue","_excluded","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_objectWithoutProperties","i","_objectWithoutPropertiesLoose","s","includes","propertyIsEnumerable","call","n","hasOwnProperty","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","DEBOUNCE_WAIT_MS","Watcher","constructor","workspace","pubsub","watcherMain","options","WatchQueue","ipcEventsDir","ipcEvents","eventsDir","verbose","consumer","watch","_this$options","msgs","watchOpts","setRootDirs","componentIds","values","rootDirs","triggerOnPreWatch","createWatcher","watcher","fsWatcher","onStart","scope","watchScopeInternalFiles","Promise","resolve","reject","onAll","on","onReady","watched","getWatched","totalWatched","flat","logger","console","chalk","bold","JSON","stringify","toString","loader","stop","event","filePath","startTime","Date","getTime","files","results","debounced","irrelevant","failureMsg","handleChange","duration","onChange","err","onError","endsWith","BIT_MAP","bitMapChangesInProgress","buildResults","watchQueue","add","handleBitmapChanges","onIdle","dirname","eventName","basename","warn","triggerGotEvent","WORKSPACE_JSONC","triggerOnWorkspaceConfigChange","UNMERGED_FILENAME","clearCache","componentId","getComponentIdByPath","compIdStr","changedFilesPerComponent","sleep","triggerCompChanges","undefined","join","msg","error","message","ms","setTimeout","updatedComponentId","hasId","ids","listIds","find","id","isEqual","ignoreVersion","debug","clearComponentCache","component","get","componentMap","state","_consumer","Error","compFilesRelativeToWorkspace","getFilesRelativeToConsumer","compFiles","nonCompFiles","partition","relativeFile","getRelativePathLinux","Boolean","p","removedFiles","compact","all","map","fs","pathExists","toStringWithoutVersion","bitMap","updateComponentPaths","f","getPathRelativeToConsumer","executeWatchOperationsOnComponent","trigger","triggerOnComponentChange","previewsRootDirs","previewsIds","getAllBitIds","_reloadConsumer","importObjectsIfNeeded","triggerOnBitmapChange","newDirs","difference","removedDirs","addResults","mapSeries","dir","executeWatchOperationsOnRemove","import","currentIds","hasVersionChanges","prevId","searchWithoutVersion","version","existsInScope","isComponentInScope","useCache","lane","getCurrentLaneObject","pub","WorkspaceAspect","createOnComponentRemovedEvent","triggerOnComponentRemove","isChange","isComponentWatchedExternally","idStr","createOnComponentChangeEvent","createOnComponentAddEvent","triggerOnComponentAdd","OnComponentRemovedEvent","now","hook","OnComponentChangeEvent","OnComponentAddEvent","watcherData","multipleWatchers","m","compilerId","rootDir","findRootDirByFilePathRecursively","pathNormalizeToLinux","parentDir","usePollingConf","globalConfig","CFG_WATCH_USE_POLLING","usePolling","workspacePathLinux","path","ignoreLocalScope","pathToCheck","startsWith","chokidar","ignoreInitial","ignored","persistent","componentsFromBitMap","getAllComponents","getRootDir","exports"],"sources":["watcher.ts"],"sourcesContent":["import { PubsubMain } from '@teambit/pubsub';\nimport fs from 'fs-extra';\nimport { dirname, basename } from 'path';\nimport { compact, difference, partition } from 'lodash';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport loader from '@teambit/legacy/dist/cli/loader';\nimport { BIT_MAP, CFG_WATCH_USE_POLLING, WORKSPACE_JSONC } from '@teambit/legacy/dist/constants';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport logger from '@teambit/legacy/dist/logger/logger';\nimport { pathNormalizeToLinux, PathOsBasedAbsolute } from '@teambit/legacy.utils';\nimport mapSeries from 'p-map-series';\nimport chalk from 'chalk';\nimport { ChildProcess } from 'child_process';\nimport { UNMERGED_FILENAME } from '@teambit/legacy/dist/scope/lanes/unmerged-components';\nimport chokidar, { FSWatcher } from 'chokidar';\nimport { ComponentMap } from '@teambit/legacy.bit-map';\nimport { CompilationInitiator } from '@teambit/compiler';\nimport {\n WorkspaceAspect,\n Workspace,\n OnComponentEventResult,\n OnComponentChangeEvent,\n OnComponentAddEvent,\n OnComponentRemovedEvent,\n} from '@teambit/workspace';\nimport { CheckTypes } from './check-types';\nimport { WatcherMain } from './watcher.main.runtime';\nimport { WatchQueue } from './watch-queue';\n\nexport type WatcherProcessData = { watchProcess: ChildProcess; compilerId: ComponentID; componentIds: ComponentID[] };\n\nexport type EventMessages = {\n onAll: Function;\n onStart: Function;\n onReady: Function;\n onChange: OnFileEventFunc;\n onAdd: OnFileEventFunc;\n onUnlink: OnFileEventFunc;\n onError: Function;\n};\n\nexport type OnFileEventFunc = (\n filePaths: string[],\n buildResults: OnComponentEventResult[],\n verbose: boolean,\n duration: number,\n failureMsg?: string\n) => void;\n\nexport type WatchOptions = {\n msgs?: EventMessages;\n initiator?: CompilationInitiator;\n verbose?: boolean; // print watch events to the console. (also ts-server events if spawnTSServer is true)\n spawnTSServer?: boolean; // needed for check types and extract API/docs.\n checkTypes?: CheckTypes; // if enabled, the spawnTSServer becomes true.\n preCompile?: boolean; // whether compile all components before start watching\n compile?: boolean; // whether compile modified/added components during watch process\n import?: boolean; // whether import objects when .bitmap got version changes\n generateTypes?: boolean; // whether generate d.ts files for typescript files during watch process (hurts performance)\n trigger?: ComponentID; // trigger onComponentChange for the specified component-id. helpful when this comp must be a bundle, and needs to be recompile on any dep change.\n};\n\nexport type RootDirs = { [dir: PathLinux]: ComponentID };\n\nconst DEBOUNCE_WAIT_MS = 100;\ntype PathLinux = string; // ts fails when importing it from @teambit/legacy/dist/utils/path.\n\nexport class Watcher {\n private fsWatcher: FSWatcher;\n private changedFilesPerComponent: { [componentId: string]: string[] } = {};\n private watchQueue = new WatchQueue();\n private bitMapChangesInProgress = false;\n private ipcEventsDir: string;\n private rootDirs: RootDirs = {};\n private verbose = false;\n private multipleWatchers: WatcherProcessData[] = [];\n constructor(\n private workspace: Workspace,\n private pubsub: PubsubMain,\n private watcherMain: WatcherMain,\n private options: WatchOptions\n ) {\n this.ipcEventsDir = this.watcherMain.ipcEvents.eventsDir;\n this.verbose = this.options.verbose || false;\n }\n\n get consumer(): Consumer {\n return this.workspace.consumer;\n }\n\n async watch() {\n const { msgs, ...watchOpts } = this.options;\n await this.setRootDirs();\n const componentIds = Object.values(this.rootDirs);\n await this.watcherMain.triggerOnPreWatch(componentIds, watchOpts);\n await this.createWatcher();\n const watcher = this.fsWatcher;\n msgs?.onStart(this.workspace);\n\n await this.workspace.scope.watchScopeInternalFiles();\n\n return new Promise((resolve, reject) => {\n if (this.verbose) {\n // @ts-ignore\n if (msgs?.onAll) watcher.on('all', msgs?.onAll);\n }\n watcher.on('ready', () => {\n msgs?.onReady(this.workspace, this.rootDirs, this.verbose);\n if (this.verbose) {\n const watched = this.fsWatcher.getWatched();\n const totalWatched = Object.values(watched).flat().length;\n logger.console(\n `${chalk.bold('the following files are being watched:')}\\n${JSON.stringify(watched, null, 2)}`\n );\n logger.console(`\\nTotal files being watched: ${chalk.bold(totalWatched.toString())}`);\n }\n\n loader.stop();\n });\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n watcher.on('all', async (event, filePath) => {\n if (event !== 'change' && event !== 'add' && event !== 'unlink') return;\n const startTime = new Date().getTime();\n const { files, results, debounced, irrelevant, failureMsg } = await this.handleChange(filePath);\n if (debounced || irrelevant) {\n return;\n }\n const duration = new Date().getTime() - startTime;\n msgs?.onChange(files, results, this.verbose, duration, failureMsg);\n });\n watcher.on('error', (err) => {\n msgs?.onError(err);\n reject(err);\n });\n });\n }\n\n /**\n * *** DEBOUNCING ***\n * some actions trigger multiple files changes at (almost) the same time. e.g. \"git pull\".\n * this causes some performance and instability issues. a debouncing mechanism was implemented to help with this.\n * the way how it works is that the first file of the same component starts the execution with a delay (e.g. 200ms).\n * if, in the meanwhile, another file of the same component was changed, it won't start a new execution, instead,\n * it'll only add the file to `this.changedFilesPerComponent` prop.\n * once the execution starts, it'll delete this component-id from the `this.changedFilesPerComponent` array,\n * indicating the next file-change to start a new execution.\n *\n * implementation wise, `lodash.debounce` doesn't help here, because:\n * A) it doesn't return the results, unless \"leading\" option is true. here, it must be false, otherwise, it'll start\n * the execution immediately.\n * B) it debounces the method regardless the param passes to it. so it'll disregard the component-id and will delay\n * other components undesirably.\n *\n * *** QUEUE ***\n * the debouncing helps to not execute the same component multiple times concurrently. however, multiple components\n * and .bitmap changes execution can still be processed concurrently.\n * the following example explains why this is an issue.\n * compA is changed in the .bitmap file from version 0.0.1 to 0.0.2. its files were changed as well.\n * all these changes get pulled at the same time by \"git pull\", as a result, the execution of compA and the .bitmap\n * happen at the same time.\n * during the execution of compA, the component id is parsed as compA@0.0.1, later, it asks for the Workspace for this\n * id. while the workspace is looking for this id, the .bitmap execution reloaded the consumer and changed all versions.\n * after this change, the workspace doesn't have this id anymore, which will trigger an error.\n * to ensure this won't happen, we keep a flag to indicate whether the .bitmap execution is running, and if so, all\n * other executions are paused until the queue is empty (this is done by awaiting for queue.onIdle).\n * once the queue is empty, we know the .bitmap process was done and the workspace has all new ids.\n * in the example above, at this stage, the id will be resolved to compA@0.0.2.\n * one more thing, the queue is configured to have concurrency of 1. to make sure two components are not processed at\n * the same time. (the same way is done when loading all components from the filesystem/scope).\n * this way we can also ensure that if compA was started before the .bitmap execution, it will complete before the\n * .bitmap execution starts.\n */\n private async handleChange(filePath: string): Promise<{\n results: OnComponentEventResult[];\n files: string[];\n failureMsg?: string;\n debounced?: boolean;\n irrelevant?: boolean; // file/dir is not part of any component\n }> {\n try {\n if (filePath.endsWith(BIT_MAP)) {\n this.bitMapChangesInProgress = true;\n const buildResults = await this.watchQueue.add(() => this.handleBitmapChanges());\n this.bitMapChangesInProgress = false;\n loader.stop();\n return { results: buildResults, files: [filePath] };\n }\n if (this.bitMapChangesInProgress) {\n await this.watchQueue.onIdle();\n }\n if (dirname(filePath) === this.ipcEventsDir) {\n const eventName = basename(filePath);\n if (eventName !== 'onPostInstall') {\n this.watcherMain.logger.warn(`eventName ${eventName} is not recognized, please handle it`);\n }\n await this.watcherMain.ipcEvents.triggerGotEvent(eventName as 'onPostInstall');\n return { results: [], files: [filePath] };\n }\n if (filePath.endsWith(WORKSPACE_JSONC)) {\n await this.workspace.triggerOnWorkspaceConfigChange();\n return { results: [], files: [filePath] };\n }\n if (filePath.endsWith(UNMERGED_FILENAME)) {\n await this.workspace.clearCache();\n return { results: [], files: [filePath] };\n }\n const componentId = this.getComponentIdByPath(filePath);\n if (!componentId) {\n loader.stop();\n return { results: [], files: [], irrelevant: true };\n }\n const compIdStr = componentId.toString();\n if (this.changedFilesPerComponent[compIdStr]) {\n this.changedFilesPerComponent[compIdStr].push(filePath);\n loader.stop();\n return { results: [], files: [], debounced: true };\n }\n this.changedFilesPerComponent[compIdStr] = [filePath];\n await this.sleep(DEBOUNCE_WAIT_MS);\n const files = this.changedFilesPerComponent[compIdStr];\n delete this.changedFilesPerComponent[compIdStr];\n\n const buildResults = await this.watchQueue.add(() => this.triggerCompChanges(componentId, files));\n const failureMsg = buildResults.length\n ? undefined\n : `files ${files.join(', ')} are inside the component ${compIdStr} but configured to be ignored`;\n loader.stop();\n return { results: buildResults, files, failureMsg };\n } catch (err: any) {\n const msg = `watcher found an error while handling ${filePath}`;\n logger.error(msg, err);\n logger.console(`${msg}, ${err.message}`);\n loader.stop();\n return { results: [], files: [filePath], failureMsg: err.message };\n }\n }\n\n private async sleep(ms: number) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n\n private async triggerCompChanges(\n componentId: ComponentID,\n files: PathOsBasedAbsolute[]\n ): Promise<OnComponentEventResult[]> {\n let updatedComponentId: ComponentID | undefined = componentId;\n if (!this.workspace.hasId(componentId)) {\n // bitmap has changed meanwhile, which triggered `handleBitmapChanges`, which re-loaded consumer and updated versions\n // so the original componentId might not be in the workspace now, and we need to find the updated one\n const ids = this.workspace.listIds();\n updatedComponentId = ids.find((id) => id.isEqual(componentId, { ignoreVersion: true }));\n if (!updatedComponentId) {\n logger.debug(`triggerCompChanges, the component ${componentId.toString()} was probably removed from .bitmap`);\n return [];\n }\n }\n this.workspace.clearComponentCache(updatedComponentId);\n const component = await this.workspace.get(updatedComponentId);\n const componentMap: ComponentMap = component.state._consumer.componentMap;\n if (!componentMap) {\n throw new Error(\n `unable to find componentMap for ${updatedComponentId.toString()}, make sure this component is in .bitmap`\n );\n }\n const compFilesRelativeToWorkspace = componentMap.getFilesRelativeToConsumer();\n const [compFiles, nonCompFiles] = partition(files, (filePath) => {\n const relativeFile = this.getRelativePathLinux(filePath);\n return Boolean(compFilesRelativeToWorkspace.find((p) => p === relativeFile));\n });\n // nonCompFiles are either, files that were removed from the filesystem or existing files that are ignored.\n // the compiler takes care of removedFiles differently, e.g. removes dists dir and old symlinks.\n const removedFiles = compact(\n await Promise.all(nonCompFiles.map(async (filePath) => ((await fs.pathExists(filePath)) ? null : filePath)))\n );\n\n if (!compFiles.length && !removedFiles.length) {\n logger.debug(\n `the following files are part of the component ${componentId.toStringWithoutVersion()} but configured to be ignored:\\n${files.join(\n '\\n'\n )}'`\n );\n return [];\n }\n this.consumer.bitMap.updateComponentPaths(\n componentId,\n compFiles.map((f) => this.consumer.getPathRelativeToConsumer(f)),\n removedFiles.map((f) => this.consumer.getPathRelativeToConsumer(f))\n );\n const buildResults = await this.executeWatchOperationsOnComponent(\n updatedComponentId,\n compFiles,\n removedFiles,\n true\n );\n if (this.options.trigger && !updatedComponentId.isEqual(this.options.trigger)) {\n await this.workspace.triggerOnComponentChange(this.options.trigger, [], [], this.options);\n }\n\n return buildResults;\n }\n\n /**\n * if .bitmap changed, it's possible that a new component has been added. trigger onComponentAdd.\n */\n private async handleBitmapChanges(): Promise<OnComponentEventResult[]> {\n const previewsRootDirs = { ...this.rootDirs };\n const previewsIds = this.consumer.bitMap.getAllBitIds();\n await this.workspace._reloadConsumer();\n await this.setRootDirs();\n await this.importObjectsIfNeeded(previewsIds);\n await this.workspace.triggerOnBitmapChange();\n const newDirs: string[] = difference(Object.keys(this.rootDirs), Object.keys(previewsRootDirs));\n const removedDirs: string[] = difference(Object.keys(previewsRootDirs), Object.keys(this.rootDirs));\n const results: OnComponentEventResult[] = [];\n if (newDirs.length) {\n const addResults = await mapSeries(newDirs, async (dir) =>\n this.executeWatchOperationsOnComponent(this.rootDirs[dir], [], [], false)\n );\n results.push(...addResults.flat());\n }\n if (removedDirs.length) {\n await mapSeries(removedDirs, (dir) => this.executeWatchOperationsOnRemove(previewsRootDirs[dir]));\n }\n\n return results;\n }\n\n /**\n * needed when using git.\n * it resolves the following issue - a user is running `git pull` which updates the components and the .bitmap file.\n * because the objects locally are not updated, the .bitmap has new versions that don't exist in the local scope.\n * as soon as the watcher gets an event about a file change, it loads the component which throws\n * ComponentsPendingImport error.\n * to resolve this, we import the new objects as soon as the .bitmap file changes.\n * for performance reasons, we import only when: 1) the .bitmap file has version changes and 2) this new version is\n * not already in the scope.\n */\n private async importObjectsIfNeeded(previewsIds: ComponentIdList) {\n if (!this.options.import) {\n return;\n }\n const currentIds = this.consumer.bitMap.getAllBitIds();\n const hasVersionChanges = currentIds.find((id) => {\n const prevId = previewsIds.searchWithoutVersion(id);\n return prevId && prevId.version !== id.version;\n });\n if (!hasVersionChanges) {\n return;\n }\n const existsInScope = await this.workspace.scope.isComponentInScope(hasVersionChanges);\n if (existsInScope) {\n // the .bitmap change was probably a result of tag/snap/merge, no need to import.\n return;\n }\n if (this.options.verbose) {\n logger.console(\n `Watcher: .bitmap has changed with new versions which do not exist locally, importing the objects...`\n );\n }\n await this.workspace.scope.import(currentIds, {\n useCache: true,\n lane: await this.workspace.getCurrentLaneObject(),\n });\n }\n\n private async executeWatchOperationsOnRemove(componentId: ComponentID) {\n logger.debug(`running OnComponentRemove hook for ${chalk.bold(componentId.toString())}`);\n this.pubsub.pub(WorkspaceAspect.id, this.createOnComponentRemovedEvent(componentId.toString()));\n await this.workspace.triggerOnComponentRemove(componentId);\n }\n\n private async executeWatchOperationsOnComponent(\n componentId: ComponentID,\n files: PathOsBasedAbsolute[],\n removedFiles: PathOsBasedAbsolute[] = [],\n isChange = true\n ): Promise<OnComponentEventResult[]> {\n if (this.isComponentWatchedExternally(componentId)) {\n // update capsule, once done, it automatically triggers the external watcher\n await this.workspace.get(componentId);\n return [];\n }\n const idStr = componentId.toString();\n\n if (isChange) {\n logger.debug(`running OnComponentChange hook for ${chalk.bold(idStr)}`);\n this.pubsub.pub(WorkspaceAspect.id, this.createOnComponentChangeEvent(idStr, 'OnComponentChange'));\n } else {\n logger.debug(`running OnComponentAdd hook for ${chalk.bold(idStr)}`);\n this.pubsub.pub(WorkspaceAspect.id, this.createOnComponentAddEvent(idStr, 'OnComponentAdd'));\n }\n\n const buildResults = isChange\n ? await this.workspace.triggerOnComponentChange(componentId, files, removedFiles, this.options)\n : await this.workspace.triggerOnComponentAdd(componentId, this.options);\n\n return buildResults;\n }\n\n private createOnComponentRemovedEvent(idStr) {\n return new OnComponentRemovedEvent(Date.now(), idStr);\n }\n\n private createOnComponentChangeEvent(idStr, hook) {\n return new OnComponentChangeEvent(Date.now(), idStr, hook);\n }\n\n private createOnComponentAddEvent(idStr, hook) {\n return new OnComponentAddEvent(Date.now(), idStr, hook);\n }\n\n private isComponentWatchedExternally(componentId: ComponentID) {\n const watcherData = this.multipleWatchers.find((m) => m.componentIds.find((id) => id.isEqual(componentId)));\n if (watcherData) {\n logger.debug(`${componentId.toString()} is watched by ${watcherData.compilerId.toString()}`);\n return true;\n }\n return false;\n }\n\n private getComponentIdByPath(filePath: string): ComponentID | null {\n const relativeFile = this.getRelativePathLinux(filePath);\n const rootDir = this.findRootDirByFilePathRecursively(relativeFile);\n if (!rootDir) {\n // the file is not part of any component. If it was a new component, or a new file of\n // existing component, then, handleBitmapChanges() should deal with it.\n return null;\n }\n return this.rootDirs[rootDir];\n }\n\n private getRelativePathLinux(filePath: string) {\n return pathNormalizeToLinux(this.consumer.getPathRelativeToConsumer(filePath));\n }\n\n private findRootDirByFilePathRecursively(filePath: string): string | null {\n if (this.rootDirs[filePath]) return filePath;\n const parentDir = dirname(filePath);\n if (parentDir === filePath) return null;\n return this.findRootDirByFilePathRecursively(parentDir);\n }\n\n private async createWatcher() {\n const usePollingConf = await this.watcherMain.globalConfig.get(CFG_WATCH_USE_POLLING);\n const usePolling = usePollingConf === 'true';\n const workspacePathLinux = pathNormalizeToLinux(this.workspace.path);\n const ignoreLocalScope = (pathToCheck: string) => {\n if (pathToCheck.startsWith(this.ipcEventsDir) || pathToCheck.endsWith(UNMERGED_FILENAME)) return false;\n return (\n pathToCheck.startsWith(`${workspacePathLinux}/.git/`) || pathToCheck.startsWith(`${workspacePathLinux}/.bit/`)\n );\n };\n this.fsWatcher = chokidar.watch(this.workspace.path, {\n ignoreInitial: true,\n // `chokidar` matchers have Bash-parity, so Windows-style backslashes are not supported as separators.\n // (windows-style backslashes are converted to forward slashes)\n ignored: ['**/node_modules/**', '**/package.json', ignoreLocalScope],\n usePolling,\n // useFsEvents,\n persistent: true,\n });\n if (this.verbose) {\n logger.console(`${chalk.bold('chokidar.options:\\n')} ${JSON.stringify(this.fsWatcher.options, undefined, 2)}`);\n }\n }\n\n private async setRootDirs() {\n this.rootDirs = {};\n const componentsFromBitMap = this.consumer.bitMap.getAllComponents();\n componentsFromBitMap.map((componentMap) => {\n const componentId = componentMap.id;\n const rootDir = componentMap.getRootDir();\n this.rootDirs[rootDir] = componentId;\n });\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAG,OAAA,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;AAEA,SAAAO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AElH,CAAC;IACD,IAAI,CAAC9J,SAAS,GAAGmK,mBAAQ,CAAC9K,KAAK,CAAC,IAAI,CAACV,SAAS,CAACoL,IAAI,EAAE;MACnDK,aAAa,EAAE,IAAI;MACnB;MACA;MACAC,OAAO,EAAE,CAAC,oBAAoB,EAAE,iBAAiB,EAAEL,gBAAgB,CAAC;MACpEH,UAAU;MACV;MACAS,UAAU,EAAE;IACd,CAAC,CAAC;IACF,IAAI,IAAI,CAACnL,OAAO,EAAE;MAChB2B,iBAAM,CAACC,OAAO,CAAC,GAAGC,gBAAK,CAACC,IAAI,CAAC,qBAAqB,CAAC,IAAIC,IAAI,CAACC,SAAS,CAAC,IAAI,CAACnB,SAAS,CAAClB,OAAO,EAAE+E,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IAChH;EACF;EAEA,MAAcpE,WAAWA,CAAA,EAAG;IAC1B,IAAI,CAACG,QAAQ,GAAG,CAAC,CAAC;IAClB,MAAM2K,oBAAoB,GAAG,IAAI,CAACnL,QAAQ,CAACgH,MAAM,CAACoE,gBAAgB,CAAC,CAAC;IACpED,oBAAoB,CAACvE,GAAG,CAAEhB,YAAY,IAAK;MACzC,MAAMzB,WAAW,GAAGyB,YAAY,CAACP,EAAE;MACnC,MAAM6E,OAAO,GAAGtE,YAAY,CAACyF,UAAU,CAAC,CAAC;MACzC,IAAI,CAAC7K,QAAQ,CAAC0J,OAAO,CAAC,GAAG/F,WAAW;IACtC,CAAC,CAAC;EACJ;AACF;AAACmH,OAAA,CAAAjM,OAAA,GAAAA,OAAA","ignoreList":[]}
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/watcher",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.470",
|
4
4
|
"homepage": "https://bit.cloud/teambit/workspace/watcher",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.workspace",
|
8
8
|
"name": "watcher",
|
9
|
-
"version": "1.0.
|
9
|
+
"version": "1.0.470"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -18,15 +18,15 @@
|
|
18
18
|
"fs-extra": "10.0.0",
|
19
19
|
"@teambit/component-id": "1.2.2",
|
20
20
|
"@teambit/harmony": "0.4.6",
|
21
|
-
"@teambit/compiler": "1.0.
|
22
|
-
"@teambit/logger": "0.0.
|
23
|
-
"@teambit/workspace": "1.0.
|
24
|
-
"@teambit/cli": "0.0.
|
25
|
-
"@teambit/pubsub": "1.0.
|
26
|
-
"@teambit/global-config": "0.0.
|
27
|
-
"@teambit/ipc-events": "1.0.
|
28
|
-
"@teambit/scope": "1.0.
|
29
|
-
"@teambit/legacy.bit-map": "0.0.
|
21
|
+
"@teambit/compiler": "1.0.470",
|
22
|
+
"@teambit/logger": "0.0.1140",
|
23
|
+
"@teambit/workspace": "1.0.470",
|
24
|
+
"@teambit/cli": "0.0.1047",
|
25
|
+
"@teambit/pubsub": "1.0.470",
|
26
|
+
"@teambit/global-config": "0.0.1050",
|
27
|
+
"@teambit/ipc-events": "1.0.470",
|
28
|
+
"@teambit/scope": "1.0.470",
|
29
|
+
"@teambit/legacy.bit-map": "0.0.51",
|
30
30
|
"@teambit/legacy.utils": "0.0.6"
|
31
31
|
},
|
32
32
|
"devDependencies": {
|
File without changes
|