#!/usr/bin/env node import path from 'node:path'; import { verifyRegistry } from '../gate-verify.mjs'; let root; let manifest = 'gates/gates.manifest.json'; let structureOnly = false; for (let index = 0; index < process.argv.slice(2).length; index += 1) { const args = process.argv.slice(2); const value = args[index]; if (value === '--root') root = path.resolve(args[++index]); else if (value === '--manifest') manifest = args[++index]; else if (value === '--structure-only') structureOnly = true; else throw new Error(`unknown fixture-runner option: ${value}`); } if (!root) throw new Error('fixture runner requires --root'); const { failures, observations } = await verifyRegistry({ root, manifest, structureOnly, fixtureProfile: true, }); for (const observation of observations) process.stdout.write(`${observation}\n`); for (const failure of failures) process.stderr.write(`GATE VERIFY FAILED: ${failure}\n`); if (failures.length > 0) process.exitCode = 1;