@worca/ui 0.22.0 → 0.23.0

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.
@@ -7,6 +7,7 @@
7
7
  */
8
8
 
9
9
  import { existsSync, watch } from 'node:fs';
10
+ import { homedir } from 'node:os';
10
11
  import { join } from 'node:path';
11
12
  import { WebSocketServer } from 'ws';
12
13
  import { readProjects, synthesizeDefaultProject } from './project-registry.js';
@@ -14,6 +15,7 @@ import { TIER_FULL, TIER_POLLING, WatcherSet } from './watcher-set.js';
14
15
  import { readProjectWorcaVersion } from './worca-setup.js';
15
16
  import { createBroadcaster } from './ws-broadcaster.js';
16
17
  import { createClientManager } from './ws-client-manager.js';
18
+ import { createFleetManifestWatcher } from './ws-fleet-manifest-watcher.js';
17
19
  import { createMessageRouter } from './ws-message-router.js';
18
20
  import { resolveLatestRunDir } from './ws-status-watcher.js';
19
21
 
@@ -45,7 +47,13 @@ export function attachWsServer(httpServer, config) {
45
47
  getSubs: clientManager.getSubs,
46
48
  });
47
49
 
48
- // 3. Create WatcherSet(s)one per project
50
+ // 3a. Fleet manifest watcher global, not per-project (§13.5)
51
+ const fleetManifestWatcher = createFleetManifestWatcher({
52
+ broadcaster,
53
+ fleetRunsDir: join(homedir(), '.worca', 'fleet-runs'),
54
+ });
55
+
56
+ // 3b. Create WatcherSet(s) — one per project
49
57
  /** @type {Map<string, WatcherSet>} */
50
58
  const watcherSets = new Map();
51
59
 
@@ -269,6 +277,7 @@ export function attachWsServer(httpServer, config) {
269
277
 
270
278
  wss.on('close', () => {
271
279
  clientManager.destroy();
280
+ fleetManifestWatcher.destroy();
272
281
  if (dirWatcher) {
273
282
  try {
274
283
  dirWatcher.close();