fix(plugins): repair missing clawhub installs

This commit is contained in:
Vincent Koc
2026-05-02 07:59:29 -07:00
parent 2244ba87b3
commit c7b5302acf
13 changed files with 376 additions and 165 deletions

View File

@@ -293,15 +293,17 @@ function resolveInstallRoute(packageJson, status) {
}
const install = packageJson.openclaw?.install;
const release = packageJson.openclaw?.release;
const clawhubSpec =
typeof install?.clawhubSpec === "string" ? `: \`${install.clawhubSpec}\`` : "";
const npmSpec =
typeof install?.npmSpec === "string" && install.npmSpec !== packageJson.name
? `: \`${install.npmSpec}\``
: "";
if (release?.publishToClawHub === true && release?.publishToNpm === true) {
return `ClawHub + npm${npmSpec}`;
return clawhubSpec ? `ClawHub${clawhubSpec}; npm${npmSpec}` : `ClawHub + npm${npmSpec}`;
}
if (release?.publishToClawHub === true) {
return `ClawHub${npmSpec}`;
return `ClawHub${clawhubSpec || npmSpec}`;
}
if (release?.publishToNpm === true || typeof install?.npmSpec === "string") {
return `npm${npmSpec}`;
@@ -311,7 +313,9 @@ function resolveInstallRoute(packageJson, status) {
function resolveStatus({ dirName, packageJson, excludedDirs }) {
const release = packageJson.openclaw?.release;
const hasInstallSpec = typeof packageJson.openclaw?.install?.npmSpec === "string";
const hasInstallSpec =
typeof packageJson.openclaw?.install?.clawhubSpec === "string" ||
typeof packageJson.openclaw?.install?.npmSpec === "string";
const excluded =
excludedDirs.has(dirName) || packageJson.openclaw?.bundle?.includeInCore === false;
if (!excluded) {