@zmainer/dsh-wx-bridge 1.0.9 → 1.0.10

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
@@ -147,6 +147,9 @@ dsh plugin --profile <profile> add @zmainer/dsh-wx-bridge
147
147
 
148
148
  ## 最近变更
149
149
 
150
+ - **1.0.10**:面板「运行时入口」一行区分「字段缺失」与「解析失败」——
151
+ 升级了包但还没重启宿主时,宿主半仍是旧版、不上报该字段,此前会误显示成「未解析(手机对话会失败)」;
152
+ 现在显示「—(宿主半未上报;重启宿主后显示)」。纯客户端修正。
150
153
  - **1.0.9**:修「手机发消息永远没答复 / 5 分钟后才报 ACP 超时」——
151
154
  根因是**运行时入口解析不到**(桌面端装在非标准目录时三级探测全部落空),ACP 子进程拿到空路径,
152
155
  而 `node "" --profile acp` 会进入「读 stdin」模式:**不回应协议、也不退出**,只能等满超时。
package/lib/client.js CHANGED
@@ -269,9 +269,12 @@ window.__ModuleLoader__.load({
269
269
  const rows = [
270
270
  ['桥状态', state + '(' + (b.phase || 'n/a') + ')'],
271
271
  ['进程', b.pid ? ('pid ' + b.pid + '|心跳 ' + (b.ageSec === null ? 'n/a' : b.ageSec + 's 前')) : '无'],
272
- ['运行时入口', b.runtimeBin
273
- ? (b.runtimeBin + (b.runtimeBinOk ? '' : '(⚠️ 文件不存在)'))
274
- : '⚠️ 未解析(手机对话会失败,请设置 dshBin)'],
272
+ // 字段缺失 ≠ 解析失败:升级了包但还没重启宿主时,宿主半仍是旧版、不上报这个字段。
273
+ ['运行时入口', b.runtimeBin === undefined
274
+ ? '—(宿主半未上报;重启宿主后显示)'
275
+ : (b.runtimeBin
276
+ ? (b.runtimeBin + (b.runtimeBinOk ? '' : '(⚠️ 文件不存在)'))
277
+ : '⚠️ 未解析(手机对话会失败,请设置 dshBin)')],
275
278
  ['数据目录', b.dataDir || 'n/a'],
276
279
  ['默认工作区', b.cwd || 'n/a'],
277
280
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zmainer/dsh-wx-bridge",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "type": "module",
5
5
  "main": "./lib/index.js",
6
6
  "dsh": {
package/src/client.js CHANGED
@@ -263,9 +263,12 @@ function Panel() {
263
263
  const rows = [
264
264
  ['桥状态', state + '(' + (b.phase || 'n/a') + ')'],
265
265
  ['进程', b.pid ? ('pid ' + b.pid + '|心跳 ' + (b.ageSec === null ? 'n/a' : b.ageSec + 's 前')) : '无'],
266
- ['运行时入口', b.runtimeBin
267
- ? (b.runtimeBin + (b.runtimeBinOk ? '' : '(⚠️ 文件不存在)'))
268
- : '⚠️ 未解析(手机对话会失败,请设置 dshBin)'],
266
+ // 字段缺失 ≠ 解析失败:升级了包但还没重启宿主时,宿主半仍是旧版、不上报这个字段。
267
+ ['运行时入口', b.runtimeBin === undefined
268
+ ? '—(宿主半未上报;重启宿主后显示)'
269
+ : (b.runtimeBin
270
+ ? (b.runtimeBin + (b.runtimeBinOk ? '' : '(⚠️ 文件不存在)'))
271
+ : '⚠️ 未解析(手机对话会失败,请设置 dshBin)')],
269
272
  ['数据目录', b.dataDir || 'n/a'],
270
273
  ['默认工作区', b.cwd || 'n/a'],
271
274
  ]