dsh-plugin-weapp-gateway 0.8.34 → 0.8.35

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
@@ -6,6 +6,12 @@
6
6
 
7
7
  `dsh-plugin-weapp-gateway` · DeepSeek Harness 移动客户端连接插件
8
8
 
9
+ ### v0.8.35 · 修复 Windows 上的连接器测试
10
+
11
+ - 插件把 `spawnProcess` 选项转发给内置中继连接器,与 Cloudflare 隧道已有的注入缝一致;默认仍是真实 `spawn`,生产行为不变。测试可用它包住真实子进程并记录启动环境,无需依赖平台专有的进程检查工具。
12
+ - 修复 `relay-connector` 测试用 `URL.pathname` 生成连接器脚本路径:Windows 上会得到 `/D:/…`,交给 `spawn` 后变成 `D:\D:\…`,连接器无法启动。改用与生产代码一致的 `fileURLToPath`。
13
+ - 修复 `restart-reconnect` 测试用 POSIX 的 `ps eww` 读取连接器环境变量:改为通过注入缝记录真实的 `GATEWAY_URL`,在 Windows 与 POSIX 上都能验证重启后连接器拨向新端口。32 个测试文件全部通过。
14
+
9
15
  ### v0.8.32 · 修复 Windows 上网关完全没有日志
10
16
 
11
17
  - 修复默认日志路径写死成 POSIX 的 `/tmp/mobile-gateway.log`:Windows 上它会解析到「当前盘:\tmp」(一般不存在),`appendFileSync` 抛 ENOENT 又被 `log()` 的 catch 静默吞掉,运营者于是**完全看不到任何日志**——排查「手机为什么掉线」时没有任何线索。现在按平台取 `os.tmpdir()`,Windows 上落到 `%TEMP%\mobile-gateway.log`;Linux/macOS 行为不变。
package/lib/index.mjs CHANGED
@@ -2757,6 +2757,9 @@ const plugin = {
2757
2757
  gatewayName: gatewayIdentity.gatewayName,
2758
2758
  mgmtUrl: `http://127.0.0.1:${webServer.port}`,
2759
2759
  stateDir: resolveStateDir(),
2760
+ // 注入缝:与 cloudflared 一致。测试用它包住真正的 spawn,
2761
+ // 既拿到连接器的环境变量(GATEWAY_URL 等)又不妨碍它真的跑起来。
2762
+ spawnProcess: options.spawnProcess,
2760
2763
  log,
2761
2764
  })
2762
2765
  let relayEnsureTimer = null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-weapp-gateway",
3
- "version": "0.8.34",
3
+ "version": "0.8.35",
4
4
  "description": "鲸尾移动网关:DeepSeek Harness 移动客户端连接与会话同步,支持安全配对、远程访问、上下文、编队、额度和语音输入",
5
5
  "main": "lib/index.mjs",
6
6
  "files": [