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-dev-git-graph

v0.1.3

Published

DSH 插件:dsh-better-sidebar 原生 Git Graph 提交图 tab——移植 vscode-git-graph 1.30.0,host 直跑 git 命令 + 同源静态服务,经 scope.repoRoot/scope.cwd 自动绑定会话工作区,点文件 diff 直接打开内置 DiffTab;前置依赖 dsh-better-sidebar。

Readme

dsh-dev-git-graph

DSH 插件:会话 Git Graph 面板——源码级移植 mhutchie/vscode-git-graph 1.30.0(MIT 许可), 在 DSH Web GUI 的会话页里以「Git 树」tab 显示当前会话工作区的提交图(分支彩线、 提交信息、日期、作者、分支/标签),右键支持 checkout / merge / rebase / push / tag / stash 等全部操作。

架构

会话 tab「Git 树」(client.js)
  └─ sessionCwd() 从 sessions 取该会话工作区
  └─ iframe /dsh-dev-git-graph/gg/index.html?repo=<cwd>
        │ host 注入 window.__DSH_GG_BOOT__ = { apiBase, repo, initialState, ... }
        ▼
git-graph 前端(media/gitgraph.js,原版 webview UI)
  └─ VS Code 兼容桥:postMessage → fetch POST /dsh-dev-git-graph/gg/api
        ▼
host 路由 (src/git-graph/routes.ts)
  └─ vendor/git-graph/dataSource.ts:child_process 直跑 git(spawn 数组,无 shell 注入)
        ▼
本地 git 仓库
  • 静态:GET /dsh-dev-git-graph/gg/ 及 /<static>(media/ 下构建产物,index.html 动态注入 boot 数据)。
  • API:POST /dsh-dev-git-graph/gg/api,命令集对齐原扩展 gitGraphView.respondToMessage(约 60 个命令)。
  • 主题:CSS 把 --vscode-* 映射到 DSH --dsw-alias-* 设计变量(缺省值兜底),随主题变明暗。

与原版差异

| 项 | 说明 | |---|---| | VS Code 专属命令 | openFile / viewDiff / openTerminal / createPullRequest / createArchive 等返回「暂不支持」 | | 状态持久化 | 前端 localStorage(原扩展用 workspaceState),setGlobalViewState 等直接 ACK | | 仓库来源 | 自动绑定当前会话工作区(无工作区时 tab 显示提示) |

构建与安装

# 构建(web 前端 tsc → media/ 合并;host tsc → lib/;client.js 拷贝)
pnpm --filter dsh-dev-git-graph build

# 类型检查
pnpm --filter dsh-dev-git-graph typecheck

# 安装到 web profile(本地 file: 依赖)
dsh plugin --profile web add file:/Users/kp/DEV/dsh-plugins/packages/dsh-dev-git-graph
# 重启 dsh web 生效;会话页出现「Git 树」tab

Better Sidebar 集成(可选)

装了 dsh-better-sidebar 时,本插件会在其右侧栏「+」菜单自动注册原生 Git Graph tab(单例去重、经 scope.repoRoot/scope.cwd 自动绑定会话工作区);未装时回退自建右侧 overlay 面板 + 会话头按钮,两者可并存。

# 一行完整安装(先 better-sidebar,再本插件)
cd ~/.dsh && dsh plugin --profile web add dsh-better-sidebar && dsh plugin --profile web add dsh-dev-git-graph

许可

前端与数据层来自 mhutchie/vscode-git-graph,许可见 vendor/git-graph/LICENSE(MIT)。 本插件的 host 集成代码按 MIT 发布。