refactor: rename to openclaw
This commit is contained in:
@@ -7,7 +7,7 @@ import process from "node:process";
|
||||
const args = process.argv.slice(2);
|
||||
const env = { ...process.env };
|
||||
const cwd = process.cwd();
|
||||
const compiler = env.CLAWDBOT_TS_COMPILER === "tsc" ? "tsc" : "tsgo";
|
||||
const compiler = env.OPENCLAW_TS_COMPILER === "tsc" ? "tsc" : "tsgo";
|
||||
const projectArgs = ["--project", "tsconfig.json"];
|
||||
|
||||
const distRoot = path.join(cwd, "dist");
|
||||
@@ -65,7 +65,7 @@ const findLatestMtime = (dirPath, shouldSkip) => {
|
||||
};
|
||||
|
||||
const shouldBuild = () => {
|
||||
if (env.CLAWDBOT_FORCE_BUILD === "1") return true;
|
||||
if (env.OPENCLAW_FORCE_BUILD === "1") return true;
|
||||
const stampMtime = statMtime(buildStampPath);
|
||||
if (stampMtime == null) return true;
|
||||
if (statMtime(distEntry) == null) return true;
|
||||
@@ -81,12 +81,12 @@ const shouldBuild = () => {
|
||||
};
|
||||
|
||||
const logRunner = (message) => {
|
||||
if (env.CLAWDBOT_RUNNER_LOG === "0") return;
|
||||
process.stderr.write(`[moltbot] ${message}\n`);
|
||||
if (env.OPENCLAW_RUNNER_LOG === "0") return;
|
||||
process.stderr.write(`[openclaw] ${message}\n`);
|
||||
};
|
||||
|
||||
const runNode = () => {
|
||||
const nodeProcess = spawn(process.execPath, ["moltbot.mjs", ...args], {
|
||||
const nodeProcess = spawn(process.execPath, ["openclaw.mjs", ...args], {
|
||||
cwd,
|
||||
env,
|
||||
stdio: "inherit",
|
||||
|
||||
Reference in New Issue
Block a user