#!/usr/bin/env node
/**
 * Build every campaign character via the modular creator.
 *
 *   pnpm cast
 *
 * Recipes live in `creator/presets.ts` — swap hair / clothes / accessories
 * there rather than re-running photo analysis.
 */
import { spawnSync } from "node:child_process";
import { fileURLToPath } from "node:url";
import { dirname, join } from "node:path";

const here = dirname(fileURLToPath(import.meta.url));
const result = spawnSync(process.execPath, ["--import", "tsx", join(here, "../creator/build.ts")], {
  stdio: "inherit",
  cwd: join(here, "../../.."),
});
process.exit(result.status ?? 1);
