fix(diffs): avoid extension build-script boundary import · openclaw/openclaw@1577e8f
steipete
·
2026-05-28
·
via Recent Commits to openclaw:main
File tree
diffs-language-pack/scripts
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | #!/usr/bin/env node |
2 | 2 | |
3 | | -import { buildDiffsViewerRuntime } from "../../../scripts/build-diffs-viewer-runtime.mjs"; |
| 3 | +import { spawnSync } from "node:child_process"; |
| 4 | +import path from "node:path"; |
| 5 | +import { fileURLToPath } from "node:url"; |
4 | 6 | |
5 | | -await buildDiffsViewerRuntime("full"); |
| 7 | +const scriptPath = path.resolve( |
| 8 | +path.dirname(fileURLToPath(import.meta.url)), |
| 9 | +"../../../scripts/build-diffs-viewer-runtime.mjs", |
| 10 | +); |
| 11 | +const result = spawnSync(process.execPath, [scriptPath, "full"], { stdio: "inherit" }); |
| 12 | +if (result.error) { |
| 13 | +throw result.error; |
| 14 | +} |
| 15 | +if (result.signal) { |
| 16 | +console.error(`build-diffs-viewer-runtime exited with signal ${result.signal}`); |
| 17 | +process.exit(1); |
| 18 | +} |
| 19 | +process.exit(result.status ?? 0); |
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | #!/usr/bin/env node |
2 | 2 | |
3 | | -import { buildDiffsViewerRuntime } from "../../../scripts/build-diffs-viewer-runtime.mjs"; |
| 3 | +import { spawnSync } from "node:child_process"; |
| 4 | +import path from "node:path"; |
| 5 | +import { fileURLToPath } from "node:url"; |
4 | 6 | |
5 | | -await buildDiffsViewerRuntime("curated"); |
| 7 | +const scriptPath = path.resolve( |
| 8 | +path.dirname(fileURLToPath(import.meta.url)), |
| 9 | +"../../../scripts/build-diffs-viewer-runtime.mjs", |
| 10 | +); |
| 11 | +const result = spawnSync(process.execPath, [scriptPath, "curated"], { stdio: "inherit" }); |
| 12 | +if (result.error) { |
| 13 | +throw result.error; |
| 14 | +} |
| 15 | +if (result.signal) { |
| 16 | +console.error(`build-diffs-viewer-runtime exited with signal ${result.signal}`); |
| 17 | +process.exit(1); |
| 18 | +} |
| 19 | +process.exit(result.status ?? 0); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。