mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 15:20:44 +00:00
fix: Found two actionable issues in the bundled runtime-deps staging c (#74526)
Co-authored-by: openclaw-clawsweeper[bot] <280122609+openclaw-clawsweeper[bot]@users.noreply.github.com>
This commit is contained in:
@@ -190,6 +190,13 @@ export function collectRootDistBundledRuntimeMirrors(params) {
|
||||
export function collectBundledPluginRootRuntimeMirrorErrors(params) {
|
||||
const errors = [];
|
||||
const declaredRootRuntimeDeps = collectRuntimeDependencySpecs(params.rootPackageJson);
|
||||
const declaredMirrorDeps =
|
||||
params.rootPackageJson?.openclaw?.bundle?.mirroredRootRuntimeDependencies ?? [];
|
||||
const declaredMirrorDepNames = new Set(
|
||||
Array.isArray(declaredMirrorDeps)
|
||||
? declaredMirrorDeps.filter((dependencyName) => typeof dependencyName === "string")
|
||||
: [],
|
||||
);
|
||||
|
||||
for (const [dependencyName, record] of params.bundledRuntimeDependencySpecs) {
|
||||
for (const conflict of record.conflicts) {
|
||||
@@ -201,6 +208,14 @@ export function collectBundledPluginRootRuntimeMirrorErrors(params) {
|
||||
|
||||
for (const [dependencyName, record] of params.requiredRootMirrors) {
|
||||
if (declaredRootRuntimeDeps.has(dependencyName)) {
|
||||
if (!declaredMirrorDepNames.has(dependencyName)) {
|
||||
const importerList = Array.from(record.importers)
|
||||
.toSorted((left, right) => left.localeCompare(right))
|
||||
.join(", ");
|
||||
errors.push(
|
||||
`installed package root mirror '${dependencyName}' for dist importers: ${importerList} is missing from package.json openclaw.bundle.mirroredRootRuntimeDependencies. Add it there so packaged runtime installs the mirrored dependency, or keep imports under dist/extensions/${record.pluginIds[0]}/.`,
|
||||
);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
const importerList = Array.from(record.importers)
|
||||
|
||||
Reference in New Issue
Block a user