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

Function onionShotGuardError

packages/cli/src/commands/keyframes.ts:671–682  ·  view source on GitHub ↗
(
  projectDir: string | undefined,
  requests: Array<{ selector: string }>,
  ghost: boolean,
)

Source from the content-addressed store, hash-verified

669// Guard checks that must pass before capturing the onion-skin shot. Returns the
670// message to print when a guard fails, or null when clear to proceed.
671function onionShotGuardError(
672 projectDir: string | undefined,
673 requests: Array<{ selector: string }>,
674 ghost: boolean,
675): string | null {
676 if (!projectDir) return "--shot needs a project directory (not a single .html file).";
677 // The rendered onion (--ghost) screenshots the whole painted stage, so it does
678 // not need an animated DOM element to sample — only the marker onion does.
679 if (requests.length === 0 && !ghost)
680 return "--shot: no animated element to sample for the selection.";
681 return null;
682}
683
684function onionShotOptions(args: ShotArgs & { selector?: string }) {
685 return {

Callers 1

runOnionShotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected