MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / run

Function run

packages/cli/src/commands/validate.ts:411–430  ·  view source on GitHub ↗
({ args })

Source from the content-addressed store, hash-verified

409 },
410 },
411 async run({ args }) {
412 const project = resolveProject(args.dir);
413 const timeout = parseInt(args.timeout as string, 10) || 3000;
414 const useContrast = args.contrast ?? true;
415 const asJson = Boolean(args.json);
416
417 if (!asJson) {
418 console.log(`${c.accent("◆")} Validating ${c.accent(project.name)} in headless Chrome`);
419 }
420
421 try {
422 const result = await validateInBrowser(project, { timeout, contrast: useContrast });
423 const exitCode = printValidationResult(result, asJson);
424 process.exit(exitCode);
425 } catch (err: unknown) {
426 const message = normalizeErrorMessage(err);
427 emitFailureReport(message, asJson);
428 process.exit(1);
429 }
430 },
431});
432
433function printValidationResult(

Callers

nothing calls this directly

Calls 5

validateInBrowserFunction · 0.85
printValidationResultFunction · 0.85
emitFailureReportFunction · 0.85
resolveProjectFunction · 0.50
normalizeErrorMessageFunction · 0.50

Tested by

no test coverage detected