Fix Bifrost bridge runtime and fixture env isolation

This commit is contained in:
Meta Vens 2026-06-22 14:03:07 +01:00
commit ba01b78d68
7 changed files with 147 additions and 15 deletions

View file

@ -17,8 +17,7 @@ const defaultPersonaAvatarUrl =
"https://raw.githubusercontent.com/GameCult/Bifrost/main/src/Bifrost.Web/wwwroot/img/bifrost-profile.png";
async function main() {
loadLocalEnv(resolve(bifrostRoot, ".env"));
loadLocalEnv(resolve(defaultProjectsRoot, "VoidBot", ".env"));
loadBifrostLocalEnv();
const [command, ...rawArgs] = process.argv.slice(2);
const options = parseArgs(rawArgs);
@ -43,6 +42,15 @@ async function main() {
}
}
function loadBifrostLocalEnv() {
if (process.env.BIFROST_SKIP_LOCAL_ENV === "true") {
return;
}
loadLocalEnv(resolve(bifrostRoot, ".env"));
loadLocalEnv(resolve(defaultProjectsRoot, "VoidBot", ".env"));
}
async function dispatchQueuedRequests(options) {
const max = parseInteger(options.max ?? "1", "max");
const statusDir = resolveOptionPath(options["status-dir"] ?? defaultStatusDir);