






















@@ -464,6 +464,50 @@ describe("run-node script", () => {
464464});
465465});
466466467+it("skips DTS generation only for launcher-triggered local builds", async () => {
468+await withTempDir({ prefix: "openclaw-run-node-" }, async (tmp) => {
469+await writeRuntimePostBuildScaffold(tmp);
470+const spawnCalls: Array<{
471+args: string[];
472+env: Record<string, string | undefined>;
473+}> = [];
474+const spawn = (_cmd: string, args: string[], options?: unknown) => {
475+const opts = options as { env?: NodeJS.ProcessEnv } | undefined;
476+spawnCalls.push({
477+ args,
478+env: { ...opts?.env },
479+});
480+return createExitedProcess(0);
481+};
482+483+const exitCode = await runNodeMain({
484+cwd: tmp,
485+args: ["status"],
486+env: {
487+ ...process.env,
488+OPENCLAW_FORCE_BUILD: "1",
489+OPENCLAW_RUNNER_LOG: "0",
490+},
491+ spawn,
492+execPath: process.execPath,
493+platform: process.platform,
494+});
495+496+expect(exitCode).toBe(0);
497+expect(spawnCalls).toHaveLength(3);
498+expect(spawnCalls[0]?.args).toEqual([
499+"scripts/bundled-plugin-assets.mjs",
500+"--phase",
501+"build",
502+]);
503+expect(spawnCalls[1]?.args).toEqual(["scripts/tsdown-build.mjs", "--no-clean"]);
504+expect(spawnCalls[2]?.args).toEqual(["openclaw.mjs", "status"]);
505+expect(spawnCalls[0]?.env.OPENCLAW_RUN_NODE_SKIP_DTS_BUILD).toBeUndefined();
506+expect(spawnCalls[1]?.env.OPENCLAW_RUN_NODE_SKIP_DTS_BUILD).toBe("1");
507+expect(spawnCalls[2]?.env.OPENCLAW_RUN_NODE_SKIP_DTS_BUILD).toBeUndefined();
508+});
509+});
510+467511it("tees launcher output into the requested generic output log", async () => {
468512await withTempDir({ prefix: "openclaw-run-node-" }, async (tmp) => {
469513await setupTrackedProject(tmp);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。