impeccable 2.1.0 → 2.1.1
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/bin/commands/skills.mjs +20 -41
- package/package.json +1 -1
package/bin/commands/skills.mjs
CHANGED
|
@@ -369,8 +369,7 @@ function downloadFile(url, dest) {
|
|
|
369
369
|
async function update(flags = []) {
|
|
370
370
|
const yes = flags.includes('-y') || flags.includes('--yes');
|
|
371
371
|
|
|
372
|
-
// Clean up deprecated skills
|
|
373
|
-
// does not fail on entries that no longer exist in the source repo.
|
|
372
|
+
// Clean up deprecated skills from previous versions.
|
|
374
373
|
try {
|
|
375
374
|
const { cleanup } = await import('../../source/skills/impeccable/scripts/cleanup-deprecated.mjs');
|
|
376
375
|
const root = findProjectRoot();
|
|
@@ -383,45 +382,10 @@ async function update(flags = []) {
|
|
|
383
382
|
// Cleanup script not available (e.g. running from npm package) -- skip
|
|
384
383
|
}
|
|
385
384
|
|
|
386
|
-
//
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
const output = execSync('npx skills check', { encoding: 'utf8', timeout: 15000 });
|
|
391
|
-
noLockFile = output.includes('No skills tracked');
|
|
392
|
-
} catch {
|
|
393
|
-
// npx skills not available or errored
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
if (!noLockFile) {
|
|
397
|
-
const root = findProjectRoot();
|
|
398
|
-
const prefix = detectPrefix(root);
|
|
399
|
-
|
|
400
|
-
// Temporarily undo prefix so npx skills can find its tracked skill names
|
|
401
|
-
if (prefix) {
|
|
402
|
-
console.log(`Detected "${prefix}" prefix, temporarily reverting for update...`);
|
|
403
|
-
undoPrefix(root, prefix);
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
console.log('Updating via npx skills...\n');
|
|
407
|
-
try {
|
|
408
|
-
execSync('npx skills update', { stdio: 'inherit' });
|
|
409
|
-
} catch (e) {
|
|
410
|
-
// Re-apply prefix even if update fails
|
|
411
|
-
if (prefix) renameSkillsWithPrefix(root, prefix);
|
|
412
|
-
process.exit(e.status ?? 1);
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
// Re-apply prefix after update
|
|
416
|
-
if (prefix) {
|
|
417
|
-
const count = renameSkillsWithPrefix(root, prefix);
|
|
418
|
-
console.log(`\nRe-applied "${prefix}" prefix to ${count} skills.`);
|
|
419
|
-
}
|
|
420
|
-
process.exit(0);
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
// Fallback: manual update by downloading the universal bundle
|
|
424
|
-
console.log('Skills not managed by npx skills. Using direct download.\n');
|
|
385
|
+
// Download the latest skills directly from impeccable.style.
|
|
386
|
+
// We skip `npx skills update` because it has a known upstream bug
|
|
387
|
+
// (vercel-labs/skills#775) where it can't find the lock file.
|
|
388
|
+
console.log('Checking for updates...\n');
|
|
425
389
|
|
|
426
390
|
const root = findProjectRoot();
|
|
427
391
|
const providers = findInstalledProviders(root);
|
|
@@ -500,6 +464,21 @@ async function update(flags = []) {
|
|
|
500
464
|
rmSync(tmpDir, { recursive: true, force: true });
|
|
501
465
|
rmSync(tmpZip, { force: true });
|
|
502
466
|
|
|
467
|
+
// Re-apply prefix if detected
|
|
468
|
+
const prefix = detectPrefix(root);
|
|
469
|
+
if (prefix) {
|
|
470
|
+
const count = renameSkillsWithPrefix(root, prefix);
|
|
471
|
+
if (count > 0) console.log(`Re-applied "${prefix}" prefix to ${count} skills.`);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
// Run cleanup again to remove deprecated stubs from the fresh download
|
|
475
|
+
try {
|
|
476
|
+
const { cleanup: postCleanup } = await import('../../source/skills/impeccable/scripts/cleanup-deprecated.mjs');
|
|
477
|
+
postCleanup(root);
|
|
478
|
+
} catch {
|
|
479
|
+
// Not available -- skip
|
|
480
|
+
}
|
|
481
|
+
|
|
503
482
|
console.log(`Updated ${updated} skills across ${providers.length} provider(s).`);
|
|
504
483
|
console.log('Done!\n');
|
|
505
484
|
} catch (e) {
|