openyida 2026.4.2-beta.8 → 2026.4.2-beta.9
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/package.json +1 -1
- package/scripts/postinstall.js +1 -33
- package/yida-skills/SKILL.md +1 -1
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -140,39 +140,7 @@ safeExec(() => {
|
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
142
|
|
|
143
|
-
// ── 3.
|
|
144
|
-
|
|
145
|
-
safeExec(() => {
|
|
146
|
-
const { execSync } = require('child_process');
|
|
147
|
-
|
|
148
|
-
let chromiumPath = null;
|
|
149
|
-
try {
|
|
150
|
-
// 通过 playwright 内置 API 获取 Chromium 可执行文件路径
|
|
151
|
-
const { chromium } = require('playwright');
|
|
152
|
-
chromiumPath = chromium.executablePath();
|
|
153
|
-
} catch {
|
|
154
|
-
// playwright 未安装或 API 不可用,跳过
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
if (chromiumPath && fs.existsSync(chromiumPath)) {
|
|
159
|
-
// Chromium 已存在,无需重复安装
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
console.log('\n 🌐 正在安装 Chromium 浏览器(首次安装需要下载,请稍候)...');
|
|
164
|
-
try {
|
|
165
|
-
execSync('npx playwright install chromium', {
|
|
166
|
-
stdio: 'inherit',
|
|
167
|
-
timeout: 300_000, // 5 分钟超时
|
|
168
|
-
});
|
|
169
|
-
console.log(' ✅ Chromium 安装完成!\n');
|
|
170
|
-
} catch {
|
|
171
|
-
console.warn(' ⚠️ Chromium 安装失败,可手动执行:npx playwright install chromium\n');
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
// ── 4. 首次安装欢迎引导 ──────────────────────────────────────────────
|
|
143
|
+
// ── 3. 首次安装欢迎引导 ──────────────────────────────────────────────
|
|
176
144
|
|
|
177
145
|
safeExec(() => {
|
|
178
146
|
const FIRST_INSTALL_FLAG = path.join(HOME_DIR, '.openyida', 'installed');
|
package/yida-skills/SKILL.md
CHANGED