@teambit/watcher 1.0.226 → 1.0.228

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.226" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.workspace/watcher@1.0.228" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -46,8 +46,7 @@
46
46
  "line": 52,
47
47
  "character": 10
48
48
  },
49
- "name": "EventMessages",
50
- "internalFilePath": "watcher.ts"
49
+ "name": "EventMessages"
51
50
  },
52
51
  "isOptional": true
53
52
  },
@@ -67,11 +66,7 @@
67
66
  "line": 53,
68
67
  "character": 15
69
68
  },
70
- "name": "CompilationInitiator",
71
- "componentId": {
72
- "scope": "teambit.compilation",
73
- "name": "compiler"
74
- }
69
+ "name": "CompilationInitiator"
75
70
  },
76
71
  "isOptional": true
77
72
  },
@@ -255,11 +250,7 @@
255
250
  "line": 20,
256
251
  "character": 24
257
252
  },
258
- "name": "Workspace",
259
- "componentId": {
260
- "scope": "teambit.workspace",
261
- "name": "workspace"
262
- }
253
+ "name": "Workspace"
263
254
  },
264
255
  "isOptional": false,
265
256
  "isSpread": false
@@ -279,11 +270,7 @@
279
270
  "line": 21,
280
271
  "character": 20
281
272
  },
282
- "name": "ScopeMain",
283
- "componentId": {
284
- "scope": "teambit.scope",
285
- "name": "scope"
286
- }
273
+ "name": "ScopeMain"
287
274
  },
288
275
  "isOptional": false,
289
276
  "isSpread": false
@@ -303,11 +290,7 @@
303
290
  "line": 22,
304
291
  "character": 21
305
292
  },
306
- "name": "PubsubMain",
307
- "componentId": {
308
- "scope": "teambit.harmony",
309
- "name": "pubsub"
310
- }
293
+ "name": "PubsubMain"
311
294
  },
312
295
  "isOptional": false,
313
296
  "isSpread": false
@@ -327,8 +310,7 @@
327
310
  "line": 23,
328
311
  "character": 29
329
312
  },
330
- "name": "OnPreWatchSlot",
331
- "internalFilePath": "watcher.main.runtime.ts"
313
+ "name": "OnPreWatchSlot"
332
314
  },
333
315
  "isOptional": false,
334
316
  "isSpread": false
@@ -348,11 +330,7 @@
348
330
  "line": 24,
349
331
  "character": 25
350
332
  },
351
- "name": "IpcEventsMain",
352
- "componentId": {
353
- "scope": "teambit.harmony",
354
- "name": "ipc-events"
355
- }
333
+ "name": "IpcEventsMain"
356
334
  },
357
335
  "isOptional": false,
358
336
  "isSpread": false
@@ -372,11 +350,7 @@
372
350
  "line": 25,
373
351
  "character": 22
374
352
  },
375
- "name": "Logger",
376
- "componentId": {
377
- "scope": "teambit.harmony",
378
- "name": "logger"
379
- }
353
+ "name": "Logger"
380
354
  },
381
355
  "isOptional": false,
382
356
  "isSpread": false
@@ -396,11 +370,7 @@
396
370
  "line": 26,
397
371
  "character": 28
398
372
  },
399
- "name": "GlobalConfigMain",
400
- "componentId": {
401
- "scope": "teambit.harmony",
402
- "name": "global-config"
403
- }
373
+ "name": "GlobalConfigMain"
404
374
  },
405
375
  "isOptional": false,
406
376
  "isSpread": false
@@ -516,12 +486,7 @@
516
486
  "line": 39,
517
487
  "character": 41
518
488
  },
519
- "name": "ComponentID",
520
- "componentId": {
521
- "scope": "teambit.component",
522
- "name": "component-id",
523
- "version": "1.2.0"
524
- }
489
+ "name": "ComponentID"
525
490
  }
526
491
  },
527
492
  "isOptional": false,
@@ -586,8 +551,7 @@
586
551
  "line": 46,
587
552
  "character": 38
588
553
  },
589
- "name": "OnPreWatch",
590
- "internalFilePath": "watcher.main.runtime.ts"
554
+ "name": "OnPreWatch"
591
555
  },
592
556
  "isOptional": false,
593
557
  "isSpread": false
