From 9fc7390c2b27ddb9805ce3d96e822a303e52ec78 Mon Sep 17 00:00:00 2001 From: Via Date: Fri, 17 Jul 2026 02:52:04 +0000 Subject: [PATCH] fix(cli): import EXTRACT_CACHE_DIR_DISABLED_ALIASES in render.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses Miga's SSOT review on #2564. The render command was inlining the disable-alias list (["off","none","false","0"]) instead of importing the exported constant, defeating the drift-safety the constant exists to provide. Also switches the flag description string to interpolate the alias set from the constant for consistency. _— Via_ --- packages/cli/src/commands/render.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/commands/render.ts b/packages/cli/src/commands/render.ts index 41f3f3a08..360c001cf 100644 --- a/packages/cli/src/commands/render.ts +++ b/packages/cli/src/commands/render.ts @@ -92,6 +92,7 @@ import { } from "../utils/render-success-state.js"; import type { ProducerLogger, RenderJob } from "@hyperframes/producer"; import { + EXTRACT_CACHE_DIR_DISABLED_ALIASES, MAX_VP9_CPU_USED, MIN_VP9_CPU_USED, isVideoFrameFormat, @@ -406,7 +407,7 @@ export default defineCommand({ "Directory for the content-addressed extracted-frame cache. " + "Use to relocate the cache off the system drive when the OS temp " + "directory lives on a small partition (e.g. Windows C: exhaustion " + - 'during long renders). Pass "off" / "none" / "false" / "0" to ' + + `during long renders). Pass ${EXTRACT_CACHE_DIR_DISABLED_ALIASES.map((a) => `"${a}"`).join(" / ")} to ` + "disable caching entirely (frames extract into the render's workDir " + "and are cleaned up when the render ends). Default: " + "/hyperframes-extract-cache-. " + @@ -604,7 +605,7 @@ export default defineCommand({ if (typeof args["frames-cache-dir"] === "string" && args["frames-cache-dir"].trim() !== "") { const raw = args["frames-cache-dir"].trim(); const normalized = raw.toLowerCase(); - const isDisableAlias = ["off", "none", "false", "0"].includes(normalized); + const isDisableAlias = EXTRACT_CACHE_DIR_DISABLED_ALIASES.includes(normalized); process.env.HYPERFRAMES_EXTRACT_CACHE_DIR = isDisableAlias ? raw : resolve(raw); }