MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / reportVariableIssues

Function reportVariableIssues

packages/cli/src/utils/variables.ts:207–232  ·  view source on GitHub ↗
(
  issues: readonly VariableValidationIssue[],
  options: { strict: boolean; quiet?: boolean },
)

Source from the content-addressed store, hash-verified

205 * warning block (the errorBox in strict mode still prints).
206 */
207export function reportVariableIssues(
208 issues: readonly VariableValidationIssue[],
209 options: { strict: boolean; quiet?: boolean },
210): void {
211 if (issues.length === 0) return;
212 const { strict, quiet } = options;
213 if (!quiet) {
214 console.log("");
215 console.log(
216 c.warn(
217 `Variable ${issues.length === 1 ? "issue" : "issues"} (${issues.length}) — values may not render as expected:`,
218 ),
219 );
220 for (const issue of issues) {
221 console.log(" " + c.dim(formatVariableValidationIssue(issue)));
222 }
223 console.log("");
224 }
225 if (strict) {
226 errorBox(
227 "Variable validation failed",
228 "Aborting render due to variable issues (--strict-variables mode).",
229 );
230 process.exit(1);
231 }
232}

Callers 6

runFunction · 0.85
validateBatchVariablesFunction · 0.85
runRenderBatchFunction · 0.85
runRenderFunction · 0.85

Calls 3

errorBoxFunction · 0.85
warnMethod · 0.80

Tested by

no test coverage detected