dsh-remote 0.8.38 → 0.8.39
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/lib/update.js +9 -0
- package/package.json +1 -1
package/lib/update.js
CHANGED
|
@@ -395,10 +395,19 @@ export async function reloadSelf(loader) {
|
|
|
395
395
|
//
|
|
396
396
|
// 保留对 _dispose/dispose 的探测:那是宿主可能提供的扩展钩子,有则优先用,
|
|
397
397
|
// 没有就用 fiber.dispose()——两条路都必须能真正卸载,否则应如实报错。
|
|
398
|
+
// DSH 0.2 的 loader 在 fiber 被卸载时把 entry.options.disabled 写成 true
|
|
399
|
+
// 并写回配置树。客户端扫描会跳过禁用行,于是热切换之后宿主能起来、
|
|
400
|
+
// 设置页的 client 不再下发。这里记下卸载前的状态:只有 loader 在
|
|
401
|
+
// dispose 期间新打上的禁用才清掉。用户本来就禁用的行不要重新打开。
|
|
402
|
+
const disabledBefore = entry.options?.disabled === true
|
|
398
403
|
if (typeof entry._dispose === 'function') await entry._dispose()
|
|
399
404
|
else if (typeof entry.dispose === 'function') await entry.dispose()
|
|
400
405
|
else if (entry.fiber && typeof entry.fiber.dispose === 'function') await entry.fiber.dispose()
|
|
401
406
|
else return { ok: false, reason: 'entry exposes no dispose hook' }
|
|
407
|
+
if (!disabledBefore && entry.options?.disabled === true) {
|
|
408
|
+
delete entry.options.disabled
|
|
409
|
+
entry.parent?.tree?.write?.()
|
|
410
|
+
}
|
|
402
411
|
await entry.init()
|
|
403
412
|
return { ok: true, cleared }
|
|
404
413
|
} catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-remote",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.39",
|
|
4
4
|
"description": "Remote-work assistant for DeepSeek Harness: connect SSH (password/key/agent/keyboard-interactive/proxy jump), pick a remote workspace, operate on it with 25 rw_* tools (incl. rw_edit/rw_stat/rw_mkdir/rw_remove/rw_move/rw_forward), conflict-aware mirror sync, workspace backup/restore, port forwarding, optional side-bar remote file editing, audit log, keychain passwords.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "flymysql <flyphp@outlook.com>",
|