@@ -700,11 +664,7 @@
700
664
  "line": 65,
701
665
  "character": 7
702
666
  },
703
- "name": "CLIMain",
704
- "componentId": {
705
- "scope": "teambit.harmony",
706
- "name": "cli"
707
- }
667
+ "name": "CLIMain"
708
668
  },
709
669
  {
710
670
  "__schema": "TypeRefSchema",
@@ -713,11 +673,7 @@
713
673
  "line": 66,
714
674
  "character": 7
715
675
  },
716
- "name": "Workspace",
717
- "componentId": {
718
- "scope": "teambit.workspace",
719
- "name": "workspace"
720
- }
676
+ "name": "Workspace"
721
677
  },
722
678
  {
723
679
  "__schema": "TypeRefSchema",
@@ -726,11 +682,7 @@
726
682
  "line": 67,
727
683
  "character": 7
728
684
  },
729
- "name": "ScopeMain",
730
- "componentId": {
731
- "scope": "teambit.scope",
732
- "name": "scope"
733
- }
685
+ "name": "ScopeMain"
734
686
  },
735
687
  {
736
688
  "__schema": "TypeRefSchema",
@@ -739,11 +691,7 @@
739
691
  "line": 68,
740
692
  "character": 7
741
693
  },
742
- "name": "PubsubMain",
743
- "componentId": {
744
- "scope": "teambit.harmony",
745
- "name": "pubsub"
746
- }
694
+ "name": "PubsubMain"
747
695
  },
748
696
  {
749
697
  "__schema": "TypeRefSchema",
@@ -752,11 +700,7 @@
752
700
  "line": 69,
753
701
  "character": 7
754
702
  },
755
- "name": "LoggerMain",
756
- "componentId": {
757
- "scope": "teambit.harmony",
758
- "name": "logger"
759
- }
703
+ "name": "LoggerMain"
760
704
  },
761
705
  {
762
706
  "__schema": "TypeRefSchema",
@@ -765,11 +709,7 @@
765
709
  "line": 70,
766
710
  "character": 7
767
711
  },
768
- "name": "IpcEventsMain",
769
- "componentId": {
770
- "scope": "teambit.harmony",
771
- "name": "ipc-events"
772
- }
712
+ "name": "IpcEventsMain"
773
713
  },
774
714
  {
775
715
  "__schema": "TypeRefSchema",
@@ -778,11 +718,7 @@
778
718
  "line": 71,
779
719
  "character": 7
780
720
  },
781
- "name": "GlobalConfigMain",
782
- "componentId": {
783
- "scope": "teambit.harmony",
784
- "name": "global-config"
785
- }
721
+ "name": "GlobalConfigMain"
786
722
  }
787
723
  ]
788
724
  },
@@ -832,8 +768,7 @@
832
768
  "line": 74,
833
769
  "character": 24
834
770
  },
835
- "name": "OnPreWatchSlot",
836
- "internalFilePath": "watcher.main.runtime.ts"
771
+ "name": "OnPreWatchSlot"
837
772
  }
838
773
  ]
839
774
  },
@@ -993,12 +928,7 @@
993
928
  "line": 31,
994
929
  "character": 103
995
930
  },
996
- "name": "ComponentID",
997
- "componentId": {
998
- "scope": "teambit.component",
999
- "name": "component-id",
1000
- "version": "1.2.0"
1001
- }
931
+ "name": "ComponentID"
1002
932
  }
1003
933
  },
1004
934
  "isOptional": false
@@ -1185,7 +1115,7 @@
1185
1115
  "line": 43,
1186
1116
  "character": 31
1187
1117
  },
1188
- "signature": "(filePaths: string[], buildResults: \u001b[2m(component: teambit.workspace/workspace)\u001b[22m OnComponentEventResult[], verbose: boolean, duration: number, failureMsg?: string): void",
1118
+ "signature": "(filePaths: string[], buildResults: OnComponentEventResult[], verbose: boolean, duration: number, failureMsg?: string): void",
1189
1119
  "name": "",
1190
1120
  "params": [
1191
1121
  {
@@ -1238,11 +1168,7 @@
1238
1168
  "line": 45,
1239
1169
  "character": 17
1240
1170
  },
1241
- "name": "OnComponentEventResult",
1242
- "componentId": {
1243
- "scope": "teambit.workspace",
1244
- "name": "workspace"
1245
- }
1171
+ "name": "OnComponentEventResult"
1246
1172
  }
