dsh-composer-ux 0.16.1 → 0.16.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/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  本项目遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
4
4
 
5
+ ## [0.16.2] — 2026-09-30(杀壳之前先确认"能把应用拉回来")
6
+
7
+ 这一版堵的是 **0.16.0 自己引入的**失败模式:先杀壳、再用 exe 重建 —— 如果 exe 路径拿不到或
8
+ 文件已不在,就会变成"壳没了、应用也没起来",比原来的弹框糟糕得多。参考插件的 README 里
9
+ 正好记着这条死法:`relaunch aborted: executable missing`。
10
+
11
+ **改法**:杀壳之前先 `fs.existsSync(appExe)`;**拿不到就绝不杀壳**,退回"只换宿主"那条老路
12
+ (壳还活着,它的恢复框至少还能救回来),并在日志里写明原因。
13
+
14
+ ## 验证
15
+
16
+ - `npm test`:**24 个套件 2382 passed / 0 failed**(行为测试从 11 条涨到 14 条,
17
+ 其中一条直接验证「exe 缺失 ⇒ 一次 taskkill 都没有」)。
18
+ - 变异:**164/164 全部咬住**。
19
+
5
20
  ## [0.16.1] — 2026-09-30(把桌面重启从「查文本的测试」升级成「真跑一遍」)
6
21
 
7
22
  0.16.0 的测试断言是在**助手源码字符串**里找关键字 —— 这一版之前已经栽过三次同类问题
package/README.md CHANGED
@@ -640,7 +640,7 @@ node build.mjs # 产出 lib/index.js + lib/client.js
640
640
  # ⚠️ 宿主半会**内联** schemastery / cosmokit:
641
641
  # 优先用 DSH 检出里的 vendor 副本,检出不在时退到 node_modules
642
642
  # 里同版本的 npm 包(两者逐字节相同)——CI 上走的就是退路
643
- npm test # 24 个套件;当前 2379 passed, 0 failed(2026-09-29 实测;CI 三平台同样全绿)
643
+ npm test # 24 个套件;当前 2382 passed, 0 failed(2026-09-29 实测;CI 三平台同样全绿)
644
644
  # 走 scripts/run-tests.mjs:顺带把"多少套件/多少条"记进 test/.last-run.json
645
645
  npm run test:mutations # 手动跑:变异测试,证明那套护栏真的在咬人(164 条,须单独跑)
646
646
  # 同样记录结果,供下面的文档门禁核对
package/lib/index.js CHANGED
@@ -4062,6 +4062,12 @@ function restartHelperSource(input) {
4062
4062
  "const desktopMain = async () => {",
4063
4063
  ' const out = fs.openSync(logOut, "a")',
4064
4064
  ' const err = fs.openSync(logErr, "a")',
4065
+ " // \u8D77\u98DE\u524D\u68C0\u67E5\uFF1A\u62FF\u4E0D\u5230\u5E94\u7528 exe \u5C31**\u7EDD\u4E0D\u6740\u58F3** \u2014\u2014 \u6740\u5B8C\u6CA1\u4EBA\u80FD\u628A\u5B83\u62C9\u56DE\u6765",
4066
+ " //\uFF08\u53C2\u8003\u63D2\u4EF6 README \u91CC\u90A3\u6761 relaunch aborted: executable missing \u5C31\u662F\u8FD9\u4E2A\u6B7B\u6CD5\uFF09\u3002",
4067
+ " if (!desktop.appExe || !fs.existsSync(desktop.appExe)) {",
4068
+ ' note("app executable missing (" + String(desktop.appExe) + "); falling back to host-only restart")',
4069
+ " return main()",
4070
+ " }",
4065
4071
  ' // \u53EA /PID\uFF1A/T \u4F1A\u628A"\u8D1F\u8D23\u91CD\u542F\u7684\u52A9\u624B\u81EA\u5DF1"\u4E00\u8D77\u5E26\u8D70\uFF08\u53C2\u8003\u63D2\u4EF6\u8E29\u8FC7\u7684\u5751\uFF09\u3002',
4066
4072
  " try {",
4067
4073
  ' const killer = spawn("taskkill", ["/F", "/PID", String(desktop.shellPid)], { windowsHide: true, stdio: ["ignore", out, err] })',