test: skip disabled bundled facade resolution · openclaw/openclaw@d1e40ca
shakkernerd
·
2026-05-10
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -53,8 +53,11 @@ export function resolveBundledFacadeModuleLocation(params: {
|
53 | 53 | env?: NodeJS.ProcessEnv; |
54 | 54 | bundledPluginsDir?: string | null; |
55 | 55 | }): FacadeModuleLocationLike | null { |
56 | | -const preferSource = !params.currentModulePath.includes(`${path.sep}dist${path.sep}`); |
57 | 56 | const env = params.env ?? process.env; |
| 57 | +if (areBundledPluginsDisabled(env)) { |
| 58 | +return null; |
| 59 | +} |
| 60 | +const preferSource = !params.currentModulePath.includes(`${path.sep}dist${path.sep}`); |
58 | 61 | const packageSourceRoot = path.resolve(params.packageRoot, "extensions"); |
59 | 62 | const publicSurfaceParams = { |
60 | 63 | rootDir: params.packageRoot, |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { createRequire } from "node:module"; |
2 | 2 | import path from "node:path"; |
3 | 3 | import { fileURLToPath } from "node:url"; |
4 | | -import { resolveBundledPluginsDir } from "../plugins/bundled-dir.js"; |
| 4 | +import { areBundledPluginsDisabled, resolveBundledPluginsDir } from "../plugins/bundled-dir.js"; |
5 | 5 | import { |
6 | 6 | getCachedPluginSourceModuleLoader, |
7 | 7 | type PluginModuleLoaderCache, |
@@ -74,7 +74,11 @@ function resolveFacadeModuleLocationUncached(params: {
|
74 | 74 | artifactBasename: string; |
75 | 75 | env?: NodeJS.ProcessEnv; |
76 | 76 | }): { modulePath: string; boundaryRoot: string } | null { |
77 | | -const bundledPluginsDir = resolveBundledPluginsDir(params.env ?? process.env); |
| 77 | +const env = params.env ?? process.env; |
| 78 | +if (areBundledPluginsDisabled(env)) { |
| 79 | +return null; |
| 80 | +} |
| 81 | +const bundledPluginsDir = resolveBundledPluginsDir(env); |
78 | 82 | const bundledLocation = resolveBundledFacadeModuleLocation({ |
79 | 83 | ...params, |
80 | 84 | currentModulePath: CURRENT_MODULE_PATH, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。