1247
1173
  },
1248
1174
  "isOptional": false,
@@ -1354,8 +1280,7 @@
1354
1280
  "line": 52,
1355
1281
  "character": 10
1356
1282
  },
1357
- "name": "EventMessages",
1358
- "internalFilePath": "watcher.ts"
1283
+ "name": "EventMessages"
1359
1284
  },
1360
1285
  "isOptional": true
1361
1286
  },
@@ -1375,11 +1300,7 @@
1375
1300
  "line": 53,
1376
1301
  "character": 15
1377
1302
  },
1378
- "name": "CompilationInitiator",
1379
- "componentId": {
1380
- "scope": "teambit.compilation",
1381
- "name": "compiler"
1382
- }
1303
+ "name": "CompilationInitiator"
1383
1304
  },
1384
1305
  "isOptional": true
1385
1306
  },
@@ -1525,8 +1446,7 @@
1525
1446
  "line": 61,
1526
1447
  "character": 32
1527
1448
  },
1528
- "name": "PathLinux",
1529
- "internalFilePath": "watcher.ts"
1449
+ "name": "PathLinux"
1530
1450
  },
1531
1451
  "isOptional": false,
1532
1452
  "isSpread": false
@@ -1538,12 +1458,7 @@
1538
1458
  "line": 61,
1539
1459
  "character": 44
1540
1460
  },
1541
- "name": "ComponentID",
1542
- "componentId": {
1543
- "scope": "teambit.component",
1544
- "name": "component-id",
1545
- "version": "1.2.0"
1546
- }
1461
+ "name": "ComponentID"
1547
1462
  }
1548
1463
  }
1549
1464
  ]
@@ -1584,11 +1499,7 @@
1584
1499
  "line": 76,
1585
1500
  "character": 24
1586
1501
  },
1587
- "name": "Workspace",
1588
- "componentId": {
1589
- "scope": "teambit.workspace",
1590
- "name": "workspace"
1591
- }
1502
+ "name": "Workspace"
1592
1503
  },
1593
1504
  "isOptional": false,
1594
1505
  "isSpread": false
@@ -1608,11 +1519,7 @@
1608
1519
  "line": 77,
1609
1520
  "character": 21
1610
1521
  },
1611
- "name": "PubsubMain",
1612
- "componentId": {
1613
- "scope": "teambit.harmony",
1614
- "name": "pubsub"
1615
- }
1522
+ "name": "PubsubMain"
1616
1523
  },
1617
1524
  "isOptional": false,
1618
1525
  "isSpread": false
@@ -1795,7 +1702,7 @@
1795
1702
  "line": 15,
1796
1703
  "character": 26
1797
1704
  },
1798
- "signature": "(componentIds: \u001b[2m(component: teambit.component/component-id)\u001b[22m ComponentID[], watchOpts: WatchOptions): Promise<void>",
1705
+ "signature": "(componentIds: ComponentID[], watchOpts: WatchOptions): Promise<void>",
1799
1706
  "name": "",
1800
1707
  "params": [
1801
1708
  {
@@ -1820,12 +1727,7 @@
1820
1727
  "line": 15,
1821
1728
  "character": 41
1822
1729
  },
1823
- "name": "ComponentID",
1824
- "componentId": {
1825
- "scope": "teambit.component",
1826
- "name": "component-id",
1827
- "version": "1.2.0"
1828
- }
1730
+ "name": "ComponentID"
1829
1731
  }
1830
1732
  },
1831
1733
  "isOptional": false,
@@ -1892,11 +1794,6 @@
1892
1794
  "character": 30
1893
1795
  },
1894
1796
  "name": "SlotRegistry",
1895
- "componentId": {
1896
- "scope": "teambit.harmony",
1897
- "name": "harmony",
1898
- "version": "0.4.6"
1899
- },
1900
1797
  "typeArgs": [
1901
1798
  {
1902
1799
  "__schema": "TypeRefSchema",
@@ -1905,8 +1802,7 @@
1905
1802
  "line": 16,
1906
1803
  "character": 43
1907
1804
  },
1908
- "name": "OnPreWatch",
1909
- "internalFilePath": "watcher.main.runtime.ts"
1805
+ "name": "OnPreWatch"
1910
1806
  }
