@wenbin_wb/dsh-bridge 2.10.15 → 2.11.1
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 +40 -0
- package/client/client.js +259 -19
- package/client/index.js +97 -15
- package/client/mobile-styles.js +17 -3
- package/client/mobile-yield.js +192 -0
- package/client/settings-nav-icon.js +90 -0
- package/docs/release-process.md +6 -1
- package/lib/feishu/lark-bundled.mjs +76 -230
- package/lib/index.js +37 -12
- package/lib/restart-helper.mjs +17 -3
- package/package.json +3 -3
package/lib/restart-helper.mjs
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
//
|
|
10
10
|
// 用法(由 lib/index.js 组装 payload):node restart-helper.mjs '<json>'
|
|
11
11
|
import { spawn } from 'node:child_process';
|
|
12
|
-
import { appendFileSync, openSync } from 'node:fs';
|
|
12
|
+
import { appendFileSync, openSync, mkdirSync } from 'node:fs';
|
|
13
|
+
import { dirname } from 'node:path';
|
|
13
14
|
import { connect } from 'node:net';
|
|
14
15
|
|
|
15
16
|
const payload = JSON.parse(process.argv[2] ?? '{}');
|
|
@@ -80,7 +81,10 @@ async function main() {
|
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
let stdio = 'ignore';
|
|
83
|
-
try {
|
|
84
|
+
try {
|
|
85
|
+
mkdirSync(dirname(childLog), { recursive: true });
|
|
86
|
+
stdio = openSync(childLog, 'a');
|
|
87
|
+
} catch { /* 打不开就用 ignore */ }
|
|
84
88
|
|
|
85
89
|
// spawn 的失败是异步 'error' 事件(例如 execPath 不存在 → ENOENT),只 try/catch 抓不到;
|
|
86
90
|
// 不挂监听会变成未捕获异常,而且父进程给助手设的是 stdio:'ignore' → 失败细节全部丢失。
|
|
@@ -90,7 +94,17 @@ async function main() {
|
|
|
90
94
|
const settle = (value) => { if (!settled) { settled = true; resolve(value); } };
|
|
91
95
|
let child;
|
|
92
96
|
try {
|
|
93
|
-
|
|
97
|
+
const childEnv = { ...process.env };
|
|
98
|
+
if (process.platform !== 'win32') {
|
|
99
|
+
const execDir = dirname(execPath);
|
|
100
|
+
const defaultPaths = [execDir, '/usr/local/bin', '/usr/bin', '/bin'].filter(Boolean);
|
|
101
|
+
const existingPath = childEnv.PATH || '';
|
|
102
|
+
const missingPaths = defaultPaths.filter((p) => !existingPath.split(':').includes(p));
|
|
103
|
+
if (missingPaths.length > 0) {
|
|
104
|
+
childEnv.PATH = existingPath ? `${existingPath}:${missingPaths.join(':')}` : missingPaths.join(':');
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
child = spawn(execPath, argv, { cwd, env: childEnv, detached: true, stdio: ['ignore', stdio, stdio] });
|
|
94
108
|
} catch (err) {
|
|
95
109
|
log(`派生新 dsh 失败(同步异常):${err?.message ?? err}`);
|
|
96
110
|
settle(null);
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wenbin_wb/dsh-bridge",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.1",
|
|
4
4
|
"description": "手机扫码即可在移动端/公网继续用 DeepSeek Harness,人不在电脑前也能接着干。一键局域网二维码、Cloudflare 公网隧道、自建隧道与微信 / QQ / 飞书 / Telegram Bot(多工作区/会话持久化/媒体/卡片审批/流式输出),无需自己搭公网服务器。",
|
|
5
|
-
"releaseNotes": "【v2.
|
|
5
|
+
"releaseNotes": "【v2.11.1】修复与 DSH 0.1.7 相关的界面与稳定性问题\n• 修复:手机上聊天区「看不到最新消息」——移动端框架规则限定到布局外壳,不再误伤聊天记录容器(感谢外部贡献者 imroc,PR #48)\n• 修复:linux 下托管误判与 systemd 掉线(cgroup 解析支持多行/换行,重启前补齐 systemctl 执行环境)\n• 修复:设置弹窗自身不再被层级规则误抬,避免与第三方模态同层(适配 DSH 0.1.7)\n• 说明:纯前端 + 重启守护逻辑改动,刷新页面即生效",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"exports": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"build:client": "node client/build.mjs",
|
|
27
27
|
"build:lark": "node scripts/bundle-lark.mjs",
|
|
28
28
|
"build:banner": "node scripts/generate-banner.mjs",
|
|
29
|
-
"prepack": "npm run build:
|
|
29
|
+
"prepack": "npm run build:client",
|
|
30
30
|
"release:github": "node scripts/create-github-release.mjs",
|
|
31
31
|
"lint": "eslint .",
|
|
32
32
|
"test": "node --test test/*.test.mjs",
|