()
| 477 | resolve(result) |
| 478 | } |
| 479 | const schedule = () => { |
| 480 | const hit = published.get(request.path) |
| 481 | if (!hit) return |
| 482 | if (typeof hit.version === "number" && hit.version !== request.version) return |
| 483 | if (hit.at < request.after && hit.version !== request.version) return |
| 484 | if (debounceTimer) clearTimeout(debounceTimer) |
| 485 | debounceTimer = setTimeout(() => finish(true), Math.max(0, DIAGNOSTICS_DEBOUNCE_MS - (Date.now() - hit.at))) |
| 486 | } |
| 487 | |
| 488 | timeoutTimer = setTimeout(() => finish(false), request.timeout) |
| 489 | const listener = (event: { path: string; serverID: string }) => { |
no test coverage detected