1911
1807
  ]
1912
1808
  }
@@ -1946,11 +1842,7 @@
1946
1842
  "line": 20,
1947
1843
  "character": 24
1948
1844
  },
1949
- "name": "Workspace",
1950
- "componentId": {
1951
- "scope": "teambit.workspace",
1952
- "name": "workspace"
1953
- }
1845
+ "name": "Workspace"
1954
1846
  },
1955
1847
  "isOptional": false,
1956
1848
  "isSpread": false
@@ -1970,11 +1862,7 @@
1970
1862
  "line": 21,
1971
1863
  "character": 20
1972
1864
  },
1973
- "name": "ScopeMain",
1974
- "componentId": {
1975
- "scope": "teambit.scope",
1976
- "name": "scope"
1977
- }
1865
+ "name": "ScopeMain"
1978
1866
  },
1979
1867
  "isOptional": false,
1980
1868
  "isSpread": false
@@ -1994,11 +1882,7 @@
1994
1882
  "line": 22,
1995
1883
  "character": 21
1996
1884
  },
1997
- "name": "PubsubMain",
1998
- "componentId": {
1999
- "scope": "teambit.harmony",
2000
- "name": "pubsub"
2001
- }
1885
+ "name": "PubsubMain"
2002
1886
  },
2003
1887
  "isOptional": false,
2004
1888
  "isSpread": false
@@ -2018,8 +1902,7 @@
2018
1902
  "line": 23,
2019
1903
  "character": 29
2020
1904
  },
2021
- "name": "OnPreWatchSlot",
2022
- "internalFilePath": "watcher.main.runtime.ts"
1905
+ "name": "OnPreWatchSlot"
2023
1906
  },
2024
1907
  "isOptional": false,
2025
1908
  "isSpread": false
@@ -2039,11 +1922,7 @@
2039
1922
  "line": 24,
2040
1923
  "character": 25
2041
1924
  },
2042
- "name": "IpcEventsMain",
2043
- "componentId": {
2044
- "scope": "teambit.harmony",
2045
- "name": "ipc-events"
2046
- }
1925
+ "name": "IpcEventsMain"
2047
1926
  },
2048
1927
  "isOptional": false,
2049
1928
  "isSpread": false
@@ -2063,11 +1942,7 @@
2063
1942
  "line": 25,
2064
1943
  "character": 22
2065
1944
  },
2066
- "name": "Logger",
2067
- "componentId": {
2068
- "scope": "teambit.harmony",
2069
- "name": "logger"
2070
- }
1945
+ "name": "Logger"
2071
1946
  },
2072
1947
  "isOptional": false,
2073
1948
  "isSpread": false
@@ -2087,11 +1962,7 @@
2087
1962
  "line": 26,
2088
1963
  "character": 28
2089
1964
  },
2090
- "name": "GlobalConfigMain",
2091
- "componentId": {
2092
- "scope": "teambit.harmony",
2093
- "name": "global-config"
2094
- }
1965
+ "name": "GlobalConfigMain"
2095
1966
  },
2096
1967
  "isOptional": false,
2097
1968
  "isSpread": false
@@ -2207,12 +2078,7 @@
2207
2078
  "line": 39,
2208
2079
  "character": 41
2209
2080
  },
2210
- "name": "ComponentID",
2211
- "componentId": {
2212
- "scope": "teambit.component",
2213
- "name": "component-id",
2214
- "version": "1.2.0"
2215
- }
2081
+ "name": "ComponentID"
2216
2082
  }
2217
2083
  },
2218
2084
  "isOptional": false,
@@ -2277,8 +2143,7 @@
2277
2143
  "line": 46,
2278
2144
  "character": 38
2279
2145
  },
2280
- "name": "OnPreWatch",
2281
- "internalFilePath": "watcher.main.runtime.ts"
2146
+ "name": "OnPreWatch"
2282
2147
  },
2283
2148
  "isOptional": false,
2284
2149
  "isSpread": false
@@ -2391,11 +2256,7 @@
2391
2256
  "line": 65,
2392
2257
  "character": 7
2393
2258
  },
