fix(tooling): skip gauntlet declaration prebuild · openclaw/openclaw@a695c28
vincentkoc
·
2026-05-26
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -737,6 +737,7 @@ async function main() {
|
737 | 737 | const commandEnv = buildGauntletPrebuildEnv(env, { |
738 | 738 | includePrivateQa: !options.skipQa, |
739 | 739 | buildIds: selectedPlugins.map((plugin) => plugin.buildId), |
| 740 | +skipDeclarationBuild: true, |
740 | 741 | }); |
741 | 742 | if (!options.skipPrebuild && (selectedPlugins.length > 0 || !options.skipQa)) { |
742 | 743 | process.stderr.write("[plugin-gauntlet] prebuild\n"); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -350,23 +350,33 @@ function collectQaBaselineRegressionObservations(rows, thresholds = {}) {
|
350 | 350 | |
351 | 351 | function buildGauntletPrebuildEnv(env, options = {}) { |
352 | 352 | const buildIds = new Set(normalizeStringArray(options.buildIds)); |
| 353 | +const runtimeOnlyPrebuildEnv = options.skipDeclarationBuild |
| 354 | + ? { OPENCLAW_RUN_NODE_SKIP_DTS_BUILD: "1" } |
| 355 | + : {}; |
| 356 | +const hasRuntimeOnlyPrebuildEnv = Object.keys(runtimeOnlyPrebuildEnv).length > 0; |
353 | 357 | if (options.includePrivateQa) { |
354 | 358 | for (const pluginId of NON_PACKAGED_BUNDLED_PLUGIN_DIRS) { |
355 | 359 | buildIds.add(pluginId); |
356 | 360 | } |
357 | 361 | } |
358 | 362 | if (!options.includePrivateQa) { |
359 | | -return buildIds.size === 0 |
| 363 | +return buildIds.size === 0 && !hasRuntimeOnlyPrebuildEnv |
360 | 364 | ? env |
361 | 365 | : { |
362 | 366 | ...env, |
363 | | -OPENCLAW_BUNDLED_PLUGIN_BUILD_IDS: [...buildIds] |
364 | | -.toSorted((left, right) => left.localeCompare(right)) |
365 | | -.join(","), |
| 367 | + ...runtimeOnlyPrebuildEnv, |
| 368 | + ...(buildIds.size > 0 |
| 369 | + ? { |
| 370 | +OPENCLAW_BUNDLED_PLUGIN_BUILD_IDS: [...buildIds] |
| 371 | +.toSorted((left, right) => left.localeCompare(right)) |
| 372 | +.join(","), |
| 373 | +} |
| 374 | + : {}), |
366 | 375 | }; |
367 | 376 | } |
368 | 377 | return { |
369 | 378 | ...env, |
| 379 | + ...runtimeOnlyPrebuildEnv, |
370 | 380 | OPENCLAW_BUILD_PRIVATE_QA: "1", |
371 | 381 | OPENCLAW_ENABLE_PRIVATE_QA_CLI: "1", |
372 | 382 | ...(buildIds.size > 0 |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -288,6 +288,22 @@ describe("plugin gateway gauntlet helpers", () => {
|
288 | 288 | expect(buildGauntletPrebuildEnv(env, { includePrivateQa: false })).toBe(env); |
289 | 289 | }); |
290 | 290 | |
| 291 | +it("marks gauntlet prebuilds as runtime-only when requested", () => { |
| 292 | +expect( |
| 293 | +buildGauntletPrebuildEnv( |
| 294 | +{ EXISTING: "1" }, |
| 295 | +{ |
| 296 | +buildIds: ["acpx"], |
| 297 | +skipDeclarationBuild: true, |
| 298 | +}, |
| 299 | +), |
| 300 | +).toEqual({ |
| 301 | +EXISTING: "1", |
| 302 | +OPENCLAW_BUNDLED_PLUGIN_BUILD_IDS: "acpx", |
| 303 | +OPENCLAW_RUN_NODE_SKIP_DTS_BUILD: "1", |
| 304 | +}); |
| 305 | +}); |
| 306 | + |
291 | 307 | it("prebuilds only selected plugin dist entries for bounded gauntlet runs", () => { |
292 | 308 | expect( |
293 | 309 | buildGauntletPrebuildEnv( |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。