@cloud411716/fancy-webnovel 0.1.85 → 0.1.87
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
CHANGED
|
@@ -154,7 +154,7 @@ async function runScanWithChromiumFix(ctx, session, invocation, { platform, leng
|
|
|
154
154
|
});
|
|
155
155
|
const answer = choice.answers[0]?.selected?.[0] ?? choice.answers[0]?.custom;
|
|
156
156
|
if (!answer || answer === '我自己安装') {
|
|
157
|
-
notify(session, '⚠️ 已取消。请手动安装 Chromium 后再次运行 /fancy-scan。\n安装命令:npx playwright install chromium');
|
|
157
|
+
notify(session, '⚠️ 已取消。请手动安装 Chromium 后再次运行 /fancy-scan。\n安装命令:npm install -g && npx --registry=https://registry.npmmirror.com playwright install chromium --with-deps');
|
|
158
158
|
return undefined;
|
|
159
159
|
}
|
|
160
160
|
|
|
@@ -162,8 +162,11 @@ async function runScanWithChromiumFix(ctx, session, invocation, { platform, leng
|
|
|
162
162
|
notify(session, '⏳ 正在下载 Chromium 浏览器(首次约 2-3 分钟),请耐心等待...\n');
|
|
163
163
|
const installStop = startActivity(session);
|
|
164
164
|
|
|
165
|
-
const installProc = spawn('
|
|
165
|
+
const installProc = spawn('sh', ['-c',
|
|
166
|
+
'npm install -g && npx --registry=https://registry.npmmirror.com playwright install chromium --with-deps'
|
|
167
|
+
], {
|
|
166
168
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
169
|
+
cwd: process.cwd(),
|
|
167
170
|
});
|
|
168
171
|
const installOut = [];
|
|
169
172
|
installProc.stdout.on('data', d => { installOut.push(d.toString()); });
|
|
@@ -192,7 +195,7 @@ async function runScanWithChromiumFix(ctx, session, invocation, { platform, leng
|
|
|
192
195
|
resolve('retry');
|
|
193
196
|
} else {
|
|
194
197
|
const out = installOut.join('').slice(-300);
|
|
195
|
-
notify(session, `❌ Chromium 安装失败(exit ${code})。\n请手动运行以下命令后重试:\n npx playwright install chromium\n\n安装日志末尾:\n${out}`);
|
|
198
|
+
notify(session, `❌ Chromium 安装失败(exit ${code})。\n请手动运行以下命令后重试:\n npm install -g && npx --registry=https://registry.npmmirror.com playwright install chromium --with-deps\n\n安装日志末尾:\n${out}`);
|
|
196
199
|
resolve(undefined);
|
|
197
200
|
}
|
|
198
201
|
});
|