dsh-selfupdater 0.4.26 → 0.4.27
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/fnos-patches.mjs +3 -2
- package/lib/updater.mjs +1 -1
- package/package.json +1 -1
package/lib/fnos-patches.mjs
CHANGED
|
@@ -107,8 +107,9 @@ function patchCode(code, filePath) {
|
|
|
107
107
|
* 任何关键补丁未命中都抛错——调用方(updater.mjs)在换装前中止升级,
|
|
108
108
|
* 旧版保持原样,天然安全。
|
|
109
109
|
* @param {string} appRoot - 含 node_modules 的应用根目录(staging 与其同构)
|
|
110
|
+
* @param {(msg: string) => void} [log] - 可选日志函数(升级脚本传入后写入 selfupdate.log)
|
|
110
111
|
*/
|
|
111
|
-
export function applyFnosPatches(appRoot) {
|
|
112
|
+
export function applyFnosPatches(appRoot, log = () => {}) {
|
|
112
113
|
const at = join(appRoot, 'node_modules', '@deepseek-ai');
|
|
113
114
|
if (!existsSync(at)) throw new Error('找不到 node_modules/@deepseek-ai,staging 结构异常');
|
|
114
115
|
|
|
@@ -139,5 +140,5 @@ export function applyFnosPatches(appRoot) {
|
|
|
139
140
|
if (missed.length > 0) {
|
|
140
141
|
throw new Error(`关键补丁未命中: ${missed.join('、')}(上游代码可能已变更,需同步更新 fnos-patches.mjs 与 patch.py)`);
|
|
141
142
|
}
|
|
142
|
-
|
|
143
|
+
log(`[fnos-patches] 补丁应用完成: ${patched} 个文件, 关键标记全部命中`);
|
|
143
144
|
}
|
package/lib/updater.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-selfupdater",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.27",
|
|
4
4
|
"description": "Self-update plugin for DeepSeek Harness: DSH core upgrades via detached swap script; plugin self-update installs in-place without killing the host and prompts for restart. DSH 主程序与已装插件的一站式在线更新插件。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|