@zhuan-ai/zhuanspec 2.13.0 → 2.15.0

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.
@@ -32,9 +32,9 @@ async function checkVersionUpdate() {
32
32
  const pkgContent = JSON.parse(await fs.promises.readFile(pkgPath, 'utf-8'));
33
33
  current = pkgContent.version;
34
34
  }
35
- // 直接使用用户本地 npm 配置(registry / 代理),避免硬编码 registry
36
- // 无代理环境下访问官方源长时间阻塞并被 5s 超时静默吞掉,导致版本 banner 消失。
37
- const { stdout } = await execAsync('npm view @zhuan-ai/zhuanspec version', { timeout: 5000 });
35
+ // 强制查询 npmjs.org 公共源,避免用户本地 registry 指向私有仓库时
36
+ // 拿到过期版本号,永远误报"版本过旧"。
37
+ const { stdout } = await execAsync('npm view @zhuan-ai/zhuanspec version --registry=https://registry.npmjs.org/', { timeout: 5000 });
38
38
  const latest = stdout.trim();
39
39
  if (!latest || !current)
40
40
  return null;
@@ -44,7 +44,7 @@ async function checkVersionUpdate() {
44
44
  const isOutdated = lM !== cM ? lM > cM : lm !== cm ? lm > cm : lp > cp;
45
45
  if (!isOutdated)
46
46
  return `✓ ZhuanSpec v${current} 已是最新版本,开始 happy coding 吧~`;
47
- return `⚠️ ZhuanSpec 版本过旧!\n 当前版本: v${current} → 最新版本: v${latest}\n 请执行: 1) npm i -g @zhuan-ai/zhuanspec 2) zhuanspec init(同步最新模板到本项目)`;
47
+ return `⚠️ ZhuanSpec 版本过旧!\n 当前版本: v${current} → 最新版本: v${latest}\n 请执行: 1) npm i -g @zhuan-ai/zhuanspec@latest 2) zhuanspec update / init(同步最新模板到本项目)`;
48
48
  }
49
49
  catch {
50
50
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhuan-ai/zhuanspec",
3
- "version": "2.13.0",
3
+ "version": "2.15.0",
4
4
  "description": "AI-native system for spec-driven development",
5
5
  "keywords": [
6
6
  "zhuanspec",