dsh-life-pack 0.3.64 → 0.3.65
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 +111 -18
- 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.5/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.
|
|
495
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.5/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.
|
|
559
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.5/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.
|
|
646
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.5/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.
|
|
788
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.5/node_modules/dsh-plugin-update/dist/bilingual.js
|
|
789
789
|
const BILINGUAL_STRINGS = {
|
|
790
790
|
"entry.label.idle": {
|
|
791
791
|
en: "Check for updates",
|
|
@@ -1753,8 +1753,8 @@ window.__ModuleLoader__.load({
|
|
|
1753
1753
|
draft: true
|
|
1754
1754
|
},
|
|
1755
1755
|
"panel.diag.copy.field.registry-unknown": {
|
|
1756
|
-
en: "Source=
|
|
1757
|
-
zh: "
|
|
1756
|
+
en: "Source=Undeclared",
|
|
1757
|
+
zh: "源=未声明",
|
|
1758
1758
|
draft: true
|
|
1759
1759
|
},
|
|
1760
1760
|
"panel.diag.copy.field.action": {
|
|
@@ -2412,6 +2412,26 @@ window.__ModuleLoader__.load({
|
|
|
2412
2412
|
zh: "开发态源码链接,更新中心不可用",
|
|
2413
2413
|
draft: true
|
|
2414
2414
|
},
|
|
2415
|
+
"diag.cause.age.target.timed": {
|
|
2416
|
+
en: "Your plugin {package} was published too recently and was blocked by the host supply-chain age policy (installer words in the summary). Retry after {time}; for urgent use ask the host to relax the policy.",
|
|
2417
|
+
zh: "本插件 {package} 发布未满宿主年龄门限,被供应链策略拦截(安装器原话见摘要)。{time}后点重试即可;急用请找宿主放宽策略。",
|
|
2418
|
+
draft: true
|
|
2419
|
+
},
|
|
2420
|
+
"diag.cause.age.target.untimed": {
|
|
2421
|
+
en: "Your plugin {package} was blocked by the host supply-chain age policy because it is too new (see the summary). Retry later; for urgent use ask the host to relax the policy.",
|
|
2422
|
+
zh: "本插件 {package} 因太新被宿主供应链年龄策略拦截(见摘要)。请稍后重试;急用请找宿主放宽策略。",
|
|
2423
|
+
draft: true
|
|
2424
|
+
},
|
|
2425
|
+
"diag.cause.age.other.timed": {
|
|
2426
|
+
en: "The installer reports: another package in the same environment, {package}, was rejected by a supply-chain age policy — not a problem with this plugin itself (see the summary). Retry after {time}; or ask the host to relax the policy.",
|
|
2427
|
+
zh: "安装器报告:同环境另一包 {package} 因供应链年龄策略被拒,不是本插件的直接问题(见摘要)。{time}后重试;或找宿主放宽策略。",
|
|
2428
|
+
draft: true
|
|
2429
|
+
},
|
|
2430
|
+
"diag.cause.age.other.untimed": {
|
|
2431
|
+
en: "The installer reports: another package in the same environment, {package}, was rejected by a supply-chain age policy — not a problem with this plugin itself (see the summary). Retry later, or ask the host to relax the policy.",
|
|
2432
|
+
zh: "安装器报告:同环境另一包 {package} 因供应链年龄策略被拒,不是本插件的直接问题(见摘要)。请稍后重试,或找宿主放宽策略。",
|
|
2433
|
+
draft: true
|
|
2434
|
+
},
|
|
2415
2435
|
"install-button.action.installed": {
|
|
2416
2436
|
en: "Installed",
|
|
2417
2437
|
zh: "已安装",
|
|
@@ -2447,7 +2467,7 @@ window.__ModuleLoader__.load({
|
|
|
2447
2467
|
}
|
|
2448
2468
|
const BILINGUAL_CSS = [".dsh-upd-bi{display:inline;overflow-wrap:anywhere}", ".dsh-upd-bi [lang]{overflow-wrap:anywhere}"].join("\n");
|
|
2449
2469
|
//#endregion
|
|
2450
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
2470
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.5/node_modules/dsh-plugin-update/dist/changelog.js
|
|
2451
2471
|
const CHANGELOG_MAX_CHARS = 65536;
|
|
2452
2472
|
const CHANGELOG_ALL_CATEGORIES = [
|
|
2453
2473
|
"Added",
|
|
@@ -3555,7 +3575,7 @@ ${note}${blocks.join("\n")}
|
|
|
3555
3575
|
}
|
|
3556
3576
|
}
|
|
3557
3577
|
//#endregion
|
|
3558
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
3578
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.5/node_modules/dsh-plugin-update/dist/log-events.js
|
|
3559
3579
|
const LOG_EVENT_CALL = "host.call";
|
|
3560
3580
|
const LOG_EVENT_CALL_FAIL = "host.call.fail";
|
|
3561
3581
|
const LOG_EVENT_INSTALL_EXEC = "update.install.exec";
|
|
@@ -3806,7 +3826,7 @@ ${note}${blocks.join("\n")}
|
|
|
3806
3826
|
};
|
|
3807
3827
|
}
|
|
3808
3828
|
//#endregion
|
|
3809
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
3829
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.5/node_modules/dsh-plugin-update/dist/codes.js
|
|
3810
3830
|
const BLOCKED_REASONS = [
|
|
3811
3831
|
"unknown-profile",
|
|
3812
3832
|
"channel-mismatch",
|
|
@@ -3841,7 +3861,49 @@ ${note}${blocks.join("\n")}
|
|
|
3841
3861
|
return typeof code === "string" && isOneOf(CHECK_SIDE_FAILURE_CODES, code.trim());
|
|
3842
3862
|
}
|
|
3843
3863
|
//#endregion
|
|
3844
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
3864
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.5/node_modules/dsh-plugin-update/dist/install-cause.js
|
|
3865
|
+
const CAUSE_KINDS = ["minimum-release-age"];
|
|
3866
|
+
function causePackageNameOf(spec) {
|
|
3867
|
+
try {
|
|
3868
|
+
const s = String(spec ?? "").trim();
|
|
3869
|
+
if (!s) return "";
|
|
3870
|
+
const at = s.lastIndexOf("@");
|
|
3871
|
+
if (at > 0) return s.slice(0, at);
|
|
3872
|
+
return s;
|
|
3873
|
+
} catch {
|
|
3874
|
+
return "";
|
|
3875
|
+
}
|
|
3876
|
+
}
|
|
3877
|
+
function blameCausePackage(spec, targetPackageName) {
|
|
3878
|
+
try {
|
|
3879
|
+
const name = causePackageNameOf(spec);
|
|
3880
|
+
const target = String(targetPackageName ?? "").trim();
|
|
3881
|
+
if (!name || !target) return "unknown";
|
|
3882
|
+
if (name === target) return "target";
|
|
3883
|
+
if (name.toLowerCase() === target.toLowerCase()) return "target";
|
|
3884
|
+
return "other-package";
|
|
3885
|
+
} catch {
|
|
3886
|
+
return "unknown";
|
|
3887
|
+
}
|
|
3888
|
+
}
|
|
3889
|
+
function formatUnlockAt(ms, lang) {
|
|
3890
|
+
try {
|
|
3891
|
+
if (typeof ms !== "number" || !Number.isFinite(ms) || ms <= 0) return null;
|
|
3892
|
+
const locale = String(lang ?? "").trim().toLowerCase().startsWith("en") ? "en-US" : "zh-CN";
|
|
3893
|
+
const text = new Intl.DateTimeFormat(locale, {
|
|
3894
|
+
month: locale === "en-US" ? "short" : "numeric",
|
|
3895
|
+
day: "numeric",
|
|
3896
|
+
hour: "2-digit",
|
|
3897
|
+
minute: "2-digit",
|
|
3898
|
+
hour12: locale === "en-US"
|
|
3899
|
+
}).format(ms);
|
|
3900
|
+
return text && text.trim() ? text.trim() : null;
|
|
3901
|
+
} catch {
|
|
3902
|
+
return null;
|
|
3903
|
+
}
|
|
3904
|
+
}
|
|
3905
|
+
//#endregion
|
|
3906
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.5/node_modules/dsh-plugin-update/dist/panel.js
|
|
3845
3907
|
function normalizePanelTheme(value) {
|
|
3846
3908
|
return value === "archive" ? "archive" : "default";
|
|
3847
3909
|
}
|
|
@@ -4136,7 +4198,10 @@ ${note}${blocks.join("\n")}
|
|
|
4136
4198
|
requestId: "string",
|
|
4137
4199
|
checkId: "string",
|
|
4138
4200
|
registryHost: "string",
|
|
4139
|
-
action: "string"
|
|
4201
|
+
action: "string",
|
|
4202
|
+
causeKind: "string",
|
|
4203
|
+
causePackage: "string",
|
|
4204
|
+
causeUnlockAt: "number"
|
|
4140
4205
|
};
|
|
4141
4206
|
function readDiagTolerant(diag) {
|
|
4142
4207
|
const empty = {
|
|
@@ -4155,6 +4220,9 @@ ${note}${blocks.join("\n")}
|
|
|
4155
4220
|
checkId: null,
|
|
4156
4221
|
registryHost: null,
|
|
4157
4222
|
action: null,
|
|
4223
|
+
causeKind: null,
|
|
4224
|
+
causePackage: null,
|
|
4225
|
+
causeUnlockAt: null,
|
|
4158
4226
|
unknownKeys: []
|
|
4159
4227
|
};
|
|
4160
4228
|
if (!diag || typeof diag !== "object" || Array.isArray(diag)) return empty;
|
|
@@ -4184,6 +4252,25 @@ ${note}${blocks.join("\n")}
|
|
|
4184
4252
|
if (typeof pos === "number") return copyText("panel.diag.queue.position", l, { n: pos });
|
|
4185
4253
|
return copyText("panel.diag.queue.absent", l);
|
|
4186
4254
|
}
|
|
4255
|
+
function causeRemedyText(cause, lang) {
|
|
4256
|
+
try {
|
|
4257
|
+
const l = normalizeLangTag(lang ?? "zh");
|
|
4258
|
+
const kind = String(cause?.kind ?? "").trim();
|
|
4259
|
+
if (!kind || !CAUSE_KINDS.includes(kind)) return null;
|
|
4260
|
+
const spec = String(cause?.package ?? "").trim();
|
|
4261
|
+
if (!spec) return null;
|
|
4262
|
+
const blame = blameCausePackage(spec, cause?.target);
|
|
4263
|
+
if (blame === "unknown") return null;
|
|
4264
|
+
const timeRaw = typeof cause?.unlockAtMs === "number" ? formatUnlockAt(cause.unlockAtMs, l) : null;
|
|
4265
|
+
const timed = !!timeRaw;
|
|
4266
|
+
return copyText(blame === "target" ? timed ? "diag.cause.age.target.timed" : "diag.cause.age.target.untimed" : timed ? "diag.cause.age.other.timed" : "diag.cause.age.other.untimed", l, {
|
|
4267
|
+
package: spec,
|
|
4268
|
+
time: timeRaw ?? ""
|
|
4269
|
+
});
|
|
4270
|
+
} catch {
|
|
4271
|
+
return null;
|
|
4272
|
+
}
|
|
4273
|
+
}
|
|
4187
4274
|
function buildUpdateDiagCopy(input, langOverride) {
|
|
4188
4275
|
const l = normalizeLangTag(langOverride ?? input.lang ?? "zh");
|
|
4189
4276
|
const unknown = copyText("panel.diag.copy.unknown", l);
|
|
@@ -4191,6 +4278,12 @@ ${note}${blocks.join("\n")}
|
|
|
4191
4278
|
const rawCode = String(input.code ?? "").trim() || "internal";
|
|
4192
4279
|
const copy = failureCopy(rawCode, l) ?? failureCopy("unknown", l);
|
|
4193
4280
|
const diag = readDiagTolerant(input.diag);
|
|
4281
|
+
const remedy = causeRemedyText({
|
|
4282
|
+
kind: diag.causeKind,
|
|
4283
|
+
package: diag.causePackage,
|
|
4284
|
+
unlockAtMs: diag.causeUnlockAt,
|
|
4285
|
+
target: diag.targetPackageName
|
|
4286
|
+
}, l) ?? copy.act;
|
|
4194
4287
|
const detail = redactForCopy(diag.detail ?? input.detail ?? "") || copyText("panel.diag.copy.no-detail", l);
|
|
4195
4288
|
const pluginName = pickText(diag.targetPackageName ?? input.pluginId, unknownPkg);
|
|
4196
4289
|
const runVer = pickText(diag.runningVersion ?? input.runningVersion, "?");
|
|
@@ -4222,12 +4315,12 @@ ${note}${blocks.join("\n")}
|
|
|
4222
4315
|
prov.push(copyText("panel.diag.copy.field.queue", l, { queue }));
|
|
4223
4316
|
const format = input.format === "line" ? "line" : "block";
|
|
4224
4317
|
const provLine = redactForCopy(prov.join(" · "));
|
|
4225
|
-
if (format === "line") return redactForCopy(`[update-diag] code=${rawCode} \xB7 ${copy.zh} \xB7 ${copyText("panel.diag.copy.line.summary", l, { summary: detail })} \xB7 ${provLine} \xB7 ${copyText("panel.diag.copy.line.remedy", l, { remedy
|
|
4318
|
+
if (format === "line") return redactForCopy(`[update-diag] code=${rawCode} \xB7 ${copy.zh} \xB7 ${copyText("panel.diag.copy.line.summary", l, { summary: detail })} \xB7 ${provLine} \xB7 ${copyText("panel.diag.copy.line.remedy", l, { remedy })}`);
|
|
4226
4319
|
return [
|
|
4227
4320
|
`[update-diag] ${rawCode} \u2014 ${copy.zh}`,
|
|
4228
4321
|
` ${copyText("panel.diag.copy.block.summary", l, { summary: detail })}`,
|
|
4229
4322
|
` ${copyText("panel.diag.copy.block.source", l, { source: provLine })}`,
|
|
4230
|
-
` ${copyText("panel.diag.copy.block.remedy", l, { remedy
|
|
4323
|
+
` ${copyText("panel.diag.copy.block.remedy", l, { remedy })}`
|
|
4231
4324
|
].join("\n");
|
|
4232
4325
|
}
|
|
4233
4326
|
const PANEL_SKIPPED_MAX = 50;
|
|
@@ -5081,7 +5174,7 @@ ${UPDATE_PANEL_ARCHIVE_CSS}` : UPDATE_PANEL_CSS}</style>
|
|
|
5081
5174
|
${body}`;
|
|
5082
5175
|
}
|
|
5083
5176
|
//#endregion
|
|
5084
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
5177
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.5/node_modules/dsh-plugin-update/dist/entry.js
|
|
5085
5178
|
const UPDATE_ENTRY_CSS = [
|
|
5086
5179
|
".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)}",
|
|
5087
5180
|
".dsh-upd-entry-btn{font:inherit;border:1px solid var(--dsh-update-border,#d1d5db);border-radius:var(--dsh-update-entry-border-radius,6px);",
|
|
@@ -5195,7 +5288,7 @@ ${body}`;
|
|
|
5195
5288
|
}
|
|
5196
5289
|
}
|
|
5197
5290
|
//#endregion
|
|
5198
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
5291
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.5/node_modules/dsh-plugin-update/dist/panel-batch.js
|
|
5199
5292
|
const BATCH_PANEL_POLL = {
|
|
5200
5293
|
defaultMs: 1500,
|
|
5201
5294
|
minMs: 250
|
|
@@ -6721,7 +6814,7 @@ ${body}`;
|
|
|
6721
6814
|
};
|
|
6722
6815
|
}
|
|
6723
6816
|
//#endregion
|
|
6724
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.
|
|
6817
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.5/node_modules/dsh-plugin-update/dist/entry-batch.js
|
|
6725
6818
|
function isObject$1(value) {
|
|
6726
6819
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
6727
6820
|
}
|
|
@@ -10680,7 +10773,7 @@ ${body}`;
|
|
|
10680
10773
|
}, 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)))));
|
|
10681
10774
|
}
|
|
10682
10775
|
/** 版本胶囊那一行字:只在这里拼一次,屏上与用例读的是同一串。 */
|
|
10683
|
-
const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.
|
|
10776
|
+
const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.65";
|
|
10684
10777
|
/** 右下角那本书离面板两沿的距离:用户口径「一直处于面板右下角、不随列表滑动消失」
|
|
10685
10778
|
* ⇒ sticky 吸附(面板相对,视口多大都落在面板角上);INSET=右沿,BOTTOM=底沿。 */
|
|
10686
10779
|
const MANUAL_ENTRY_INSET = 16;
|