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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joyskills-cli",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "Team-level skill governance compatible with open skill / Claude Skills",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -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 directly
210
- const skillPath = path.join(registryDirPath, skillName);
211
- if (fs.existsSync(path.join(skillPath, 'SKILL.md'))) {
212
- const targetPath = path.join(targetDir, skillName);
213
- copyRecursive(skillPath, targetPath);
214
-
215
- const content = fs.readFileSync(path.join(skillPath, 'SKILL.md'), 'utf-8');
216
- const versionMatch = content.match(/version:\s*(.+)/);
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
- const lockfileManager = new LockfileManager(projectRoot);
220
- await lockfileManager.load();
221
- lockfileManager.updateSkill(skillName, {
222
- version,
223
- source: sourceLabel,
224
- installedAt: new Date().toISOString()
225
- });
226
- await lockfileManager.save();
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
- console.log(chalk.green(`✅ Installed ${skillName} v${version} from ${sourceLabel}`));
229
- return true;
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