MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / flush

Function flush

src/artifacts/live-server.ts:118–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 ──────────────────────────────────────────────────────────

Callers

nothing calls this directly

Calls 5

renderCurrentFunction · 0.85
hashHtmlFunction · 0.85
shouldPushFunction · 0.85
pushReloadFunction · 0.85
warnMethod · 0.80

Tested by

no test coverage detected