w1661884010-jpg/dsh-plugin-github-market ↗★ 1
dsh-plugin-github-market
DSH web client plugin: browse GitHub repositories with the dsh-plugin topic (fuzzy search, sort, favorites, install-command copy)
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗dsh-plugin-github-market
DSH web 客户端插件:在设置面板中浏览 GitHub 上带有 dsh-plugin topic 的插件仓库。
功能
- GitHub 插件市场:设置(Settings)面板中的「GitHub 插件市场」页面,默认按 Star 数展示
topic:dsh-plugin仓库 - 模糊搜索:输入框即时按名称 / 描述 / 标签 / 语言多词模糊过滤;回车后把关键字发给 GitHub Search API 做全局查询
- 排序:按 Star 数或最近更新排序
- 打开仓库:每条卡片可点击在新标签页打开 GitHub 仓库
- 复制安装命令:一键复制
dsh plugin --profile web add github:/ - 本地收藏:收藏夹存在浏览器 localStorage(键
dsh-plugin-github-market.favorites),可在「收藏」页签查看 - GitHub Token(可选):市场页顶部输入 Token → 保存 → 测试连接。Token 只存本浏览器(localStorage 键
dsh-plugin-github-market.token),只发给api.github.com;限流从匿名 60 次/小时提升到 5000 次/小时
安装
# 1. 把本包加入 web profile(file: 路径按你的实际位置调整)
dsh plugin --profile web add "file:"
# 2. 在 profile 用户补丁层启用插件行
# 编辑 ~/.dsh/profiles/web/cordis.patch.yml,追加:
# - insert:
# - id: ui-github-market
# name: 'dsh-plugin-github-market'
# 3. 重启 web profile 使 loader 生效
# 关闭当前 dsh web 进程后重新运行 dsh web
数据与限流
- 数据来自 GitHub Search API(
GET /search/repositories?q=topic:dsh-plugin ...),浏览器直连 - 匿名访问限流 60 次/小时/IP;插件对每次搜索响应做 10 分钟 localStorage 缓存
- 遇到 403/429 会显示中文提示,稍后再试或等缓存过期即可
开发
- 插件是纯客户端 bundle(
lib/client.js),手写、无构建工具链 - 冒烟测试:
node tests/bundle-smoke.test.mjs(仓库根目录) - 修改
lib/client.js后重启dsh web生效;若在 DSH 源码仓库里跑pnpm run dev:web,client HMR 会自动热重载