(server: RuntimeServer, watchId: string, dir: string, eventType: string, filename?: string)
| 37 | } |
| 38 | |
| 39 | function emitWatchEvent(server: RuntimeServer, watchId: string, dir: string, eventType: string, filename?: string): void { |
| 40 | server.supervisor.touchByOwner("fs-watch", watchId) |
| 41 | server.notify("fs/watch/event", { |
| 42 | watchId, |
| 43 | dir, |
| 44 | eventType, |
| 45 | filename, |
| 46 | at: new Date().toISOString(), |
| 47 | }) |
| 48 | } |
| 49 | |
| 50 | function stopWatch(server: RuntimeServer, fsWatches: Map<string, FsWatchState>, watchId: string): { ok: true; dir: string } | { ok: false; error: string } { |
| 51 | const watch = fsWatches.get(watchId) |
no test coverage detected