#!/usr/bin/env node /** * Run gates 0–12 in dependency order. Stops on first failure. */ import { spawnSync } from 'node:child_process'; import { resolve, dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; const root = resolve(dirname(fileURLToPath(import.meta.url)), '..'); const gates = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; for (const g of gates) { console.log(`\n========== GATE ${g} ==========`); const result = spawnSync('npm', ['run', `gate:${g}`], { cwd: root, stdio: 'inherit', shell: true, }); if (result.status !== 0) { console.error(`\ngate:all stopped at GATE ${g}`); process.exit(result.status ?? 1); } } console.log('\ngate:all PASSED (0–12)'); process.exit(0);