/* global console */ import { spawnSync } from "node:child_process"; import process from "node:process"; const root = process.cwd(); const bun = process.platform === "win32" ? "bun.exe" : "bun"; function run(command, args) { console.log(`\n> ${command} ${args.join(" ")}`); const result = spawnSync(command, args, { cwd: root, stdio: "inherit", env: process.env, }); if (result.error) throw result.error; if (result.status !== 0) process.exit(result.status ?? 1); } run(process.execPath, ["scripts/verify-0.4.mjs"]); run(bun, ["run", "check"]); run(bun, ["test", "integration"]); run(bun, ["run", "--cwd", "examples/basic-app", "test"]); run(bun, ["run", "--cwd", "examples/basic-app", "build"]); run(bun, ["run", "--cwd", "examples/component-showcase", "check"]); run(bun, ["run", "--cwd", "examples/captcha-showcase", "check"]); run(bun, ["test", "services/managed-captcha"]); console.log("\n✓ WRNexusJS 0.4.0 complete validation passed.\n");