@cloud411716/fancy-webnovel 0.1.93 → 0.1.95

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud411716/fancy-webnovel",
3
- "version": "0.1.93",
3
+ "version": "0.1.95",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -171,7 +171,7 @@ async function runScanWithChromiumFix(ctx, session, invocation, { platform, leng
171
171
  const installOut = [];
172
172
 
173
173
  installProc.stdout.on('data', d => { installOut.push(d.toString()); });
174
- installProc.stderr.on('data', d => { installOut.push(d.toString()); });
174
+ // stderr 不进 installOut(sudo 提示等交互信息不要混入最终报告)
175
175
 
176
176
  // 注册 CTRL+C 取消处理:kill 安装进程
177
177
  const stopCancel = onUserCancel(session, () => {
@@ -199,9 +199,12 @@ async function runScanWithChromiumFix(ctx, session, invocation, { platform, leng
199
199
 
200
200
  return new Promise((resolve) => {
201
201
  installProc.on('close', async (code) => {
202
- // 如果弹过 sudo 框,等弹框完成后再处理结果
202
+ // 如果弹过 sudo 框,等弹框结果(最多等 3 分钟,防止卡死)
203
203
  if (sudoDialogPromise) {
204
- await sudoDialogPromise.catch(() => {});
204
+ await Promise.race([
205
+ sudoDialogPromise.catch(() => {}),
206
+ new Promise(r => setTimeout(r, 180000)),
207
+ ]);
205
208
  }
206
209
  stopCancel(); // 移除取消监听
207
210
  installStop();