()
| 116 | }; |
| 117 | |
| 118 | const flush = () => { |
| 119 | void renderCurrent(cwd, id, channelPath).then(html => { |
| 120 | const h = hashHtml(html); |
| 121 | if (!shouldPush(lastHash, h)) return; // dedupe rename double-fire / no-op rewrites |
| 122 | lastHash = h; |
| 123 | pushReload(h); |
| 124 | }).catch(err => logger.warn('Live artifact flush failed', { id, err: err?.message ?? String(err) })); |
| 125 | }; |
| 126 | const debouncedFlush = makeDebouncer(flush, debounceMs); |
| 127 | |
| 128 | // ── HTTP server ────────────────────────────────────────────────────────── |
nothing calls this directly
no test coverage detected