2394
- "name": "CLIMain",
2395
- "componentId": {
2396
- "scope": "teambit.harmony",
2397
- "name": "cli"
2398
- }
2259
+ "name": "CLIMain"
2399
2260
  },
2400
2261
  {
2401
2262
  "__schema": "TypeRefSchema",
@@ -2404,11 +2265,7 @@
2404
2265
  "line": 66,
2405
2266
  "character": 7
2406
2267
  },
2407
- "name": "Workspace",
2408
- "componentId": {
2409
- "scope": "teambit.workspace",
2410
- "name": "workspace"
2411
- }
2268
+ "name": "Workspace"
2412
2269
  },
2413
2270
  {
2414
2271
  "__schema": "TypeRefSchema",
@@ -2417,11 +2274,7 @@
2417
2274
  "line": 67,
2418
2275
  "character": 7
2419
2276
  },
2420
- "name": "ScopeMain",
2421
- "componentId": {
2422
- "scope": "teambit.scope",
2423
- "name": "scope"
2424
- }
2277
+ "name": "ScopeMain"
2425
2278
  },
2426
2279
  {
2427
2280
  "__schema": "TypeRefSchema",
@@ -2430,11 +2283,7 @@
2430
2283
  "line": 68,
2431
2284
  "character": 7
2432
2285
  },
2433
- "name": "PubsubMain",
2434
- "componentId": {
2435
- "scope": "teambit.harmony",
2436
- "name": "pubsub"
2437
- }
2286
+ "name": "PubsubMain"
2438
2287
  },
2439
2288
  {
2440
2289
  "__schema": "TypeRefSchema",
@@ -2443,11 +2292,7 @@
2443
2292
  "line": 69,
2444
2293
  "character": 7
2445
2294
  },
2446
- "name": "LoggerMain",
2447
- "componentId": {
2448
- "scope": "teambit.harmony",
2449
- "name": "logger"
2450
- }
2295
+ "name": "LoggerMain"
2451
2296
  },
2452
2297
  {
2453
2298
  "__schema": "TypeRefSchema",
@@ -2456,11 +2301,7 @@
2456
2301
  "line": 70,
2457
2302
  "character": 7
2458
2303
  },
2459
- "name": "IpcEventsMain",
2460
- "componentId": {
2461
- "scope": "teambit.harmony",
2462
- "name": "ipc-events"
2463
- }
2304
+ "name": "IpcEventsMain"
2464
2305
  },
2465
2306
  {
2466
2307
  "__schema": "TypeRefSchema",
@@ -2469,11 +2310,7 @@
2469
2310
  "line": 71,
2470
2311
  "character": 7
2471
2312
  },
2472
- "name": "GlobalConfigMain",
2473
- "componentId": {
2474
- "scope": "teambit.harmony",
2475
- "name": "global-config"
2476
- }
2313
+ "name": "GlobalConfigMain"
2477
2314
  }
2478
2315
  ]
2479
2316
  },
@@ -2523,8 +2360,7 @@
2523
2360
  "line": 74,
2524
2361
  "character": 24
2525
2362
  },
2526
- "name": "OnPreWatchSlot",
2527
- "internalFilePath": "watcher.main.runtime.ts"
2363
+ "name": "OnPreWatchSlot"
2528
2364
  }
2529
2365
  ]
2530
2366
  },
@@ -2615,7 +2451,7 @@
2615
2451
  "componentId": {
2616
2452
  "scope": "teambit.workspace",
2617
2453
  "name": "watcher",
2618
- "version": "1.0.226"
2454
+ "version": "1.0.228"
2619
2455
  },
2620
2456
  "taggedModuleExports": []
2621
2457
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/watcher",
3
- "version": "1.0.226",
3
+ "version": "1.0.228",
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.226"
9
+ "version": "1.0.228"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -18,21 +18,21 @@
18
18
  "fs-extra": "10.0.0",
19
19
  "@teambit/harmony": "0.4.6",
20
20
  "@teambit/component-id": "1.2.0",
