import { spawnSync } from 'node:child_process';

const scripts = [
  'validate-phase9-contract.mjs',
  'validate-runtime-dependencies.mjs',
  'validate-locales.mjs',
  'validate-routes.mjs',
  'validate-tokens.mjs',
  'validate-phase11-foundation.mjs',
  'validate-css-logical.mjs',
  'validate-prohibited-content.mjs',
  'validate-metadata.mjs',
  'validate-phase12-components.mjs',
  'validate-phase13-homepage.mjs',
  'validate-phase14-integrations.mjs',
  'validate-phase14-environment.mjs',
  'validate-phase14-security.mjs',
  'validate-phase14-privacy.mjs',
  'validate-phase15-readiness.mjs',
  'validate-phase16-readiness.mjs',
];
for (const script of scripts) {
  const result = spawnSync(process.execPath, [`scripts/${script}`], { stdio: 'inherit' });
  if (result.status !== 0) process.exit(result.status ?? 1);
}
