(key: string | undefined)
| 323 | const IDEMPOTENCY_KEY_RE = /^[A-Za-z0-9_:.-]{1,255}$/; |
| 324 | |
| 325 | function 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 |