Files
heygen-com__hyperframes/packages/cli/package.json
Vance Ingalls 43337ae224 fix: add media rendering guardrails to prevent silent failures
Lint rules:
- media_missing_id (error): audio/video with data-start but no id
- media_missing_src (error): media with id but no src
- media_preload_none (warning): preload="none" blocks the renderer
- video_nested_in_timed_element upgraded from warning to error

Compiler:
- Strip preload="none" from media during compilation
- Fire-and-forget keyframe interval + VFR detection via ffprobe
- Warn on sparse keyframes (>2s) and variable frame rate videos

CLI:
- Shared lintProject() lints index.html + compositions/*.html
- Shared formatLintFindings() used by lint, render, and dev commands
- Pre-render lint: warns by default, --strict blocks on errors,
  --strict-all blocks on errors + warnings
- Pre-dev lint: prints issues for agents before starting studio
- Render orchestrator hints --workers 1 on parallel capture timeout

Refactor:
- Extract runFfprobe() + parseProbeJson() (~80 lines deduped)
- Extract shouldBlockRender() for testable strict flag logic
- Extract formatLintFindings() (3 consumers unified)
2026-03-30 10:00:32 -07:00

63 lines
2.1 KiB
JSON

{
"name": "@hyperframes/cli",
"version": "0.1.12",
"description": "HyperFrames CLI — create, preview, and render HTML video compositions",
"repository": {
"type": "git",
"url": "https://github.com/heygen-com/hyperframes",
"directory": "packages/cli"
},
"bin": {
"hyperframes": "./dist/cli.js"
},
"files": [
"dist"
],
"type": "module",
"scripts": {
"test": "vitest run",
"dev": "tsx src/cli.ts",
"build": "bun run build:fonts && bun run build:studio && tsup && bun run build:runtime && bun run build:copy",
"build:fonts": "cd ../producer && tsx scripts/generate-font-data.ts",
"build:studio": "cd ../studio && bun run build",
"build:runtime": "tsx scripts/build-runtime.ts",
"build:copy": "mkdir -p dist/studio dist/docs dist/templates dist/skills && cp -r ../studio/dist/* dist/studio/ && cp -r src/templates/blank src/templates/warm-grain src/templates/play-mode src/templates/swiss-grid src/templates/vignelli src/templates/_shared dist/templates/ && cp -r ../../skills/hyperframes-compose ../../skills/hyperframes-captions dist/skills/ && (cp src/docs/*.md dist/docs/ 2>/dev/null || true)",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@hono/node-server": "^1.8.0",
"@puppeteer/browsers": "^2.13.0",
"adm-zip": "^0.5.16",
"cheerio": "^1.2.0",
"citty": "^0.2.1",
"esbuild": "^0.25.0",
"hono": "^4.0.0",
"mime-types": "^3.0.2",
"open": "^10.0.0",
"puppeteer-core": "^24.39.1"
},
"devDependencies": {
"@clack/prompts": "^1.1.0",
"@hono/node-server": "^1.0.0",
"@hyperframes/core": "workspace:*",
"@hyperframes/engine": "workspace:*",
"@hyperframes/producer": "workspace:*",
"@types/adm-zip": "^0.5.7",
"@types/mime-types": "^3.0.1",
"@types/node": "^22.0.0",
"adm-zip": "^0.5.16",
"cheerio": "^1.2.0",
"hono": "^4.0.0",
"linkedom": "^0.18.12",
"mime-types": "^3.0.2",
"picocolors": "^1.1.1",
"tsup": "^8.0.0",
"tsx": "^4.0.0",
"typescript": "^5.0.0",
"vitest": "^3.2.4"
},
"engines": {
"node": ">=22"
}
}