mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
canvas.drawElementImage is an unlaunched Dev/Canary-only Blink feature
(~151+). The CLI's pinned CHROME_VERSION fallback was still 131.0.6778.85 —
a puppeteer 24→25.2.1 bump that pinned it to Chrome Dev 151.0.7912.0 was
written on 2026-06-29 but never merged (orphaned local commit, no PR). Any
render on that pin, or on the shared puppeteer-cache binary, or on system
Chrome (Stable, no drawElementImage at all) got a canvas.getContext("2d")
missing the method and crashed mid-capture with "ctx.drawElementImage is
not a function" instead of falling back (HF#2060).
Three changes:
- Bump puppeteer/puppeteer-core to ^25.2.1 across every package that
depends on it, and CHROME_VERSION to 152.0.7928.2 (today's Dev channel;
confirmed via direct probe to implement drawElementImage, unlike 131).
- `ensureBrowser({ preferManagedChrome: true })`, always used by `render`:
resolve straight to our pinned/cached build, skipping both the shared
puppeteer-cache preference and system Chrome. Rendering shouldn't depend
on whatever arbitrary Chrome a machine happens to have — that's exactly
how this regressed (any Mac with Chrome.app installed bypassed the CLI's
pin entirely).
- A runtime capability probe in the engine, right before any other
drawElement work: if `drawElementImage` isn't a function on the injected
canvas, route to the existing screenshot-fallback gate instead of
crashing. This is the real backstop — it protects every resolution path
(env override, stale cache entry, a future Chrome regression), not just
the ones `preferManagedChrome` reaches.
Verified end-to-end: rendering against chrome-headless-shell 131 (confirmed
to lack drawElementImage) now falls back cleanly and produces a valid MP4
instead of crashing; rendering against a capable build still engages
drawElement normally. 922 engine tests + 1373 CLI tests pass.
Fixes #2060.
75 lines
2.2 KiB
JSON
75 lines
2.2 KiB
JSON
{
|
|
"name": "@hyperframes/cli",
|
|
"version": "0.7.42",
|
|
"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 && tsup && bun run build:runtime && bun run build:beat-analyzer && bun run build:copy",
|
|
"build:fonts": "node scripts/build-fonts.mjs",
|
|
"build:runtime": "tsx scripts/build-runtime.ts",
|
|
"build:beat-analyzer": "node scripts/build-beat-analyzer.mjs",
|
|
"build:copy": "node scripts/build-copy.mjs",
|
|
"typecheck": "tsc --noEmit",
|
|
"gen:skills-manifest": "tsx scripts/gen-skills-manifest.ts",
|
|
"gen:agent-dirs": "tsx scripts/sync-agent-dirs.ts"
|
|
},
|
|
"dependencies": {
|
|
"@hono/node-server": "^1.8.0",
|
|
"@puppeteer/browsers": "^2.13.0",
|
|
"adm-zip": "^0.5.16",
|
|
"citty": "^0.2.1",
|
|
"compare-versions": "^6.1.1",
|
|
"debug": "^4.4.0",
|
|
"esbuild": "^0.25.12",
|
|
"fontkit": "^2.0.4",
|
|
"giget": "^3.2.0",
|
|
"hono": "^4.0.0",
|
|
"onnxruntime-node": "^1.20.0",
|
|
"open": "^10.0.0",
|
|
"postcss": "^8.5.8",
|
|
"prettier": "^3.8.1",
|
|
"puppeteer-core": "^25.2.1",
|
|
"sharp": "^0.34.5"
|
|
},
|
|
"devDependencies": {
|
|
"@clack/prompts": "^1.1.0",
|
|
"@hyperframes/aws-lambda": "workspace:*",
|
|
"@hyperframes/core": "workspace:*",
|
|
"@hyperframes/engine": "workspace:*",
|
|
"@hyperframes/gcp-cloud-run": "workspace:*",
|
|
"@hyperframes/lint": "workspace:*",
|
|
"@hyperframes/producer": "workspace:*",
|
|
"@hyperframes/studio": "workspace:*",
|
|
"@hyperframes/studio-server": "workspace:*",
|
|
"@types/adm-zip": "^0.5.7",
|
|
"@types/fontkit": "^2.0.9",
|
|
"@types/mime-types": "^3.0.1",
|
|
"@types/node": "^25.0.10",
|
|
"linkedom": "^0.18.12",
|
|
"picocolors": "^1.1.1",
|
|
"tsup": "^8.0.0",
|
|
"tsx": "^4.0.0",
|
|
"typescript": "^5.0.0",
|
|
"vitest": "^3.2.4"
|
|
},
|
|
"optionalDependencies": {
|
|
"@google/genai": "^1.50.1"
|
|
},
|
|
"engines": {
|
|
"node": ">=22"
|
|
}
|
|
}
|