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-launch-json

v0.2.0

Published

用于启动 launch.json 配置的项目。暂支持 Python 和 JavaScript 配置,依赖 dsh-better-sidebar 插件。

Readme

dsh-launch-json

从项目的 .vscode/launch.json 启动项目——列出工作区的调试/启动配置,然后像 VSCode 调试器一样精确启动其中一项:解释器、程序、参数、环境变量与工作目录, 并支持后台运行常驻服务。

功能

插件向 dsh-better-sidebar 注册一个**「启动配置」tab**:

  • 列出当前会话的 launch.json 配置及将执行的命令
  • 点击直接启动,支持后台运行(带停止按钮与实时状态)
  • 提供「打开 launch.json」动作在侧边栏编辑器中打开该文件

安装

# 从本仓库的 git checkout 安装(会执行 prepare 构建)
dsh plugin --profile <name> add github:you/dsh-launch-json

# 或从本地 checkout / tarball 安装
dsh plugin --profile <name> add ./dsh-launch-json
dsh plugin --profile <name> add ./dsh-launch-json-0.1.0.tgz

然后启动该 profile(dsh --profile <name>)。git 安装时 pnpm 可能要求你授权 prepare 构建脚本——allowBuilds 的写法见发布协议文档。

配置

插件接受 cordis.patch.yml 中的 config 块:

- insert:
    - id: launch-json
      name: dsh-launch-json
      config:
        launchJsonPath: '.vscode/launch.json'   # 默认值;相对工作区根目录或绝对路径

配置解析规则

遵循常见场景下的 VSCode 启动约定:

  • node / pwa-nodenode [runtimeArgs] <program> [args](设置了 runtimeExecutable 时优先)
  • pythonpython <program> [args]
  • gogo run <program> [args]
  • chrome / pwa-chrome / msedge → 需要 runtimeExecutable(浏览器可执行文件)+ url
  • type → 直接运行 <program> [args]
  • commandLine(少见)→ 原样执行

Python 调试配置

对于 Python 调试,Cursor/VSCode 使用 debugpy 来支持断点调试。launch.json 中可以使用以下配置:

{
  "name": "Python: FastAPI (Debug)",
  "type": "python",
  "request": "launch",
  "module": "uvicorn",
  "args": ["app.main:app", "--reload", "--host", "0.0.0.0", "--port", "8000"],
  "python": "${workspaceFolder}/.venv/bin/python",
  "console": "integratedTerminal",
  "justMyCode": false
}

关键配置项:

| 字段 | 说明 | |------|------| | type: "python" | Python 调试类型 | | module | 要运行的 Python 模块(如 uvicorn) | | args | 模块的参数 | | python | Python 解释器路径(可选) | | justMyCode | 是否只调试自己的代码(可选) |

注意: 由于 DSH 的终端环境限制,当前版本使用简化的命令执行方式。如果需要断点调试功能,可以在 args 中添加调试参数或使用其他调试方案。

变量替换支持:${workspaceFolder} / ${workspaceRoot}${workspaceFolderBasename}${userHome}${cwd}${execPath}${env:NAME}\${…} 转义为字面量 ${…}。无法解析的变量会原样保留。

request: "attach" 配置与 compounds 组合会被列出但无法启动。

安全说明

Harness 的 shell 服务在启动子进程前会清除凭据形态的环境变量(*KEY**PASSWORD**SECRET**TOKEN*)与 DSH_* 变量,再合并配置中的 env 覆盖。若启动的项目需要 API key,请在配置的 env 中显式声明。

开发

npm install
npm run check        # typecheck(服务端 + 客户端)+ 测试 + 构建
npm test             # vitest
npm run build        # tsc → lib/ + esbuild → lib/client.js(web tab 产物)

web tab 产物是面向客户端模块加载器的闭包工厂产物 (window.__ModuleLoader__.load({ id, factory }),外部依赖经注入的 require 解析),由 scripts/build-client.mjs 用 esbuild 构建,不依赖 harness 的构建管线。

兼容性

  • 依赖 harness 的 web server(@deepseek-ai/dsh-host-webserver,web profile 自带); headless profile 会直接跳过。
  • 侧边栏 tab 需要 profile 中组合 dsh-better-sidebar ≥ 0.12
  • peer 依赖 @deepseek-ai/cordis@deepseek-ai/dsh-shell—— 均由 dsh 安装本身提供。

License

MIT