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-zentao-bugs

v0.5.1

Published

DSH 插件:在左侧栏面板或右侧边栏查询禅道「我的地盘 → 指派给我」的 Bug,分页列表与详情(含历史记录、评论与步骤截图)。

Readme

dsh-zentao-bugs

DeepSeek Harness(DSH)Web 客户端插件:在右侧栏面板中查询禅道(ZenTao)「我的地盘 → 指派给我 → Bug」,支持分页列表与详情(含历史记录、评论、步骤截图)。

功能

  • 双入口:左侧栏「开始界面」面板与右侧边栏「开始」页均有 禅道 入口,可同时打开一边看 Bug 一边工作
  • 分页列表(本地分页,每页 20/50/100 条可选,按 Bug ID 倒序,分页条固定在底部):
    • ID、严重程度(S1–S4 标识色)、状态(激活/已解决/已关闭 标识色)、标题、产品
    • 点击标题 → 在当前面板内打开详情页
    • 点击「详情」 → 用系统默认浏览器打开禅道的 Bug 页面(bug-view-<id>.html)
  • 详情页:标题、状态/严重程度/优先级、产品、所属模块、类型、优先级、创建人、指派信息、解决信息、截止日期、重现步骤(含内网截图)、历史记录与评论时间线;底部固定操作栏(在浏览器打开)
  • 附件预览:详情页展示附件列表,图片/视频点击浮层内预览(视频可拖动进度条),其他类型一键下载;附件经 Host 会话代理,浏览器无需禅道登录
  • 图片代理:步骤与评论里的图片由 Host 代理加载(浏览器无禅道会话也能显示)
  • 设置页:设置 → 禅道 配置内网地址、用户名、密码,失焦自动保存;另有两个开关分别控制左/右侧栏入口的展示(即时生效),以及一键清空配置(带确认弹窗)
  • 会话与凭据绑定:换账号、改密码或清空配置后立即强制重新登录,不会串用上一个用户的会话;列表结果缓存 30 秒(按凭据区分)

界面位置

| 位置 | 内容 | |---|---| | 左侧栏面板列表 | 「禅道」图标 → 主面板打开列表/详情 | | 右侧边栏「开始」页 | 「禅道」胶囊 → 右侧边栏内打开列表/详情 | | 设置 | 「禅道」分区:地址、用户名、密码、左右侧栏入口开关 |

说明:左侧栏注册在 sidebar.panellist(入口)与 root 作用域 main keyed slot(页面);右侧栏通过 sidebarRightTabs 注册页类型与 guide 入口,正文在 sidebar.right.pane.tab。界面文案为中文。

安装

方式一:DSH「添加插件」(推荐)

在 DSH 的 插件页 → 添加插件 对话框中,以下两种填法均可:

填包名(包已发布到 npm 公共源):

dsh-zentao-bugs

填仓库地址(不依赖 npm 源):

https://github.com/sad-marmot/dsh-zentao-bugs

安装器会用 pnpm 拉取本包、加入当前 profile 的 bundles 并重载插件,随后在 设置 → 禅道 填入地址与账号即可。

提示:填包名时按安装源走 npm 官方源或 npmmirror(官方发布后镜像约 10 分钟内自动同步,也可到 npmmirror.com 手动触发 sync)。若提示无法访问 GitHub,改用包名或下面的本地路径方式。

方式二:插件管理器(本地目录)

在具备 plugin_manager 工具的 DSH 会话中执行 install_bundle,target 指向本仓库目录(先克隆):

git clone https://github.com/sad-marmot/dsh-zentao-bugs.git

方式三:手动安装到 profile

  1. 克隆本仓库
  2. 把包链接/复制到 profile 的 node_modules/dsh-zentao-bugs
  3. 在 profile 的 package.json 中:
"dependencies": { "dsh-zentao-bugs": "0.5.0" },
"dsh": { "profile": { "bundles": [ "...", "dsh-zentao-bugs" ] } }
  1. 在 profile 的 cordis.patch.yml 末尾追加:
