@michengai/dsh-codex-ui 0.2.94 → 0.2.96
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/CHANGELOG.md +22 -0
- package/CHANGELOG.zh-CN.md +22 -0
- package/dist/client.js +59 -17
- package/dist/index.mjs +30 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@
|
|
|
4
4
|
|
|
5
5
|
This changelog records recent releases of DSH Codex UI and its one-click installer. Earlier changes remain available in the [Git history](https://github.com/MichengAI/dsh-codex-ui/commits/main).
|
|
6
6
|
|
|
7
|
+
## 0.2.96 — 2026-09-01
|
|
8
|
+
|
|
9
|
+
Companion release: `@michengai/dsh-codex-suite-installer@0.1.13`.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Opened About immediately when the IM companion is not installed instead of showing General settings while waiting for a missing section to time out; the installed IM settings route is unchanged.
|
|
14
|
+
- Predeclared the nonessential `protobufjs` and `koffi` install scripts as disabled before About-page plugin installs, preventing pnpm's ignored-build placeholder from blocking an otherwise safe install.
|
|
15
|
+
|
|
16
|
+
### Dependencies
|
|
17
|
+
|
|
18
|
+
- Refreshed the Suite Installer against the latest exact member versions from the official npm registry at release time.
|
|
19
|
+
|
|
20
|
+
## 0.2.95 — 2026-09-01
|
|
21
|
+
|
|
22
|
+
Companion release: `@michengai/dsh-codex-suite-installer@0.1.12`.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- Matched the sidebar background to the Host workspace background in both light and dark themes.
|
|
27
|
+
- Replaced the clipped white-tile WeCom channel icon with a compact multicolor brand mark that remains legible at sidebar size.
|
|
28
|
+
|
|
7
29
|
## 0.2.94 — 2026-08-30
|
|
8
30
|
|
|
9
31
|
Companion release: `@michengai/dsh-codex-suite-installer@0.1.11`.
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -4,6 +4,28 @@
|
|
|
4
4
|
|
|
5
5
|
本日志记录 DSH Codex UI 及其一键安装器的最近发布;更早的变更可查看 [Git 提交历史](https://github.com/MichengAI/dsh-codex-ui/commits/main)。
|
|
6
6
|
|
|
7
|
+
## 0.2.96 — 2026-09-01
|
|
8
|
+
|
|
9
|
+
配套版本:`@michengai/dsh-codex-suite-installer@0.1.13`。
|
|
10
|
+
|
|
11
|
+
### 修复
|
|
12
|
+
|
|
13
|
+
- 未安装 IM 配套插件时,点击 IM 助理会立即进入“关于”,不再先显示通用设置并等待缺失分区超时;已安装时仍正常进入 IM 设置。
|
|
14
|
+
- “关于”页安装插件前会预先将非必要的 `protobufjs` 与 `koffi` 安装脚本声明为禁用,避免 pnpm 写入 ignored-build 占位配置并阻断安全安装。
|
|
15
|
+
|
|
16
|
+
### 依赖
|
|
17
|
+
|
|
18
|
+
- 发布时通过官方 npm 源重新解析 Suite Installer 全部成员的最新精确版本。
|
|
19
|
+
|
|
20
|
+
## 0.2.95 — 2026-09-01
|
|
21
|
+
|
|
22
|
+
配套版本:`@michengai/dsh-codex-suite-installer@0.1.12`。
|
|
23
|
+
|
|
24
|
+
### 修复
|
|
25
|
+
|
|
26
|
+
- 浅色与暗色主题下,侧边栏背景现在与宿主工作区背景保持一致。
|
|
27
|
+
- 将企业微信频道中被裁切的白底图标替换为紧凑的多色品牌标记,在侧边栏尺寸下仍能清晰识别。
|
|
28
|
+
|
|
7
29
|
## 0.2.94 — 2026-08-30
|
|
8
30
|
|
|
9
31
|
配套版本:`@michengai/dsh-codex-suite-installer@0.1.11`。
|
package/dist/client.js
CHANGED
|
@@ -18,6 +18,16 @@ window.__ModuleLoader__.load({
|
|
|
18
18
|
if (match !== void 0) return match;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* 可选插件未注册设置入口时,直接打开兜底页,避免先展示通用设置并等待导航超时。
|
|
23
|
+
*/
|
|
24
|
+
function routeOptionalSettingsSection(available, openRequested, openFallback) {
|
|
25
|
+
if (available) {
|
|
26
|
+
openRequested();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
openFallback();
|
|
30
|
+
}
|
|
21
31
|
let cancelPendingNavigation;
|
|
22
32
|
const SETTINGS_NAVIGATION_TIMEOUT_MS = 4e3;
|
|
23
33
|
function openSettingsSection(root, label, onMissing, onSelected) {
|
|
@@ -167,17 +177,32 @@ window.__ModuleLoader__.load({
|
|
|
167
177
|
});
|
|
168
178
|
if (brand === "wecom") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
169
179
|
className: "dcu-wb-brand",
|
|
170
|
-
viewBox: "
|
|
180
|
+
viewBox: "4 6 39 34",
|
|
171
181
|
width: 16,
|
|
172
182
|
height: 16,
|
|
173
183
|
"aria-hidden": "true",
|
|
174
|
-
children: [
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
184
|
+
children: [
|
|
185
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
186
|
+
fill: "#fb6500",
|
|
187
|
+
d: "M28.856 31.647a.483.483 0 0 0 .06.738 6.2 6.2 0 0 1 1.911 3.725 2.02 2.02 0 1 0 2.16-2.54 6.2 6.2 0 0 1-3.448-1.922.483.483 0 0 0-.683-.001"
|
|
188
|
+
}),
|
|
189
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
190
|
+
fill: "#0082ef",
|
|
191
|
+
d: "M37.057 28.448a2 2 0 0 0-.58 1.215 6.2 6.2 0 0 1-1.918 3.454.484.484 0 1 0 .738.616 6.2 6.2 0 0 1 3.725-1.91 2.02 2.02 0 1 0-1.96-3.376z"
|
|
192
|
+
}),
|
|
193
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
194
|
+
fill: "#2dbc00",
|
|
195
|
+
d: "M31.366 22.75a2.02 2.02 0 0 0 1.215 3.435 6.2 6.2 0 0 1 3.454 1.918.483.483 0 0 0 .829-.27.48.48 0 0 0-.212-.468 6.2 6.2 0 0 1-1.911-3.726 2.02 2.02 0 0 0-3.375-.889"
|
|
196
|
+
}),
|
|
197
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
198
|
+
fill: "#fc0",
|
|
199
|
+
d: "m30.374 25.907-.037.037a6.2 6.2 0 0 1-3.78 1.978 2.007 2.007 0 0 0-.895 3.374 2.02 2.02 0 0 0 3.435-1.216 6.2 6.2 0 0 1 1.923-3.453.484.484 0 0 0-.646-.72"
|
|
200
|
+
}),
|
|
201
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
202
|
+
fill: "#0082ef",
|
|
203
|
+
d: "M18.17 8.471c-3.624.4-6.908 1.948-9.266 4.367-.938.956-1.7 2.032-2.262 3.182a11.08 11.08 0 0 0 .78 11.188c.64.968 1.693 2.178 2.654 3.037l-.435 3.423-.048.145c-.012.042-.012.09-.018.133l-.012.108.012.11a1.1 1.1 0 0 0 1.657.852h.018l.067-.049 1.04-.52 3.102-1.56a16 16 0 0 0 4.537.623c1.897.004 3.78-.323 5.564-.968a2.014 2.014 0 0 1-1.373-2.11 13.7 13.7 0 0 1-5.721.568l-.309-.042a14 14 0 0 1-2.056-.43 1.4 1.4 0 0 0-1.1.116l-.085.042-2.552 1.5-.109.066c-.06.036-.09.048-.12.048a.176.176 0 0 1-.164-.181l.097-.393.115-.43.181-.707.212-.787a1.07 1.07 0 0 0-.387-1.19 11.2 11.2 0 0 1-2.577-2.686 8.73 8.73 0 0 1-.629-8.818c.46-.92 1.065-1.773 1.815-2.54 1.935-1.997 4.657-3.267 7.669-3.593a14.3 14.3 0 0 1 3.132 0c2.994.344 5.704 1.633 7.627 3.617a10 10 0 0 1 1.796 2.551 8.7 8.7 0 0 1 .901 3.84c0 .14-.012.279-.018.412a2.015 2.015 0 0 1 2.48.29l.09.109a11 11 0 0 0-1.1-5.733 12.3 12.3 0 0 0-2.238-3.182 15.18 15.18 0 0 0-9.229-4.397 17 17 0 0 0-3.739-.01"
|
|
204
|
+
})
|
|
205
|
+
]
|
|
181
206
|
});
|
|
182
207
|
if (brand === "qq") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
183
208
|
className: "dcu-wb-brand",
|
|
@@ -3517,7 +3542,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
3517
3542
|
const getEmptyCompanionTabs = () => EMPTY_COMPANION_TABS;
|
|
3518
3543
|
const SIDEBAR_COLLAPSE_SETTLE_MS = 140;
|
|
3519
3544
|
const stylesheet$3 = `
|
|
3520
|
-
.dcu-root{--dcu-font:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei UI",sans-serif;--dcu-sidebar-wide-width:240px;--dcu-sidebar-primary:#393d3e;--dcu-sidebar-secondary:#676b6c;--dcu-sidebar-tertiary:#9a9f9f;--dcu-sidebar-navigation:#4e5253;--dcu-sidebar-icon:#4e5253;--dcu-sidebar-hover:#dfe8e5;--dcu-sidebar-border:rgba(37,46,41,.10);--dcu-tip-bg:#ffffff;--dcu-tip-shadow:0 10px 32px rgba(31,39,36,.22);height:100%;min-width:0;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;background
|
|
3545
|
+
.dcu-root{--dcu-font:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei UI",sans-serif;--dcu-sidebar-wide-width:240px;--dcu-sidebar-primary:#393d3e;--dcu-sidebar-secondary:#676b6c;--dcu-sidebar-tertiary:#9a9f9f;--dcu-sidebar-navigation:#4e5253;--dcu-sidebar-icon:#4e5253;--dcu-sidebar-hover:#dfe8e5;--dcu-sidebar-border:rgba(37,46,41,.10);--dcu-tip-bg:#ffffff;--dcu-tip-shadow:0 10px 32px rgba(31,39,36,.22);height:100%;min-width:0;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;background:var(--dsw-alias-bg-base);color:var(--dcu-sidebar-primary);font:14px/20px var(--dcu-font)}body[data-ds-dark-theme] .dcu-root{--dcu-sidebar-primary:#b9bab9;--dcu-sidebar-secondary:#909191;--dcu-sidebar-tertiary:#666867;--dcu-sidebar-navigation:#b9bab9;--dcu-sidebar-icon:#afafaf;--dcu-sidebar-hover:#303432;--dcu-sidebar-border:rgba(255,255,255,.08);--dcu-tip-bg:#2a2e2c;--dcu-tip-shadow:0 10px 30px rgba(0,0,0,.28)}
|
|
3521
3546
|
.dcu-expanded-shell{display:flex;width:var(--dcu-sidebar-wide-width);min-height:0;flex:1 1 0;overflow:hidden;flex-direction:column;transform-origin:left center;transition:opacity 140ms ease-out,transform 180ms cubic-bezier(.16,1,.3,1);animation:dcu-sidebar-expanded-in 180ms cubic-bezier(.16,1,.3,1)}.dcu-compact-shell{display:none;width:56px}.dcu-root.dcu-collapsing .dcu-expanded-shell{opacity:0;transform:translateX(-6px);pointer-events:none}.dcu-root.dcu-compact .dcu-expanded-shell{display:none}.dcu-root.dcu-compact .dcu-compact-shell{display:flex;min-height:0;flex:1;flex-direction:column;align-items:center;animation:dcu-sidebar-compact-in 140ms ease-out}@keyframes dcu-sidebar-expanded-in{from{opacity:0;transform:translateX(-6px)}to{opacity:1;transform:none}}@keyframes dcu-sidebar-compact-in{from{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:none}}
|
|
3522
3547
|
.dcu-root *{box-sizing:border-box}.dcu-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:8px;height:60px;padding:8px 8px 8px 12px}.dcu-brand{border:0;background:transparent;color:inherit;padding:0;display:flex;align-items:center;min-width:0;overflow:hidden}.dcu-brand svg{display:block;width:auto;max-width:100%;height:24px;min-width:0}.dcu-head-actions{display:grid;grid-auto-flow:column;grid-auto-columns:28px;align-items:center;column-gap:8px;height:28px}
|
|
3523
3548
|
.dcu-icon,.dcu-menu button,.dcu-footer-link{appearance:none;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}.dcu-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:8px;color:var(--dcu-sidebar-icon)}.dcu-head .dcu-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin:0;padding:0;border-radius:50%;line-height:0}.dcu-head .dcu-icon svg{display:block;width:16px;height:16px}
|
|
@@ -3568,7 +3593,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
3568
3593
|
});
|
|
3569
3594
|
}
|
|
3570
3595
|
/** 搜索状态与大侧栏隔离:输入、悬停和开关弹窗都不能让工作区树跟着重渲染。 */
|
|
3571
|
-
const SidebarSearch = (0, react.forwardRef)(function SidebarSearch({ openSession, startSession, t, useSessions, useWorkspaces, settingsSeat }, ref) {
|
|
3596
|
+
const SidebarSearch = (0, react.forwardRef)(function SidebarSearch({ imSettingsAvailable, openSession, startSession, t, useSessions, useWorkspaces, settingsSeat }, ref) {
|
|
3572
3597
|
const [open, setOpen] = (0, react.useState)(false);
|
|
3573
3598
|
const [query, setQuery] = (0, react.useState)("");
|
|
3574
3599
|
const [activeIndex, setActiveIndex] = (0, react.useState)(0);
|
|
@@ -3598,6 +3623,18 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
3598
3623
|
settingsSeat,
|
|
3599
3624
|
t
|
|
3600
3625
|
]);
|
|
3626
|
+
const openImSettings = (0, react.useCallback)(() => {
|
|
3627
|
+
routeOptionalSettingsSection(imSettingsAvailable, () => {
|
|
3628
|
+
selectExternalSection([t("sidebar.imSettings"), "IM助理"]);
|
|
3629
|
+
}, () => {
|
|
3630
|
+
selectSection(t("about.nav"));
|
|
3631
|
+
});
|
|
3632
|
+
}, [
|
|
3633
|
+
imSettingsAvailable,
|
|
3634
|
+
selectExternalSection,
|
|
3635
|
+
selectSection,
|
|
3636
|
+
t
|
|
3637
|
+
]);
|
|
3601
3638
|
const openSettings = (0, react.useCallback)(() => {
|
|
3602
3639
|
settingsSeat.current?.querySelector("[aria-haspopup=\"dialog\"]")?.click();
|
|
3603
3640
|
}, [settingsSeat]);
|
|
@@ -3683,7 +3720,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
3683
3720
|
keywords: t("search.settings"),
|
|
3684
3721
|
run: () => {
|
|
3685
3722
|
close();
|
|
3686
|
-
|
|
3723
|
+
openImSettings();
|
|
3687
3724
|
}
|
|
3688
3725
|
},
|
|
3689
3726
|
{
|
|
@@ -3713,6 +3750,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
3713
3750
|
];
|
|
3714
3751
|
}, [
|
|
3715
3752
|
close,
|
|
3753
|
+
openImSettings,
|
|
3716
3754
|
openSession,
|
|
3717
3755
|
openSettings,
|
|
3718
3756
|
selectExternalSection,
|
|
@@ -3857,6 +3895,13 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
3857
3895
|
selectSection(t("about.nav"));
|
|
3858
3896
|
});
|
|
3859
3897
|
};
|
|
3898
|
+
const openImSettings = () => {
|
|
3899
|
+
routeOptionalSettingsSection(showChannels, () => {
|
|
3900
|
+
selectExternalSection([t("sidebar.imSettings"), "IM助理"]);
|
|
3901
|
+
}, () => {
|
|
3902
|
+
selectSection(t("about.nav"));
|
|
3903
|
+
});
|
|
3904
|
+
};
|
|
3860
3905
|
(0, react.useEffect)(() => {
|
|
3861
3906
|
if (imTab === "channels" && !showChannels) setImTab("tasks");
|
|
3862
3907
|
if (imTab === "schedule" && !showSchedule) setImTab("tasks");
|
|
@@ -4057,9 +4102,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
4057
4102
|
}),
|
|
4058
4103
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
4059
4104
|
type: "button",
|
|
4060
|
-
onClick:
|
|
4061
|
-
selectExternalSection([t("sidebar.imSettings"), "IM助理"]);
|
|
4062
|
-
},
|
|
4105
|
+
onClick: openImSettings,
|
|
4063
4106
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MenuIcon, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ImAssistantIcon, {}) }), t("sidebar.assistant")]
|
|
4064
4107
|
})
|
|
4065
4108
|
]
|
|
@@ -4215,9 +4258,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
4215
4258
|
type: "button",
|
|
4216
4259
|
className: "dcu-icon",
|
|
4217
4260
|
"aria-label": t("sidebar.assistant"),
|
|
4218
|
-
onClick:
|
|
4219
|
-
selectExternalSection([t("sidebar.imSettings"), "IM助理"]);
|
|
4220
|
-
},
|
|
4261
|
+
onClick: openImSettings,
|
|
4221
4262
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ImAssistantIcon, {})
|
|
4222
4263
|
})
|
|
4223
4264
|
]
|
|
@@ -4236,6 +4277,7 @@ header [data-dcu-title-folder] svg,header [data-dcu-title-more] svg{display:bloc
|
|
|
4236
4277
|
}),
|
|
4237
4278
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarSearch, {
|
|
4238
4279
|
ref: search,
|
|
4280
|
+
imSettingsAvailable: showChannels,
|
|
4239
4281
|
settingsSeat,
|
|
4240
4282
|
openSession,
|
|
4241
4283
|
startSession,
|
package/dist/index.mjs
CHANGED
|
@@ -228,6 +228,34 @@ function applyReleaseExclude(source, packageName, version) {
|
|
|
228
228
|
if (section.test(source)) return source.replace(section, (match) => `${match.endsWith("\n") ? match : `${match}${eol}`}${entry}${eol}`);
|
|
229
229
|
return `${source}${source === "" || source.endsWith("\n") ? "" : eol}minimumReleaseAgeExclude:${eol}${entry}${eol}`;
|
|
230
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* pnpm 11 会在首次解析带 install script 的传递依赖时中止并写入占位值。
|
|
233
|
+
* 这些依赖的运行时不需要 postinstall,因此在调用 DSH plugin add 之前显式
|
|
234
|
+
* 记录拒绝执行,保证“关于”页单独安装和 Suite Installer 行为一致。
|
|
235
|
+
*/
|
|
236
|
+
function applyRequiredBuildPolicies(source) {
|
|
237
|
+
const eol = source.includes("\r\n") ? "\r\n" : "\n";
|
|
238
|
+
const lines = source.split(/\r?\n/);
|
|
239
|
+
const start = lines.findIndex((line) => line === "allowBuilds:");
|
|
240
|
+
if (start === -1) return `${source}${source === "" || source.endsWith("\n") ? "" : eol}allowBuilds:${eol} protobufjs: false${eol} koffi: false${eol}`;
|
|
241
|
+
let end = start + 1;
|
|
242
|
+
while (end < lines.length && (lines[end] === "" || /^\s/.test(lines[end]))) end += 1;
|
|
243
|
+
const body = lines.slice(start + 1, end).filter((line) => !/^\s{2}(?:protobufjs|koffi):/.test(line));
|
|
244
|
+
lines.splice(start + 1, end - start - 1, " protobufjs: false", " koffi: false", ...body);
|
|
245
|
+
return lines.join(eol);
|
|
246
|
+
}
|
|
247
|
+
async function ensureRequiredBuildPolicies(runtime) {
|
|
248
|
+
const path = resolve(profileDirectory(runtime), "pnpm-workspace.yaml");
|
|
249
|
+
let source;
|
|
250
|
+
try {
|
|
251
|
+
source = await readFile(path, "utf8");
|
|
252
|
+
} catch (error) {
|
|
253
|
+
if (error.code !== "ENOENT") throw error;
|
|
254
|
+
source = "";
|
|
255
|
+
}
|
|
256
|
+
const next = applyRequiredBuildPolicies(source);
|
|
257
|
+
if (next !== source) await writeFile(path, next, "utf8");
|
|
258
|
+
}
|
|
231
259
|
/** 将用户本次确认的精确版本加入 Profile 的 pnpm 发布时间保护例外。 */
|
|
232
260
|
async function ensureLatestReleaseAllowed(packageName, version, runtime) {
|
|
233
261
|
if (parseSemver(version) === void 0) throw new Error("npm 返回了无法识别的最新版本。");
|
|
@@ -384,6 +412,7 @@ function pluginCommandError(stderr) {
|
|
|
384
412
|
if (detail.includes("minimumReleaseAge") || detail.includes("Release age")) return /* @__PURE__ */ new Error("更新被 pnpm 发布时间保护拦截。请确认已写入当前版本白名单后重试。");
|
|
385
413
|
if (/EPERM|EBUSY|EACCES|unable to unlink|ERR_PNPM_LOCKED|Lock/i.test(detail)) return /* @__PURE__ */ new Error("无法覆盖正在运行的插件文件。请先完全退出桌面端,再重新打开后更新。");
|
|
386
414
|
if (/UNEXPECTED_STORE|Unexpected store location/i.test(detail)) return /* @__PURE__ */ new Error("插件目录和 pnpm 仓库不一致。请完全退出桌面端后再更新。");
|
|
415
|
+
if (/ERR_PNPM_IGNORED_BUILDS|Ignored build scripts/i.test(detail)) return /* @__PURE__ */ new Error("插件依赖的 pnpm 构建脚本策略尚未确认。请更新 Profile 的 allowBuilds 配置后重试。");
|
|
387
416
|
if (/pnpm not found/i.test(detail)) return /* @__PURE__ */ new Error("当前环境找不到 pnpm。请从桌面端启动后再更新。");
|
|
388
417
|
return /* @__PURE__ */ new Error("无法在应用运行时更新插件。请先完全退出桌面端,再重新打开后更新。");
|
|
389
418
|
}
|
|
@@ -581,6 +610,7 @@ async function installDependenciesLocked(ids, requestHotUpdate, runtime) {
|
|
|
581
610
|
};
|
|
582
611
|
}));
|
|
583
612
|
const remove = [...new Set(targets.flatMap((target) => pluginsToRemoveBeforeInstall(declared, target.packageName)))];
|
|
613
|
+
await ensureRequiredBuildPolicies(runtime);
|
|
584
614
|
for (const target of targets) {
|
|
585
615
|
await ensureLatestReleaseAllowed(target.packageName, target.version, runtime);
|
|
586
616
|
if (!isOfficialRuntimePackage(target.packageName)) await recordDeclaredVersion(target.packageName, target.version, runtime);
|