mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-25 16:37:32 +00:00
* revert(cli): hold the proxy fix and its Node floor for v0.10.0
This reverts commit 2960319749 (#8311), except a stale fallow-ignore line it had removed.
* chore(ci): allow the revert to delete the three files the proxy fix added
13 lines
604 B
TypeScript
13 lines
604 B
TypeScript
const MINIMUM_NODE_MAJOR = 22;
|
|
|
|
export function runtimeVersionError(version: string): string | null {
|
|
const major = Number.parseInt(version.split(".", 1)[0] ?? "", 10);
|
|
if (Number.isFinite(major) && major >= MINIMUM_NODE_MAJOR) return null;
|
|
return `HyperFrames requires Node.js >= ${MINIMUM_NODE_MAJOR} (current: ${version}). Switch Node versions and retry.`;
|
|
}
|
|
|
|
export function runtimeVersionJson(message: string, argv: readonly string[]): string | null {
|
|
if (!argv.includes("--json")) return null;
|
|
return JSON.stringify({ ok: false, error: { code: "node_version_unsupported", message } });
|
|
}
|