← Files Electrical Progress TrackerARCHIVED FILE
skills/create-tracker/assets/source/scripts/execution-profile.mjs
624 Bytes · Oct 3, 2026 · 06:35 UTC
import { readFileSync } from "node:fs";
export function readExecutionProfile() {
let settings;
try {
settings = JSON.parse(readFileSync(new URL("../.sites-runtime/execution-profile.json", import.meta.url), "utf8"));
} catch (error) {
// Clean clones and remote builds have no checkout-local selection.
if (error.code === "ENOENT") return "portable";
throw error;
}
if (!["managed-linux", "portable"].includes(settings?.executionProfile)) {
throw new Error("Invalid local execution profile; rerun the Sites plugin's configure-execution-profile.mjs.");
}
return settings.executionProfile;
}
SHA-256: 2e71116f4d2b70cff8bb70436f8dd5c709ec7ff62893424530f404e0193d3630