Files
WRNexusJS/scripts/validate-auth.mjs
2026-07-29 12:51:10 +05:30

25 lines
733 B
JavaScript

/* 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-auth.mjs"]);
run(bun, ["run", "typecheck"]);
run(bun, ["test", "packages/auth"]);
run(bun, ["run", "--cwd", "examples/auth-showcase", "check"]);
console.log("\n✓ @wrnexus/auth validation passed.\n");