dsh-life-pack 0.3.61 → 0.3.62

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/dist/client.js CHANGED
@@ -471,7 +471,7 @@ window.__ModuleLoader__.load({
471
471
  path: "/api/ilife-manager"
472
472
  };
473
473
  //#endregion
474
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.1/node_modules/dsh-plugin-update/dist/config.js
474
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.2/node_modules/dsh-plugin-update/dist/config.js
475
475
  const DEFAULT_PANEL_POLL_MS = 1e3;
476
476
  function assertPrefix(value, role) {
477
477
  if (typeof value !== "string" || value.length === 0) throw new Error("[dsh-plugin-update] " + role + " 非法:须为非空字符串(收到 " + JSON.stringify(value) + ")");
@@ -492,7 +492,7 @@ window.__ModuleLoader__.load({
492
492
  return buildPhoneNames(prefix).logAppend;
493
493
  }
494
494
  //#endregion
495
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.1/node_modules/dsh-plugin-update/dist/redaction.js
495
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.2/node_modules/dsh-plugin-update/dist/redaction.js
496
496
  const COPY_BUDGET_CHARS = 1500;
497
497
  const REDACTED_PATH = "<路径>";
498
498
  const REDACTED_SECRET = "<脱敏>";
@@ -556,7 +556,7 @@ window.__ModuleLoader__.load({
556
556
  return truncateForCopy(scrubWithoutBudget(flat));
557
557
  }
558
558
  //#endregion
559
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.1/node_modules/dsh-plugin-update/dist/service.js
559
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.2/node_modules/dsh-plugin-update/dist/service.js
560
560
  function updateError(code) {
561
561
  return Object.assign(new Error(code), { code });
562
562
  }
@@ -643,7 +643,7 @@ window.__ModuleLoader__.load({
643
643
  return 0;
644
644
  }
645
645
  //#endregion
646
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.1/node_modules/dsh-plugin-update/dist/lang.js
646
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.2/node_modules/dsh-plugin-update/dist/lang.js
647
647
  function normalizeLangTag(tag) {
648
648
  if (typeof tag !== "string") return "zh";
649
649
  const s = tag.trim().toLowerCase().replace(/_/g, "-");
@@ -785,7 +785,7 @@ window.__ModuleLoader__.load({
785
785
  };
786
786
  }
787
787
  //#endregion
788
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.1/node_modules/dsh-plugin-update/dist/bilingual.js
788
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.2/node_modules/dsh-plugin-update/dist/bilingual.js
789
789
  const BILINGUAL_STRINGS = {
790
790
  "entry.label.idle": {
791
791
  en: "Check for updates",
@@ -2432,7 +2432,7 @@ window.__ModuleLoader__.load({
2432
2432
  }
2433
2433
  const BILINGUAL_CSS = [".dsh-upd-bi{display:inline;overflow-wrap:anywhere}", ".dsh-upd-bi [lang]{overflow-wrap:anywhere}"].join("\n");
2434
2434
  //#endregion
2435
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.1/node_modules/dsh-plugin-update/dist/changelog.js
2435
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.2/node_modules/dsh-plugin-update/dist/changelog.js
2436
2436
  const CHANGELOG_MAX_CHARS = 65536;
2437
2437
  const CHANGELOG_ALL_CATEGORIES = [
2438
2438
  "Added",
@@ -3540,7 +3540,7 @@ ${note}${blocks.join("\n")}
3540
3540
  }
3541
3541
  }
3542
3542
  //#endregion
3543
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.1/node_modules/dsh-plugin-update/dist/log-events.js
3543
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.2/node_modules/dsh-plugin-update/dist/log-events.js
3544
3544
  const LOG_EVENT_CALL = "host.call";
3545
3545
  const LOG_EVENT_CALL_FAIL = "host.call.fail";
3546
3546
  const LOG_EVENT_INSTALL_EXEC = "update.install.exec";
@@ -3791,7 +3791,7 @@ ${note}${blocks.join("\n")}
3791
3791
  };
3792
3792
  }
3793
3793
  //#endregion
3794
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.1/node_modules/dsh-plugin-update/dist/codes.js
3794
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.2/node_modules/dsh-plugin-update/dist/codes.js
3795
3795
  const BLOCKED_REASONS = [
3796
3796
  "unknown-profile",
3797
3797
  "channel-mismatch",
@@ -3825,7 +3825,7 @@ ${note}${blocks.join("\n")}
3825
3825
  return typeof code === "string" && isOneOf(CHECK_SIDE_FAILURE_CODES, code.trim());
3826
3826
  }
3827
3827
  //#endregion
3828
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.1/node_modules/dsh-plugin-update/dist/panel.js
3828
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.2/node_modules/dsh-plugin-update/dist/panel.js
3829
3829
  function normalizePanelTheme(value) {
3830
3830
  return value === "archive" ? "archive" : "default";
3831
3831
  }
@@ -5060,7 +5060,7 @@ ${UPDATE_PANEL_ARCHIVE_CSS}` : UPDATE_PANEL_CSS}</style>
5060
5060
  ${body}`;
5061
5061
  }
5062
5062
  //#endregion
5063
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.1/node_modules/dsh-plugin-update/dist/entry.js
5063
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.2/node_modules/dsh-plugin-update/dist/entry.js
5064
5064
  const UPDATE_ENTRY_CSS = [
5065
5065
  ".dsh-upd-entry{display:inline-flex;align-items:center;gap:8px;font:13px/1.6 var(--dsh-update-font-sans,system-ui,\"Microsoft YaHei\",sans-serif);font-size:var(--dsh-update-entry-font-size,13px);color:var(--dsh-update-text,#1f2937)}",
5066
5066
  ".dsh-upd-entry-btn{font:inherit;border:1px solid var(--dsh-update-border,#d1d5db);border-radius:var(--dsh-update-entry-border-radius,6px);",
@@ -5174,7 +5174,7 @@ ${body}`;
5174
5174
  }
5175
5175
  }
5176
5176
  //#endregion
5177
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.1/node_modules/dsh-plugin-update/dist/panel-batch.js
5177
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.2/node_modules/dsh-plugin-update/dist/panel-batch.js
5178
5178
  const BATCH_PANEL_POLL = {
5179
5179
  defaultMs: 1500,
5180
5180
  minMs: 250
@@ -5357,7 +5357,7 @@ ${body}`;
5357
5357
  latest: sessionTarget,
5358
5358
  hasUpdate: true
5359
5359
  };
5360
- if (current2 === sessionTarget) return {
5360
+ if (current2 === sessionTarget || !isUpgradeOf(sessionTarget, current2)) return {
5361
5361
  current: current2,
5362
5362
  latest: null,
5363
5363
  hasUpdate: false
@@ -5372,7 +5372,7 @@ ${body}`;
5372
5372
  const knowledgeCurrent = knowledge && knowledge.installed !== false && typeof knowledge.installedVersion === "string" && knowledge.installedVersion ? knowledge.installedVersion : null;
5373
5373
  const current = snapshotCurrent ?? knowledgeCurrent;
5374
5374
  const latest = knowledge && typeof knowledge.latestVersion === "string" && knowledge.latestVersion ? knowledge.latestVersion : null;
5375
- if (current && latest && latest !== current) return {
5375
+ if (current && latest && latest !== current && isUpgradeOf(latest, current)) return {
5376
5376
  current,
5377
5377
  latest,
5378
5378
  hasUpdate: true
@@ -5393,6 +5393,13 @@ ${body}`;
5393
5393
  hasUpdate: false
5394
5394
  };
5395
5395
  }
5396
+ function isUpgradeOf(target, current) {
5397
+ try {
5398
+ return compareReleaseVersions(target, current) === 1;
5399
+ } catch {
5400
+ return true;
5401
+ }
5402
+ }
5396
5403
  function batchRowVersionHTML(row, knowledge, lang) {
5397
5404
  const parts = batchRowVersionParts(row, knowledge);
5398
5405
  if (parts.hasUpdate && parts.latest) {
@@ -6693,7 +6700,7 @@ ${body}`;
6693
6700
  };
6694
6701
  }
6695
6702
  //#endregion
6696
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.1/node_modules/dsh-plugin-update/dist/entry-batch.js
6703
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.2/node_modules/dsh-plugin-update/dist/entry-batch.js
6697
6704
  function isObject$1(value) {
6698
6705
  return !!value && typeof value === "object" && !Array.isArray(value);
6699
6706
  }
@@ -10652,7 +10659,7 @@ ${body}`;
10652
10659
  }, react.createElement("span", { style: S.morePkg }, row.pkg), react.createElement("span", { style: S.moreDesc }, row.desc), react.createElement("span", { style: S.moreIcon }, react.createElement(ExternalIcon, null)))));
10653
10660
  }
10654
10661
  /** 版本胶囊那一行字:只在这里拼一次,屏上与用例读的是同一串。 */
10655
- const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.61";
10662
+ const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.62";
10656
10663
  /** 右下角那本书离面板两沿的距离:用户口径「一直处于面板右下角、不随列表滑动消失」
10657
10664
  * ⇒ sticky 吸附(面板相对,视口多大都落在面板角上);INSET=右沿,BOTTOM=底沿。 */
10658
10665
  const MANUAL_ENTRY_INSET = 16;