mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:20:43 +00:00
fix(plugins): type channel clawhub install metadata
This commit is contained in:
@@ -234,9 +234,7 @@ function resolveInstallInfo(params: {
|
||||
: localPath
|
||||
? "local"
|
||||
: "npm";
|
||||
return {
|
||||
...(clawhubSpec ? { clawhubSpec } : {}),
|
||||
...(npmSpec ? { npmSpec } : {}),
|
||||
const install = {
|
||||
...(localPath ? { localPath } : {}),
|
||||
defaultChoice,
|
||||
...(params.install?.minHostVersion ? { minHostVersion: params.install.minHostVersion } : {}),
|
||||
@@ -247,6 +245,20 @@ function resolveInstallInfo(params: {
|
||||
? { allowInvalidConfigRecovery: true }
|
||||
: {}),
|
||||
};
|
||||
if (clawhubSpec) {
|
||||
return {
|
||||
clawhubSpec,
|
||||
...(npmSpec ? { npmSpec } : {}),
|
||||
...install,
|
||||
};
|
||||
}
|
||||
if (!npmSpec) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
npmSpec,
|
||||
...install,
|
||||
};
|
||||
}
|
||||
|
||||
function buildCatalogEntryFromManifest(params: {
|
||||
|
||||
@@ -68,10 +68,14 @@ function collectDownloadableInstallCandidates(params: {
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
const npmSpec = entry.install.npmSpec?.trim();
|
||||
if (!npmSpec) {
|
||||
continue;
|
||||
}
|
||||
candidates.set(pluginId, {
|
||||
pluginId,
|
||||
label: entry.meta.label,
|
||||
npmSpec: entry.install.npmSpec,
|
||||
npmSpec,
|
||||
...(entry.install.expectedIntegrity
|
||||
? { expectedIntegrity: entry.install.expectedIntegrity }
|
||||
: {}),
|
||||
|
||||
Reference in New Issue
Block a user