()
| 525 | } |
| 526 | |
| 527 | async function stop(): Promise<void> { |
| 528 | if (!running) { |
| 529 | cleanupSessionRoot(); |
| 530 | return; |
| 531 | } |
| 532 | running = false; |
| 533 | clearDebounce(); |
| 534 | clearRefresh(); |
| 535 | closeAllWatchers(); |
| 536 | try { |
| 537 | await reloadChain; |
| 538 | } catch { |
| 539 | // ignore pending reload failures during shutdown |
| 540 | } |
| 541 | cleanupSessionRoot(); |
| 542 | log({ level: "info", message: "HSR watcher stopped" }); |
| 543 | } |
| 544 | |
| 545 | return Object.freeze({ |
| 546 | start, |
nothing calls this directly
no test coverage detected