joyskills-cli 0.2.9 → 0.2.10

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.9",
3
+ "version": "0.2.10",
4
4
  "description": "Team-level skill governance compatible with open skill / Claude Skills",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -377,6 +377,14 @@ async function installFromGitUrl(gitUrl, targetDir, options) {
377
377
  console.log(chalk.green(' ✓ Repository cloned'));
378
378
  } else {
379
379
  console.log(chalk.gray(' Using cached repository'));
380
+ // Try to update cache
381
+ try {
382
+ const git = simpleGit(cachePath);
383
+ await git.pull('origin', 'main', ['--depth', '1']);
384
+ console.log(chalk.gray(' ✓ Cache updated'));
385
+ } catch (e) {
386
+ // Ignore update errors, use cached version
387
+ }
380
388
  }
381
389
 
382
390
  const skills = await findSkills(cachePath);
@@ -439,6 +447,14 @@ async function installFromGitHub(owner, repo, skillPath, targetDir, options) {
439
447
  console.log(chalk.green(' ✓ Repository cloned'));
440
448
  } else {
441
449
  console.log(chalk.gray(' Using cached repository'));
450
+ // Try to update cache
451
+ try {
452
+ const git = simpleGit(cachePath);
453
+ await git.pull('origin', 'main', ['--depth', '1']);
454
+ console.log(chalk.gray(' ✓ Cache updated'));
455
+ } catch (e) {
456
+ // Ignore update errors, use cached version
457
+ }
442
458
  }
443
459
 
444
460
  // Find skills in the repo
@@ -23,7 +23,8 @@ export function removeCommand(program) {
23
23
  program
24
24
  .command('remove <skill>')
25
25
  .description('Remove a skill')
26
- .action(async (skillName) => {
26
+ .option('-y, --yes', 'Skip confirmation prompt')
27
+ .action(async (skillName, options) => {
27
28
  const projectRoot = process.cwd();
28
29
  const lockfileManager = new LockfileManager(projectRoot);
29
30
 
@@ -269,9 +269,12 @@ async function upgradeFromGitHub(skill, skillsDir) {
269
269
  const git = simpleGit(cachePath);
270
270
  await git.pull();
271
271
 
272
- // Find skill in cache
273
- const skillSourcePath = path.join(cachePath, skill.name);
274
- if (!fs.existsSync(skillSourcePath)) {
272
+ // Find skill in cache (support nested directories)
273
+ const { findSkills } = await import('../commands/install.js');
274
+ const skills = await findSkills(cachePath);
275
+ const skillInfo = skills.find(s => s.name === skill.name);
276
+
277
+ if (!skillInfo) {
275
278
  throw new Error(`Skill not found in repository: ${skill.name}`);
276
279
  }
277
280
 
@@ -282,7 +285,7 @@ async function upgradeFromGitHub(skill, skillsDir) {
282
285
  }
283
286
 
284
287
  // Copy new version
285
- copyRecursive(skillSourcePath, targetPath);
288
+ copyRecursive(skillInfo.path, targetPath);
286
289
  }
287
290
 
288
291
  async function upgradeFromRegistry(skill, skillsDir) {