openyida 2026.4.2-beta.4 → 2026.4.2-beta.5
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/lib/core/doctor.js +24 -2
- package/package.json +1 -1
- package/yida-skills/SKILL.md +1 -1
package/lib/core/doctor.js
CHANGED
|
@@ -229,8 +229,8 @@ class EnvironmentChecker {
|
|
|
229
229
|
passed: false,
|
|
230
230
|
severity: Severity.ERROR,
|
|
231
231
|
message: `Chromium 未安装(期望路径:${chromiumPath || '未知'})`,
|
|
232
|
-
fixType: FixType.
|
|
233
|
-
|
|
232
|
+
fixType: FixType.AUTO,
|
|
233
|
+
fixAction: 'install-chromium',
|
|
234
234
|
};
|
|
235
235
|
} catch {
|
|
236
236
|
// playwright API 不可用,降级为仅检查包安装
|
|
@@ -742,6 +742,28 @@ class FixEngine {
|
|
|
742
742
|
};
|
|
743
743
|
}
|
|
744
744
|
|
|
745
|
+
case 'install-chromium': {
|
|
746
|
+
try {
|
|
747
|
+
const { execSync } = require('child_process');
|
|
748
|
+
console.log('\n 🌐 正在安装 Chromium 浏览器(请稍候)...');
|
|
749
|
+
execSync('npx playwright install chromium', {
|
|
750
|
+
stdio: 'inherit',
|
|
751
|
+
timeout: 300_000,
|
|
752
|
+
});
|
|
753
|
+
return {
|
|
754
|
+
id: issue.id,
|
|
755
|
+
fixed: true,
|
|
756
|
+
message: 'Chromium 安装完成',
|
|
757
|
+
};
|
|
758
|
+
} catch (error) {
|
|
759
|
+
return {
|
|
760
|
+
id: issue.id,
|
|
761
|
+
fixed: false,
|
|
762
|
+
message: `Chromium 安装失败,请手动运行:npx playwright install chromium(${error.message})`,
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
|
|
745
767
|
case 'init-project': {
|
|
746
768
|
try {
|
|
747
769
|
const copy = require('./copy');
|
package/package.json
CHANGED
package/yida-skills/SKILL.md
CHANGED