npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-plugin-checker

v1.0.1

Published

Detect updates for installed third-party (non-builtin) DSH plugins, ask the user, and update them from the Web GUI.

Readme

dsh-plugin-checker

检测已安装的第三方(非内置)DSH 插件是否有更新,在 Web GUI 询问用户是否更新,并反馈更新成功 / 更新失败

功能

  • 扫描:识别 $DSH_HOME/profiles/node_modules 里已安装的非内置插件(判定标准:package.json 含 dsh 字段,且不属于官方 @deepseek-ai/* 命名空间,排除自身)
  • 对比:逐个查询 npm registry 最新版,semver 语义比较(正确处理 rc/beta 预发布号),标记有更新的插件
  • 询问:Web GUI 顶部横幅列出可更新插件(名称 + installed → latest),可单个更新全部更新,操作前 confirm 确认
  • 反馈:更新成功(绿)显示"已更新到 X",更新失败(红)显示失败原因;支持重试
  • 每 6 小时自动复查;"重新检查"走 ?fresh=1 强制刷新

架构

  • Host 半身lib/index.js):
    • GET /dsh-plugin-checker/status.json — 扫描 + 版本对比(npm 查询带 5 分钟 TTL 缓存)
    • POST /dsh-plugin-checker/update — 更新指定插件(body { confirm: true, name },仅允许已安装的非内置插件)
  • Client 半身lib/client.js):shell.overlay 横幅,跟随 DSH 界面语言(zh / en,其余回退中文)

更新机制(布局无关)

你的机器可能用 junction 省 C 盘(@deepseek-ai/* 链接到部署目录),其它机器可能是真实拷贝。本插件不假设存储形态

  1. 临时目录执行 npm install <pkg>@latest(干净环境,不触碰 profiles 其它包)
  2. 替换前用 lstat 检测目标是否为符号链接(junction):是则只删链接、拷贝真实副本,避免自拷贝陷阱
  3. 旧版本自动备份到 profiles/node_modules/.dsh-plugin-backups/<pkg>-<时间戳>/
  4. 新版本拷贝到 profiles/node_modules/<pkg>,缺失的新增依赖一并合并

绝不直接对 profiles 执行 npm install --prefix(会清空整个 node_modules,详见项目经验记录)。

安装

包是 profile bundle(manifest 声明 dsh.bundle.patch):

# 1) 安装到 profile(真实拷贝或 npm 安装)
npm i dsh-plugin-checker

# 2) 在 $DSH_HOME/profiles/web/cordis.patch.yml 加一行
- insert:
    - id: dsh-plugin-checker
      name: 'dsh-plugin-checker'

然后应用 patch(或重启 dsh web)并刷新页面。

Notes

  • 非 npm 插件(未发布到 registry 的本地插件,如部分自研插件)会被标记 onNpm: false 并跳过更新检测
  • 更新后部分插件需要重启 dsh web 才生效(与 dsh-update-checker 的重启/看门狗机制配合使用)
  • 写操作均要求 { confirm: true },防误触发

License

MIT