MCPcopy Create free account
hub / github.com/vercel/vercel / waitForReady

Function waitForReady

packages/cli/test/dev/integration-4.test.ts:488–500  ·  view source on GitHub ↗
(readOutput: () => string)

Source from the content-addressed store, hash-verified

486}
487
488async function waitForReady(readOutput: () => string) {
489 const start = Date.now();
490 while (Date.now() - start < 60_000) {
491 const output = stripAnsi(readOutput());
492 if (output.includes('Ready! Available at')) return;
493 if (output.includes('Command failed') || output.includes('Error:')) {
494 throw new Error(output);
495 }
496 await new Promise(resolve => setTimeout(resolve, 100));
497 }
498
499 throw new Error(`Timed out waiting for vc dev:\n${readOutput()}`);
500}

Callers 1

withLocalDevFunction · 0.85

Calls 1

stripAnsiFunction · 0.50

Tested by

no test coverage detected