openyida 2026.4.2-beta.3 → 2026.4.2-beta.4

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.
@@ -195,15 +195,9 @@ class EnvironmentChecker {
195
195
  }
196
196
 
197
197
  checkPlaywrightInstalled() {
198
+ // 1. 检查 playwright npm 包是否安装
198
199
  try {
199
200
  require.resolve('playwright');
200
- return {
201
- id: 'env-playwright',
202
- label: 'Playwright 已安装',
203
- passed: true,
204
- severity: Severity.INFO,
205
- fixType: null,
206
- };
207
201
  } catch {
208
202
  return {
209
203
  id: 'env-playwright',
@@ -215,6 +209,39 @@ class EnvironmentChecker {
215
209
  fixCommand: 'npm install playwright && npx playwright install chromium',
216
210
  };
217
211
  }
212
+
213
+ // 2. 检查 Chromium 二进制是否存在于用户目录(postinstall 已自动安装)
214
+ try {
215
+ const { chromium } = require('playwright');
216
+ const chromiumPath = chromium.executablePath();
217
+ if (chromiumPath && fs.existsSync(chromiumPath)) {
218
+ return {
219
+ id: 'env-playwright',
220
+ label: `Playwright + Chromium 已就绪`,
221
+ passed: true,
222
+ severity: Severity.INFO,
223
+ fixType: null,
224
+ };
225
+ }
226
+ return {
227
+ id: 'env-playwright',
228
+ label: 'Chromium 浏览器检测',
229
+ passed: false,
230
+ severity: Severity.ERROR,
231
+ message: `Chromium 未安装(期望路径:${chromiumPath || '未知'})`,
232
+ fixType: FixType.COMMAND,
233
+ fixCommand: 'npx playwright install chromium',
234
+ };
235
+ } catch {
236
+ // playwright API 不可用,降级为仅检查包安装
237
+ return {
238
+ id: 'env-playwright',
239
+ label: 'Playwright 已安装',
240
+ passed: true,
241
+ severity: Severity.INFO,
242
+ fixType: null,
243
+ };
244
+ }
218
245
  }
219
246
 
220
247
  checkConfig() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openyida",
3
- "version": "2026.04.02-beta.3",
3
+ "version": "2026.04.02-beta.4",
4
4
  "description": "OpenYida CLI - 宜搭低代码 AI 开发工具(安装即用,零配置)",
5
5
  "bin": {
6
6
  "openyida": "./bin/yida.js",
@@ -4,7 +4,7 @@ description: >
4
4
  宜搭低代码平台 AI 开发入口。一句话生成完整应用:创建应用、表单设计、自定义页面、流程配置、数据管理。
5
5
  当用户提到"宜搭"、"yida"、"低代码"、"创建应用"、"创建表单"、"发布页面"、"搭建"、"系统"、"应用"时触发。
6
6
  metadata:
7
- version: 2026.04.02-beta.3
7
+ version: 2026.04.02-beta.4
8
8
  ---
9
9
 
10
10
  # 宜搭 AI 应用开发指南