Files
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

52 lines
1.6 KiB
JavaScript

import { spawnSync } from "node:child_process";
import { accessSync, constants } from "node:fs";
import path from "node:path";
import { projectRoot } from "./sites-env.mjs";
import { readExecutionProfile } from "./execution-profile.mjs";
if (!process.env.npm_execpath) {
throw new Error("Run this installer with npm run install:ci.");
}
if (![
"SHARP_IGNORE_GLOBAL_LIBVIPS",
"SHARP_FORCE_GLOBAL_LIBVIPS",
"npm_config_build_from_source",
"NPM_CONFIG_BUILD_FROM_SOURCE",
].some((key) => key in process.env)) {
process.env.SHARP_IGNORE_GLOBAL_LIBVIPS = "1";
}
if (readExecutionProfile() === "managed-linux") {
const result = spawnSync("bash", [path.join(projectRoot, "scripts/install-ci.sh")], {
stdio: "inherit",
});
if (result.error) throw result.error;
process.exit(result.status ?? 1);
}
// Invoke npm's JavaScript entrypoint, avoiding platform-specific shell shims.
const installed = spawnSync(
process.execPath,
[
process.env.npm_execpath, "ci", "--prefix", projectRoot, "--workspaces=false",
"--include=dev", "--include=optional", "--prefer-offline", "--no-audit", "--no-fund",
],
{ stdio: "inherit" },
);
if (installed.error) throw installed.error;
if (installed.status !== 0) process.exit(installed.status ?? 1);
try {
accessSync(
path.join(
projectRoot, "node_modules", ".bin",
process.platform === "win32" ? "vinext.cmd" : "vinext",
),
process.platform === "win32" ? constants.F_OK : constants.X_OK,
);
} catch {
console.error("npm ci exited successfully but the local vinext executable is unavailable.");
process.exitCode = 69;
}