现象
设置页「插件控制台」点「检查更新」不出现可更新项,也没有任何失败提示。POST /api/plugin-console/versions/refresh 返回 ok: true,但 registry 上确实有新版的包也全部返回 latest: null。
复现响应
安装若干 registry 上有新版的包后点「检查更新」,响应形如:
{
"ok": true,
"packages": {
"dsh-monitor": { "latest": null, "checked": true },
"@linxin666/dsh-client-ui-skin-center": { "latest": null, "checked": true },
"@linxin666/dsh-client-ui-web-ui-settings": { "latest": null, "checked": true },
"dsh-web-terminal": { "latest": null, "checked": true },
"dsh-loop": { "latest": null, "checked": true },
"whale-girl": { "latest": null, "checked": true },
"@dsh-external/plugin-console": { "latest": null, "checked": true }
}
}
这些包在 registry 上均有新版本,但全部 latest: null,且 UI 无任何失败提示。
根因
src/index.ts 的 npmViewLatest 用 spawnSync('npm', ['view', name, 'version'], { stdio: ['ignore', 'pipe', 'pipe'] }) 查询版本:
- Windows 下裸名
npm 是 .cmd 垫片,spawnSync 不做 shell 解析,直接 ENOENT;
- 受限宿主环境(sandboxed host) 子进程管道捕获被拦截(EPERM);
- 失败被空
catch 折叠成 null,且照常写缓存 → UI 显示「已检查」,用户无法区分「已最新」「本地包」「检查失败」三种状态。
修复
PR #12 已提交:改用原生 fetch 查询 registry JSON API(404 = 非 registry 包;错误显式化并记录日志;响应带 error 字段),另含设置页重复 tab 修复。
AI 辅助提交(模型 DeepSeek、工具 DeepSeek Harness)。
现象
设置页「插件控制台」点「检查更新」不出现可更新项,也没有任何失败提示。
POST /api/plugin-console/versions/refresh返回ok: true,但 registry 上确实有新版的包也全部返回latest: null。复现响应
安装若干 registry 上有新版的包后点「检查更新」,响应形如:
{ "ok": true, "packages": { "dsh-monitor": { "latest": null, "checked": true }, "@linxin666/dsh-client-ui-skin-center": { "latest": null, "checked": true }, "@linxin666/dsh-client-ui-web-ui-settings": { "latest": null, "checked": true }, "dsh-web-terminal": { "latest": null, "checked": true }, "dsh-loop": { "latest": null, "checked": true }, "whale-girl": { "latest": null, "checked": true }, "@dsh-external/plugin-console": { "latest": null, "checked": true } } }这些包在 registry 上均有新版本,但全部
latest: null,且 UI 无任何失败提示。根因
src/index.ts的npmViewLatest用spawnSync('npm', ['view', name, 'version'], { stdio: ['ignore', 'pipe', 'pipe'] })查询版本:npm是.cmd垫片,spawnSync不做 shell 解析,直接 ENOENT;catch折叠成null,且照常写缓存 → UI 显示「已检查」,用户无法区分「已最新」「本地包」「检查失败」三种状态。修复
PR #12 已提交:改用原生
fetch查询 registry JSON API(404 = 非 registry 包;错误显式化并记录日志;响应带error字段),另含设置页重复 tab 修复。AI 辅助提交(模型 DeepSeek、工具 DeepSeek Harness)。