dsh-agentone 0.5.8 → 0.5.9

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/lib/proc.js +3 -2
  2. package/package.json +1 -1
package/lib/proc.js CHANGED
@@ -74,8 +74,9 @@ export function parseLatestVersionLine(stdout) {
74
74
  export function compareSemver(a, b) {
75
75
  const parse = (v) => {
76
76
  const [core, pre] = String(v).split('+')[0].split('-');
77
- const nums = core.split('.').map((n) => parseInt(n, 10) || 0);
78
- return { nums, pre: pre === undefined ? null : pre.split('.') };
77
+ const raw = core.split('.').map((n) => parseInt(n, 10) || 0);
78
+ while (raw.length < 3) raw.push(0); // 「1.2」补齐为「1.2.0」再比
79
+ return { nums: raw, pre: pre === undefined ? null : pre.split('.') };
79
80
  };
80
81
  const pa = parse(a);
81
82
  const pb = parse(b);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-agentone",
3
- "version": "0.5.8",
3
+ "version": "0.5.9",
4
4
  "description": "AgentOne 平台集成插件:飞书登录、平台模型、SkillHub 技能、套餐申请、插件管理、lark-cli / ccpg-cli 探测(请求超时与错误码透传、令牌轮换 single-flight、凭据损坏容错、状态页 UX 增强)",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",