@linxin666/dsh-remote-web-ui 0.2.2 → 0.2.4
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/client.js +8 -7
- package/lib/client.js.map +1 -1
- package/lib/index.js +9 -3
- package/lib/mobile.js +7 -6
- package/lib/mobile.js.map +1 -1
- package/lib/types/client/locales.js +4 -4
- package/lib/types/client/settings-form.d.ts.map +1 -1
- package/lib/types/client/settings-form.js +9 -6
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +10 -2
- package/package.json +12 -12
- package/src/client/locales.ts +4 -4
- package/src/client/settings-form.ts +8 -6
- package/src/update.ts +14 -1
|
@@ -88,7 +88,7 @@ export const zh = {
|
|
|
88
88
|
'update.doneDetail': '所有组件已更新到最新版本。',
|
|
89
89
|
'update.restartHint': '请重启 dsh web 使新版本生效:在终端按 Ctrl+C 停止后重新运行 dsh web。',
|
|
90
90
|
'update.linkMode': '当前为本地开发模式',
|
|
91
|
-
'update.linkModeDetail': 'dsh-web-ui
|
|
91
|
+
'update.linkModeDetail': 'dsh-web-ui 或其组件通过本地链接安装(开发模式),无法自动更新。npm 上最新版本:{version}。请同步本地仓库,或移除与全家桶重复的独立链接。',
|
|
92
92
|
'update.missing': '未找到 dsh-web-ui 安装',
|
|
93
93
|
'update.missingDetail': '无法定位已安装的 dsh-web-ui 聚合包。请先运行 dsh plugin --profile <profile> add @linxin666/dsh-web-ui-all。',
|
|
94
94
|
'update.offline': '无法连接更新源',
|
|
@@ -102,7 +102,7 @@ export const zh = {
|
|
|
102
102
|
'update.error.pnpmMissing': '未找到 pnpm,已尝试 pnpm / corepack / npx 仍不可用。请安装 pnpm 后重启应用(Windows: npm install -g pnpm 或 corepack enable;macOS: brew install pnpm 或 corepack enable)。',
|
|
103
103
|
'update.error.timeout': '更新超时,已终止安装进程,请重试。',
|
|
104
104
|
'update.error.notFound': '未找到 dsh-web-ui 聚合包安装,无法更新。',
|
|
105
|
-
'update.error.link': '
|
|
105
|
+
'update.error.link': 'dsh-web-ui 或其组件使用本地链接,无法自动更新;请同步本地仓库,或移除与全家桶重复的独立链接。',
|
|
106
106
|
'update.error.pnpmFailed': '更新执行失败(pnpm 退出码 {code}),详见下方输出。',
|
|
107
107
|
'update.error.stale': '更新命令已执行,但安装版本未变化。常见原因:pnpm 11 的 minimumReleaseAge 门禁会静默跳过发布不足 24 小时的新版本。请在 profile 目录(~/.dsh/profiles/<profile>)的 pnpm-workspace.yaml 中配置 minimumReleaseAgeExclude(例如 "@linxin666/*")或 minimumReleaseAge: 0 后重新点击更新。',
|
|
108
108
|
'update.error.verifyFailed': '更新命令已执行,但无法核对安装后的版本(可能是 registry 探测失败或安装路径变化)。请查看下方输出,或稍后重试。',
|
|
@@ -197,7 +197,7 @@ export const en = {
|
|
|
197
197
|
'update.doneDetail': 'All components are up to date.',
|
|
198
198
|
'update.restartHint': 'Restart dsh web for the new version to take effect: stop it with Ctrl+C in the terminal, then run dsh web again.',
|
|
199
199
|
'update.linkMode': 'Local development mode',
|
|
200
|
-
'update.linkModeDetail': 'dsh-web-ui is installed via a local link
|
|
200
|
+
'update.linkModeDetail': 'dsh-web-ui or one of its components is installed via a local link and cannot be updated remotely. Latest npm release: {version}. Sync the local checkout, or remove a standalone link duplicated by the aggregate.',
|
|
201
201
|
'update.missing': 'dsh-web-ui not found',
|
|
202
202
|
'update.missingDetail': 'Could not locate the installed dsh-web-ui aggregate package. Install it with: dsh plugin --profile <profile> add @linxin666/dsh-web-ui-all',
|
|
203
203
|
'update.offline': 'Cannot reach the update source',
|
|
@@ -211,7 +211,7 @@ export const en = {
|
|
|
211
211
|
'update.error.pnpmMissing': 'pnpm was not found (tried pnpm / corepack / npx). Install pnpm and restart the app (Windows: npm install -g pnpm or corepack enable; macOS: brew install pnpm or corepack enable).',
|
|
212
212
|
'update.error.timeout': 'The update timed out and the install process was killed; try again.',
|
|
213
213
|
'update.error.notFound': 'The dsh-web-ui aggregate package is not installed; nothing to update.',
|
|
214
|
-
'update.error.link': '
|
|
214
|
+
'update.error.link': 'dsh-web-ui or one of its components uses a local link. Sync the checkout, or remove a standalone link duplicated by the aggregate.',
|
|
215
215
|
'update.error.pnpmFailed': 'The update failed (pnpm exited with code {code}); see the output below.',
|
|
216
216
|
'update.error.stale': 'The update command ran but the installed versions did not change. Likely cause: the pnpm 11 minimumReleaseAge gate silently skips releases published less than 24 hours ago. Add minimumReleaseAgeExclude (e.g. "@linxin666/*") or set minimumReleaseAge: 0 in pnpm-workspace.yaml under the profile directory (~/.dsh/profiles/<profile>), then run the update again.',
|
|
217
217
|
'update.error.verifyFailed': 'The update command ran but the installed versions could not be verified afterwards (registry probe failed or the install path changed). Inspect the output below, or retry later.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-form.d.ts","sourceRoot":"","sources":["../../../src/client/settings-form.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAyB,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAGjH,yEAAyE;AACzE,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAA;AAErB,0EAA0E;AAC1E,MAAM,WAAW,SAAS;IACxB,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAA;IACb;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,2FAA2F;IAC3F,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAA;IAClC;;;OAGG;IACH,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAAA;CAChD;AAED,wCAAwC;AACxC,MAAM,WAAW,UAAU;IACzB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,oEAAoE;IACpE,UAAU,EAAE,OAAO,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,EAInB;IAED;;;OAGG;IACH,OAAO,IAAI,IAAI,CAKd;IAED,wFAAwF;IACxF,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAI1C;IAED,iFAAiF;IACjF,KAAK,IAAI,SAAS,CAajB;IAED,8EAA8E;IAC9E,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAY/B;IAED,wDAAwD;IACxD,OAAO,IAAI,WAAW,CAerB;IAED;;;;;;;;;;OAUG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"settings-form.d.ts","sourceRoot":"","sources":["../../../src/client/settings-form.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAyB,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAGjH,yEAAyE;AACzE,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAA;AAErB,0EAA0E;AAC1E,MAAM,WAAW,SAAS;IACxB,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAA;IACb;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,2FAA2F;IAC3F,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAA;IAClC;;;OAGG;IACH,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAAA;CAChD;AAED,wCAAwC;AACxC,MAAM,WAAW,UAAU;IACzB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,oEAAoE;IACpE,UAAU,EAAE,OAAO,CAAA;IACnB,gFAAgF;IAChF,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,oDAAoD;AACpD,MAAM,WAAW,SAAS;IACxB,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AAE,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAI1C;IAED,iFAAiF;IACjF,KAAK,IAAI,SAAS,CAajB;IAED,8EAA8E;IAC9E,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAY/B;IAED,wDAAwD;IACxD,OAAO,IAAI,WAAW,CAerB;IAED;;;;;;;;;;OAUG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAoC1B;IAED,0FAA0F;IAC1F,OAAO,CAAC,YAAY;IAKpB;;;;;;OAMG;IACH,OAAO,CAAC,IAAI;YAiBE,KAAK;YAKL,KAAK;IAUnB,OAAO,CAAC,KAAK;IAOb,OAAO,CAAC,MAAM;IAQd,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,MAAM;IAKd,OAAO,CAAC,OAAO;CAGhB"}
|
|
@@ -184,9 +184,12 @@ export class CardForm {
|
|
|
184
184
|
if (plan.length === 0 || this.saving || valid.length !== plan.length)
|
|
185
185
|
return;
|
|
186
186
|
const plannedWrites = valid.map(item => item.op);
|
|
187
|
-
// Snapshot the
|
|
188
|
-
// flight
|
|
189
|
-
|
|
187
|
+
// Snapshot the staged entries this save writes, so an edit staged while it
|
|
188
|
+
// is in flight (which replaces the same key) survives: only delete the key
|
|
189
|
+
// when the entry is still the one this save started from.
|
|
190
|
+
const pending = new Map();
|
|
191
|
+
for (const item of plan)
|
|
192
|
+
pending.set(item.field, this.staged.get(item.field));
|
|
190
193
|
this.saving = true;
|
|
191
194
|
this.failed = false;
|
|
192
195
|
this.failedReason = undefined;
|
|
@@ -211,12 +214,12 @@ export class CardForm {
|
|
|
211
214
|
landed.add(item.field);
|
|
212
215
|
}
|
|
213
216
|
}
|
|
214
|
-
for (const field of
|
|
215
|
-
if (landed.has(field))
|
|
217
|
+
for (const [field, before] of pending) {
|
|
218
|
+
if (landed.has(field) && this.staged.get(field) === before)
|
|
216
219
|
this.staged.delete(field);
|
|
217
220
|
}
|
|
218
221
|
this.saving = false;
|
|
219
|
-
this.failed = landed.size !==
|
|
222
|
+
this.failed = landed.size !== pending.size;
|
|
220
223
|
this.publish();
|
|
221
224
|
}
|
|
222
225
|
/** The scope's batch surface when it supports one; undefined conservatively otherwise. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAE1C,iDAAiD;AACjD,eAAO,MAAM,YAAY,+BAA+B,CAAA;AAExD,oEAAoE;AACpE,eAAO,MAAM,YAAY,gBAAgB,CAAA;AAEzC,sEAAsE;AACtE,eAAO,MAAM,iBAAiB,8BAA8B,CAAA;AAE5D,+EAA+E;AAC/E,eAAO,MAAM,YAAY,iCAAiC,CAAA;AAQ1D,0EAA0E;AAC1E,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,2DAA2D;IAC3D,UAAU,EAAE,MAAM,EAAE,CAAA;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CASlE;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CA2B5D;AAYD,yDAAyD;AACzD,MAAM,WAAW,YAAY;IAC3B,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,kCAAkC;IAClC,GAAG,EAAE,MAAM,CAAA;CACZ;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,kBAAkB,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAahF;AAED,6DAA6D;AAC7D,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IAChE,SAAS,CAAC,EAAE,eAAe,CAAA;CAC5B;AAED,+CAA+C;AAC/C,MAAM,WAAW,aAAa;IAC5B,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAA;IAClB,sCAAsC;IACtC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;IAC3B,oDAAoD;IACpD,SAAS,CAAC,EAAE,OAAO,KAAK,CAAA;IACxB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAA;CAC3B;AAuBD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC,CA8HvE;AAED,0EAA0E;AAC1E,MAAM,WAAW,qBAAqB;IACpC,iDAAiD;IACjD,GAAG,EAAE,aAAa,CAAA;IAClB,8DAA8D;IAC9D,KAAK,EAAE,eAAe,CAAA;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,CAgE7F"}
|
package/lib/types/update.js
CHANGED
|
@@ -128,6 +128,13 @@ export function isLinkedSpec(spec) {
|
|
|
128
128
|
return false;
|
|
129
129
|
return /^(?:link|file):|^\.{1,2}(?:[/\\]|$)/.test(spec);
|
|
130
130
|
}
|
|
131
|
+
/** Whether a direct local dependency overrides one of the aggregate's children. */
|
|
132
|
+
function hasLinkedFamilyOverride(anchorManifest, profileManifest) {
|
|
133
|
+
const dependencies = profileManifest?.dependencies;
|
|
134
|
+
if (typeof dependencies !== 'object' || dependencies === null)
|
|
135
|
+
return false;
|
|
136
|
+
return familyChildren(anchorManifest).some(name => isLinkedSpec(dependencies[name]));
|
|
137
|
+
}
|
|
131
138
|
/**
|
|
132
139
|
* Resolve the anchor package's manifest path. The aggregate package is the
|
|
133
140
|
* canonical entry point; this plugin's own package is the fallback. Both a
|
|
@@ -171,7 +178,7 @@ export function resolveUpdateTarget(deps) {
|
|
|
171
178
|
return { error: 'link' };
|
|
172
179
|
const profileManifest = readManifest(join(profile.dir, 'package.json'));
|
|
173
180
|
const spec = profileManifest?.dependencies?.[anchor];
|
|
174
|
-
if (isLinkedSpec(spec))
|
|
181
|
+
if (isLinkedSpec(spec) || hasLinkedFamilyOverride(manifest, profileManifest))
|
|
175
182
|
return { error: 'link' };
|
|
176
183
|
// Standalone installs carry no aggregate: the anchor's own dependency
|
|
177
184
|
// list misses every sibling @linxin666/* plugin installed directly into
|
|
@@ -283,7 +290,8 @@ export async function checkUpdates(deps) {
|
|
|
283
290
|
const profile = findProfile(manifestPath);
|
|
284
291
|
const profileManifest = profile === undefined ? undefined : readManifest(join(profile.dir, "package.json"));
|
|
285
292
|
const linked = profile === undefined
|
|
286
|
-
|| isLinkedSpec(profileManifest?.dependencies?.[anchor])
|
|
293
|
+
|| isLinkedSpec(profileManifest?.dependencies?.[anchor])
|
|
294
|
+
|| hasLinkedFamilyOverride(manifest, profileManifest);
|
|
287
295
|
if (profile === undefined) {
|
|
288
296
|
return { mode: 'link', packages: [], outdated: false };
|
|
289
297
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linxin666/dsh-remote-web-ui",
|
|
3
3
|
"description": "Mobile remote control for the dsh web GUI: scan-to-pair QR entry beside the settings button, one-time pairing tokens, live device status, and revocable mobile sessions",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": "^22.19.0 || >=24.0.0"
|
|
@@ -61,17 +61,17 @@
|
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
64
|
-
"@deepseek-ai/dsh-client-connection": "^0.1.0-rc.
|
|
65
|
-
"@deepseek-ai/dsh-client-locale": "^0.1.0-rc.
|
|
66
|
-
"@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.
|
|
67
|
-
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.
|
|
68
|
-
"@deepseek-ai/dsh-client-ui-settings": "^0.1.0-rc.
|
|
69
|
-
"@deepseek-ai/dsh-client-ui-sidebar": "^0.1.0-rc.
|
|
70
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.
|
|
71
|
-
"@deepseek-ai/dsh-host-apiproxy": "^0.1.0-rc.
|
|
72
|
-
"@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.
|
|
73
|
-
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.
|
|
74
|
-
"@deepseek-ai/dsh-settings": "^0.1.0-rc.
|
|
64
|
+
"@deepseek-ai/dsh-client-connection": "^0.1.0-rc.8",
|
|
65
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.0-rc.8",
|
|
66
|
+
"@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.8",
|
|
67
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.8",
|
|
68
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.0-rc.8",
|
|
69
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "^0.1.0-rc.8",
|
|
70
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.8",
|
|
71
|
+
"@deepseek-ai/dsh-host-apiproxy": "^0.1.0-rc.8",
|
|
72
|
+
"@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.8",
|
|
73
|
+
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.8",
|
|
74
|
+
"@deepseek-ai/dsh-settings": "^0.1.0-rc.8",
|
|
75
75
|
"@testing-library/dom": "^10.4.1",
|
|
76
76
|
"@testing-library/react": "^16.3.2",
|
|
77
77
|
"@types/node": "^22.20.0",
|
package/src/client/locales.ts
CHANGED
|
@@ -89,7 +89,7 @@ export const zh = {
|
|
|
89
89
|
'update.doneDetail': '所有组件已更新到最新版本。',
|
|
90
90
|
'update.restartHint': '请重启 dsh web 使新版本生效:在终端按 Ctrl+C 停止后重新运行 dsh web。',
|
|
91
91
|
'update.linkMode': '当前为本地开发模式',
|
|
92
|
-
'update.linkModeDetail': 'dsh-web-ui
|
|
92
|
+
'update.linkModeDetail': 'dsh-web-ui 或其组件通过本地链接安装(开发模式),无法自动更新。npm 上最新版本:{version}。请同步本地仓库,或移除与全家桶重复的独立链接。',
|
|
93
93
|
'update.missing': '未找到 dsh-web-ui 安装',
|
|
94
94
|
'update.missingDetail': '无法定位已安装的 dsh-web-ui 聚合包。请先运行 dsh plugin --profile <profile> add @linxin666/dsh-web-ui-all。',
|
|
95
95
|
'update.offline': '无法连接更新源',
|
|
@@ -103,7 +103,7 @@ export const zh = {
|
|
|
103
103
|
'update.error.pnpmMissing': '未找到 pnpm,已尝试 pnpm / corepack / npx 仍不可用。请安装 pnpm 后重启应用(Windows: npm install -g pnpm 或 corepack enable;macOS: brew install pnpm 或 corepack enable)。',
|
|
104
104
|
'update.error.timeout': '更新超时,已终止安装进程,请重试。',
|
|
105
105
|
'update.error.notFound': '未找到 dsh-web-ui 聚合包安装,无法更新。',
|
|
106
|
-
'update.error.link': '
|
|
106
|
+
'update.error.link': 'dsh-web-ui 或其组件使用本地链接,无法自动更新;请同步本地仓库,或移除与全家桶重复的独立链接。',
|
|
107
107
|
'update.error.pnpmFailed': '更新执行失败(pnpm 退出码 {code}),详见下方输出。',
|
|
108
108
|
'update.error.stale': '更新命令已执行,但安装版本未变化。常见原因:pnpm 11 的 minimumReleaseAge 门禁会静默跳过发布不足 24 小时的新版本。请在 profile 目录(~/.dsh/profiles/<profile>)的 pnpm-workspace.yaml 中配置 minimumReleaseAgeExclude(例如 "@linxin666/*")或 minimumReleaseAge: 0 后重新点击更新。',
|
|
109
109
|
'update.error.verifyFailed': '更新命令已执行,但无法核对安装后的版本(可能是 registry 探测失败或安装路径变化)。请查看下方输出,或稍后重试。',
|
|
@@ -205,7 +205,7 @@ export const en = {
|
|
|
205
205
|
'update.doneDetail': 'All components are up to date.',
|
|
206
206
|
'update.restartHint': 'Restart dsh web for the new version to take effect: stop it with Ctrl+C in the terminal, then run dsh web again.',
|
|
207
207
|
'update.linkMode': 'Local development mode',
|
|
208
|
-
'update.linkModeDetail': 'dsh-web-ui is installed via a local link
|
|
208
|
+
'update.linkModeDetail': 'dsh-web-ui or one of its components is installed via a local link and cannot be updated remotely. Latest npm release: {version}. Sync the local checkout, or remove a standalone link duplicated by the aggregate.',
|
|
209
209
|
'update.missing': 'dsh-web-ui not found',
|
|
210
210
|
'update.missingDetail': 'Could not locate the installed dsh-web-ui aggregate package. Install it with: dsh plugin --profile <profile> add @linxin666/dsh-web-ui-all',
|
|
211
211
|
'update.offline': 'Cannot reach the update source',
|
|
@@ -219,7 +219,7 @@ export const en = {
|
|
|
219
219
|
'update.error.pnpmMissing': 'pnpm was not found (tried pnpm / corepack / npx). Install pnpm and restart the app (Windows: npm install -g pnpm or corepack enable; macOS: brew install pnpm or corepack enable).',
|
|
220
220
|
'update.error.timeout': 'The update timed out and the install process was killed; try again.',
|
|
221
221
|
'update.error.notFound': 'The dsh-web-ui aggregate package is not installed; nothing to update.',
|
|
222
|
-
'update.error.link': '
|
|
222
|
+
'update.error.link': 'dsh-web-ui or one of its components uses a local link. Sync the checkout, or remove a standalone link duplicated by the aggregate.',
|
|
223
223
|
'update.error.pnpmFailed': 'The update failed (pnpm exited with code {code}); see the output below.',
|
|
224
224
|
'update.error.stale': 'The update command ran but the installed versions did not change. Likely cause: the pnpm 11 minimumReleaseAge gate silently skips releases published less than 24 hours ago. Add minimumReleaseAgeExclude (e.g. "@linxin666/*") or set minimumReleaseAge: 0 in pnpm-workspace.yaml under the profile directory (~/.dsh/profiles/<profile>), then run the update again.',
|
|
225
225
|
'update.error.verifyFailed': 'The update command ran but the installed versions could not be verified afterwards (registry probe failed or the install path changed). Inspect the output below, or retry later.',
|
|
@@ -333,9 +333,11 @@ export class CardForm<T> {
|
|
|
333
333
|
const valid = plan.filter(item => item.run !== undefined)
|
|
334
334
|
if (plan.length === 0 || this.saving || valid.length !== plan.length) return
|
|
335
335
|
const plannedWrites = valid.map(item => item.op)
|
|
336
|
-
// Snapshot the
|
|
337
|
-
// flight
|
|
338
|
-
|
|
336
|
+
// Snapshot the staged entries this save writes, so an edit staged while it
|
|
337
|
+
// is in flight (which replaces the same key) survives: only delete the key
|
|
338
|
+
// when the entry is still the one this save started from.
|
|
339
|
+
const pending = new Map<string, StagedEdit | undefined>()
|
|
340
|
+
for (const item of plan) pending.set(item.field, this.staged.get(item.field))
|
|
339
341
|
this.saving = true
|
|
340
342
|
this.failed = false
|
|
341
343
|
this.failedReason = undefined
|
|
@@ -356,11 +358,11 @@ export class CardForm<T> {
|
|
|
356
358
|
if (await item.run!()) landed.add(item.field)
|
|
357
359
|
}
|
|
358
360
|
}
|
|
359
|
-
for (const field of
|
|
360
|
-
if (landed.has(field)) this.staged.delete(field)
|
|
361
|
+
for (const [field, before] of pending) {
|
|
362
|
+
if (landed.has(field) && this.staged.get(field) === before) this.staged.delete(field)
|
|
361
363
|
}
|
|
362
364
|
this.saving = false
|
|
363
|
-
this.failed = landed.size !==
|
|
365
|
+
this.failed = landed.size !== pending.size
|
|
364
366
|
this.publish()
|
|
365
367
|
}
|
|
366
368
|
|
package/src/update.ts
CHANGED
|
@@ -144,6 +144,18 @@ export function isLinkedSpec(spec: DependencySpec): boolean {
|
|
|
144
144
|
return /^(?:link|file):|^\.{1,2}(?:[/\\]|$)/.test(spec)
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
/** Whether a direct local dependency overrides one of the aggregate's children. */
|
|
148
|
+
function hasLinkedFamilyOverride(
|
|
149
|
+
anchorManifest: Record<string, unknown>,
|
|
150
|
+
profileManifest: Record<string, unknown> | undefined,
|
|
151
|
+
): boolean {
|
|
152
|
+
const dependencies = profileManifest?.dependencies
|
|
153
|
+
if (typeof dependencies !== 'object' || dependencies === null) return false
|
|
154
|
+
return familyChildren(anchorManifest).some(name =>
|
|
155
|
+
isLinkedSpec((dependencies as Record<string, DependencySpec>)[name]),
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
|
|
147
159
|
/** One package's current-vs-latest comparison. */
|
|
148
160
|
export interface UpdatePackageStatus {
|
|
149
161
|
/** Package name. */
|
|
@@ -234,7 +246,7 @@ export function resolveUpdateTarget(
|
|
|
234
246
|
if (profile === undefined) return { error: 'link' }
|
|
235
247
|
const profileManifest = readManifest(join(profile.dir, 'package.json'))
|
|
236
248
|
const spec = (profileManifest?.dependencies as Record<string, DependencySpec> | undefined)?.[anchor]
|
|
237
|
-
if (isLinkedSpec(spec)) return { error: 'link' }
|
|
249
|
+
if (isLinkedSpec(spec) || hasLinkedFamilyOverride(manifest, profileManifest)) return { error: 'link' }
|
|
238
250
|
// Standalone installs carry no aggregate: the anchor's own dependency
|
|
239
251
|
// list misses every sibling @linxin666/* plugin installed directly into
|
|
240
252
|
// the profile, so union the profile's direct family deps (#377).
|
|
@@ -353,6 +365,7 @@ export async function checkUpdates(deps: UpdateCheckDeps): Promise<UpdateStatus>
|
|
|
353
365
|
const profileManifest = profile === undefined ? undefined : readManifest(join(profile.dir, "package.json"))
|
|
354
366
|
const linked = profile === undefined
|
|
355
367
|
|| isLinkedSpec((profileManifest?.dependencies as Record<string, DependencySpec> | undefined)?.[anchor])
|
|
368
|
+
|| hasLinkedFamilyOverride(manifest, profileManifest)
|
|
356
369
|
if (profile === undefined) {
|
|
357
370
|
return { mode: 'link', packages: [], outdated: false }
|
|
358
371
|
}
|