@teambit/watcher 1.0.469 → 1.0.471
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<testsuites tests="0" failures="0" errors="0" skipped="0">
|
3
|
-
<testsuite name="teambit.workspace/watcher@1.0.
|
3
|
+
<testsuite name="teambit.workspace/watcher@1.0.471" tests="0" failures="0" errors="0" skipped="0"/>
|
4
4
|
</testsuites>
|
package/artifacts/schema.json
CHANGED
@@ -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
|
},
|
@@ -240,12 +235,7 @@
|
|
240
235
|
"line": 60,
|
241
236
|
"character": 13
|
242
237
|
},
|
243
|
-
"name": "ComponentID"
|
244
|
-
"componentId": {
|
245
|
-
"scope": "teambit.component",
|
246
|
-
"name": "component-id",
|
247
|
-
"version": "1.2.2"
|
248
|
-
}
|
238
|
+
"name": "ComponentID"
|
249
239
|
},
|
250
240
|
"isOptional": true
|
251
241
|
}
|
@@ -349,11 +339,7 @@
|
|
349
339
|
"line": 20,
|
350
340
|
"character": 24
|
351
341
|
},
|
352
|
-
"name": "Workspace"
|
353
|
-
"componentId": {
|
354
|
-
"scope": "teambit.workspace",
|
355
|
-
"name": "workspace"
|
356
|
-
}
|
342
|
+
"name": "Workspace"
|
357
343
|
},
|
358
344
|
"isOptional": false,
|
359
345
|
"isSpread": false
|
@@ -373,11 +359,7 @@
|
|
373
359
|
"line": 21,
|
374
360
|
"character": 20
|
375
361
|
},
|
376
|
-
"name": "ScopeMain"
|
377
|
-
"componentId": {
|
378
|
-
"scope": "teambit.scope",
|
379
|
-
"name": "scope"
|
380
|
-
}
|
362
|
+
"name": "ScopeMain"
|
381
363
|
},
|
382
364
|
"isOptional": false,
|
383
365
|
"isSpread": false
|
@@ -397,11 +379,7 @@
|
|
397
379
|
"line": 22,
|
398
380
|
"character": 21
|
399
381
|
},
|
400
|
-
"name": "PubsubMain"
|
401
|
-
"componentId": {
|
402
|
-
"scope": "teambit.harmony",
|
403
|
-
"name": "pubsub"
|
404
|
-
}
|
382
|
+
"name": "PubsubMain"
|
405
383
|
},
|
406
384
|
"isOptional": false,
|
407
385
|
"isSpread": false
|
@@ -421,8 +399,7 @@
|
|
421
399
|
"line": 23,
|
422
400
|
"character": 29
|
423
401
|
},
|
424
|
-
"name": "OnPreWatchSlot"
|
425
|
-
"internalFilePath": "watcher.main.runtime.ts"
|
402
|
+
"name": "OnPreWatchSlot"
|
426
403
|
},
|
427
404
|
"isOptional": false,
|
428
405
|
"isSpread": false
|
@@ -442,11 +419,7 @@
|
|
442
419
|
"line": 24,
|
443
420
|
"character": 25
|
444
421
|
},
|
445
|
-
"name": "IpcEventsMain"
|
446
|
-
"componentId": {
|
447
|
-
"scope": "teambit.harmony",
|
448
|
-
"name": "ipc-events"
|
449
|
-
}
|
422
|
+
"name": "IpcEventsMain"
|
450
423
|
},
|
451
424
|
"isOptional": false,
|
452
425
|
"isSpread": false
|
@@ -466,11 +439,7 @@
|
|
466
439
|
"line": 25,
|
467
440
|
"character": 22
|
468
441
|
},
|
469
|
-
"name": "Logger"
|
470
|
-
"componentId": {
|
471
|
-
"scope": "teambit.harmony",
|
472
|
-
"name": "logger"
|
473
|
-
}
|
442
|
+
"name": "Logger"
|
474
443
|
},
|
475
444
|
"isOptional": false,
|
476
445
|
"isSpread": false
|
@@ -490,11 +459,7 @@
|
|
490
459
|
"line": 26,
|
491
460
|
"character": 28
|
492
461
|
},
|
493
|
-
"name": "GlobalConfigMain"
|
494
|
-
"componentId": {
|
495
|
-
"scope": "teambit.harmony",
|
496
|
-
"name": "global-config"
|
497
|
-
}
|
462
|
+
"name": "GlobalConfigMain"
|
498
463
|
},
|
499
464
|
"isOptional": false,
|
500
465
|
"isSpread": false
|
@@ -610,12 +575,7 @@
|
|
610
575
|
"line": 39,
|
611
576
|
"character": 41
|
612
577
|
},
|
613
|
-
"name": "ComponentID"
|
614
|
-
"componentId": {
|
615
|
-
"scope": "teambit.component",
|
616
|
-
"name": "component-id",
|
617
|
-
"version": "1.2.2"
|
618
|
-
}
|
578
|
+
"name": "ComponentID"
|
619
579
|
}
|
620
580
|
},
|
621
581
|
"isOptional": false,
|
@@ -680,8 +640,7 @@
|
|
680
640
|
"line": 46,
|
681
641
|
"character": 38
|
682
642
|
},
|
683
|
-
"name": "OnPreWatch"
|
684
|
-
"internalFilePath": "watcher.main.runtime.ts"
|
643
|
+
"name": "OnPreWatch"
|
685
644
|
},
|
686
645
|
"isOptional": false,
|
687
646
|
"isSpread": false
|
@@ -794,11 +753,7 @@
|
|
794
753
|
"line": 65,
|
795
754
|
"character": 7
|
796
755
|
},
|
797
|
-
"name": "CLIMain"
|
798
|
-
"componentId": {
|
799
|
-
"scope": "teambit.harmony",
|
800
|
-
"name": "cli"
|
801
|
-
}
|
756
|
+
"name": "CLIMain"
|
802
757
|
},
|
803
758
|
{
|
804
759
|
"__schema": "TypeRefSchema",
|
@@ -807,11 +762,7 @@
|
|
807
762
|
"line": 66,
|
808
763
|
"character": 7
|
809
764
|
},
|
810
|
-
"name": "Workspace"
|
811
|
-
"componentId": {
|
812
|
-
"scope": "teambit.workspace",
|
813
|
-
"name": "workspace"
|
814
|
-
}
|
765
|
+
"name": "Workspace"
|
815
766
|
},
|
816
767
|
{
|
817
768
|
"__schema": "TypeRefSchema",
|
@@ -820,11 +771,7 @@
|
|
820
771
|
"line": 67,
|
821
772
|
"character": 7
|
822
773
|
},
|
823
|
-
"name": "ScopeMain"
|
824
|
-
"componentId": {
|
825
|
-
"scope": "teambit.scope",
|
826
|
-
"name": "scope"
|
827
|
-
}
|
774
|
+
"name": "ScopeMain"
|
828
775
|
},
|
829
776
|
{
|
830
777
|
"__schema": "TypeRefSchema",
|
@@ -833,11 +780,7 @@
|
|
833
780
|
"line": 68,
|
834
781
|
"character": 7
|
835
782
|
},
|
836
|
-
"name": "PubsubMain"
|
837
|
-
"componentId": {
|
838
|
-
"scope": "teambit.harmony",
|
839
|
-
"name": "pubsub"
|
840
|
-
}
|
783
|
+
"name": "PubsubMain"
|
841
784
|
},
|
842
785
|
{
|
843
786
|
"__schema": "TypeRefSchema",
|
@@ -846,11 +789,7 @@
|
|
846
789
|
"line": 69,
|
847
790
|
"character": 7
|
848
791
|
},
|
849
|
-
"name": "LoggerMain"
|
850
|
-
"componentId": {
|
851
|
-
"scope": "teambit.harmony",
|
852
|
-
"name": "logger"
|
853
|
-
}
|
792
|
+
"name": "LoggerMain"
|
854
793
|
},
|
855
794
|
{
|
856
795
|
"__schema": "TypeRefSchema",
|
@@ -859,11 +798,7 @@
|
|
859
798
|
"line": 70,
|
860
799
|
"character": 7
|
861
800
|
},
|
862
|
-
"name": "IpcEventsMain"
|
863
|
-
"componentId": {
|
864
|
-
"scope": "teambit.harmony",
|
865
|
-
"name": "ipc-events"
|
866
|
-
}
|
801
|
+
"name": "IpcEventsMain"
|
867
802
|
},
|
868
803
|
{
|
869
804
|
"__schema": "TypeRefSchema",
|
@@ -872,11 +807,7 @@
|
|
872
807
|
"line": 71,
|
873
808
|
"character": 7
|
874
809
|
},
|
875
|
-
"name": "GlobalConfigMain"
|
876
|
-
"componentId": {
|
877
|
-
"scope": "teambit.harmony",
|
878
|
-
"name": "global-config"
|
879
|
-
}
|
810
|
+
"name": "GlobalConfigMain"
|
880
811
|
}
|
881
812
|
]
|
882
813
|
},
|
@@ -926,8 +857,7 @@
|
|
926
857
|
"line": 74,
|
927
858
|
"character": 24
|
928
859
|
},
|
929
|
-
"name": "OnPreWatchSlot"
|
930
|
-
"internalFilePath": "watcher.main.runtime.ts"
|
860
|
+
"name": "OnPreWatchSlot"
|
931
861
|
}
|
932
862
|
]
|
933
863
|
},
|
@@ -1098,12 +1028,7 @@
|
|
1098
1028
|
"line": 30,
|
1099
1029
|
"character": 103
|
1100
1030
|
},
|
1101
|
-
"name": "ComponentID"
|
1102
|
-
"componentId": {
|
1103
|
-
"scope": "teambit.component",
|
1104
|
-
"name": "component-id",
|
1105
|
-
"version": "1.2.2"
|
1106
|
-
}
|
1031
|
+
"name": "ComponentID"
|
1107
1032
|
}
|
1108
1033
|
},
|
1109
1034
|
"isOptional": false
|
@@ -1290,7 +1215,7 @@
|
|
1290
1215
|
"line": 42,
|
1291
1216
|
"character": 31
|
1292
1217
|
},
|
1293
|
-
"signature": "(filePaths: string[], buildResults:
|
1218
|
+
"signature": "(filePaths: string[], buildResults: OnComponentEventResult[], verbose: boolean, duration: number, failureMsg?: string): void",
|
1294
1219
|
"name": "",
|
1295
1220
|
"params": [
|
1296
1221
|
{
|
@@ -1343,11 +1268,7 @@
|
|
1343
1268
|
"line": 44,
|
1344
1269
|
"character": 17
|
1345
1270
|
},
|
1346
|
-
"name": "OnComponentEventResult"
|
1347
|
-
"componentId": {
|
1348
|
-
"scope": "teambit.workspace",
|
1349
|
-
"name": "workspace"
|
1350
|
-
}
|
1271
|
+
"name": "OnComponentEventResult"
|
1351
1272
|
}
|
1352
1273
|
},
|
1353
1274
|
"isOptional": false,
|
@@ -1459,8 +1380,7 @@
|
|
1459
1380
|
"line": 51,
|
1460
1381
|
"character": 10
|
1461
1382
|
},
|
1462
|
-
"name": "EventMessages"
|
1463
|
-
"internalFilePath": "watcher.ts"
|
1383
|
+
"name": "EventMessages"
|
1464
1384
|
},
|
1465
1385
|
"isOptional": true
|
1466
1386
|
},
|
@@ -1480,11 +1400,7 @@
|
|
1480
1400
|
"line": 52,
|
1481
1401
|
"character": 15
|
1482
1402
|
},
|
1483
|
-
"name": "CompilationInitiator"
|
1484
|
-
"componentId": {
|
1485
|
-
"scope": "teambit.compilation",
|
1486
|
-
"name": "compiler"
|
1487
|
-
}
|
1403
|
+
"name": "CompilationInitiator"
|
1488
1404
|
},
|
1489
1405
|
"isOptional": true
|
1490
1406
|
},
|
@@ -1644,12 +1560,7 @@
|
|
1644
1560
|
"line": 60,
|
1645
1561
|
"character": 13
|
1646
1562
|
},
|
1647
|
-
"name": "ComponentID"
|
1648
|
-
"componentId": {
|
1649
|
-
"scope": "teambit.component",
|
1650
|
-
"name": "component-id",
|
1651
|
-
"version": "1.2.2"
|
1652
|
-
}
|
1563
|
+
"name": "ComponentID"
|
1653
1564
|
},
|
1654
1565
|
"isOptional": true
|
1655
1566
|
}
|
@@ -1695,8 +1606,7 @@
|
|
1695
1606
|
"line": 63,
|
1696
1607
|
"character": 32
|
1697
1608
|
},
|
1698
|
-
"name": "PathLinux"
|
1699
|
-
"internalFilePath": "watcher.ts"
|
1609
|
+
"name": "PathLinux"
|
1700
1610
|
},
|
1701
1611
|
"isOptional": false,
|
1702
1612
|
"isSpread": false
|
@@ -1708,12 +1618,7 @@
|
|
1708
1618
|
"line": 63,
|
1709
1619
|
"character": 44
|
1710
1620
|
},
|
1711
|
-
"name": "ComponentID"
|
1712
|
-
"componentId": {
|
1713
|
-
"scope": "teambit.component",
|
1714
|
-
"name": "component-id",
|
1715
|
-
"version": "1.2.2"
|
1716
|
-
}
|
1621
|
+
"name": "ComponentID"
|
1717
1622
|
}
|
1718
1623
|
}
|
1719
1624
|
]
|
@@ -1733,7 +1638,7 @@
|
|
1733
1638
|
"__schema": "ConstructorSchema",
|
1734
1639
|
"location": {
|
1735
1640
|
"filePath": "watcher.ts",
|
1736
|
-
"line":
|
1641
|
+
"line": 78,
|
1737
1642
|
"character": 3
|
1738
1643
|
},
|
1739
1644
|
"signature": "constructor Watcher(workspace: Workspace, pubsub: PubsubMain, watcherMain: WatcherMain, options: WatchOptions): Watcher",
|
@@ -1743,7 +1648,7 @@
|
|
1743
1648
|
"__schema": "ParameterSchema",
|
1744
1649
|
"location": {
|
1745
1650
|
"filePath": "watcher.ts",
|
1746
|
-
"line":
|
1651
|
+
"line": 79,
|
1747
1652
|
"character": 5
|
1748
1653
|
},
|
1749
1654
|
"name": "workspace",
|
@@ -1751,14 +1656,10 @@
|
|
1751
1656
|
"__schema": "TypeRefSchema",
|
1752
1657
|
"location": {
|
1753
1658
|
"filePath": "watcher.ts",
|
1754
|
-
"line":
|
1659
|
+
"line": 79,
|
1755
1660
|
"character": 24
|
1756
1661
|
},
|
1757
|
-
"name": "Workspace"
|
1758
|
-
"componentId": {
|
1759
|
-
"scope": "teambit.workspace",
|
1760
|
-
"name": "workspace"
|
1761
|
-
}
|
1662
|
+
"name": "Workspace"
|
1762
1663
|
},
|
1763
1664
|
"isOptional": false,
|
1764
1665
|
"isSpread": false
|
@@ -1767,7 +1668,7 @@
|
|
1767
1668
|
"__schema": "ParameterSchema",
|
1768
1669
|
"location": {
|
1769
1670
|
"filePath": "watcher.ts",
|
1770
|
-
"line":
|
1671
|
+
"line": 80,
|
1771
1672
|
"character": 5
|
1772
1673
|
},
|
1773
1674
|
"name": "pubsub",
|
@@ -1775,14 +1676,10 @@
|
|
1775
1676
|
"__schema": "TypeRefSchema",
|
1776
1677
|
"location": {
|
1777
1678
|
"filePath": "watcher.ts",
|
1778
|
-
"line":
|
1679
|
+
"line": 80,
|
1779
1680
|
"character": 21
|
1780
1681
|
},
|
1781
|
-
"name": "PubsubMain"
|
1782
|
-
"componentId": {
|
1783
|
-
"scope": "teambit.harmony",
|
1784
|
-
"name": "pubsub"
|
1785
|
-
}
|
1682
|
+
"name": "PubsubMain"
|
1786
1683
|
},
|
1787
1684
|
"isOptional": false,
|
1788
1685
|
"isSpread": false
|
@@ -1791,7 +1688,7 @@
|
|
1791
1688
|
"__schema": "ParameterSchema",
|
1792
1689
|
"location": {
|
1793
1690
|
"filePath": "watcher.ts",
|
1794
|
-
"line":
|
1691
|
+
"line": 81,
|
1795
1692
|
"character": 5
|
1796
1693
|
},
|
1797
1694
|
"name": "watcherMain",
|
@@ -1799,7 +1696,7 @@
|
|
1799
1696
|
"__schema": "TypeRefSchema",
|
1800
1697
|
"location": {
|
1801
1698
|
"filePath": "watcher.ts",
|
1802
|
-
"line":
|
1699
|
+
"line": 81,
|
1803
1700
|
"character": 26
|
1804
1701
|
},
|
1805
1702
|
"name": "WatcherMain"
|
@@ -1811,7 +1708,7 @@
|
|
1811
1708
|
"__schema": "ParameterSchema",
|
1812
1709
|
"location": {
|
1813
1710
|
"filePath": "watcher.ts",
|
1814
|
-
"line":
|
1711
|
+
"line": 82,
|
1815
1712
|
"character": 5
|
1816
1713
|
},
|
1817
1714
|
"name": "options",
|
@@ -1819,7 +1716,7 @@
|
|
1819
1716
|
"__schema": "TypeRefSchema",
|
1820
1717
|
"location": {
|
1821
1718
|
"filePath": "watcher.ts",
|
1822
|
-
"line":
|
1719
|
+
"line": 82,
|
1823
1720
|
"character": 22
|
1824
1721
|
},
|
1825
1722
|
"name": "WatchOptions"
|
@@ -1843,7 +1740,7 @@
|
|
1843
1740
|
"__schema": "GetAccessorSchema",
|
1844
1741
|
"location": {
|
1845
1742
|
"filePath": "watcher.ts",
|
1846
|
-
"line":
|
1743
|
+
"line": 89,
|
1847
1744
|
"character": 3
|
1848
1745
|
},
|
1849
1746
|
"signature": "(getter) Watcher.consumer: Consumer",
|
@@ -1852,7 +1749,7 @@
|
|
1852
1749
|
"__schema": "TypeRefSchema",
|
1853
1750
|
"location": {
|
1854
1751
|
"filePath": "watcher.ts",
|
1855
|
-
"line":
|
1752
|
+
"line": 89,
|
1856
1753
|
"character": 3
|
1857
1754
|
},
|
1858
1755
|
"name": "Consumer",
|
@@ -1863,7 +1760,7 @@
|
|
1863
1760
|
"__schema": "FunctionLikeSchema",
|
1864
1761
|
"location": {
|
1865
1762
|
"filePath": "watcher.ts",
|
1866
|
-
"line":
|
1763
|
+
"line": 93,
|
1867
1764
|
"character": 3
|
1868
1765
|
},
|
1869
1766
|
"signature": "(method) Watcher.watch(): Promise<unknown>",
|
@@ -1873,7 +1770,7 @@
|
|
1873
1770
|
"__schema": "InferenceTypeSchema",
|
1874
1771
|
"location": {
|
1875
1772
|
"filePath": "watcher.ts",
|
1876
|
-
"line":
|
1773
|
+
"line": 93,
|
1877
1774
|
"character": 3
|
1878
1775
|
},
|
1879
1776
|
"type": "Promise<unknown>"
|
@@ -1965,7 +1862,7 @@
|
|
1965
1862
|
"line": 15,
|
1966
1863
|
"character": 26
|
1967
1864
|
},
|
1968
|
-
"signature": "(componentIds:
|
1865
|
+
"signature": "(componentIds: ComponentID[], watchOpts: WatchOptions): Promise<void>",
|
1969
1866
|
"name": "",
|
1970
1867
|
"params": [
|
1971
1868
|
{
|
@@ -1990,12 +1887,7 @@
|
|
1990
1887
|
"line": 15,
|
1991
1888
|
"character": 41
|
1992
1889
|
},
|
1993
|
-
"name": "ComponentID"
|
1994
|
-
"componentId": {
|
1995
|
-
"scope": "teambit.component",
|
1996
|
-
"name": "component-id",
|
1997
|
-
"version": "1.2.2"
|
1998
|
-
}
|
1890
|
+
"name": "ComponentID"
|
1999
1891
|
}
|
2000
1892
|
},
|
2001
1893
|
"isOptional": false,
|
@@ -2062,11 +1954,6 @@
|
|
2062
1954
|
"character": 30
|
2063
1955
|
},
|
2064
1956
|
"name": "SlotRegistry",
|
2065
|
-
"componentId": {
|
2066
|
-
"scope": "teambit.harmony",
|
2067
|
-
"name": "harmony",
|
2068
|
-
"version": "0.4.6"
|
2069
|
-
},
|
2070
1957
|
"typeArgs": [
|
2071
1958
|
{
|
2072
1959
|
"__schema": "TypeRefSchema",
|
@@ -2075,8 +1962,7 @@
|
|
2075
1962
|
"line": 16,
|
2076
1963
|
"character": 43
|
2077
1964
|
},
|
2078
|
-
"name": "OnPreWatch"
|
2079
|
-
"internalFilePath": "watcher.main.runtime.ts"
|
1965
|
+
"name": "OnPreWatch"
|
2080
1966
|
}
|
2081
1967
|
]
|
2082
1968
|
}
|
@@ -2116,11 +2002,7 @@
|
|
2116
2002
|
"line": 20,
|
2117
2003
|
"character": 24
|
2118
2004
|
},
|
2119
|
-
"name": "Workspace"
|
2120
|
-
"componentId": {
|
2121
|
-
"scope": "teambit.workspace",
|
2122
|
-
"name": "workspace"
|
2123
|
-
}
|
2005
|
+
"name": "Workspace"
|
2124
2006
|
},
|
2125
2007
|
"isOptional": false,
|
2126
2008
|
"isSpread": false
|
@@ -2140,11 +2022,7 @@
|
|
2140
2022
|
"line": 21,
|
2141
2023
|
"character": 20
|
2142
2024
|
},
|
2143
|
-
"name": "ScopeMain"
|
2144
|
-
"componentId": {
|
2145
|
-
"scope": "teambit.scope",
|
2146
|
-
"name": "scope"
|
2147
|
-
}
|
2025
|
+
"name": "ScopeMain"
|
2148
2026
|
},
|
2149
2027
|
"isOptional": false,
|
2150
2028
|
"isSpread": false
|
@@ -2164,11 +2042,7 @@
|
|
2164
2042
|
"line": 22,
|
2165
2043
|
"character": 21
|
2166
2044
|
},
|
2167
|
-
"name": "PubsubMain"
|
2168
|
-
"componentId": {
|
2169
|
-
"scope": "teambit.harmony",
|
2170
|
-
"name": "pubsub"
|
2171
|
-
}
|
2045
|
+
"name": "PubsubMain"
|
2172
2046
|
},
|
2173
2047
|
"isOptional": false,
|
2174
2048
|
"isSpread": false
|
@@ -2188,8 +2062,7 @@
|
|
2188
2062
|
"line": 23,
|
2189
2063
|
"character": 29
|
2190
2064
|
},
|
2191
|
-
"name": "OnPreWatchSlot"
|
2192
|
-
"internalFilePath": "watcher.main.runtime.ts"
|
2065
|
+
"name": "OnPreWatchSlot"
|
2193
2066
|
},
|
2194
2067
|
"isOptional": false,
|
2195
2068
|
"isSpread": false
|
@@ -2209,11 +2082,7 @@
|
|
2209
2082
|
"line": 24,
|
2210
2083
|
"character": 25
|
2211
2084
|
},
|
2212
|
-
"name": "IpcEventsMain"
|
2213
|
-
"componentId": {
|
2214
|
-
"scope": "teambit.harmony",
|
2215
|
-
"name": "ipc-events"
|
2216
|
-
}
|
2085
|
+
"name": "IpcEventsMain"
|
2217
2086
|
},
|
2218
2087
|
"isOptional": false,
|
2219
2088
|
"isSpread": false
|
@@ -2233,11 +2102,7 @@
|
|
2233
2102
|
"line": 25,
|
2234
2103
|
"character": 22
|
2235
2104
|
},
|
2236
|
-
"name": "Logger"
|
2237
|
-
"componentId": {
|
2238
|
-
"scope": "teambit.harmony",
|
2239
|
-
"name": "logger"
|
2240
|
-
}
|
2105
|
+
"name": "Logger"
|
2241
2106
|
},
|
2242
2107
|
"isOptional": false,
|
2243
2108
|
"isSpread": false
|
@@ -2257,11 +2122,7 @@
|
|
2257
2122
|
"line": 26,
|
2258
2123
|
"character": 28
|
2259
2124
|
},
|
2260
|
-
"name": "GlobalConfigMain"
|
2261
|
-
"componentId": {
|
2262
|
-
"scope": "teambit.harmony",
|
2263
|
-
"name": "global-config"
|
2264
|
-
}
|
2125
|
+
"name": "GlobalConfigMain"
|
2265
2126
|
},
|
2266
2127
|
"isOptional": false,
|
2267
2128
|
"isSpread": false
|
@@ -2377,12 +2238,7 @@
|
|
2377
2238
|
"line": 39,
|
2378
2239
|
"character": 41
|
2379
2240
|
},
|
2380
|
-
"name": "ComponentID"
|
2381
|
-
"componentId": {
|
2382
|
-
"scope": "teambit.component",
|
2383
|
-
"name": "component-id",
|
2384
|
-
"version": "1.2.2"
|
2385
|
-
}
|
2241
|
+
"name": "ComponentID"
|
2386
2242
|
}
|
2387
2243
|
},
|
2388
2244
|
"isOptional": false,
|
@@ -2447,8 +2303,7 @@
|
|
2447
2303
|
"line": 46,
|
2448
2304
|
"character": 38
|
2449
2305
|
},
|
2450
|
-
"name": "OnPreWatch"
|
2451
|
-
"internalFilePath": "watcher.main.runtime.ts"
|
2306
|
+
"name": "OnPreWatch"
|
2452
2307
|
},
|
2453
2308
|
"isOptional": false,
|
2454
2309
|
"isSpread": false
|
@@ -2561,11 +2416,7 @@
|
|
2561
2416
|
"line": 65,
|
2562
2417
|
"character": 7
|
2563
2418
|
},
|
2564
|
-
"name": "CLIMain"
|
2565
|
-
"componentId": {
|
2566
|
-
"scope": "teambit.harmony",
|
2567
|
-
"name": "cli"
|
2568
|
-
}
|
2419
|
+
"name": "CLIMain"
|
2569
2420
|
},
|
2570
2421
|
{
|
2571
2422
|
"__schema": "TypeRefSchema",
|
@@ -2574,11 +2425,7 @@
|
|
2574
2425
|
"line": 66,
|
2575
2426
|
"character": 7
|
2576
2427
|
},
|
2577
|
-
"name": "Workspace"
|
2578
|
-
"componentId": {
|
2579
|
-
"scope": "teambit.workspace",
|
2580
|
-
"name": "workspace"
|
2581
|
-
}
|
2428
|
+
"name": "Workspace"
|
2582
2429
|
},
|
2583
2430
|
{
|
2584
2431
|
"__schema": "TypeRefSchema",
|
@@ -2587,11 +2434,7 @@
|
|
2587
2434
|
"line": 67,
|
2588
2435
|
"character": 7
|
2589
2436
|
},
|
2590
|
-
"name": "ScopeMain"
|
2591
|
-
"componentId": {
|
2592
|
-
"scope": "teambit.scope",
|
2593
|
-
"name": "scope"
|
2594
|
-
}
|
2437
|
+
"name": "ScopeMain"
|
2595
2438
|
},
|
2596
2439
|
{
|
2597
2440
|
"__schema": "TypeRefSchema",
|
@@ -2600,11 +2443,7 @@
|
|
2600
2443
|
"line": 68,
|
2601
2444
|
"character": 7
|
2602
2445
|
},
|
2603
|
-
"name": "PubsubMain"
|
2604
|
-
"componentId": {
|
2605
|
-
"scope": "teambit.harmony",
|
2606
|
-
"name": "pubsub"
|
2607
|
-
}
|
2446
|
+
"name": "PubsubMain"
|
2608
2447
|
},
|
2609
2448
|
{
|
2610
2449
|
"__schema": "TypeRefSchema",
|
@@ -2613,11 +2452,7 @@
|
|
2613
2452
|
"line": 69,
|
2614
2453
|
"character": 7
|
2615
2454
|
},
|
2616
|
-
"name": "LoggerMain"
|
2617
|
-
"componentId": {
|
2618
|
-
"scope": "teambit.harmony",
|
2619
|
-
"name": "logger"
|
2620
|
-
}
|
2455
|
+
"name": "LoggerMain"
|
2621
2456
|
},
|
2622
2457
|
{
|
2623
2458
|
"__schema": "TypeRefSchema",
|
@@ -2626,11 +2461,7 @@
|
|
2626
2461
|
"line": 70,
|
2627
2462
|
"character": 7
|
2628
2463
|
},
|
2629
|
-
"name": "IpcEventsMain"
|
2630
|
-
"componentId": {
|
2631
|
-
"scope": "teambit.harmony",
|
2632
|
-
"name": "ipc-events"
|
2633
|
-
}
|
2464
|
+
"name": "IpcEventsMain"
|
2634
2465
|
},
|
2635
2466
|
{
|
2636
2467
|
"__schema": "TypeRefSchema",
|
@@ -2639,11 +2470,7 @@
|
|
2639
2470
|
"line": 71,
|
2640
2471
|
"character": 7
|
2641
2472
|
},
|
2642
|
-
"name": "GlobalConfigMain"
|
2643
|
-
"componentId": {
|
2644
|
-
"scope": "teambit.harmony",
|
2645
|
-
"name": "global-config"
|
2646
|
-
}
|
2473
|
+
"name": "GlobalConfigMain"
|
2647
2474
|
}
|
2648
2475
|
]
|
2649
2476
|
},
|
@@ -2693,8 +2520,7 @@
|
|
2693
2520
|
"line": 74,
|
2694
2521
|
"character": 24
|
2695
2522
|
},
|
2696
|
-
"name": "OnPreWatchSlot"
|
2697
|
-
"internalFilePath": "watcher.main.runtime.ts"
|
2523
|
+
"name": "OnPreWatchSlot"
|
2698
2524
|
}
|
2699
2525
|
]
|
2700
2526
|
},
|
@@ -2785,7 +2611,7 @@
|
|
2785
2611
|
"componentId": {
|
2786
2612
|
"scope": "teambit.workspace",
|
2787
2613
|
"name": "watcher",
|
2788
|
-
"version": "1.0.
|
2614
|
+
"version": "1.0.471"
|
2789
2615
|
},
|
2790
2616
|
"taggedModuleExports": []
|
2791
2617
|
}
|
package/dist/watcher.d.ts
CHANGED
@@ -50,6 +50,7 @@ export declare class Watcher {
|
|
50
50
|
private rootDirs;
|
51
51
|
private verbose;
|
52
52
|
private multipleWatchers;
|
53
|
+
private logger;
|
53
54
|
constructor(workspace: Workspace, pubsub: PubsubMain, watcherMain: WatcherMain, options: WatchOptions);
|
54
55
|
get consumer(): Consumer;
|
55
56
|
watch(): Promise<unknown>;
|
package/dist/watcher.js
CHANGED
@@ -25,13 +25,6 @@ function _lodash() {
|
|
25
25
|
};
|
26
26
|
return data;
|
27
27
|
}
|
28
|
-
function _loader() {
|
29
|
-
const data = _interopRequireDefault(require("@teambit/legacy/dist/cli/loader"));
|
30
|
-
_loader = function () {
|
31
|
-
return data;
|
32
|
-
};
|
33
|
-
return data;
|
34
|
-
}
|
35
28
|
function _constants() {
|
36
29
|
const data = require("@teambit/legacy/dist/constants");
|
37
30
|
_constants = function () {
|
@@ -121,8 +114,10 @@ class Watcher {
|
|
121
114
|
_defineProperty(this, "rootDirs", {});
|
122
115
|
_defineProperty(this, "verbose", false);
|
123
116
|
_defineProperty(this, "multipleWatchers", []);
|
117
|
+
_defineProperty(this, "logger", void 0);
|
124
118
|
this.ipcEventsDir = this.watcherMain.ipcEvents.eventsDir;
|
125
119
|
this.verbose = this.options.verbose || false;
|
120
|
+
this.logger = this.watcherMain.logger;
|
126
121
|
}
|
127
122
|
get consumer() {
|
128
123
|
return this.workspace.consumer;
|
@@ -153,7 +148,7 @@ class Watcher {
|
|
153
148
|
_logger().default.console(`${_chalk().default.bold('the following files are being watched:')}\n${JSON.stringify(watched, null, 2)}`);
|
154
149
|
_logger().default.console(`\nTotal files being watched: ${_chalk().default.bold(totalWatched.toString())}`);
|
155
150
|
}
|
156
|
-
|
151
|
+
this.logger.clearStatusLine();
|
157
152
|
});
|
158
153
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
159
154
|
watcher.on('all', async (event, filePath) => {
|
@@ -220,7 +215,7 @@ class Watcher {
|
|
220
215
|
this.bitMapChangesInProgress = true;
|
221
216
|
const buildResults = await this.watchQueue.add(() => this.handleBitmapChanges());
|
222
217
|
this.bitMapChangesInProgress = false;
|
223
|
-
|
218
|
+
this.logger.clearStatusLine();
|
224
219
|
return {
|
225
220
|
results: buildResults,
|
226
221
|
files: [filePath]
|
@@ -256,7 +251,7 @@ class Watcher {
|
|
256
251
|
}
|
257
252
|
const componentId = this.getComponentIdByPath(filePath);
|
258
253
|
if (!componentId) {
|
259
|
-
|
254
|
+
this.logger.clearStatusLine();
|
260
255
|
return {
|
261
256
|
results: [],
|
262
257
|
files: [],
|
@@ -266,7 +261,7 @@ class Watcher {
|
|
266
261
|
const compIdStr = componentId.toString();
|
267
262
|
if (this.changedFilesPerComponent[compIdStr]) {
|
268
263
|
this.changedFilesPerComponent[compIdStr].push(filePath);
|
269
|
-
|
264
|
+
this.logger.clearStatusLine();
|
270
265
|
return {
|
271
266
|
results: [],
|
272
267
|
files: [],
|
@@ -279,7 +274,7 @@ class Watcher {
|
|
279
274
|
delete this.changedFilesPerComponent[compIdStr];
|
280
275
|
const buildResults = await this.watchQueue.add(() => this.triggerCompChanges(componentId, files));
|
281
276
|
const failureMsg = buildResults.length ? undefined : `files ${files.join(', ')} are inside the component ${compIdStr} but configured to be ignored`;
|
282
|
-
|
277
|
+
this.logger.clearStatusLine();
|
283
278
|
return {
|
284
279
|
results: buildResults,
|
285
280
|
files,
|
@@ -289,7 +284,7 @@ class Watcher {
|
|
289
284
|
const msg = `watcher found an error while handling ${filePath}`;
|
290
285
|
_logger().default.error(msg, err);
|
291
286
|
_logger().default.console(`${msg}, ${err.message}`);
|
292
|
-
|
287
|
+
this.logger.clearStatusLine();
|
293
288
|
return {
|
294
289
|
results: [],
|
295
290
|
files: [filePath],
|
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 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,QAAA;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AC;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","_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","logger","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","console","chalk","bold","JSON","stringify","toString","clearStatusLine","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 { 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';\nimport { Logger } from '@teambit/logger';\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 private logger: Logger;\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 this.logger = this.watcherMain.logger;\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 this.logger.clearStatusLine();\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 this.logger.clearStatusLine();\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 this.logger.clearStatusLine();\n return { results: [], files: [], irrelevant: true };\n }\n const compIdStr = componentId.toString();\n if (this.changedFilesPerComponent[compIdStr]) {\n this.changedFilesPerComponent[compIdStr].push(filePath);\n this.logger.clearStatusLine();\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 this.logger.clearStatusLine();\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 this.logger.clearStatusLine();\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,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,QAAA;EAAA,MAAAN,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAI,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA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UAAU,CAAC,GAAGJ,kBAAkB,QAAQ,CAAC;IAElH,CAAC;IACD,IAAI,CAAC5J,SAAS,GAAGiK,mBAAQ,CAAC5K,KAAK,CAAC,IAAI,CAACX,SAAS,CAACmL,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,CAAClL,OAAO,EAAE;MAChBC,iBAAM,CAAC2B,OAAO,CAAC,GAAGC,gBAAK,CAACC,IAAI,CAAC,qBAAqB,CAAC,IAAIC,IAAI,CAACC,SAAS,CAAC,IAAI,CAAClB,SAAS,CAACnB,OAAO,EAAE8E,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IAChH;EACF;EAEA,MAAclE,WAAWA,CAAA,EAAG;IAC1B,IAAI,CAACG,QAAQ,GAAG,CAAC,CAAC;IAClB,MAAMyK,oBAAoB,GAAG,IAAI,CAACjL,QAAQ,CAAC8G,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,CAAC3K,QAAQ,CAACwJ,OAAO,CAAC,GAAG/F,WAAW;IACtC,CAAC,CAAC;EACJ;AACF;AAACmH,OAAA,CAAAhM,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.471",
|
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.471"
|
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.471",
|
22
|
+
"@teambit/logger": "0.0.1141",
|
23
|
+
"@teambit/workspace": "1.0.471",
|
24
|
+
"@teambit/cli": "0.0.1048",
|
25
|
+
"@teambit/pubsub": "1.0.471",
|
26
|
+
"@teambit/global-config": "0.0.1051",
|
27
|
+
"@teambit/ipc-events": "1.0.471",
|
28
|
+
"@teambit/scope": "1.0.471",
|
29
|
+
"@teambit/legacy.bit-map": "0.0.52",
|
30
30
|
"@teambit/legacy.utils": "0.0.6"
|
31
31
|
},
|
32
32
|
"devDependencies": {
|
File without changes
|