21
- "@teambit/compiler": "1.0.226",
22
- "@teambit/logger": "0.0.952",
23
- "@teambit/workspace": "1.0.226",
24
- "@teambit/cli": "0.0.859",
25
- "@teambit/pubsub": "1.0.226",
26
- "@teambit/global-config": "0.0.862",
27
- "@teambit/ipc-events": "1.0.226",
28
- "@teambit/scope": "1.0.226"
21
+ "@teambit/compiler": "1.0.228",
22
+ "@teambit/logger": "0.0.954",
23
+ "@teambit/workspace": "1.0.228",
24
+ "@teambit/cli": "0.0.861",
25
+ "@teambit/pubsub": "1.0.228",
26
+ "@teambit/global-config": "0.0.864",
27
+ "@teambit/ipc-events": "1.0.228",
28
+ "@teambit/scope": "1.0.228"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/lodash": "4.14.165",
32
32
  "@types/fs-extra": "9.0.7",
33
33
  "@types/mocha": "9.1.0",
34
34
  "chai": "4.3.0",
35
- "@teambit/harmony.envs.core-aspect-env": "0.0.27"
35
+ "@teambit/harmony.envs.core-aspect-env": "0.0.30"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@teambit/legacy": "1.0.624"
package/tsconfig.json CHANGED
@@ -20,7 +20,8 @@
20
20
  "emitDeclarationOnly": true,
21
21
  "strict": true,
22
22
  "strictPropertyInitialization": false,
23
- "noImplicitAny": false
23
+ "noImplicitAny": false,
24
+ "composite": true
24
25
  },
25
26
  "exclude": [
26
27
  "artifacts",
@@ -35,5 +36,31 @@
35
36
  "include": [
36
37
  "**/*",
37
38
  "**/*.json"
39
+ ],
40
+ "references": [
41
+ {
42
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_compiler@1.0.228"
43
+ },
44
+ {
45
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_logger@0.0.954"
46
+ },
47
+ {
48
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.228"
49
+ },
50
+ {
51
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.861"
52
+ },
53
+ {
54
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_pubsub@1.0.228"
55
+ },
56
+ {
57
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_global-config@0.0.864"
58
+ },
59
+ {
60
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_ipc-events@1.0.228"
61
+ },
62
+ {
63
+ "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@1.0.228"
64
+ }
38
65
  ]
39
66
  }
