eskill 1.0.12 → 1.0.13

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.
Files changed (2) hide show
  1. package/cli.js +6 -3
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -115,7 +115,10 @@ program
115
115
  process.exit(1);
116
116
  }
117
117
 
118
- const skills = result.data || result.skills || result.results || [];
118
+ // API 返回的数据结构中提取技能和分页信息
119
+ const skills = result.data?.skills || result.data || result.skills || result.results || [];
120
+ const pagination = result.data?.pagination || result.pagination || {};
121
+ const total = pagination.total || result.total || skills.length;
119
122
 
120
123
  // 确保 skills 是数组
121
124
  if (!Array.isArray(skills)) {
@@ -127,8 +130,8 @@ program
127
130
  console.log(formatSkillList(skills));
128
131
 
129
132
  // 显示分页信息
130
- if (result.totalPages || result.total) {
131
- console.log(`总计: ${result.total || skills.length} 个技能\n`);
133
+ if (total > 0) {
134
+ console.log(`总计: ${total} 个技能\n`);
132
135
  }
133
136
 
134
137
  // 显示安装提示
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eskill",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Unified AI Agent Skills Management - Install skills from Git URLs",
5
5
  "main": "index.js",
6
6
  "type": "module",