dsh-multipane 1.0.14 → 1.0.15

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,12 @@ C:\Users\weiai\.dsh\plugin-src\_probe\sync-client.ps1 -Push # 台式机 ->
246
246
 
247
247
  ## 更新记录
248
248
 
249
+ ### 1.0.15(2026-11-10)
250
+ - 修 1.0.11~1.0.14 里「立即更新」必然失败的问题:插件市场的 POST 响应把 `operationId` 放在 `operation` 对象里
251
+ (`{schema, operation:{operationId}}`),之前读的是顶层,所以每次都报「没有返回操作 id」。
252
+ - 观察期不再承诺「强制更新」:实测市场即使收到 `force: true` 仍会拒绝(`OPERATION_BUSY`,该版本被 held),
253
+ 这是市场侧硬限制。现在文案改成「过一会儿点重新检查」,按钮也换成「重新检查」,不误导。
254
+
249
255
  ### 1.0.14(2026-11-10)
250
256
  - **设置页内直接更新**:检查到新版本后**弹窗**显示「当前版本 → 新版本」,弹窗里就有「立即更新」按钮,
251
257
  点它由插件市场装包并在弹窗里跑进度条,完成后给「刷新页面」。全程不用去插件页输入包名。
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.14";
20
+ const PLUGIN_VERSION = "1.0.15";
21
21
  const NPM_LATEST_URL = "https://registry.npmjs.org/dsh-multipane/latest";
22
22
  /* 插件市场的公开更新 API v1(dshmarket 提供,见其 UPDATE-API-V1.md)。
23
23
  它自己负责装包/校验版本/回滚,我们只负责触发和显示结果——
@@ -6478,7 +6478,7 @@ const TAB_LABEL_CHROME_DOT_PX = 46;
6478
6478
  modal: true,
6479
6479
  installed,
6480
6480
  latest,
6481
- forceHint: "插件市场对刚发布的版本有观察期,通常十几分钟到几十分钟。可以稍后再试,也可以直接点「强制更新」现在就装。",
6481
+ forceHint: "插件市场对刚发布的版本有观察期(通常十几分钟到几小时,防供应链投毒),这段时间装会被市场拒绝。过一会儿点「重新检查」,放行后再更新即可。",
6482
6482
  progress: null
6483
6483
  });
6484
6484
  } else {
@@ -6535,7 +6535,9 @@ const TAB_LABEL_CHROME_DOT_PX = 46;
6535
6535
  throw new Error(`HTTP ${res.status}${detail === "" ? "" : ":" + detail}`);
6536
6536
  }
6537
6537
  const created = await res.json();
6538
- const opId = String((created && created.operationId) || "");
6538
+ /* 实测返回形状:{ schema, operation: { operationId, state, ... } } —— id 在 operation 里,不在顶层 */
6539
+ const createdOp = created === null || created === void 0 ? {} : created.operation ?? created;
6540
+ const opId = String((createdOp && createdOp.operationId) || (created && created.operationId) || "");
6539
6541
  if (opId === "") throw new Error("没有返回操作 id");
6540
6542
  setUpdate((prev) => ({ ...prev, opId }));
6541
6543
  for (let step = 0; step < 80; step += 1) {
@@ -6594,7 +6596,6 @@ const TAB_LABEL_CHROME_DOT_PX = 46;
6594
6596
  ...prev,
6595
6597
  phase: "error",
6596
6598
  text: `更新失败:${String((err && err.message) || err)}`,
6597
- canUpdate: false,
6598
6599
  opId: "",
6599
6600
  modal: true,
6600
6601
  progress: null
@@ -6946,10 +6947,10 @@ const TAB_LABEL_CHROME_DOT_PX = 46;
6946
6947
  key: "go",
6947
6948
  type: "button",
6948
6949
  "data-primary": "1",
6949
- disabled: update.phase === "updating" || update.canUpdate !== true,
6950
- onClick: () => runUpdate(update.forceHint !== "")
6950
+ disabled: update.phase === "updating",
6951
+ onClick: () => (update.canUpdate === true ? runUpdate(false) : checkUpdate())
6951
6952
  },
6952
- update.phase === "updating" ? "更新中…" : update.forceHint !== "" && update.canUpdate === true ? "强制更新" : "立即更新"
6953
+ update.phase === "updating" ? "更新中…" : update.canUpdate === true ? "立即更新" : "重新检查"
6953
6954
  )
6954
6955
  ]
6955
6956
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-multipane",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
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",