mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 12:54:29 +00:00
* fix(cli): lazy-load @puppeteer/browsers to prevent debug package crash
Convert the static `import { ... } from "@puppeteer/browsers"` in
browser/manager.ts to dynamic imports inside the async functions that
use them. This eliminates a module-load-time crash when the transitive
`debug` dependency is missing or corrupted.
Previously, every CLI command (including init, lint, docs, help) would
crash with "Cannot find package debug" if the debug package was absent —
even though only browser-related commands need @puppeteer/browsers.
Also add `debug` as a direct dependency so npm/bun always installs it
explicitly rather than relying on transitive resolution.
PostHog data: ~3,955 total-CLI-crash occurrences since May 29.
* fix(cli): simplify isLinuxArm to sync inline check and surface real load error
isLinuxArm() was async only to call detectBrowserPlatform() from
@puppeteer/browsers, but that function just checks process.platform +
process.arch under the hood. Replace with a direct inline check and make
the function sync — no behavioral change, removes an unnecessary async
boundary and an eager load of the package we're trying to lazy-load.
Also surface the real error from loadPuppeteerBrowsers() catch block instead
of hard-coding 'likely missing transitive dependency "debug"' — the actual
cause could be anything (missing package, corrupt install, wrong Node ABI).
69 lines
1.8 KiB
JSON
69 lines
1.8 KiB
JSON
{
|
|
"name": "@hyperframes/cli",
|
|
"version": "0.6.70",
|
|
"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:copy",
|
|
"build:fonts": "node scripts/build-fonts.mjs",
|
|
"build:runtime": "tsx scripts/build-runtime.ts",
|
|
"build:copy": "node scripts/build-copy.mjs",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"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": "^24.39.1",
|
|
"sharp": "^0.34.5"
|
|
},
|
|
"devDependencies": {
|
|
"@clack/prompts": "^1.1.0",
|
|
"@hyperframes/aws-lambda": "workspace:*",
|
|
"@hyperframes/core": "workspace:*",
|
|
"@hyperframes/engine": "workspace:*",
|
|
"@hyperframes/producer": "workspace:*",
|
|
"@hyperframes/studio": "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"
|
|
}
|
|
}
|