@teambit/watcher 1.0.487 → 1.0.489
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.489" tests="0" failures="0" errors="0" skipped="0"/>
|
4
4
|
</testsuites>
|
package/artifacts/schema.json
CHANGED
@@ -55,7 +55,8 @@
|
|
55
55
|
"line": 51,
|
56
56
|
"character": 10
|
57
57
|
},
|
58
|
-
"name": "EventMessages"
|
58
|
+
"name": "EventMessages",
|
59
|
+
"internalFilePath": "watcher.ts"
|
59
60
|
},
|
60
61
|
"isOptional": true
|
61
62
|
},
|
@@ -75,7 +76,11 @@
|
|
75
76
|
"line": 52,
|
76
77
|
"character": 15
|
77
78
|
},
|
78
|
-
"name": "CompilationInitiator"
|
79
|
+
"name": "CompilationInitiator",
|
80
|
+
"componentId": {
|
81
|
+
"scope": "teambit.compilation",
|
82
|
+
"name": "compiler"
|
83
|
+
}
|
79
84
|
},
|
80
85
|
"isOptional": true
|
81
86
|
},
|
@@ -235,7 +240,12 @@
|
|
235
240
|
"line": 60,
|
236
241
|
"character": 13
|
237
242
|
},
|
238
|
-
"name": "ComponentID"
|
243
|
+
"name": "ComponentID",
|
244
|
+
"componentId": {
|
245
|
+
"scope": "teambit.component",
|
246
|
+
"name": "component-id",
|
247
|
+
"version": "1.2.2"
|
248
|
+
}
|
239
249
|
},
|
240
250
|
"isOptional": true
|
241
251
|
}
|
@@ -339,7 +349,11 @@
|
|
339
349
|
"line": 20,
|
340
350
|
"character": 24
|
341
351
|
},
|
342
|
-
"name": "Workspace"
|
352
|
+
"name": "Workspace",
|
353
|
+
"componentId": {
|
354
|
+
"scope": "teambit.workspace",
|
355
|
+
"name": "workspace"
|
356
|
+
}
|
343
357
|
},
|
344
358
|
"isOptional": false,
|
345
359
|
"isSpread": false
|
@@ -359,7 +373,11 @@
|
|
359
373
|
"line": 21,
|
360
374
|
"character": 20
|
361
375
|
},
|
362
|
-
"name": "ScopeMain"
|
376
|
+
"name": "ScopeMain",
|
377
|
+
"componentId": {
|
378
|
+
"scope": "teambit.scope",
|
379
|
+
"name": "scope"
|
380
|
+
}
|
363
381
|
},
|
364
382
|
"isOptional": false,
|
365
383
|
"isSpread": false
|
@@ -379,7 +397,11 @@
|
|
379
397
|
"line": 22,
|
380
398
|
"character": 21
|
381
399
|
},
|
382
|
-
"name": "PubsubMain"
|
400
|
+
"name": "PubsubMain",
|
401
|
+
"componentId": {
|
402
|
+
"scope": "teambit.harmony",
|
403
|
+
"name": "pubsub"
|
404
|
+
}
|
383
405
|
},
|
384
406
|
"isOptional": false,
|
385
407
|
"isSpread": false
|
@@ -399,7 +421,8 @@
|
|
399
421
|
"line": 23,
|
400
422
|
"character": 29
|
401
423
|
},
|
402
|
-
"name": "OnPreWatchSlot"
|
424
|
+
"name": "OnPreWatchSlot",
|
425
|
+
"internalFilePath": "watcher.main.runtime.ts"
|
403
426
|
},
|
404
427
|
"isOptional": false,
|
405
428
|
"isSpread": false
|
@@ -419,7 +442,11 @@
|
|
419
442
|
"line": 24,
|
420
443
|
"character": 25
|
421
444
|
},
|
422
|
-
"name": "IpcEventsMain"
|
445
|
+
"name": "IpcEventsMain",
|
446
|
+
"componentId": {
|
447
|
+
"scope": "teambit.harmony",
|
448
|
+
"name": "ipc-events"
|
449
|
+
}
|
423
450
|
},
|
424
451
|
"isOptional": false,
|
425
452
|
"isSpread": false
|
@@ -439,7 +466,11 @@
|
|
439
466
|
"line": 25,
|
440
467
|
"character": 22
|
441
468
|
},
|
442
|
-
"name": "Logger"
|
469
|
+
"name": "Logger",
|
470
|
+
"componentId": {
|
471
|
+
"scope": "teambit.harmony",
|
472
|
+
"name": "logger"
|
473
|
+
}
|
443
474
|
},
|
444
475
|
"isOptional": false,
|
445
476
|
"isSpread": false
|
@@ -459,7 +490,11 @@
|
|
459
490
|
"line": 26,
|
460
491
|
"character": 28
|
461
492
|
},
|
462
|
-
"name": "GlobalConfigMain"
|
493
|
+
"name": "GlobalConfigMain",
|
494
|
+
"componentId": {
|
495
|
+
"scope": "teambit.harmony",
|
496
|
+
"name": "global-config"
|
497
|
+
}
|
463
498
|
},
|
464
499
|
"isOptional": false,
|
465
500
|
"isSpread": false
|
@@ -575,7 +610,12 @@
|
|
575
610
|
"line": 39,
|
576
611
|
"character": 41
|
577
612
|
},
|
578
|
-
"name": "ComponentID"
|
613
|
+
"name": "ComponentID",
|
614
|
+
"componentId": {
|
615
|
+
"scope": "teambit.component",
|
616
|
+
"name": "component-id",
|
617
|
+
"version": "1.2.2"
|
618
|
+
}
|
579
619
|
}
|
580
620
|
},
|
581
621
|
"isOptional": false,
|
@@ -640,7 +680,8 @@
|
|
640
680
|
"line": 46,
|
641
681
|
"character": 38
|
642
682
|
},
|
643
|
-
"name": "OnPreWatch"
|
683
|
+
"name": "OnPreWatch",
|
684
|
+
"internalFilePath": "watcher.main.runtime.ts"
|
644
685
|
},
|
645
686
|
"isOptional": false,
|
646
687
|
"isSpread": false
|
@@ -753,7 +794,11 @@
|
|
753
794
|
"line": 65,
|
754
795
|
"character": 7
|
755
796
|
},
|
756
|
-
"name": "CLIMain"
|
797
|
+
"name": "CLIMain",
|
798
|
+
"componentId": {
|
799
|
+
"scope": "teambit.harmony",
|
800
|
+
"name": "cli"
|
801
|
+
}
|
757
802
|
},
|
758
803
|
{
|
759
804
|
"__schema": "TypeRefSchema",
|
@@ -762,7 +807,11 @@
|
|
762
807
|
"line": 66,
|
763
808
|
"character": 7
|
764
809
|
},
|
765
|
-
"name": "Workspace"
|
810
|
+
"name": "Workspace",
|
811
|
+
"componentId": {
|
812
|
+
"scope": "teambit.workspace",
|
813
|
+
"name": "workspace"
|
814
|
+
}
|
766
815
|
},
|
767
816
|
{
|
768
817
|
"__schema": "TypeRefSchema",
|
@@ -771,7 +820,11 @@
|
|
771
820
|
"line": 67,
|
772
821
|
"character": 7
|
773
822
|
},
|
774
|
-
"name": "ScopeMain"
|
823
|
+
"name": "ScopeMain",
|
824
|
+
"componentId": {
|
825
|
+
"scope": "teambit.scope",
|
826
|
+
"name": "scope"
|
827
|
+
}
|
775
828
|
},
|
776
829
|
{
|
777
830
|
"__schema": "TypeRefSchema",
|
@@ -780,7 +833,11 @@
|
|
780
833
|
"line": 68,
|
781
834
|
"character": 7
|
782
835
|
},
|
783
|
-
"name": "PubsubMain"
|
836
|
+
"name": "PubsubMain",
|
837
|
+
"componentId": {
|
838
|
+
"scope": "teambit.harmony",
|
839
|
+
"name": "pubsub"
|
840
|
+
}
|
784
841
|
},
|
785
842
|
{
|
786
843
|
"__schema": "TypeRefSchema",
|
@@ -789,7 +846,11 @@
|
|
789
846
|
"line": 69,
|
790
847
|
"character": 7
|
791
848
|
},
|
792
|
-
"name": "LoggerMain"
|
849
|
+
"name": "LoggerMain",
|
850
|
+
"componentId": {
|
851
|
+
"scope": "teambit.harmony",
|
852
|
+
"name": "logger"
|
853
|
+
}
|
793
854
|
},
|
794
855
|
{
|
795
856
|
"__schema": "TypeRefSchema",
|
@@ -798,7 +859,11 @@
|
|
798
859
|
"line": 70,
|
799
860
|
"character": 7
|
800
861
|
},
|
801
|
-
"name": "IpcEventsMain"
|
862
|
+
"name": "IpcEventsMain",
|
863
|
+
"componentId": {
|
864
|
+
"scope": "teambit.harmony",
|
865
|
+
"name": "ipc-events"
|
866
|
+
}
|
802
867
|
},
|
803
868
|
{
|
804
869
|
"__schema": "TypeRefSchema",
|
@@ -807,7 +872,11 @@
|
|
807
872
|
"line": 71,
|
808
873
|
"character": 7
|
809
874
|
},
|
810
|
-
"name": "GlobalConfigMain"
|
875
|
+
"name": "GlobalConfigMain",
|
876
|
+
"componentId": {
|
877
|
+
"scope": "teambit.harmony",
|
878
|
+
"name": "global-config"
|
879
|
+
}
|
811
880
|
}
|
812
881
|
]
|
813
882
|
},
|
@@ -857,7 +926,8 @@
|
|
857
926
|
"line": 74,
|
858
927
|
"character": 24
|
859
928
|
},
|
860
|
-
"name": "OnPreWatchSlot"
|
929
|
+
"name": "OnPreWatchSlot",
|
930
|
+
"internalFilePath": "watcher.main.runtime.ts"
|
861
931
|
}
|
862
932
|
]
|
863
933
|
},
|
@@ -1028,7 +1098,12 @@
|
|
1028
1098
|
"line": 30,
|
1029
1099
|
"character": 103
|
1030
1100
|
},
|
1031
|
-
"name": "ComponentID"
|
1101
|
+
"name": "ComponentID",
|
1102
|
+
"componentId": {
|
1103
|
+
"scope": "teambit.component",
|
1104
|
+
"name": "component-id",
|
1105
|
+
"version": "1.2.2"
|
1106
|
+
}
|
1032
1107
|
}
|
1033
1108
|
},
|
1034
1109
|
"isOptional": false
|
@@ -1215,7 +1290,7 @@
|
|
1215
1290
|
"line": 42,
|
1216
1291
|
"character": 31
|
1217
1292
|
},
|
1218
|
-
"signature": "(filePaths: string[], buildResults: OnComponentEventResult[], verbose: boolean, duration: number, failureMsg?: string): void",
|
1293
|
+
"signature": "(filePaths: string[], buildResults: (component: teambit.workspace/workspace) OnComponentEventResult[], verbose: boolean, duration: number, failureMsg?: string): void",
|
1219
1294
|
"name": "",
|
1220
1295
|
"params": [
|
1221
1296
|
{
|
@@ -1268,7 +1343,11 @@
|
|
1268
1343
|
"line": 44,
|
1269
1344
|
"character": 17
|
1270
1345
|
},
|
1271
|
-
"name": "OnComponentEventResult"
|
1346
|
+
"name": "OnComponentEventResult",
|
1347
|
+
"componentId": {
|
1348
|
+
"scope": "teambit.workspace",
|
1349
|
+
"name": "workspace"
|
1350
|
+
}
|
1272
1351
|
}
|
1273
1352
|
},
|
1274
1353
|
"isOptional": false,
|
@@ -1380,7 +1459,8 @@
|
|
1380
1459
|
"line": 51,
|
1381
1460
|
"character": 10
|
1382
1461
|
},
|
1383
|
-
"name": "EventMessages"
|
1462
|
+
"name": "EventMessages",
|
1463
|
+
"internalFilePath": "watcher.ts"
|
1384
1464
|
},
|
1385
1465
|
"isOptional": true
|
1386
1466
|
},
|
@@ -1400,7 +1480,11 @@
|
|
1400
1480
|
"line": 52,
|
1401
1481
|
"character": 15
|
1402
1482
|
},
|
1403
|
-
"name": "CompilationInitiator"
|
1483
|
+
"name": "CompilationInitiator",
|
1484
|
+
"componentId": {
|
1485
|
+
"scope": "teambit.compilation",
|
1486
|
+
"name": "compiler"
|
1487
|
+
}
|
1404
1488
|
},
|
1405
1489
|
"isOptional": true
|
1406
1490
|
},
|
@@ -1560,7 +1644,12 @@
|
|
1560
1644
|
"line": 60,
|
1561
1645
|
"character": 13
|
1562
1646
|
},
|
1563
|
-
"name": "ComponentID"
|
1647
|
+
"name": "ComponentID",
|
1648
|
+
"componentId": {
|
1649
|
+
"scope": "teambit.component",
|
1650
|
+
"name": "component-id",
|
1651
|
+
"version": "1.2.2"
|
1652
|
+
}
|
1564
1653
|
},
|
1565
1654
|
"isOptional": true
|
1566
1655
|
}
|
@@ -1606,7 +1695,8 @@
|
|
1606
1695
|
"line": 63,
|
1607
1696
|
"character": 32
|
1608
1697
|
},
|
1609
|
-
"name": "PathLinux"
|
1698
|
+
"name": "PathLinux",
|
1699
|
+
"internalFilePath": "watcher.ts"
|
1610
1700
|
},
|
1611
1701
|
"isOptional": false,
|
1612
1702
|
"isSpread": false
|
@@ -1618,7 +1708,12 @@
|
|
1618
1708
|
"line": 63,
|
1619
1709
|
"character": 44
|
1620
1710
|
},
|
1621
|
-
"name": "ComponentID"
|
1711
|
+
"name": "ComponentID",
|
1712
|
+
"componentId": {
|
1713
|
+
"scope": "teambit.component",
|
1714
|
+
"name": "component-id",
|
1715
|
+
"version": "1.2.2"
|
1716
|
+
}
|
1622
1717
|
}
|
1623
1718
|
}
|
1624
1719
|
]
|
@@ -1659,7 +1754,11 @@
|
|
1659
1754
|
"line": 79,
|
1660
1755
|
"character": 24
|
1661
1756
|
},
|
1662
|
-
"name": "Workspace"
|
1757
|
+
"name": "Workspace",
|
1758
|
+
"componentId": {
|
1759
|
+
"scope": "teambit.workspace",
|
1760
|
+
"name": "workspace"
|
1761
|
+
}
|
1663
1762
|
},
|
1664
1763
|
"isOptional": false,
|
1665
1764
|
"isSpread": false
|
@@ -1679,7 +1778,11 @@
|
|
1679
1778
|
"line": 80,
|
1680
1779
|
"character": 21
|
1681
1780
|
},
|
1682
|
-
"name": "PubsubMain"
|
1781
|
+
"name": "PubsubMain",
|
1782
|
+
"componentId": {
|
1783
|
+
"scope": "teambit.harmony",
|
1784
|
+
"name": "pubsub"
|
1785
|
+
}
|
1683
1786
|
},
|
1684
1787
|
"isOptional": false,
|
1685
1788
|
"isSpread": false
|
@@ -1753,7 +1856,11 @@
|
|
1753
1856
|
"character": 3
|
1754
1857
|
},
|
1755
1858
|
"name": "Consumer",
|
1756
|
-
"
|
1859
|
+
"componentId": {
|
1860
|
+
"scope": "teambit.legacy",
|
1861
|
+
"name": "consumer",
|
1862
|
+
"version": "0.0.2"
|
1863
|
+
}
|
1757
1864
|
}
|
1758
1865
|
},
|
1759
1866
|
{
|
@@ -1862,7 +1969,7 @@
|
|
1862
1969
|
"line": 15,
|
1863
1970
|
"character": 26
|
1864
1971
|
},
|
1865
|
-
"signature": "(componentIds: ComponentID[], watchOpts: WatchOptions): Promise<void>",
|
1972
|
+
"signature": "(componentIds: (component: teambit.component/component-id) ComponentID[], watchOpts: WatchOptions): Promise<void>",
|
1866
1973
|
"name": "",
|
1867
1974
|
"params": [
|
1868
1975
|
{
|
@@ -1887,7 +1994,12 @@
|
|
1887
1994
|
"line": 15,
|
1888
1995
|
"character": 41
|
1889
1996
|
},
|
1890
|
-
"name": "ComponentID"
|
1997
|
+
"name": "ComponentID",
|
1998
|
+
"componentId": {
|
1999
|
+
"scope": "teambit.component",
|
2000
|
+
"name": "component-id",
|
2001
|
+
"version": "1.2.2"
|
2002
|
+
}
|
1891
2003
|
}
|
1892
2004
|
},
|
1893
2005
|
"isOptional": false,
|
@@ -1954,6 +2066,11 @@
|
|
1954
2066
|
"character": 30
|
1955
2067
|
},
|
1956
2068
|
"name": "SlotRegistry",
|
2069
|
+
"componentId": {
|
2070
|
+
"scope": "teambit.harmony",
|
2071
|
+
"name": "harmony",
|
2072
|
+
"version": "0.4.6"
|
2073
|
+
},
|
1957
2074
|
"typeArgs": [
|
1958
2075
|
{
|
1959
2076
|
"__schema": "TypeRefSchema",
|
@@ -1962,7 +2079,8 @@
|
|
1962
2079
|
"line": 16,
|
1963
2080
|
"character": 43
|
1964
2081
|
},
|
1965
|
-
"name": "OnPreWatch"
|
2082
|
+
"name": "OnPreWatch",
|
2083
|
+
"internalFilePath": "watcher.main.runtime.ts"
|
1966
2084
|
}
|
1967
2085
|
]
|
1968
2086
|
}
|
@@ -2002,7 +2120,11 @@
|
|
2002
2120
|
"line": 20,
|
2003
2121
|
"character": 24
|
2004
2122
|
},
|
2005
|
-
"name": "Workspace"
|
2123
|
+
"name": "Workspace",
|
2124
|
+
"componentId": {
|
2125
|
+
"scope": "teambit.workspace",
|
2126
|
+
"name": "workspace"
|
2127
|
+
}
|
2006
2128
|
},
|
2007
2129
|
"isOptional": false,
|
2008
2130
|
"isSpread": false
|
@@ -2022,7 +2144,11 @@
|
|
2022
2144
|
"line": 21,
|
2023
2145
|
"character": 20
|
2024
2146
|
},
|
2025
|
-
"name": "ScopeMain"
|
2147
|
+
"name": "ScopeMain",
|
2148
|
+
"componentId": {
|
2149
|
+
"scope": "teambit.scope",
|
2150
|
+
"name": "scope"
|
2151
|
+
}
|
2026
2152
|
},
|
2027
2153
|
"isOptional": false,
|
2028
2154
|
"isSpread": false
|
@@ -2042,7 +2168,11 @@
|
|
2042
2168
|
"line": 22,
|
2043
2169
|
"character": 21
|
2044
2170
|
},
|
2045
|
-
"name": "PubsubMain"
|
2171
|
+
"name": "PubsubMain",
|
2172
|
+
"componentId": {
|
2173
|
+
"scope": "teambit.harmony",
|
2174
|
+
"name": "pubsub"
|
2175
|
+
}
|
2046
2176
|
},
|
2047
2177
|
"isOptional": false,
|
2048
2178
|
"isSpread": false
|
@@ -2062,7 +2192,8 @@
|
|
2062
2192
|
"line": 23,
|
2063
2193
|
"character": 29
|
2064
2194
|
},
|
2065
|
-
"name": "OnPreWatchSlot"
|
2195
|
+
"name": "OnPreWatchSlot",
|
2196
|
+
"internalFilePath": "watcher.main.runtime.ts"
|
2066
2197
|
},
|
2067
2198
|
"isOptional": false,
|
2068
2199
|
"isSpread": false
|
@@ -2082,7 +2213,11 @@
|
|
2082
2213
|
"line": 24,
|
2083
2214
|
"character": 25
|
2084
2215
|
},
|
2085
|
-
"name": "IpcEventsMain"
|
2216
|
+
"name": "IpcEventsMain",
|
2217
|
+
"componentId": {
|
2218
|
+
"scope": "teambit.harmony",
|
2219
|
+
"name": "ipc-events"
|
2220
|
+
}
|
2086
2221
|
},
|
2087
2222
|
"isOptional": false,
|
2088
2223
|
"isSpread": false
|
@@ -2102,7 +2237,11 @@
|
|
2102
2237
|
"line": 25,
|
2103
2238
|
"character": 22
|
2104
2239
|
},
|
2105
|
-
"name": "Logger"
|
2240
|
+
"name": "Logger",
|
2241
|
+
"componentId": {
|
2242
|
+
"scope": "teambit.harmony",
|
2243
|
+
"name": "logger"
|
2244
|
+
}
|
2106
2245
|
},
|
2107
2246
|
"isOptional": false,
|
2108
2247
|
"isSpread": false
|
@@ -2122,7 +2261,11 @@
|
|
2122
2261
|
"line": 26,
|
2123
2262
|
"character": 28
|
2124
2263
|
},
|
2125
|
-
"name": "GlobalConfigMain"
|
2264
|
+
"name": "GlobalConfigMain",
|
2265
|
+
"componentId": {
|
2266
|
+
"scope": "teambit.harmony",
|
2267
|
+
"name": "global-config"
|
2268
|
+
}
|
2126
2269
|
},
|
2127
2270
|
"isOptional": false,
|
2128
2271
|
"isSpread": false
|
@@ -2238,7 +2381,12 @@
|
|
2238
2381
|
"line": 39,
|
2239
2382
|
"character": 41
|
2240
2383
|
},
|
2241
|
-
"name": "ComponentID"
|
2384
|
+
"name": "ComponentID",
|
2385
|
+
"componentId": {
|
2386
|
+
"scope": "teambit.component",
|
2387
|
+
"name": "component-id",
|
2388
|
+
"version": "1.2.2"
|
2389
|
+
}
|
2242
2390
|
}
|
2243
2391
|
},
|
2244
2392
|
"isOptional": false,
|
@@ -2303,7 +2451,8 @@
|
|
2303
2451
|
"line": 46,
|
2304
2452
|
"character": 38
|
2305
2453
|
},
|
2306
|
-
"name": "OnPreWatch"
|
2454
|
+
"name": "OnPreWatch",
|
2455
|
+
"internalFilePath": "watcher.main.runtime.ts"
|
2307
2456
|
},
|
2308
2457
|
"isOptional": false,
|
2309
2458
|
"isSpread": false
|
@@ -2416,7 +2565,11 @@
|
|
2416
2565
|
"line": 65,
|
2417
2566
|
"character": 7
|
2418
2567
|
},
|
2419
|
-
"name": "CLIMain"
|
2568
|
+
"name": "CLIMain",
|
2569
|
+
"componentId": {
|
2570
|
+
"scope": "teambit.harmony",
|
2571
|
+
"name": "cli"
|
2572
|
+
}
|
2420
2573
|
},
|
2421
2574
|
{
|
2422
2575
|
"__schema": "TypeRefSchema",
|
@@ -2425,7 +2578,11 @@
|
|
2425
2578
|
"line": 66,
|
2426
2579
|
"character": 7
|
2427
2580
|
},
|
2428
|
-
"name": "Workspace"
|
2581
|
+
"name": "Workspace",
|
2582
|
+
"componentId": {
|
2583
|
+
"scope": "teambit.workspace",
|
2584
|
+
"name": "workspace"
|
2585
|
+
}
|
2429
2586
|
},
|
2430
2587
|
{
|
2431
2588
|
"__schema": "TypeRefSchema",
|
@@ -2434,7 +2591,11 @@
|
|
2434
2591
|
"line": 67,
|
2435
2592
|
"character": 7
|
2436
2593
|
},
|
2437
|
-
"name": "ScopeMain"
|
2594
|
+
"name": "ScopeMain",
|
2595
|
+
"componentId": {
|
2596
|
+
"scope": "teambit.scope",
|
2597
|
+
"name": "scope"
|
2598
|
+
}
|
2438
2599
|
},
|
2439
2600
|
{
|
2440
2601
|
"__schema": "TypeRefSchema",
|
@@ -2443,7 +2604,11 @@
|
|
2443
2604
|
"line": 68,
|
2444
2605
|
"character": 7
|
2445
2606
|
},
|
2446
|
-
"name": "PubsubMain"
|
2607
|
+
"name": "PubsubMain",
|
2608
|
+
"componentId": {
|
2609
|
+
"scope": "teambit.harmony",
|
2610
|
+
"name": "pubsub"
|
2611
|
+
}
|
2447
2612
|
},
|
2448
2613
|
{
|
2449
2614
|
"__schema": "TypeRefSchema",
|
@@ -2452,7 +2617,11 @@
|
|
2452
2617
|
"line": 69,
|
2453
2618
|
"character": 7
|
2454
2619
|
},
|
2455
|
-
"name": "LoggerMain"
|
2620
|
+
"name": "LoggerMain",
|
2621
|
+
"componentId": {
|
2622
|
+
"scope": "teambit.harmony",
|
2623
|
+
"name": "logger"
|
2624
|
+
}
|
2456
2625
|
},
|
2457
2626
|
{
|
2458
2627
|
"__schema": "TypeRefSchema",
|
@@ -2461,7 +2630,11 @@
|
|
2461
2630
|
"line": 70,
|
2462
2631
|
"character": 7
|
2463
2632
|
},
|
2464
|
-
"name": "IpcEventsMain"
|
2633
|
+
"name": "IpcEventsMain",
|
2634
|
+
"componentId": {
|
2635
|
+
"scope": "teambit.harmony",
|
2636
|
+
"name": "ipc-events"
|
2637
|
+
}
|
2465
2638
|
},
|
2466
2639
|
{
|
2467
2640
|
"__schema": "TypeRefSchema",
|
@@ -2470,7 +2643,11 @@
|
|
2470
2643
|
"line": 71,
|
2471
2644
|
"character": 7
|
2472
2645
|
},
|
2473
|
-
"name": "GlobalConfigMain"
|
2646
|
+
"name": "GlobalConfigMain",
|
2647
|
+
"componentId": {
|
2648
|
+
"scope": "teambit.harmony",
|
2649
|
+
"name": "global-config"
|
2650
|
+
}
|
2474
2651
|
}
|
2475
2652
|
]
|
2476
2653
|
},
|
@@ -2520,7 +2697,8 @@
|
|
2520
2697
|
"line": 74,
|
2521
2698
|
"character": 24
|
2522
2699
|
},
|
2523
|
-
"name": "OnPreWatchSlot"
|
2700
|
+
"name": "OnPreWatchSlot",
|
2701
|
+
"internalFilePath": "watcher.main.runtime.ts"
|
2524
2702
|
}
|
2525
2703
|
]
|
2526
2704
|
},
|
@@ -2611,7 +2789,7 @@
|
|
2611
2789
|
"componentId": {
|
2612
2790
|
"scope": "teambit.workspace",
|
2613
2791
|
"name": "watcher",
|
2614
|
-
"version": "1.0.
|
2792
|
+
"version": "1.0.489"
|
2615
2793
|
},
|
2616
2794
|
"taggedModuleExports": []
|
2617
2795
|
}
|
package/dist/watcher.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { PubsubMain } from '@teambit/pubsub';
|
2
2
|
import { ComponentID } from '@teambit/component-id';
|
3
|
-
import { Consumer } from '@teambit/legacy
|
3
|
+
import { Consumer } from '@teambit/legacy.consumer';
|
4
4
|
import { ChildProcess } from 'child_process';
|
5
5
|
import { CompilationInitiator } from '@teambit/compiler';
|
6
6
|
import { Workspace, OnComponentEventResult } from '@teambit/workspace';
|
package/dist/watcher.js
CHANGED
@@ -25,23 +25,23 @@ function _lodash() {
|
|
25
25
|
};
|
26
26
|
return data;
|
27
27
|
}
|
28
|
-
function
|
29
|
-
const data = require("@teambit/legacy
|
30
|
-
|
28
|
+
function _legacy() {
|
29
|
+
const data = require("@teambit/legacy.constants");
|
30
|
+
_legacy = function () {
|
31
31
|
return data;
|
32
32
|
};
|
33
33
|
return data;
|
34
34
|
}
|
35
|
-
function
|
36
|
-
const data =
|
37
|
-
|
35
|
+
function _legacy2() {
|
36
|
+
const data = require("@teambit/legacy.logger");
|
37
|
+
_legacy2 = function () {
|
38
38
|
return data;
|
39
39
|
};
|
40
40
|
return data;
|
41
41
|
}
|
42
|
-
function
|
42
|
+
function _legacy3() {
|
43
43
|
const data = require("@teambit/legacy.utils");
|
44
|
-
|
44
|
+
_legacy3 = function () {
|
45
45
|
return data;
|
46
46
|
};
|
47
47
|
return data;
|
@@ -60,9 +60,9 @@ function _chalk() {
|
|
60
60
|
};
|
61
61
|
return data;
|
62
62
|
}
|
63
|
-
function
|
64
|
-
const data = require("@teambit/legacy
|
65
|
-
|
63
|
+
function _legacy4() {
|
64
|
+
const data = require("@teambit/legacy.scope");
|
65
|
+
_legacy4 = function () {
|
66
66
|
return data;
|
67
67
|
};
|
68
68
|
return data;
|
@@ -145,8 +145,8 @@ class Watcher {
|
|
145
145
|
if (this.verbose) {
|
146
146
|
const watched = this.fsWatcher.getWatched();
|
147
147
|
const totalWatched = Object.values(watched).flat().length;
|
148
|
-
|
149
|
-
|
148
|
+
_legacy2().logger.console(`${_chalk().default.bold('the following files are being watched:')}\n${JSON.stringify(watched, null, 2)}`);
|
149
|
+
_legacy2().logger.console(`\nTotal files being watched: ${_chalk().default.bold(totalWatched.toString())}`);
|
150
150
|
}
|
151
151
|
this.logger.clearStatusLine();
|
152
152
|
});
|
@@ -211,7 +211,7 @@ class Watcher {
|
|
211
211
|
*/
|
212
212
|
async handleChange(filePath) {
|
213
213
|
try {
|
214
|
-
if (filePath.endsWith(
|
214
|
+
if (filePath.endsWith(_legacy().BIT_MAP)) {
|
215
215
|
this.bitMapChangesInProgress = true;
|
216
216
|
const buildResults = await this.watchQueue.add(() => this.handleBitmapChanges());
|
217
217
|
this.bitMapChangesInProgress = false;
|
@@ -235,14 +235,14 @@ class Watcher {
|
|
235
235
|
files: [filePath]
|
236
236
|
};
|
237
237
|
}
|
238
|
-
if (filePath.endsWith(
|
238
|
+
if (filePath.endsWith(_legacy().WORKSPACE_JSONC)) {
|
239
239
|
await this.workspace.triggerOnWorkspaceConfigChange();
|
240
240
|
return {
|
241
241
|
results: [],
|
242
242
|
files: [filePath]
|
243
243
|
};
|
244
244
|
}
|
245
|
-
if (filePath.endsWith(
|
245
|
+
if (filePath.endsWith(_legacy4().UNMERGED_FILENAME)) {
|
246
246
|
await this.workspace.clearCache();
|
247
247
|
return {
|
248
248
|
results: [],
|
@@ -282,8 +282,8 @@ class Watcher {
|
|
282
282
|
};
|
283
283
|
} catch (err) {
|
284
284
|
const msg = `watcher found an error while handling ${filePath}`;
|
285
|
-
|
286
|
-
|
285
|
+
_legacy2().logger.error(msg, err);
|
286
|
+
_legacy2().logger.console(`${msg}, ${err.message}`);
|
287
287
|
this.logger.clearStatusLine();
|
288
288
|
return {
|
289
289
|
results: [],
|
@@ -305,7 +305,7 @@ class Watcher {
|
|
305
305
|
ignoreVersion: true
|
306
306
|
}));
|
307
307
|
if (!updatedComponentId) {
|
308
|
-
|
308
|
+
_legacy2().logger.debug(`triggerCompChanges, the component ${componentId.toString()} was probably removed from .bitmap`);
|
309
309
|
return [];
|
310
310
|
}
|
311
311
|
}
|
@@ -324,7 +324,7 @@ class Watcher {
|
|
324
324
|
// the compiler takes care of removedFiles differently, e.g. removes dists dir and old symlinks.
|
325
325
|
const removedFiles = (0, _lodash().compact)(await Promise.all(nonCompFiles.map(async filePath => (await _fsExtra().default.pathExists(filePath)) ? null : filePath)));
|
326
326
|
if (!compFiles.length && !removedFiles.length) {
|
327
|
-
|
327
|
+
_legacy2().logger.debug(`the following files are part of the component ${componentId.toStringWithoutVersion()} but configured to be ignored:\n${files.join('\n')}'`);
|
328
328
|
return [];
|
329
329
|
}
|
330
330
|
this.consumer.bitMap.updateComponentPaths(componentId, compFiles.map(f => this.consumer.getPathRelativeToConsumer(f)), removedFiles.map(f => this.consumer.getPathRelativeToConsumer(f)));
|
@@ -386,7 +386,7 @@ class Watcher {
|
|
386
386
|
return;
|
387
387
|
}
|
388
388
|
if (this.options.verbose) {
|
389
|
-
|
389
|
+
_legacy2().logger.console(`Watcher: .bitmap has changed with new versions which do not exist locally, importing the objects...`);
|
390
390
|
}
|
391
391
|
await this.workspace.scope.import(currentIds, {
|
392
392
|
useCache: true,
|
@@ -394,7 +394,7 @@ class Watcher {
|
|
394
394
|
});
|
395
395
|
}
|
396
396
|
async executeWatchOperationsOnRemove(componentId) {
|
397
|
-
|
397
|
+
_legacy2().logger.debug(`running OnComponentRemove hook for ${_chalk().default.bold(componentId.toString())}`);
|
398
398
|
this.pubsub.pub(_workspace().WorkspaceAspect.id, this.createOnComponentRemovedEvent(componentId.toString()));
|
399
399
|
await this.workspace.triggerOnComponentRemove(componentId);
|
400
400
|
}
|
@@ -406,10 +406,10 @@ class Watcher {
|
|
406
406
|
}
|
407
407
|
const idStr = componentId.toString();
|
408
408
|
if (isChange) {
|
409
|
-
|
409
|
+
_legacy2().logger.debug(`running OnComponentChange hook for ${_chalk().default.bold(idStr)}`);
|
410
410
|
this.pubsub.pub(_workspace().WorkspaceAspect.id, this.createOnComponentChangeEvent(idStr, 'OnComponentChange'));
|
411
411
|
} else {
|
412
|
-
|
412
|
+
_legacy2().logger.debug(`running OnComponentAdd hook for ${_chalk().default.bold(idStr)}`);
|
413
413
|
this.pubsub.pub(_workspace().WorkspaceAspect.id, this.createOnComponentAddEvent(idStr, 'OnComponentAdd'));
|
414
414
|
}
|
415
415
|
const buildResults = isChange ? await this.workspace.triggerOnComponentChange(componentId, files, removedFiles, this.options) : await this.workspace.triggerOnComponentAdd(componentId, this.options);
|
@@ -427,7 +427,7 @@ class Watcher {
|
|
427
427
|
isComponentWatchedExternally(componentId) {
|
428
428
|
const watcherData = this.multipleWatchers.find(m => m.componentIds.find(id => id.isEqual(componentId)));
|
429
429
|
if (watcherData) {
|
430
|
-
|
430
|
+
_legacy2().logger.debug(`${componentId.toString()} is watched by ${watcherData.compilerId.toString()}`);
|
431
431
|
return true;
|
432
432
|
}
|
433
433
|
return false;
|
@@ -443,7 +443,7 @@ class Watcher {
|
|
443
443
|
return this.rootDirs[rootDir];
|
444
444
|
}
|
445
445
|
getRelativePathLinux(filePath) {
|
446
|
-
return (0,
|
446
|
+
return (0, _legacy3().pathNormalizeToLinux)(this.consumer.getPathRelativeToConsumer(filePath));
|
447
447
|
}
|
448
448
|
findRootDirByFilePathRecursively(filePath) {
|
449
449
|
if (this.rootDirs[filePath]) return filePath;
|
@@ -452,11 +452,11 @@ class Watcher {
|
|
452
452
|
return this.findRootDirByFilePathRecursively(parentDir);
|
453
453
|
}
|
454
454
|
async createWatcher() {
|
455
|
-
const usePollingConf = await this.watcherMain.globalConfig.get(
|
455
|
+
const usePollingConf = await this.watcherMain.globalConfig.get(_legacy().CFG_WATCH_USE_POLLING);
|
456
456
|
const usePolling = usePollingConf === 'true';
|
457
|
-
const workspacePathLinux = (0,
|
457
|
+
const workspacePathLinux = (0, _legacy3().pathNormalizeToLinux)(this.workspace.path);
|
458
458
|
const ignoreLocalScope = pathToCheck => {
|
459
|
-
if (pathToCheck.startsWith(this.ipcEventsDir) || pathToCheck.endsWith(
|
459
|
+
if (pathToCheck.startsWith(this.ipcEventsDir) || pathToCheck.endsWith(_legacy4().UNMERGED_FILENAME)) return false;
|
460
460
|
return pathToCheck.startsWith(`${workspacePathLinux}/.git/`) || pathToCheck.startsWith(`${workspacePathLinux}/.bit/`);
|
461
461
|
};
|
462
462
|
this.fsWatcher = _chokidar().default.watch(this.workspace.path, {
|
@@ -469,7 +469,7 @@ class Watcher {
|
|
469
469
|
persistent: true
|
470
470
|
});
|
471
471
|
if (this.verbose) {
|
472
|
-
|
472
|
+
_legacy2().logger.console(`${_chalk().default.bold('chokidar.options:\n')} ${JSON.stringify(this.fsWatcher.options, undefined, 2)}`);
|
473
473
|
}
|
474
474
|
}
|
475
475
|
async setRootDirs() {
|
package/dist/watcher.js.map
CHANGED
@@ -1 +1 @@
|
|
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' && eventName !== 'onPostObjectsPersist') {\n this.watcherMain.logger.warn(`eventName ${eventName} is not recognized, please handle it`);\n }\n await this.watcherMain.ipcEvents.triggerGotEvent(eventName as any);\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,IAAA;AAAA;AACA,SAAAO,QAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,OAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,YAAA;EAAA,MAAAR,IAAA,GAAAC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K,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":[]}
|
1
|
+
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_path","_lodash","_legacy","_legacy2","_legacy3","_pMapSeries","_chalk","_legacy4","_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.constants';\nimport { Consumer } from '@teambit/legacy.consumer';\nimport { logger } from '@teambit/legacy.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.scope';\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' && eventName !== 'onPostObjectsPersist') {\n this.watcherMain.logger.warn(`eventName ${eventName} is not recognized, please handle it`);\n }\n await this.watcherMain.ipcEvents.triggerGotEvent(eventName as any);\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,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,SAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,QAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;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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.489",
|
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.489"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -18,16 +18,20 @@
|
|
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.
|
30
|
-
"@teambit/legacy.
|
21
|
+
"@teambit/compiler": "1.0.489",
|
22
|
+
"@teambit/logger": "0.0.1159",
|
23
|
+
"@teambit/workspace": "1.0.489",
|
24
|
+
"@teambit/cli": "0.0.1066",
|
25
|
+
"@teambit/pubsub": "1.0.489",
|
26
|
+
"@teambit/global-config": "0.0.1069",
|
27
|
+
"@teambit/ipc-events": "1.0.489",
|
28
|
+
"@teambit/scope": "1.0.489",
|
29
|
+
"@teambit/legacy.bit-map": "0.0.59",
|
30
|
+
"@teambit/legacy.constants": "0.0.2",
|
31
|
+
"@teambit/legacy.consumer": "0.0.2",
|
32
|
+
"@teambit/legacy.logger": "0.0.2",
|
33
|
+
"@teambit/legacy.scope": "0.0.2",
|
34
|
+
"@teambit/legacy.utils": "0.0.9"
|
31
35
|
},
|
32
36
|
"devDependencies": {
|
33
37
|
"@types/lodash": "4.14.165",
|
File without changes
|