Files
AzerothAI/scripts/run-framework.mjs
T
Richard Clark 5f0fc86cf9
Core tests / core (push) Successful in 9m57s
Full verification / application (push) Failing after 5m16s
Full verification / local-brain (push) Failing after 6m15s
Realm simulation / simulated-live-world (push) Failing after 5m32s
WoW integration lab / real-worldserver (push) Canceled after 17m23s
Import verified AzerothAI snapshot from GitHub
Source branch: feature/ai-brain-router
Source commit: c2a09e0460465201a58aaab56c71424e9a96405e
2026-09-22 13:12:54 -04:00

24 lines
993 B
JavaScript

import { spawnSync } from "node:child_process";
import { fileURLToPath } from "node:url";
import { readExecutionProfile } from "./execution-profile.mjs";
const [command, ...args] = process.argv.slice(2);
if (!["dev", "build"].includes(command)) throw new Error("Expected dev or build.");
const managedLinux = readExecutionProfile() === "managed-linux";
if (managedLinux && command === "build") {
const result = spawnSync("bash", [
fileURLToPath(new URL("./build-verified.sh", import.meta.url)), ...args,
], { stdio: "inherit" });
if (result.error) throw result.error;
process.exit(result.status ?? 1);
}
// Import in this process so the preview owner retains its PID and signals.
const cli = new URL(managedLinux
? "../node_modules/vite/bin/vite.js"
: "../node_modules/vinext/dist/cli.js", import.meta.url);
process.argv = [process.execPath, fileURLToPath(cli), command,
...(!managedLinux && command === "dev" ? ["--port", "5173"] : []), ...args];
await import(cli.href);