@konnga/dsh-hud 0.9.1 → 0.9.2

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.en.md CHANGED
@@ -165,11 +165,14 @@ With the composer empty, `↑` brings back your previous prompt; keep pressing t
165
165
 
166
166
  ## Development
167
167
 
168
- - `lib/index.js` — the host half (runs git, serves `/dsh-hud-rpc`).
169
- - `lib/client.js` — the browser half (**no build step**, hand-written JS, depends only on the seed module `react`).
170
- - `npm test` — the whole suite (`node --test test/*.test.mjs`). No dependencies to install.
168
+ - `src/host/**` — the host half's source (TypeScript; runs git, serves `/dsh-hud-rpc`), compiled file-by-file by `tsc` into `lib/host/**`.
169
+ - `src/client/**` — the browser half's source (TypeScript; depends only on the seed module `react`); `lib/client.js` is a **build artifact** (rolldown), because DSH loads exactly one classic script.
170
+ - Convention: `src/` is all source, `lib/` is all artifacts — `pnpm run build` rebuilds both halves (`tsc -p tsconfig.host.json` + `rolldown`), and artifacts are committed together with the source (DSH and the local profile read `lib/` directly).
171
+ - `pnpm test` — typecheck (both halves are under **full `strict`**) + the whole suite.
172
+ - `pnpm run format` — Prettier formats the sources (`.prettierrc.json`; `lib/` is artifacts and is not formatted); `pnpm run format:check` only checks.
173
+ - The package manager is pnpm: `pnpm-lock.yaml` is committed, and `pnpm-workspace.yaml` disables `autoInstallPeers` because DSH provides those client services at runtime.
171
174
  - `docs/dock-slot-host.md` — a proposal for turning the row above the composer into a registrable inline host.
172
- - **Releasing**: `npm run tag && npm publish`. `prepublishOnly` runs the tests and then verifies version ↔ git tag (clean tree, `v<version>` exists and points at HEAD); a mismatch blocks the publish.
175
+ - **Releasing**: `pnpm run tag && pnpm publish`. `prepublishOnly` runs the tests and then verifies version ↔ git tag (clean tree, `v<version>` exists and points at HEAD); a mismatch blocks the publish.
173
176
 
174
177
  ## License
175
178
 
package/README.md CHANGED
@@ -163,11 +163,14 @@ main* ↑0 ↓0 · 已修改 7 未跟踪 2
163
163
 
164
164
  ## 开发
165
165
 
166
- - `lib/index.js`:宿主半(跑 git、提供 `/dsh-hud-rpc`)。
167
- - `lib/client.js`:浏览器半(**无构建步骤**,手写 JS,只依赖种子模块 `react`)。
168
- - `npm test`:全部用例(`node --test test/*.test.mjs`)。零依赖、不用装东西。
166
+ - `src/host/**`:宿主半的源码(TypeScript;跑 git、提供 `/dsh-hud-rpc`),`tsc` 逐文件产出到 `lib/host/**`。
167
+ - `src/client/**`:浏览器半的源码(TypeScript,只依赖种子模块 `react`);`lib/client.js` 是**打包产物**(rolldown),因为 DSH 只加载「一个经典脚本」。
168
+ - 约定:`src/` 全是源码,`lib/` 全是产物 —— `pnpm run build` 一次重建两半(`tsc -p tsconfig.host.json` + `rolldown`),产物与源码一起提交(DSH 与本机 profile 直接读 `lib/`)。
169
+ - `pnpm test`:类型检查(浏览器半与宿主半都是**全量 `strict`**)+ 全部用例。
170
+ - `pnpm run format`:Prettier 统一源码格式(`.prettierrc.json`;`lib/` 是产物、不格式化),`pnpm run format:check` 只检查。
171
+ - 包管理器是 pnpm:`pnpm-lock.yaml` 入库;`pnpm-workspace.yaml` 关掉 `autoInstallPeers` —— DSH 的客户端服务由宿主提供,不随包安装。
169
172
  - `docs/dock-slot-host.md`:把输入框上方那一行做成「可注册行内宿主」的提案,给上游看的。
170
- - **发版**:`npm run tag && npm publish`。`prepublishOnly` 先跑测试,再校验「版本号 ↔ git tag」(工作区要干净、`v<版本>` 要存在且指向 HEAD),对不上就发不出去。
173
+ - **发版**:`pnpm run tag && pnpm publish`。`prepublishOnly` 先跑测试,再校验「版本号 ↔ git tag」(工作区要干净、`v<版本>` 要存在且指向 HEAD),对不上就发不出去。
171
174
 
172
175
  ## 许可
173
176
 
package/cordis.patch.yml CHANGED
@@ -3,7 +3,7 @@
3
3
  # `name` 必须是**真实的包名**(改名时这里漏改过一次,结果整个插件加载不起来:插入找不到模块,
4
4
  # 组合树里就没有这条,界面上一片空白)。
5
5
  #
6
- # 宿主半(lib/index.js)在自己的 `ctx.webServer` 上注册 `/dsh-hud-rpc` 前缀路由,
6
+ # 宿主半(源码 src/host/index.ts,产物 lib/host/index.js)在自己的 `ctx.webServer` 上注册 `/dsh-hud-rpc` 前缀路由,
7
7
  # 收发与 `/api` 相同的 Connection RPC 信封,并用 `connection.requestRejection`
8
8
  # 复用 Host/Origin + 浏览器会话围栏;浏览器半(lib/client.js,一个 dsh.client 行)
9
9
  # 通过 `ctx.connection.rpc.call("/dsh-hud-rpc", endpoint, { args })` 取数。