- insert:
    - id: zentao-bugs
      name: dsh-zentao-bugs
      config:
        baseUrl: http://zentao.example.com/zentao
        username: your-account
        password: your-password
  1. 重载插件(patchReload: live 会监听 patch 文件;首次加载无需重启 DSH)

发布新版本(维护者)

  1. 更新 package.json 的 version 并提交推送
  2. 登录 npm(仅需一次,需拥有 npmjs.com 账号):
npm login --registry https://registry.npmjs.org
  1. 发布(publishConfig 已固定指向官方源):
npm publish
  1. 镜像同步:npmmirror 通常在 10 分钟内自动同步;急用可访问 https://npmmirror.com/sync/dsh-zentao-bugs 手动触发,之后「添加插件」填包名 dsh-zentao-bugs 即可装到最新版

配置

| 字段 | 说明 | 默认 | |---|---|---| | baseUrl | 禅道地址,含 /zentao 路径,如 http://zentao.example.com/zentao | 空(必填) | | username | 禅道账号 | 空 | | password | 禅道密码 | 空 |

安全提示:密码以明文保存在本机 DSH profile 配置文件与浏览器设置表单中,没有额外加密层。请仅在受控的个人机器上使用,并在 baseUrl 中避免使用公网暴露的地址。

数据来源与口径

插件通过禅道自身的 Web JSON 接口取数(登录会话 zentaosid):

| 用途 | 禅道接口 | |---|---| | 获取会话 | GET /api-getsessionid.json | | 登录 | POST /user-login.json?zentaosid=...(account / password 表单) | | 指派给我的 Bug | GET /my-work-bug.json —— 即界面上的我的地盘 → 指派给我 | | Bug 详情 + 历史/评论 | GET /bug-view-<id>.json | | 产品名映射 | GET /product-all.json | | 附件/图片 | GET /file-<name> |

为什么不用 api.php/v1 REST API:它的 bugs 接口按产品可见性过滤,会漏掉「我的地盘」里能看到的 Bug(实测同账号 REST 只能查到部分记录),因此改用「我的地盘」同源接口,数据与界面完全一致。

插件暴露的 Host 路由

浏览器半通过同源路径访问 Host 代理(避免 CORS 与浏览器端携带禅道凭据):

| 路由 | 说明 | |---|---| | GET /zentao-plugin/bugs | 指派给我的 Bug 列表(30 秒缓存) | | GET /zentao-plugin/bug/<id> | Bug 详情 + 历史记录/评论 | | GET /zentao-plugin/file/<file-*> | 步骤/评论图片代理(带禅道会话,5 分钟缓存) |

安全边界

  • 路由只监听本机回环地址(DSH Web 服务的绑定地址)
  • 该前缀路由不校验 DSH Web 的登录 token(token 只保护 SPA 页面),同机其他进程可直接调用;仅适合内网单机场景
  • 禅道账号密码只保存在 Host 侧配置中,浏览器端从不持有凭据

开发

zentao-bugs/
├── index.js           # Host 半:配置 schema、同源 HTTP 路由、禅道会话与代理
├── client.js          # 浏览器半:侧栏入口、列表/详情页、设置分区
├── cordis.patch.yml   # bundle patch:插入插件行
├── icon.svg           # 插件卡片图标
├── locale/{en,zh}.json # 插件卡片标题与描述
└── package.json       # dsh.bundle / dsh.client 声明

启用 Host 侧热重载(编辑 index.js 自动生效,无需重启 DSH),在 profile 的 cordis.patch.yml 中覆盖 HMR 配置:

- id: hmr
  config:
    root:
      - /absolute/path/to/zentao-bugs

修改 client.js 后,打开中的页面可能会自动重载插件;若行为未更新,刷新窗口即可。

语法自检:

node --check index.js
node --check client.js

兼容性

  • 禅道开源版 22.3(实测;依赖 my-work-bug.json、bug-view-<id>.json 这些 Web JSON 接口,较老版本可能字段不同)
  • 禅道账号需具备「我的地盘」访问权限,且能直接访问内网地址
  • DSH Desktop / Web(Web 客户端插件体系:sidebar.panellist、main、settings.section)

许可

本仓库未声明开源许可证;如需对外复用,请自行补充许可证文件。