dsh-multipane 1.0.19 → 1.0.20
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 +5 -0
- package/lib/client.js +18 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -246,6 +246,11 @@ C:\Users\weiai\.dsh\plugin-src\_probe\sync-client.ps1 -Push # 台式机 ->
|
|
|
246
246
|
|
|
247
247
|
## 更新记录
|
|
248
248
|
|
|
249
|
+
### 1.0.20(2026-11-10)
|
|
250
|
+
- **说清「已是最新」到底是不是真的最新**:插件市场自己的同步比 npm registry 慢(实测约 20 分钟)。
|
|
251
|
+
以前刚发版就点检查,只会看到「已是最新」并以为功能坏了;现在会补一句
|
|
252
|
+
「npm 上已有 X,插件市场还没同步(通常要 20 分钟左右),稍后再点一次」。
|
|
253
|
+
|
|
249
254
|
### 1.0.19(2026-11-10)
|
|
250
255
|
- **打开设置页就自动检查一次**(静默,不弹窗):一进去就能看到「有新版本 X」或「已是最新(X,12:30 检查)」,
|
|
251
256
|
不用先点按钮、也就不会有「点了没反应」的错觉。手动点「检查更新」时才会弹窗。
|
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.
|
|
20
|
+
const PLUGIN_VERSION = "1.0.20";
|
|
21
21
|
const NPM_LATEST_URL = "https://registry.npmjs.org/dsh-multipane/latest";
|
|
22
22
|
/* 插件市场的公开更新 API v1(dshmarket 提供,见其 UPDATE-API-V1.md)。
|
|
23
23
|
它自己负责装包/校验版本/回滚,我们只负责触发和显示结果——
|
|
@@ -6489,9 +6489,25 @@ const TAB_LABEL_CHROME_DOT_PX = 46;
|
|
|
6489
6489
|
checkedAt: new Date().toLocaleTimeString("zh-CN", { hour: "2-digit", minute: "2-digit" })
|
|
6490
6490
|
});
|
|
6491
6491
|
} else {
|
|
6492
|
+
/* 市场说「已最新」不代表真的没新版:市场自己的同步比 npm registry 慢
|
|
6493
|
+
(实测约 20 分钟)。这里直接问一次 registry,把差额写清楚,
|
|
6494
|
+
否则用户刚发版就点,只会看到「已是最新」并以为功能坏了。 */
|
|
6495
|
+
let lagNote = "";
|
|
6496
|
+
try {
|
|
6497
|
+
const regRes = await fetch(`${NPM_LATEST_URL}?t=${Date.now()}`, { cache: "no-store" });
|
|
6498
|
+
if (regRes.ok === true) {
|
|
6499
|
+
const regData = await regRes.json();
|
|
6500
|
+
const regLatest = String((regData && regData.version) || "");
|
|
6501
|
+
if (regLatest !== "" && compareVersion(regLatest, installed) > 0) {
|
|
6502
|
+
lagNote = `;npm 上已有 ${regLatest},插件市场还没同步(通常要 20 分钟左右),稍后再点一次`;
|
|
6503
|
+
}
|
|
6504
|
+
}
|
|
6505
|
+
} catch {
|
|
6506
|
+
/* 忽略:查不到 registry 就只报市场的结果 */
|
|
6507
|
+
}
|
|
6492
6508
|
setUpdate({
|
|
6493
6509
|
phase: "latest",
|
|
6494
|
-
text: `已是最新版本(${installed},${new Date().toLocaleTimeString("zh-CN", { hour: "2-digit", minute: "2-digit" })}
|
|
6510
|
+
text: `已是最新版本(${installed},${new Date().toLocaleTimeString("zh-CN", { hour: "2-digit", minute: "2-digit" })} 检查)${lagNote}`,
|
|
6495
6511
|
canUpdate: false,
|
|
6496
6512
|
opId: "",
|
|
6497
6513
|
modal: false,
|
package/package.json
CHANGED