@@ -1,5 +0,0 @@
1
- export declare enum CheckTypes {
2
- None = 0,// keep this. it equals zero. this way we can do "if checkTypes() ... "
3
- EntireProject = 1,
4
- ChangedFile = 2
5
- }
package/dist/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import { WatcherAspect } from './watcher.aspect';
2
- export type { WatchOptions } from './watcher';
3
- export { CheckTypes } from './check-types';
4
- export type { WatcherMain } from './watcher.main.runtime';
5
- export default WatcherAspect;
6
- export { WatcherAspect };
@@ -1,4 +0,0 @@
1
- import { OnComponentEventResult } from '@teambit/workspace';
2
- import { RootDirs } from './watcher';
3
- export declare function formatWatchPathsSortByComponent(trackDirs: RootDirs): string;
4
- export declare function formatCompileResults(compileResults: OnComponentEventResult[]): string;
@@ -1,8 +0,0 @@
1
- import PQueue from 'p-queue';
2
- export declare class WatchQueue {
3
- private queue;
4
- constructor(concurrency?: number);
5
- getQueue(): PQueue<import("p-queue/dist/priority-queue").default, import("p-queue").DefaultAddOptions>;
6
- add<T>(fn: () => T, priority?: number): Promise<T>;
7
- onIdle(): Promise<void>;
8
- }
@@ -1,46 +0,0 @@
1
- import { Command, CommandOptions } from '@teambit/cli';
2
- import type { Logger } from '@teambit/logger';
3
- import type { PubsubMain } from '@teambit/pubsub';
4
- import { WatcherMain } from './watcher.main.runtime';
5
- export type WatchCmdOpts = {
6
- verbose?: boolean;
7
- skipPreCompilation?: boolean;
8
- checkTypes?: string | boolean;
9
- };
10
- export declare class WatchCommand implements Command {
11
- /**
12
- * logger extension.
13
- */
14
- private pubsub;
15
- /**
16
- * logger extension.
17
- */
18
- private logger;
19
- /**
20
- * watcher extension.
21
- */
22
- private watcher;
23
- name: string;
24
- description: string;
25
- extendedDescription: string;
26
- helpUrl: string;
27
- alias: string;
28
- group: string;
29
- options: CommandOptions;
30
- constructor(
31
- /**
32
- * logger extension.
33
- */
34
- pubsub: PubsubMain,
35
- /**
36
- * logger extension.
37
- */
38
- logger: Logger,
39
- /**
40
- * watcher extension.
41
- */
42
- watcher: WatcherMain);
43
- private registerToEvents;
44
- private eventsListener;
45
- report(cliArgs: [], watchCmdOpts: WatchCmdOpts): Promise<string>;
46
- }
@@ -1,2 +0,0 @@
1
- import { Aspect } from '@teambit/harmony';
2
- export declare const WatcherAspect: Aspect;
package/dist/watcher.d.ts DELETED
@@ -1,108 +0,0 @@
1
- /// <reference types="node" />
2
- import { PubsubMain } from '@teambit/pubsub';
3
- import { ComponentID } from '@teambit/component-id';
4
- import { Consumer } from '@teambit/legacy/dist/consumer';
5
- import { ChildProcess } from 'child_process';
6
- import { CompilationInitiator } from '@teambit/compiler';
7
- import { Workspace, OnComponentEventResult } from '@teambit/workspace';
8
- import { CheckTypes } from './check-types';
9
- import { WatcherMain } from './watcher.main.runtime';
10
- export type WatcherProcessData = {
11
- watchProcess: ChildProcess;
12
- compilerId: ComponentID;
13
- componentIds: ComponentID[];
14
- };
15
- export type EventMessages = {
16
- onAll: Function;
17
- onStart: Function;
18
- onReady: Function;
19
- onChange: OnFileEventFunc;
20
- onAdd: OnFileEventFunc;
21
- onUnlink: OnFileEventFunc;
22
- onError: Function;
23
- };
24
- export type OnFileEventFunc = (filePaths: string[], buildResults: OnComponentEventResult[], verbose: boolean, duration: number, failureMsg?: string) => void;
25
- export type WatchOptions = {
26
- msgs?: EventMessages;
27
- initiator?: CompilationInitiator;
28
- verbose?: boolean;
29
- spawnTSServer?: boolean;
30
- checkTypes?: CheckTypes;
31
- preCompile?: boolean;
32
- compile?: boolean;
33
- };
34
- export type RootDirs = {
35
- [dir: PathLinux]: ComponentID;
36
- };
37
- type PathLinux = string;
38
- export declare class Watcher {
39
- private workspace;
40
- private pubsub;
41
- private watcherMain;
42
- private options;
43
- private fsWatcher;
44
- private changedFilesPerComponent;
45
- private watchQueue;
46
- private bitMapChangesInProgress;
47
- private ipcEventsDir;
48
- private rootDirs;
49
- private verbose;
50
- private multipleWatchers;
51
- constructor(workspace: Workspace, pubsub: PubsubMain, watcherMain: WatcherMain, options: WatchOptions);
52
- get consumer(): Consumer;
53
- watch(): Promise<unknown>;
54
- /**
55
- * *** DEBOUNCING ***
56
- * some actions trigger multiple files changes at (almost) the same time. e.g. "git pull".
57
- * this causes some performance and instability issues. a debouncing mechanism was implemented to help with this.
58
- * the way how it works is that the first file of the same component starts the execution with a delay (e.g. 200ms).
59
- * if, in the meanwhile, another file of the same component was changed, it won't start a new execution, instead,
60
- * it'll only add the file to `this.changedFilesPerComponent` prop.
61
- * once the execution starts, it'll delete this component-id from the `this.changedFilesPerComponent` array,
62
- * indicating the next file-change to start a new execution.
63
- *
64
- * implementation wise, `lodash.debounce` doesn't help here, because:
65
- * A) it doesn't return the results, unless "leading" option is true. here, it must be false, otherwise, it'll start
66
- * the execution immediately.
67
- * B) it debounces the method regardless the param passes to it. so it'll disregard the component-id and will delay
68
- * other components undesirably.
69
- *
70
- * *** QUEUE ***
71
- * the debouncing helps to not execute the same component multiple times concurrently. however, multiple components
72
- * and .bitmap changes execution can still be processed concurrently.
73
- * the following example explains why this is an issue.
74
- * compA is changed in the .bitmap file from version 0.0.1 to 0.0.2. its files were changed as well.
75
- * all these changes get pulled at the same time by "git pull", as a result, the execution of compA and the .bitmap
76
- * happen at the same time.
77
- * during the execution of compA, the component id is parsed as compA@0.0.1, later, it asks for the Workspace for this
78
- * id. while the workspace is looking for this id, the .bitmap execution reloaded the consumer and changed all versions.
79
- * after this change, the workspace doesn't have this id anymore, which will trigger an error.
80
- * to ensure this won't happen, we keep a flag to indicate whether the .bitmap execution is running, and if so, all
81
- * other executions are paused until the queue is empty (this is done by awaiting for queue.onIdle).
82
- * once the queue is empty, we know the .bitmap process was done and the workspace has all new ids.
83
- * in the example above, at this stage, the id will be resolved to compA@0.0.2.
84
- * one more thing, the queue is configured to have concurrency of 1. to make sure two components are not processed at
85
- * the same time. (the same way is done when loading all components from the filesystem/scope).
86
- * this way we can also ensure that if compA was started before the .bitmap execution, it will complete before the
87
- * .bitmap execution starts.
88
- */
89
- private handleChange;
90
- private sleep;
91
- private triggerCompChanges;
92
- /**
93
- * if .bitmap changed, it's possible that a new component has been added. trigger onComponentAdd.
94
- */
95
- private handleBitmapChanges;
96
- private executeWatchOperationsOnRemove;
97
- private executeWatchOperationsOnComponent;
98
- private createOnComponentRemovedEvent;
99
- private createOnComponentChangeEvent;
100
- private createOnComponentAddEvent;
101
- private isComponentWatchedExternally;
102
- private getComponentIdByPath;
103
- private getRelativePathLinux;
104
- private findRootDirByFilePathRecursively;
105
- private createWatcher;
106
- private setRootDirs;
107
- }
108
- export {};
@@ -1,39 +0,0 @@
1
- import { CLIMain } from '@teambit/cli';
2
- import { SlotRegistry } from '@teambit/harmony';
3
- import { GlobalConfigMain } from '@teambit/global-config';
4
- import { ScopeMain } from '@teambit/scope';
5
- import { ComponentID } from '@teambit/component-id';
6
- import { IpcEventsMain } from '@teambit/ipc-events';
7
- import { Logger, LoggerMain } from '@teambit/logger';
8
- import { PubsubMain } from '@teambit/pubsub';
9
- import { Workspace } from '@teambit/workspace';
10
- import { WatchOptions } from './watcher';
11
- export type OnPreWatch = (componentIds: ComponentID[], watchOpts: WatchOptions) => Promise<void>;
12
- export type OnPreWatchSlot = SlotRegistry<OnPreWatch>;
13
- export declare class WatcherMain {
14
- private workspace;
15
- private scope;
16
- private pubsub;
17
- private onPreWatchSlot;
18
- readonly ipcEvents: IpcEventsMain;
19
- readonly logger: Logger;
20
- readonly globalConfig: GlobalConfigMain;
21
- constructor(workspace: Workspace, scope: ScopeMain, pubsub: PubsubMain, onPreWatchSlot: OnPreWatchSlot, ipcEvents: IpcEventsMain, logger: Logger, globalConfig: GlobalConfigMain);
22
- watch(opts: WatchOptions): Promise<void>;
23
- watchScopeInternalFiles(): Promise<void>;
24
- triggerOnPreWatch(componentIds: ComponentID[], watchOpts: WatchOptions): Promise<void>;
25
- registerOnPreWatch(onPreWatchFunc: OnPreWatch): this;
26
- static slots: ((registerFn: () => string) => SlotRegistry<OnPreWatch>)[];
27
- static dependencies: import("@teambit/harmony").Aspect[];
28
- static runtime: import("@teambit/harmony").RuntimeDefinition;
29
- static provider([cli, workspace, scope, pubsub, loggerMain, ipcEvents, globalConfig]: [
30
- CLIMain,
31
- Workspace,
32
- ScopeMain,
33
- PubsubMain,
34
- LoggerMain,
35
- IpcEventsMain,
36
- GlobalConfigMain
37
- ], _: any, [onPreWatchSlot]: [OnPreWatchSlot]): Promise<WatcherMain>;
38
- }
39
- export default WatcherMain;