@worca/ui 0.32.0 → 0.34.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.
- package/app/main.bundle.js +1400 -1357
- package/app/main.bundle.js.map +3 -3
- package/app/styles.css +45 -0
- package/package.json +1 -1
- package/server/app.js +34 -23
- package/server/dispatch-defaults.js +6 -2
- package/server/dispatch-migration.js +39 -1
- package/server/integrations/renderers.js +28 -0
- package/server/project-routes.js +2 -2
- package/server/safe-watch.js +11 -0
- package/server/watcher.js +4 -3
- package/server/workspace-routes.js +170 -2
- package/server/ws-beads-watcher.js +3 -2
- package/server/ws-fleet-manifest-watcher.js +3 -2
- package/server/ws-log-watcher.js +5 -4
- package/server/ws-modular.js +7 -2
- package/server/ws-status-watcher.js +8 -13
- package/server/ws-workspace-manifest-watcher.js +3 -2
|
@@ -3,14 +3,9 @@
|
|
|
3
3
|
* Owns refresh scheduling, lastPipelineStatus tracking, and the status/runsDirWatcher FSWatchers.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
existsSync,
|
|
8
|
-
mkdirSync,
|
|
9
|
-
readdirSync,
|
|
10
|
-
readFileSync,
|
|
11
|
-
watch,
|
|
12
|
-
} from 'node:fs';
|
|
6
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync } from 'node:fs';
|
|
13
7
|
import { join } from 'node:path';
|
|
8
|
+
import { safeWatch } from './safe-watch.js';
|
|
14
9
|
import { readSettings } from './settings-reader.js';
|
|
15
10
|
import { discoverRunsAsync } from './watcher.js';
|
|
16
11
|
|
|
@@ -225,7 +220,7 @@ export function createStatusWatcher({
|
|
|
225
220
|
const wtRunsDir = join(reg.worktree_path, '.worca', 'runs');
|
|
226
221
|
if (!existsSync(wtRunsDir)) continue;
|
|
227
222
|
try {
|
|
228
|
-
const w =
|
|
223
|
+
const w = safeWatch(
|
|
229
224
|
wtRunsDir,
|
|
230
225
|
{ recursive: true },
|
|
231
226
|
(_eventType, filename) => {
|
|
@@ -322,7 +317,7 @@ export function createStatusWatcher({
|
|
|
322
317
|
// rename-over) replace the inode. After one 'rename' event the
|
|
323
318
|
// watcher goes dead because it tracked the old inode. We
|
|
324
319
|
// re-establish the watcher on the new file after a short delay.
|
|
325
|
-
statusWatcher =
|
|
320
|
+
statusWatcher = safeWatch(statusFile, (eventType) => {
|
|
326
321
|
scheduleRefresh();
|
|
327
322
|
if (eventType === 'rename') {
|
|
328
323
|
// File replaced (atomic write) — re-watch the new inode
|
|
@@ -338,7 +333,7 @@ export function createStatusWatcher({
|
|
|
338
333
|
} else if (existsSync(runDir)) {
|
|
339
334
|
// status.json doesn't exist yet — watch the directory for its creation,
|
|
340
335
|
// then switch to watching the file once it appears.
|
|
341
|
-
statusWatcher =
|
|
336
|
+
statusWatcher = safeWatch(
|
|
342
337
|
runDir,
|
|
343
338
|
{ recursive: false },
|
|
344
339
|
(_eventType, filename) => {
|
|
@@ -373,7 +368,7 @@ export function createStatusWatcher({
|
|
|
373
368
|
// Watch worcaDir for legacy status.json changes
|
|
374
369
|
try {
|
|
375
370
|
if (existsSync(worcaDir)) {
|
|
376
|
-
activeRunWatcher =
|
|
371
|
+
activeRunWatcher = safeWatch(
|
|
377
372
|
worcaDir,
|
|
378
373
|
{ recursive: false },
|
|
379
374
|
(_eventType, filename) => {
|
|
@@ -395,7 +390,7 @@ export function createStatusWatcher({
|
|
|
395
390
|
const runsDir = join(worcaDir, 'runs');
|
|
396
391
|
try {
|
|
397
392
|
if (existsSync(runsDir)) {
|
|
398
|
-
runsDirWatcher =
|
|
393
|
+
runsDirWatcher = safeWatch(
|
|
399
394
|
runsDir,
|
|
400
395
|
{ recursive: true },
|
|
401
396
|
(_eventType, filename) => {
|
|
@@ -414,7 +409,7 @@ export function createStatusWatcher({
|
|
|
414
409
|
const pipelinesDirPath = join(worcaDir, 'multi', 'pipelines.d');
|
|
415
410
|
try {
|
|
416
411
|
mkdirSync(pipelinesDirPath, { recursive: true });
|
|
417
|
-
pipelinesDirWatcher =
|
|
412
|
+
pipelinesDirWatcher = safeWatch(
|
|
418
413
|
pipelinesDirPath,
|
|
419
414
|
{ recursive: false },
|
|
420
415
|
(_eventType, filename) => {
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
* Separate from fleet-update per W-040 §13.5 — never multiplexed.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { existsSync, readFileSync
|
|
9
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
10
10
|
import { join } from 'node:path';
|
|
11
11
|
import { workspaceRunsDir as resolveWorkspaceRunsDir } from './paths.js';
|
|
12
|
+
import { safeWatch } from './safe-watch.js';
|
|
12
13
|
|
|
13
14
|
const WS_DEBOUNCE_MS = 200;
|
|
14
15
|
|
|
@@ -102,7 +103,7 @@ export function createWorkspaceManifestWatcher({
|
|
|
102
103
|
|
|
103
104
|
try {
|
|
104
105
|
if (existsSync(workspaceRunsDir)) {
|
|
105
|
-
fsWatcher =
|
|
106
|
+
fsWatcher = safeWatch(
|
|
106
107
|
workspaceRunsDir,
|
|
107
108
|
{ persistent: false },
|
|
108
109
|
(_event, filename) => {
|