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

Function validateIdempotencyKey

packages/cli/src/commands/cloud/render.ts:325–331  ·  view source on GitHub ↗
(key: string | undefined)

Source from the content-addressed store, hash-verified

323const IDEMPOTENCY_KEY_RE = /^[A-Za-z0-9_:.-]{1,255}$/;
324
325function validateIdempotencyKey(key: string | undefined): void {
326 if (key === undefined) return;
327 if (!IDEMPOTENCY_KEY_RE.test(key)) {
328 errorBox("Invalid --idempotency-key", `Got "${key}". Must be 1-255 chars from [A-Za-z0-9_:.-]`);
329 process.exit(1);
330 }
331}
332
333// ---------------------------------------------------------------------------
334// Project resolution (dir | asset-id | url) — exactly one source

Callers 1

runFunction · 0.85

Calls 1

errorBoxFunction · 0.85

Tested by

no test coverage detected