itismyskillmarket 1.3.4 → 1.3.5

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 CHANGED
@@ -692,6 +692,9 @@ async function detectPlatforms() {
692
692
  }
693
693
  return available;
694
694
  }
695
+ function getAllAdapters() {
696
+ return Array.from(adapters.values());
697
+ }
695
698
  function getAdapterByPlatform(platform) {
696
699
  const idMap = {
697
700
  opencode: "opencode",
@@ -1510,19 +1513,15 @@ var platformsCmd = program.command("platforms").description("Show available plat
1510
1513
  platformsCmd.action(async () => {
1511
1514
  try {
1512
1515
  const available = await detectPlatforms();
1516
+ const allAdapters = getAllAdapters();
1513
1517
  console.log("\n\u{1F4CD} Available Platforms:\n");
1514
- const allPlatforms = [
1515
- { name: "OpenCode", adapter: new OpenCodeAdapter() },
1516
- { name: "Claude Code", adapter: new ClaudeAdapter() },
1517
- { name: "VSCode", adapter: new VSCodeAdapter() }
1518
- ];
1519
- for (const { name, adapter } of allPlatforms) {
1518
+ for (const adapter of allAdapters) {
1520
1519
  const isAvailable = available.find((a) => a.id === adapter.id);
1521
1520
  const installed = await adapter.listInstalled();
1522
1521
  if (isAvailable) {
1523
- console.log(`${name.padEnd(12)} \u2705 Available (${installed.length} skills installed)`);
1522
+ console.log(`${adapter.name.padEnd(15)} \u2705 Available (${installed.length} skills installed)`);
1524
1523
  } else {
1525
- console.log(`${name.padEnd(12)} \u274C Not detected`);
1524
+ console.log(`${adapter.name.padEnd(15)} \u274C Not detected`);
1526
1525
  }
1527
1526
  }
1528
1527
  console.log("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itismyskillmarket",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "Cross-platform skill manager for AI coding tools",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.ts CHANGED
@@ -49,7 +49,7 @@ import { syncPlatformLinks } from './commands/sync.js'; // 同步命令
49
49
  import { updateSkill } from './commands/update.js'; // 更新命令
50
50
  import { uninstallSkill, uninstallAll } from './commands/uninstall.js'; // 卸载命令
51
51
  import { installFromGitHub, parseGitHubUrl } from './commands/github-install.js'; // GitHub 安装
52
- import { detectPlatforms, getAllAdapters, OpenCodeAdapter, ClaudeAdapter, VSCodeAdapter } from './adapters/index.js'; // 平台适配器
52
+ import { detectPlatforms, getAllAdapters } from './adapters/index.js'; // 平台适配器
53
53
 
54
54
  // -----------------------------------------------------------------------------
55
55
  // 创建命令程序实例
@@ -417,23 +417,18 @@ platformsCmd
417
417
  .action(async () => {
418
418
  try {
419
419
  const available = await detectPlatforms();
420
+ const allAdapters = getAllAdapters();
420
421
 
421
422
  console.log('\n📍 Available Platforms:\n');
422
423
 
423
- const allPlatforms = [
424
- { name: 'OpenCode', adapter: new OpenCodeAdapter() },
425
- { name: 'Claude Code', adapter: new ClaudeAdapter() },
426
- { name: 'VSCode', adapter: new VSCodeAdapter() },
427
- ];
428
-
429
- for (const { name, adapter } of allPlatforms) {
424
+ for (const adapter of allAdapters) {
430
425
  const isAvailable = available.find(a => a.id === adapter.id);
431
426
  const installed = await adapter.listInstalled();
432
427
 
433
428
  if (isAvailable) {
434
- console.log(`${name.padEnd(12)} ✅ Available (${installed.length} skills installed)`);
429
+ console.log(`${adapter.name.padEnd(15)} ✅ Available (${installed.length} skills installed)`);
435
430
  } else {
436
- console.log(`${name.padEnd(12)} ❌ Not detected`);
431
+ console.log(`${adapter.name.padEnd(15)} ❌ Not detected`);
437
432
  }
438
433
  }
439
434