@cannbot-ai/install-helper 0.0.2-beta.39 → 0.0.2-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1977,18 +1977,20 @@ async function installViaManifest(manifest, pluginDir, repoPath, tool, level, in
|
|
|
1977
1977
|
logger.warn(` Skill source not found: ${source.dir}`);
|
|
1978
1978
|
continue;
|
|
1979
1979
|
}
|
|
1980
|
-
for (const
|
|
1980
|
+
for (const skillEntry of source.skills) {
|
|
1981
|
+
const skillName = typeof skillEntry === "string" ? skillEntry : skillEntry.name;
|
|
1982
|
+
const skillAlias = typeof skillEntry === "string" ? skillName : skillEntry.as || skillName;
|
|
1981
1983
|
const skillPath = join11(sourceDir, skillName);
|
|
1982
1984
|
if (!existsSync11(skillPath)) {
|
|
1983
1985
|
logger.warn(` Skill not found: ${skillName} in ${source.dir}`);
|
|
1984
1986
|
continue;
|
|
1985
1987
|
}
|
|
1986
|
-
const targetPath = join11(skillsDir,
|
|
1988
|
+
const targetPath = join11(skillsDir, skillAlias);
|
|
1987
1989
|
const result = installLink(skillPath, targetPath);
|
|
1988
1990
|
if (result !== "failed") {
|
|
1989
|
-
installedSkills.push(
|
|
1991
|
+
installedSkills.push(skillAlias);
|
|
1990
1992
|
} else {
|
|
1991
|
-
logger.warn(` Failed to install skill: ${
|
|
1993
|
+
logger.warn(` Failed to install skill: ${skillAlias}`);
|
|
1992
1994
|
}
|
|
1993
1995
|
}
|
|
1994
1996
|
}
|