dsh-unlag 1.9.119 → 1.9.120
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 +13 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -77,6 +77,19 @@ dsh plugin install dsh-unlag
|
|
|
77
77
|
- 状态:`GET /dsh-unlag/state` → `{"version":"<当前版本>","code":"<index.js 写入时间>","plugins":true,"page":true,"shim":{...}}`。`code` 用来分清「版本号没刷」和「旧代码真的还在跑」。
|
|
78
78
|
- 重建后的日志带起页面代次:`interface rebuilt; the page runs the plugins as served now (page <rev>)`,据此判断新文档加载的是新脚本还是旧脚本。
|
|
79
79
|
|
|
80
|
+
## 与官方文档的对照
|
|
81
|
+
|
|
82
|
+
判定按下后能不能重建,依赖的是 Client Modules 的读接口和它自己公布的路由规则。逐条核对的是 App 内随包发布的文档 `.research/asar-dsh/dsh-client-modules/README.zh.md`(15968 B,sha256 前缀 `33cee13e7b61a151`)。
|
|
83
|
+
|
|
84
|
+
| 官方规则(该文档行) | 这里的做法 | 为什么 |
|
|
85
|
+
| --- | --- | --- |
|
|
86
|
+
| 未知资源或 revision 返回 404(80) | 冻结的启动清单里的行,旧 revision 照样给现在的字节;表里已经没有的插件仍然 404 | 桌面壳从启动时读到的清单重启文档,任何一行 404 都会让壳以退出码 1 结束,正在跑的会话随之死掉。只在「这一行确实还在表里」时接管,别的 404 原样放行 |
|
|
87
|
+
| 启动图与批次 URL 是应用目录相对形式(80) | 校验时按同样形式(`plugins/??…&rev=…`)读,相对路径补前导 `/` 后再取 | 与文档一致,避免把文档相对形式当绝对路径 |
|
|
88
|
+
| 每个阶段在 URL 超过 3 KiB 前分区(80) | 一行超过 8 KiB 就拒检(`blocked/list`) | 官方既然在 3 KiB 前分区,真实启动行就短于 3 KiB(这台机器实测最长 2834 B),8 KiB 只挡伪造清单,不会误拒正常行 |
|
|
89
|
+
| revision 由 mtime/ctime/大小派生,不哈希内容(80、136) | 只用官方读接口拿到的 revision,不自己算版本;比对的是正文里注册的插件 id | 哈希会引入一套自己的代际,和官方的 404 规则打架 |
|
|
90
|
+
| bundle 内容变更只能通过 `rebuilt()` 进入图(78) | 不调用 `rebuilt()` | 调了会让运行中的页面就地换模块,草稿和正在跑的任务受影响;这里只换宿主侧代码,页面由人来按按钮重开 |
|
|
91
|
+
| 图更新在同一个 Loader 上串行执行(90) | 重建走宿主自己的插件重载,不自己改 Loader | 自己改会和官方协调逻辑冲突,这是不能碰的那层 |
|
|
92
|
+
|
|
80
93
|
## 改完后让运行中的 App 用上
|
|
81
94
|
|
|
82
95
|
不用重启 App,也不用重启页面:换掉 `index.js` 后让插件的记录重载一次即可。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-unlag",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.120",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A press applies plugin edits right away and brings a laggy interface back; automatic reloading stays off unless you turn it on, so the press is the only trigger, and nothing restarts.",
|
|
6
6
|
"license": "MIT",
|