joyskills-cli 0.2.8 → 0.2.9
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/package.json +1 -1
- package/src/commands/install.js +18 -21
package/package.json
CHANGED
package/src/commands/install.js
CHANGED
|
@@ -206,29 +206,26 @@ async function tryInstallFromRegistryDir(skillName, registryDirPath, targetDir,
|
|
|
206
206
|
return false;
|
|
207
207
|
}
|
|
208
208
|
} else {
|
|
209
|
-
// No registry.yaml: scan skill directories
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
const version = versionMatch?.[1]?.trim() || '1.0.0';
|
|
209
|
+
// No registry.yaml: scan skill directories recursively
|
|
210
|
+
const skills = await findSkills(registryDirPath);
|
|
211
|
+
const skill = skills.find(s => s.name === skillName);
|
|
212
|
+
|
|
213
|
+
if (!skill) return false;
|
|
214
|
+
|
|
215
|
+
const targetPath = path.join(targetDir, skillName);
|
|
216
|
+
copyRecursive(skill.path, targetPath);
|
|
218
217
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
218
|
+
const lockfileManager = new LockfileManager(projectRoot);
|
|
219
|
+
await lockfileManager.load();
|
|
220
|
+
lockfileManager.updateSkill(skillName, {
|
|
221
|
+
version: skill.version || '1.0.0',
|
|
222
|
+
source: sourceLabel,
|
|
223
|
+
installedAt: new Date().toISOString()
|
|
224
|
+
});
|
|
225
|
+
await lockfileManager.save();
|
|
227
226
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
return false;
|
|
227
|
+
console.log(chalk.green(`✅ Installed ${skillName} v${skill.version || '1.0.0'} from ${sourceLabel}`));
|
|
228
|
+
return true;
|
|
232
229
|
}
|
|
233
230
|
}
|
|
234
231
|
|