dsh-life-pack 0.3.67 → 0.3.68
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 +75 -17
- package/dist/client.js.map +1 -1
- package/package.json +2 -2
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.
|
|
474
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.11/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) + ")");
|
|
@@ -493,7 +493,7 @@ window.__ModuleLoader__.load({
|
|
|
493
493
|
return buildPhoneNames(prefix).logAppend;
|
|
494
494
|
}
|
|
495
495
|
//#endregion
|
|
496
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
496
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.11/node_modules/dsh-plugin-update/dist/version-judgment.js
|
|
497
497
|
function updateError(code) {
|
|
498
498
|
return Object.assign(new Error(code), { code });
|
|
499
499
|
}
|
|
@@ -580,7 +580,7 @@ window.__ModuleLoader__.load({
|
|
|
580
580
|
return 0;
|
|
581
581
|
}
|
|
582
582
|
//#endregion
|
|
583
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
583
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.11/node_modules/dsh-plugin-update/dist/lang.js
|
|
584
584
|
function normalizeLangTag(tag) {
|
|
585
585
|
if (typeof tag !== "string") return "zh";
|
|
586
586
|
const s = tag.trim().toLowerCase().replace(/_/g, "-");
|
|
@@ -722,7 +722,7 @@ window.__ModuleLoader__.load({
|
|
|
722
722
|
};
|
|
723
723
|
}
|
|
724
724
|
//#endregion
|
|
725
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
725
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.11/node_modules/dsh-plugin-update/dist/bilingual.js
|
|
726
726
|
const BILINGUAL_STRINGS = {
|
|
727
727
|
"entry.label.idle": {
|
|
728
728
|
en: "Check for updates",
|
|
@@ -2289,6 +2289,16 @@ window.__ModuleLoader__.load({
|
|
|
2289
2289
|
zh: "诊断信息已复制,请提交至插件作者(已脱敏)。",
|
|
2290
2290
|
draft: true
|
|
2291
2291
|
},
|
|
2292
|
+
"batch.toast.copy-all-diag-ok": {
|
|
2293
|
+
en: "Diagnostics for {n} plugin(s) copied; paste them to the plugin author (already redacted).",
|
|
2294
|
+
zh: "已复制 {n} 家插件的诊断,请提交至插件作者(已脱敏)。",
|
|
2295
|
+
draft: true
|
|
2296
|
+
},
|
|
2297
|
+
"batch.toast.copy-all-manual-ok": {
|
|
2298
|
+
en: "{n} manual command(s) copied (plugins without a command are marked as # comments); paste them into the terminal line by line.",
|
|
2299
|
+
zh: "已复制 {n} 条手工命令(无命令的插件已用 # 注释标注),请粘贴至终端逐行执行。",
|
|
2300
|
+
draft: true
|
|
2301
|
+
},
|
|
2292
2302
|
"batch.toast.restart-delegated": {
|
|
2293
2303
|
en: "Handled by the caller’s restart flow; the new version takes effect after restart.",
|
|
2294
2304
|
zh: "已按调用方重启流程处理;重启后新版本生效。",
|
|
@@ -2499,7 +2509,7 @@ window.__ModuleLoader__.load({
|
|
|
2499
2509
|
}
|
|
2500
2510
|
const BILINGUAL_CSS = [".dsh-upd-bi{display:inline;overflow-wrap:anywhere}", ".dsh-upd-bi [lang]{overflow-wrap:anywhere}"].join("\n");
|
|
2501
2511
|
//#endregion
|
|
2502
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
2512
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.11/node_modules/dsh-plugin-update/dist/changelog.js
|
|
2503
2513
|
const CHANGELOG_MAX_CHARS = 65536;
|
|
2504
2514
|
const CHANGELOG_ALL_CATEGORIES = [
|
|
2505
2515
|
"Added",
|
|
@@ -3607,7 +3617,7 @@ ${note}${blocks.join("\n")}
|
|
|
3607
3617
|
}
|
|
3608
3618
|
}
|
|
3609
3619
|
//#endregion
|
|
3610
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
3620
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.11/node_modules/dsh-plugin-update/dist/log-events.js
|
|
3611
3621
|
const LOG_EVENT_CALL = "host.call";
|
|
3612
3622
|
const LOG_EVENT_CALL_FAIL = "host.call.fail";
|
|
3613
3623
|
const LOG_EVENT_INSTALL_EXEC = "update.install.exec";
|
|
@@ -3858,7 +3868,7 @@ ${note}${blocks.join("\n")}
|
|
|
3858
3868
|
};
|
|
3859
3869
|
}
|
|
3860
3870
|
//#endregion
|
|
3861
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
3871
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.11/node_modules/dsh-plugin-update/dist/codes.js
|
|
3862
3872
|
const BLOCKED_REASONS = [
|
|
3863
3873
|
"unknown-profile",
|
|
3864
3874
|
"channel-mismatch",
|
|
@@ -3893,7 +3903,7 @@ ${note}${blocks.join("\n")}
|
|
|
3893
3903
|
return typeof code === "string" && isOneOf(CHECK_SIDE_FAILURE_CODES, code.trim());
|
|
3894
3904
|
}
|
|
3895
3905
|
//#endregion
|
|
3896
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
3906
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.11/node_modules/dsh-plugin-update/dist/install-cause.js
|
|
3897
3907
|
const CAUSE_KINDS = ["minimum-release-age"];
|
|
3898
3908
|
const CAUSE_SIGNATURES = [{
|
|
3899
3909
|
kind: "minimum-release-age",
|
|
@@ -4013,7 +4023,7 @@ ${note}${blocks.join("\n")}
|
|
|
4013
4023
|
}
|
|
4014
4024
|
}
|
|
4015
4025
|
//#endregion
|
|
4016
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
4026
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.11/node_modules/dsh-plugin-update/dist/redaction.js
|
|
4017
4027
|
const COPY_BUDGET_CHARS = 1500;
|
|
4018
4028
|
const REDACTED_PATH = "<路径>";
|
|
4019
4029
|
const REDACTED_SECRET = "<脱敏>";
|
|
@@ -4077,7 +4087,7 @@ ${note}${blocks.join("\n")}
|
|
|
4077
4087
|
return truncateForCopy(scrubWithoutBudget(flat));
|
|
4078
4088
|
}
|
|
4079
4089
|
//#endregion
|
|
4080
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
4090
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.11/node_modules/dsh-plugin-update/dist/panel-copy.js
|
|
4081
4091
|
const BLOCKED_KEYS = {
|
|
4082
4092
|
"unknown-profile": {
|
|
4083
4093
|
title: "panel.blocked.unknown-profile.title",
|
|
@@ -4388,7 +4398,7 @@ ${note}${blocks.join("\n")}
|
|
|
4388
4398
|
].join("\n");
|
|
4389
4399
|
}
|
|
4390
4400
|
//#endregion
|
|
4391
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
4401
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.11/node_modules/dsh-plugin-update/dist/panel.js
|
|
4392
4402
|
function normalizePanelTheme(value) {
|
|
4393
4403
|
return value === "archive" ? "archive" : "default";
|
|
4394
4404
|
}
|
|
@@ -5478,7 +5488,7 @@ ${UPDATE_PANEL_ARCHIVE_CSS}` : UPDATE_PANEL_CSS}</style>
|
|
|
5478
5488
|
${body}`;
|
|
5479
5489
|
}
|
|
5480
5490
|
//#endregion
|
|
5481
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
5491
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.11/node_modules/dsh-plugin-update/dist/entry.js
|
|
5482
5492
|
const UPDATE_ENTRY_CSS = [
|
|
5483
5493
|
".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)}",
|
|
5484
5494
|
".dsh-upd-entry-btn{font:inherit;border:1px solid var(--dsh-update-border,#d1d5db);border-radius:var(--dsh-update-entry-border-radius,6px);",
|
|
@@ -5592,7 +5602,7 @@ ${body}`;
|
|
|
5592
5602
|
}
|
|
5593
5603
|
}
|
|
5594
5604
|
//#endregion
|
|
5595
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
5605
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.11/node_modules/dsh-plugin-update/dist/panel-batch.js
|
|
5596
5606
|
const BATCH_PANEL_POLL = {
|
|
5597
5607
|
defaultMs: 1500,
|
|
5598
5608
|
minMs: 250
|
|
@@ -6075,7 +6085,7 @@ ${body}`;
|
|
|
6075
6085
|
if (act) parts.push("<div class=\"dsh-upd-banner-sub\">" + escapeHtml$2(act) + "</div>");
|
|
6076
6086
|
}
|
|
6077
6087
|
const pendingRestartRow = (row) => asBatchPhase(row.phase) === "failed" && row.error === "pending-restart";
|
|
6078
|
-
const failed = rows
|
|
6088
|
+
const failed = batchFailedRows(rows);
|
|
6079
6089
|
if (failed.length > 0) {
|
|
6080
6090
|
const lines = failed.map((row) => {
|
|
6081
6091
|
const code = row.error || "install-failed";
|
|
@@ -6083,7 +6093,8 @@ ${body}`;
|
|
|
6083
6093
|
return "<div>" + escapeHtml$2(titleOf(row, titles)) + ":<code>" + escapeHtml$2(code) + "</code> " + escapeHtml$2(copy?.zh ?? failureCopy("unknown", l)?.zh ?? "") + "</div>";
|
|
6084
6094
|
}).join("");
|
|
6085
6095
|
const failedAct = batchText("batch.banner.failed-action", l);
|
|
6086
|
-
|
|
6096
|
+
const manualAbsent = batchFailedManualText(failed, l, titles).commands === 0;
|
|
6097
|
+
parts.push("<div class=\"dsh-upd-banner\" data-kind=\"failed\" data-mini=\"阻\" role=\"status\"><div><span class=\"dsh-upd-sealmini\" aria-hidden=\"true\">阻</span><strong>" + escapeHtml$2(batchText("batch.banner.failed-title", l, { n: String(failed.length) })) + "</strong></div><div class=\"dsh-upd-blist\">" + lines + "</div><div class=\"dsh-upd-browline\"><span class=\"dsh-upd-bcopy\"><button type=\"button\" data-act=\"copy-all-diag\">" + escapeHtml$2(batchText("batch.row-action.copy-diag", l)) + "</button><button type=\"button\" data-act=\"copy-all-manual\"" + (manualAbsent ? " disabled title=\"" + escapeHtml$2(batchText("panel.manual.absent", l)) + "\"" : "") + ">" + escapeHtml$2(batchText("batch.row-action.copy-manual", l)) + "</button></span></div></div>");
|
|
6087
6098
|
if (failedAct) parts.push("<div class=\"dsh-upd-banner-sub\">" + escapeHtml$2(failedAct) + "</div>");
|
|
6088
6099
|
}
|
|
6089
6100
|
if (confirmList) parts.push("<div class=\"dsh-upd-banner\" data-kind=\"update\" role=\"status\"><div><strong>" + escapeHtml$2(batchText("batch.banner.compliant-confirm", l, { list: confirmList })) + "</strong></div><div class=\"dsh-upd-browline\"><span class=\"dsh-upd-blist\">" + escapeHtml$2(confirmList) + "</span><button type=\"button\" data-act=\"batch-fallback-confirm\" data-primary=\"1\"" + (compliantBusy ? " disabled" : "") + ">" + escapeHtml$2(batchText("batch.action.install-compliant-confirm", l, { n: String(confirmCount) })) + "</button></div></div>");
|
|
@@ -6276,6 +6287,8 @@ ${body}`;
|
|
|
6276
6287
|
".dsh-upd-browline{display:flex;align-items:center;gap:10px;flex-wrap:wrap}",
|
|
6277
6288
|
".dsh-upd-browline>.dsh-upd-blist{flex:1 1 auto;min-width:0;text-align:left;margin:0}",
|
|
6278
6289
|
".dsh-upd-browline>button{flex:none;margin:0;margin-left:auto}",
|
|
6290
|
+
".dsh-upd-browline>.dsh-upd-bcopy{display:inline-flex;align-items:center;gap:10px;flex:none;margin-left:auto}",
|
|
6291
|
+
".dsh-upd-browline>.dsh-upd-bcopy>button{flex:none;margin:0}",
|
|
6279
6292
|
".dsh-upd-batch-ledger{margin:8px 0 0;font-size:var(--dsh-update-panel-log-font-size,13px);opacity:.85}",
|
|
6280
6293
|
".dsh-upd-batch-more{margin-top:6px}",
|
|
6281
6294
|
".dsh-upd-batch-more button{font-size:12px}",
|
|
@@ -6450,6 +6463,17 @@ ${body}`;
|
|
|
6450
6463
|
return null;
|
|
6451
6464
|
}
|
|
6452
6465
|
}
|
|
6466
|
+
function batchFailedRows(rows) {
|
|
6467
|
+
const out = [];
|
|
6468
|
+
for (const row of rows) {
|
|
6469
|
+
if (asBatchPhase(row.phase) !== "failed") continue;
|
|
6470
|
+
if (isQueueBusyRow(row)) continue;
|
|
6471
|
+
if (row.error === "pending-restart") continue;
|
|
6472
|
+
if (compliantInstalledOf(row) !== null) continue;
|
|
6473
|
+
out.push(row);
|
|
6474
|
+
}
|
|
6475
|
+
return out;
|
|
6476
|
+
}
|
|
6453
6477
|
function asBatchPhase(value) {
|
|
6454
6478
|
return typeof value === "string" && BATCH_PHASES.includes(value) ? value : "pending";
|
|
6455
6479
|
}
|
|
@@ -6562,6 +6586,27 @@ ${body}`;
|
|
|
6562
6586
|
lang: lang ?? "zh"
|
|
6563
6587
|
});
|
|
6564
6588
|
}
|
|
6589
|
+
function batchFailedDiagText(rows, lang) {
|
|
6590
|
+
return batchFailedRows(rows).map((row) => diagTextOf(row, lang)).join("\n\n");
|
|
6591
|
+
}
|
|
6592
|
+
function batchFailedManualText(rows, lang, titles = {}) {
|
|
6593
|
+
const l = langOf(lang);
|
|
6594
|
+
const lines = [];
|
|
6595
|
+
let commands = 0;
|
|
6596
|
+
for (const row of batchFailedRows(rows)) {
|
|
6597
|
+
const manual = typeof row.manual === "string" ? row.manual : "";
|
|
6598
|
+
if (manual) {
|
|
6599
|
+
lines.push(manual);
|
|
6600
|
+
commands += 1;
|
|
6601
|
+
continue;
|
|
6602
|
+
}
|
|
6603
|
+
lines.push("# " + titleOf(row, titles) + ":" + batchText("panel.manual.absent", l));
|
|
6604
|
+
}
|
|
6605
|
+
return {
|
|
6606
|
+
text: lines.join("\n"),
|
|
6607
|
+
commands
|
|
6608
|
+
};
|
|
6609
|
+
}
|
|
6565
6610
|
function isBusyReply(reply) {
|
|
6566
6611
|
if (!isObject$2(reply) || reply["ok"] === true) return false;
|
|
6567
6612
|
const kind = typeof reply["errorKind"] === "string" ? reply["errorKind"] : "";
|
|
@@ -7299,6 +7344,19 @@ ${body}`;
|
|
|
7299
7344
|
await copyWith(diagTextOf(row, currentLang()), batchText("batch.toast.copy-diag-ok", currentLang()), row.key);
|
|
7300
7345
|
return;
|
|
7301
7346
|
}
|
|
7347
|
+
case "copy-all-diag": {
|
|
7348
|
+
const failed = batchFailedRows(rows);
|
|
7349
|
+
if (failed.length === 0) return;
|
|
7350
|
+
await copyWith(batchFailedDiagText(rows, currentLang()), batchText("batch.toast.copy-all-diag-ok", currentLang(), { n: String(failed.length) }), null);
|
|
7351
|
+
return;
|
|
7352
|
+
}
|
|
7353
|
+
case "copy-all-manual": {
|
|
7354
|
+
if (batchFailedRows(rows).length === 0) return;
|
|
7355
|
+
const all = batchFailedManualText(rows, currentLang(), titles);
|
|
7356
|
+
if (all.commands === 0) return;
|
|
7357
|
+
await copyWith(all.text, batchText("batch.toast.copy-all-manual-ok", currentLang(), { n: String(all.commands) }), null);
|
|
7358
|
+
return;
|
|
7359
|
+
}
|
|
7302
7360
|
case "row-fallback": {
|
|
7303
7361
|
const row = typeof key === "string" && key ? rowOfKey(key) : null;
|
|
7304
7362
|
if (!row) return;
|
|
@@ -7684,7 +7742,7 @@ ${body}`;
|
|
|
7684
7742
|
};
|
|
7685
7743
|
}
|
|
7686
7744
|
//#endregion
|
|
7687
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
7745
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.11/node_modules/dsh-plugin-update/dist/entry-batch.js
|
|
7688
7746
|
function isObject$1(value) {
|
|
7689
7747
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
7690
7748
|
}
|
|
@@ -11844,7 +11902,7 @@ ${body}`;
|
|
|
11844
11902
|
}, 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)))));
|
|
11845
11903
|
}
|
|
11846
11904
|
/** 版本胶囊那一行字:只在这里拼一次,屏上与用例读的是同一串。 */
|
|
11847
|
-
const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.
|
|
11905
|
+
const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.68";
|
|
11848
11906
|
/** 右下角那本书离面板两沿的距离:用户口径「一直处于面板右下角、不随列表滑动消失」
|
|
11849
11907
|
* ⇒ sticky 吸附(面板相对,视口多大都落在面板角上);INSET=右沿,BOTTOM=底沿。 */
|
|
11850
11908
|
const MANUAL_ENTRY_INSET = 16;
|