dsh-game-center 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  [English](#english) | [中文](#中文)
4
4
 
5
- ![version](https://img.shields.io/badge/version-1.0.0-blue.svg)
5
+ ![version](https://img.shields.io/badge/version-1.0.1-blue.svg)
6
+ ![npm](https://img.shields.io/npm/v/dsh-game-center?label=npm&color=cb3837)
6
7
  ![DSH](https://img.shields.io/badge/DSH-0.2.1--rc.5-blueviolet.svg)
7
8
  ![license](https://img.shields.io/badge/license-MIT-green.svg)
8
9
 
@@ -20,17 +21,26 @@ A DeepSeek Harness panel plugin that keeps the mini-games built for this harness
20
21
 
21
22
  | | |
22
23
  | --- | --- |
23
- | DeepSeek Harness | `0.2.1-rc.5` (Web UI) |
24
+ | DeepSeek Harness | `0.2.1-rc.5` or newer (Web UI; verified on `0.2.2-rc.1`) |
24
25
  | Node.js | `>= 22` |
25
26
  | npm dependencies | none at runtime — the panel injects `@deepseek-ai/dsh-client-locale` and `@deepseek-ai/dsh-client-ui-slots`, which the harness provides |
26
27
 
27
28
  ### Install
28
29
 
29
- ```sh
30
- dsh plugin add github:stallenlu/dsh-game-center
31
- ```
30
+ The plugin is listed in the [awesome-dsh-plugin catalog](https://awesome-dsh-plugin.com/p/stallenlu/dsh-game-center/), so it appears in **dshmarket** and in DSH's **Plugins → Discover**: search for *Game Center*, *游戏中心* or *Tetris* and click **Install**. That is the easiest path.
31
+
32
+ It is also published through three channels you can install from directly:
32
33
 
33
- Restart DSH (or refresh the Web UI) afterwards, then open **Game Center** from the sidebar.
34
+ | Channel | Command | Notes |
35
+ | --- | --- | --- |
36
+ | dshmarket / Discover | search **Game Center** | one-click; the catalog entry lives in awesome-dsh-plugin |
37
+ | npm | `dsh plugin --profile web add dsh-game-center` | prebuilt `dsh-game-center@1.0.1`; no build scripts, so no `allowBuilds` prompt |
38
+ | GitHub Release tarball | `dsh plugin --profile web add "https://github.com/stallenlu/dsh-game-center/releases/latest/download/dsh-game-center.tgz"` | prebuilt; the asset name carries no version, so the URL keeps working after upgrades |
39
+ | Git source | `dsh plugin --profile web add github:stallenlu/dsh-game-center` | always the current `main`; a code push needs no PR |
40
+
41
+ With a single profile, `dsh plugin add …` works the same without `--profile web`.
42
+
43
+ Restart DSH afterwards — a full restart, not just a Web UI refresh, for a first install — then open **Game Center** from the sidebar.
34
44
 
35
45
  ### What it does
36
46
 
@@ -69,7 +79,8 @@ index.js host-side entry (no host behaviour)
69
79
  cordis.patch.yml the insert row that mounts the bundle
70
80
  locale/*.json the plugin-list title and description
71
81
  icon.svg the in-app icon
72
- assets/ storefront images
82
+ assets/ storefront images (screenshot-1.png, screenshot-2.png, icon-180.png)
83
+ screenshots.json the image list the catalog collects
73
84
  verify.mjs runnable check (node verify.mjs) — wiring + both games' cores
74
85
  ```
75
86
 
@@ -87,6 +98,25 @@ verify.mjs runnable check (node verify.mjs) — wiring + both games' cor
87
98
  node verify.mjs
88
99
  ```
89
100
 
101
+ ### Distribution and updates
102
+
103
+ The catalog entry lives in [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) (`data/plugins/stallenlu__dsh-game-center.yml`); the code lives in this repository. The catalog stores no copy of the code and no version number — it derives the install target at request time. Three channels are published:
104
+
105
+ | Channel | Where | How an update reaches users |
106
+ | --- | --- | --- |
107
+ | npm | [`dsh-game-center@1.0.1`](https://www.npmjs.com/package/dsh-game-center) on registry.npmjs.org | `npm version patch && npm publish`; the catalog's nightly `probe-npm.mjs` checks that `repository` points back here and picks up the new version automatically — no PR, and update detection switches to version numbers |
108
+ | GitHub Release | [`v1.0.1`](https://github.com/stallenlu/dsh-game-center/releases/tag/v1.0.1) with asset `dsh-game-center.tgz` | publish a new Release keeping the **same** asset name, so `releases/latest/download/dsh-game-center.tgz` keeps resolving. Never put the version in the asset name — the permanent URL would 404 on the next release |
109
+ | Git source | `main` | just `git push`; installs pinned to a commit see it on the next update check — no PR, no wait |
110
+
111
+ `installTargetFor()` prefers **npm → release tarball → git source**. Once the catalog auto-collects the npm package, npm becomes the default install command and the tarball stays as a fallback (and as the site's alternate command). A `tarball:` line in the catalog YAML (added through a catalog PR) is what makes the prebuilt archive visible there; `npm:` is deliberately not a valid YAML key — that mapping is auto-collected, never hand-written.
112
+
113
+ Rules worth keeping in mind when updating:
114
+
115
+ - `screenshots.json` and `assets/` live in **this** repo — push here and they show up after the next nightly build, no catalog PR.
116
+ - The catalog's `icon`, `name`, `category` and zh/en descriptions live in the catalog YAML — changing those needs a PR to awesome-dsh-plugin (edit only your own entry; never hand-edit the generated READMEs).
117
+ - Bump `version` in `package.json` when you change code, and keep `cordis.patch.yml`'s `name:` equal to the installed package name — a mismatch makes `install_bundle` fail with `ERR_MODULE_NOT_FOUND`.
118
+ - The catalog rebuilds automatically after a merge (usually within a day); users on the China mirror read the `dsh-plugin-catalog` npm package, one build later.
119
+
90
120
  ### License
91
121
 
92
122
  MIT
@@ -105,17 +135,26 @@ MIT
105
135
 
106
136
  | | |
107
137
  | --- | --- |
108
- | DeepSeek Harness | `0.2.1-rc.5`(Web UI) |
138
+ | DeepSeek Harness | `0.2.1-rc.5` 或更新(Web UI;已在 `0.2.2-rc.1` 验证) |
109
139
  | Node.js | `>= 22` |
110
140
  | npm 依赖 | 运行时无依赖——面板只注入 `@deepseek-ai/dsh-client-locale` 和 `@deepseek-ai/dsh-client-ui-slots`,由 harness 提供 |
111
141
 
112
142
  ### 安装
113
143
 
114
- ```sh
115
- dsh plugin add github:stallenlu/dsh-game-center
116
- ```
144
+ 本插件已收录进 [awesome-dsh-plugin 精选列表](https://awesome-dsh-plugin.com/p/stallenlu/dsh-game-center/),因此会出现在 **dshmarket** 以及 DSH 的**插件 → 发现**里:搜索 *Game Center*、*游戏中心* 或 *Tetris*,点「安装」即可,这是最省事的方式。
145
+
146
+ 也可以从以下三个已发布渠道直接安装:
117
147
 
118
- 安装后重启 DSH(或刷新 Web UI),从侧边栏打开**游戏中心**。
148
+ | 渠道 | 命令 | 说明 |
149
+ | --- | --- | --- |
150
+ | dshmarket / 发现 | 搜索**游戏中心** | 一键安装;目录条目维护在 awesome-dsh-plugin |
151
+ | npm | `dsh plugin --profile web add dsh-game-center` | 预构建包 `dsh-game-center@1.0.1`;无构建脚本,不会弹 `allowBuilds` 授权 |
152
+ | GitHub Release tarball | `dsh plugin --profile web add "https://github.com/stallenlu/dsh-game-center/releases/latest/download/dsh-game-center.tgz"` | 预构建;资产名不含版本号,升级后链接仍有效 |
153
+ | Git 源码 | `dsh plugin --profile web add github:stallenlu/dsh-game-center` | 始终是 `main` 最新代码;推送代码后无需提 PR |
154
+
155
+ 单 profile 环境下 `dsh plugin add …` 不带 `--profile web` 效果相同。
156
+
157
+ 安装后请**完整重启** DSH(首次安装仅刷新页面不够),再从侧边栏打开**游戏中心**。
119
158
 
120
159
  ### 功能
121
160
 
@@ -154,7 +193,8 @@ index.js 宿主侧入口(无宿主行为)
154
193
  cordis.patch.yml 挂载 bundle 的 insert 行
155
194
  locale/*.json 插件列表的标题与描述
156
195
  icon.svg 应用内图标
157
- assets/ 商店图片
196
+ assets/ 商店图片(screenshot-1.png、screenshot-2.png、icon-180.png)
197
+ screenshots.json 目录采集的图片清单
158
198
  verify.mjs 可运行自检(node verify.mjs):接线 + 两款游戏的核心逻辑
159
199
  ```
160
200
 
@@ -172,6 +212,25 @@ verify.mjs 可运行自检(node verify.mjs):接线 + 两款游戏
172
212
  node verify.mjs
173
213
  ```
174
214
 
215
+ ### 分发与更新
216
+
217
+ 目录条目在 [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)(`data/plugins/stallenlu__dsh-game-center.yml`),代码在本仓库。目录不保存代码副本、也不记录版本号——它在每次请求时派生安装目标。目前发布了三个渠道:
218
+
219
+ | 渠道 | 发布位置 | 更新如何到达用户 |
220
+ | --- | --- | --- |
221
+ | npm | registry.npmjs.org 上的 [`dsh-game-center@1.0.1`](https://www.npmjs.com/package/dsh-game-center) | `npm version patch && npm publish`;目录的 nightly `probe-npm.mjs` 校验 `repository` 指回本仓库后自动采集新版本——无需提 PR,更新检测改按版本号 |
222
+ | GitHub Release | [`v1.0.1`](https://github.com/stallenlu/dsh-game-center/releases/tag/v1.0.1),附资产 `dsh-game-center.tgz` | 发布新 Release 时保持**同名**资产,`releases/latest/download/dsh-game-center.tgz` 会一直可用;资产名不要带版本号,否则下次发版永久链 404 |
223
+ | Git 源码 | `main` | 直接 `git push`;按 commit 钉住的安装会在下次检查更新时看到——无需 PR、无需等待 |
224
+
225
+ `installTargetFor()` 的优先级是 **npm → Release tarball → Git 源码**:一旦目录自动采集到 npm 包,npm 就成为默认安装命令,tarball 退为兜底(以及站点上的备选命令)。目录 YAML 里的 `tarball:` 行(通过给目录提 PR 添加)让预构建包在站点可见;`npm:` 不是合法 YAML 键,该映射由脚本自动采集,不能手写。
226
+
227
+ 更新时还要记住:
228
+
229
+ - `screenshots.json` 与 `assets/` 在**本仓库**,这里 push 后下一次 nightly 构建即生效,不用给目录提 PR。
230
+ - 目录里的 `icon`、`name`、`category` 和中英描述在 YAML 里——改这些才需要向 awesome-dsh-plugin 提 PR(只改自己那一条;生成的 README 不要手改)。
231
+ - 改代码时顺手 bump `package.json` 的 `version`,并保证 `cordis.patch.yml` 的 `name:` 等于已安装包名——不一致会让 `install_bundle` 报 `ERR_MODULE_NOT_FOUND`。
232
+ - PR 合并后目录自动重建(通常一天内);中国区用户读 `dsh-plugin-catalog` npm 包,再晚一个构建周期。
233
+
175
234
  ### 许可
176
235
 
177
236
  MIT
package/locale/en.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Game Center",
4
- "description": "Manage every mini-game built in DSH and play them from one panel. Ships with Tetris."
4
+ "description": "Manage every mini-game built in DSH and play them from one panel. Ships with Tetris and Cops & Robbers."
5
5
  },
6
6
  "open": "Game Center",
7
7
  "title": "Game Center",
package/locale/zh.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "游戏中心",
4
- "description": "统一管理在 DSH 里开发的所有小游戏,并可直接游玩。首发游戏:俄罗斯方块。"
4
+ "description": "统一管理在 DSH 里开发的所有小游戏,并可直接游玩。自带俄罗斯方块和警察抓小偷。"
5
5
  },
6
6
  "open": "游戏中心",
7
7
  "title": "游戏中心",
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "dsh-game-center",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
- "description": "Game Center for DSH: a panel that manages every mini-game built here and lets you play them. Ships with Tetris.",
5
+ "description": "Game Center for DSH: a panel that manages every mini-game built here and lets you play them. Ships with Tetris and Cops & Robbers.",
6
6
  "exports": {
7
7
  ".": "./index.js",
8
8
  "./client": "./client.js",