skill-atlas-cli 0.1.22 → 0.1.24

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Skill-Atlas CLI
2
2
 
3
- 虾小宝 SkillAtlas 命令行工具,用于从 [skillatlas.cn](https://skillatlas.cn) 搜索并安装 skill 到各类 AI 编程助手(Cursor、OpenClaw、Claude Code、Cline 等)。
3
+ 虾小宝 SkillAtlas 命令行工具,用于从 [skillatlas.cn](https://ai.skillatlas.cn) 搜索并安装 skill 到各类 AI 编程助手(Cursor、OpenClaw、Claude Code、Cline 等)。
4
4
 
5
5
  ## 环境要求
6
6
 
package/lib/index.js CHANGED
@@ -228,7 +228,7 @@ function saveCache(latest) {
228
228
  function checkForUpdate(pkg) {
229
229
  const cache = getCache();
230
230
  if (cache?.latest && semver.gt(cache.latest, pkg.version)) {
231
- if (process.stdout.isTTY) console.error(`\n 📦 Update available: \x1b[31m${pkg.version}\x1b[0m → \x1b[32m${cache.latest}\x1b[0m\n 👉 No need to reinstall. Run: \x1b[36mnpm update -g ${pkg.name}\x1b[0m\n`);
231
+ if (process.stdout.isTTY) console.error(`\n 📦 Update available: \x1b[31m${pkg.version}\x1b[0m → \x1b[32m${cache.latest}\x1b[0m\n 👉 No need to reinstall. Run: \x1b[36mnpm update -g ${pkg.name} --force \x1b[0m\n`);
232
232
  }
233
233
  const lastCheck = cache?.lastCheck || 0;
234
234
  if (Date.now() - lastCheck < CHECK_INTERVAL) return;
@@ -313,7 +313,7 @@ var import_picocolors = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin((
313
313
  async function get(apiPath, params = {}) {
314
314
  const url = new URL(apiPath, config_default.getApiBase());
315
315
  for (const [k, v] of Object.entries(params)) if (v !== void 0 && v !== null && v !== "") url.searchParams.set(k, String(v));
316
- const res = await fetch(url.toString(), { headers: { agent_id: config_default.getAgentId() } });
316
+ const res = await fetch(url.toString(), { headers: { "X-SkillAtlas-Agent-Id": config_default.getAgentId() } });
317
317
  if (!res.ok) {
318
318
  const body = await res.text().catch(() => "");
319
319
  throw new Error(`API error ${res.status}: ${body || res.statusText}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skill-atlas-cli",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "description": "skill-atlas CLI - 虾小宝 命令行工具",
5
5
  "homepage": "https://ai.skillatlas.cn/",
6
6
  "type": "module",
@@ -14,9 +14,11 @@
14
14
  "scripts": {
15
15
  "build": "tsdown",
16
16
  "dev": "tsdown --watch",
17
+ "test": "vitest run",
18
+ "test:watch": "vitest",
17
19
  "start": "node bin/cli.js",
18
20
  "prepare": "npm run build",
19
- "prepublishOnly": "npm run build",
21
+ "prepublishOnly": "npm run test && npm run build",
20
22
  "release:patch": "npm whoami && npm version patch && npm publish",
21
23
  "release:minor": "npm whoami && npm version minor && npm publish",
22
24
  "release:major": "npm whoami && npm version major && npm publish"
@@ -32,7 +34,8 @@
32
34
  "keywords": [
33
35
  "skill-atlas",
34
36
  "skillatlas",
35
- "虾小宝"
37
+ "虾小宝",
38
+ "安全可靠的SKILL市场"
36
39
  ],
37
40
  "author": "",
38
41
  "license": "MIT",
@@ -49,6 +52,7 @@
49
52
  },
50
53
  "devDependencies": {
51
54
  "@types/node": "^22.0.0",
55
+ "vitest": "^2.1.0",
52
56
  "picocolors": "^1.1.1",
53
57
  "simple-git": "^3.32.3",
54
58
  "tsdown": "^0.21.0",