dsh-multipane 1.0.11 → 1.0.12

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
@@ -246,6 +246,10 @@ C:\Users\weiai\.dsh\plugin-src\_probe\sync-client.ps1 -Push # 台式机 ->
246
246
 
247
247
  ## 更新记录
248
248
 
249
+ ### 1.0.12(2026-11-10)
250
+ - 修上一版读取更新结果的两个字段:`restartRequired` 实际在 `outcome` 里、失败原因在 `failure.message`(不在顶层)。
251
+ 之前会把「需要重启」误判成「刷新即可」,失败时也只显示状态名而不是市场给的原因。
252
+
249
253
  ### 1.0.11(2026-11-10)
250
254
  - **插件内一键更新**:设置页的「检查更新」改为走插件市场(dshmarket)的公开 update API v1 —— 发现新版直接给「立即更新」按钮,
251
255
  由插件市场负责装包、校验版本、保留回滚点;完成后按它返回的 `refreshRequired` / `restartRequired` 告诉你刷新还是重启
package/lib/client.js CHANGED
@@ -17,7 +17,7 @@ window.__ModuleLoader__.load({
17
17
  */
18
18
  const PLUGIN_LABEL = "多栏视图";
19
19
  /* 与 package.json 的 version 必须一致(发版时两处同改;check-names.cjs 会校验)。 */
20
- const PLUGIN_VERSION = "1.0.11";
20
+ const PLUGIN_VERSION = "1.0.12";
21
21
  const NPM_LATEST_URL = "https://registry.npmjs.org/dsh-multipane/latest";
22
22
  /* 插件市场的公开更新 API v1(dshmarket 提供,见其 UPDATE-API-V1.md)。
23
23
  它自己负责装包/校验版本/回滚,我们只负责触发和显示结果——
@@ -6469,7 +6469,9 @@ const TAB_LABEL_CHROME_DOT_PX = 46;
6469
6469
  const state = String(op.state ?? "");
6470
6470
  if (state === "succeeded") {
6471
6471
  const got = String(op.installedVersion ?? "");
6472
- const needRestart = op.restartRequired === true;
6472
+ /* restartRequired / refreshRequired 都在 outcome 里(实测 2026-11-10),不在顶层 */
6473
+ const outcome = op.outcome === null || op.outcome === void 0 ? {} : op.outcome;
6474
+ const needRestart = outcome.restartRequired === true;
6473
6475
  setUpdate({
6474
6476
  phase: "done",
6475
6477
  text: `已更新${got === "" ? "" : "到 " + got}${needRestart ? ",重启 App 后生效" : ",刷新页面即可生效"}`,
@@ -6479,7 +6481,9 @@ const TAB_LABEL_CHROME_DOT_PX = 46;
6479
6481
  return;
6480
6482
  }
6481
6483
  if (state === "failed" || state === "cancelled" || state === "rolled-back") {
6482
- throw new Error(String(op.message ?? op.failureCode ?? state));
6484
+ /* 失败详情在 failure: {code, message, retryable}(实测 2026-11-10) */
6485
+ const fail = op.failure === null || op.failure === void 0 ? {} : op.failure;
6486
+ throw new Error(String(fail.message ?? fail.code ?? state));
6483
6487
  }
6484
6488
  const pct = op.progress === null || op.progress === void 0 ? void 0 : op.progress.percent;
6485
6489
  setUpdate((prev) => ({ ...prev, text: typeof pct === "number" ? `正在更新… ${Math.round(pct)}%` : "正在更新…" }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-multipane",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "Hermes-style tabbed workspace for the DSH main area: drag sessions in, split into up to four columns, close tabs.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",