@noob-stupid/dsh-plugin-console 0.5.10 → 0.5.12
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 +2 -0
- package/README.zh.md +2 -0
- package/lib/client.js +9 -11
- package/package.json +1 -1
package/README.md
CHANGED
package/README.zh.md
CHANGED
package/lib/client.js
CHANGED
|
@@ -100,11 +100,10 @@ window.__ModuleLoader__.load({
|
|
|
100
100
|
safetyBackfillBtn: "补声明({n} 项)",
|
|
101
101
|
safetyBackfillDone: "补声明完成",
|
|
102
102
|
safetyMode: "运行模式",
|
|
103
|
-
safetyModeManaged: "
|
|
104
|
-
safetyModeManagedOn: "
|
|
105
|
-
safetyModeObserver: "
|
|
106
|
-
safetyModeObserverOn: "
|
|
107
|
-
safetyModeNote: "启动失败隔离不受模式影响:服务起不来时会自动定位肇事插件并禁用(预设文件会被改名为 .broken-*,找不到肇事者则进安全模式先让服务起来)。",
|
|
103
|
+
safetyModeManaged: "托管:框架升级与回滚由本控制台负责(默认,行为与之前一致)",
|
|
104
|
+
safetyModeManagedOn: "已切到托管模式:框架升级与回滚仍由本控制台负责",
|
|
105
|
+
safetyModeObserver: "观察者:只做预检、门控与回滚点守护,不接管框架升级",
|
|
106
|
+
safetyModeObserverOn: "已切到观察者模式:不再接管框架升级,只守门",
|
|
108
107
|
safetyModeSwitch: "切换托管 / 观察者",
|
|
109
108
|
safetySwitchFailed: "操作失败",
|
|
110
109
|
safetyFrameworkTitle: "框架版本",
|
|
@@ -570,11 +569,10 @@ window.__ModuleLoader__.load({
|
|
|
570
569
|
safetyBackfillBtn: "Declare {n}",
|
|
571
570
|
safetyBackfillDone: "Declarations written",
|
|
572
571
|
safetyMode: "Operating mode",
|
|
573
|
-
safetyModeManaged: "Managed: this console owns framework upgrade and rollback (
|
|
574
|
-
safetyModeManagedOn: "Switched to managed: framework upgrade and rollback stay with this console
|
|
575
|
-
safetyModeObserver: "Observer
|
|
576
|
-
safetyModeObserverOn: "Switched to observer: no longer takes over framework upgrades, only gates
|
|
577
|
-
safetyModeNote: "Boot-failure quarantine is not affected by the mode: when the service cannot start, the culprit plugin is located and disabled automatically (broken presets are renamed to .broken-*, and with no clear culprit it falls back to safe mode).",
|
|
572
|
+
safetyModeManaged: "Managed: this console owns framework upgrade and rollback (default, unchanged behaviour)",
|
|
573
|
+
safetyModeManagedOn: "Switched to managed: framework upgrade and rollback stay with this console",
|
|
574
|
+
safetyModeObserver: "Observer: preflight, gating and rollback-point guard only — does not take over upgrades",
|
|
575
|
+
safetyModeObserverOn: "Switched to observer: no longer takes over framework upgrades, only gates",
|
|
578
576
|
safetyModeSwitch: "Switch managed / observer",
|
|
579
577
|
safetySwitchFailed: "Action failed",
|
|
580
578
|
safetyFrameworkTitle: "Framework version",
|
|
@@ -5002,7 +5000,7 @@ setMessage(t("failed") + ":" + (data?.reason ?? "未知"));
|
|
|
5002
5000
|
el("div", { style: { fontSize: "12px", opacity: .7, marginTop: "2px" } }, (mode === "observer" ? t("safetyModeObserverShort") : t("safetyModeManagedShort")) + " · " + fw + (pending > 0 ? " · " + fill(t("safetyBackfillShort"), [["n", pending]]) : ""))),
|
|
5003
5001
|
el("span", { style: { opacity: .5, flex: "0 0 auto", transform: open ? "rotate(90deg)" : "none", transition: "transform .2s cubic-bezier(.34,1.56,.64,1)" } }, el("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }, el("path", { d: "M9 6l6 6-6 6" }))));
|
|
5004
5002
|
const panel = el("div", { className: "pc-safety-panel", style: { marginTop: "8px", padding: "8px", borderRadius: "12px", border: "1px solid var(--dsw-alias-border-secondary, rgba(127,127,127,.18))", background: "var(--dsw-alias-bg-layer-4, rgba(127,127,127,.10))", display: "flex", flexDirection: "column", gap: "4px" } },
|
|
5005
|
-
row("shield", t("safetyMode")
|
|
5003
|
+
row("shield", t("safetyMode"), mode === "observer" ? t("safetyModeObserver") : t("safetyModeManaged") + (status !== null && typeof status.modeReason === "string" && status.modeReason !== "" ? "(" + status.modeReason + ")" : ""), sw(mode === "observer", () => switchMode(mode === "observer" ? "managed" : "observer"), t("safetyModeSwitch"))),
|
|
5006
5004
|
row("pin", t("safetyFrameworkTitle"), fill(t("safetyFrameworkDesc"), [["v", fw]])),
|
|
5007
5005
|
row("back", t("safetyRollbackTitle"), rb.applicable === true ? fill(t("safetyRollbackOk"), [["from", rb.from], ["to", rb.to]]) : fill(t("safetyRollbackNone"), [["reason", rb.reason === null || rb.reason === undefined ? "-" : rb.reason]])),
|
|
5008
5006
|
row("scan", t("safetyFpTitle"), fp.changed === true ? fill(t("safetyFpChanged"), [["reasons", (fp.reasons || []).join(";")]]) : t("safetyFpStable"), fp.changed === true ? el("button", { type: "button", className: styles.toggle, onClick: ack, disabled: busy }, t("safetyFpAck")) : null),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noob-stupid/dsh-plugin-console",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.12",
|
|
4
4
|
"description": "DSH 框架升级安全与插件升级门控:一键升级、失败自动回滚、升级后回滚上版、旧插件不适配自动禁用;内置多源插件市场为发现层,插件源全部可自定义,可指向公司内网私有源 / 私有索引 / 本地 Git 仓库,纯内网离线可用 | Framework upgrade safety & plugin version gating for DSH, with a customizable multi-source plugin market: point every source at internal mirrors or a local file:// repo for intranet-only, offline installs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|