@ricsam/r5d-browser 0.0.87 → 0.0.88
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/dist/cjs/main.cjs +5 -4
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/main.mjs +5 -4
- package/dist/mjs/package.json +1 -1
- package/package.json +1 -1
package/dist/cjs/main.cjs
CHANGED
|
@@ -293,6 +293,7 @@ async function start(options) {
|
|
|
293
293
|
requestStop = resolve;
|
|
294
294
|
});
|
|
295
295
|
const signalHandlers = /* @__PURE__ */ new Map();
|
|
296
|
+
const processEvents = process;
|
|
296
297
|
for (const signal of ["SIGINT", "SIGTERM", "SIGHUP"]) {
|
|
297
298
|
const handler = () => {
|
|
298
299
|
requestedSignalOutcome ??= { exitCode: 0 };
|
|
@@ -316,14 +317,14 @@ async function start(options) {
|
|
|
316
317
|
}
|
|
317
318
|
});
|
|
318
319
|
} catch (error) {
|
|
319
|
-
for (const [signal, handler] of signalHandlers)
|
|
320
|
+
for (const [signal, handler] of signalHandlers) processEvents.off(signal, handler);
|
|
320
321
|
throw error;
|
|
321
322
|
}
|
|
322
323
|
if (requestedSignalOutcome) {
|
|
323
324
|
try {
|
|
324
325
|
await launch.close();
|
|
325
326
|
} finally {
|
|
326
|
-
for (const [signal, handler] of signalHandlers)
|
|
327
|
+
for (const [signal, handler] of signalHandlers) processEvents.off(signal, handler);
|
|
327
328
|
}
|
|
328
329
|
return;
|
|
329
330
|
}
|
|
@@ -389,14 +390,14 @@ async function start(options) {
|
|
|
389
390
|
cleanupError ??= error;
|
|
390
391
|
}
|
|
391
392
|
await controlStopped;
|
|
392
|
-
for (const [signal, handler] of signalHandlers)
|
|
393
|
+
for (const [signal, handler] of signalHandlers) processEvents.off(signal, handler);
|
|
393
394
|
if (outcome.exitCode !== 0) throw new Error(outcome.message ?? "Google Chrome stopped unexpectedly.");
|
|
394
395
|
if (cleanupError) throw cleanupError;
|
|
395
396
|
} catch (error) {
|
|
396
397
|
try {
|
|
397
398
|
await launch.close().catch(() => void 0);
|
|
398
399
|
} finally {
|
|
399
|
-
for (const [signal, handler] of signalHandlers)
|
|
400
|
+
for (const [signal, handler] of signalHandlers) processEvents.off(signal, handler);
|
|
400
401
|
}
|
|
401
402
|
throw error;
|
|
402
403
|
}
|
package/dist/cjs/package.json
CHANGED
package/dist/mjs/main.mjs
CHANGED
|
@@ -270,6 +270,7 @@ async function start(options) {
|
|
|
270
270
|
requestStop = resolve;
|
|
271
271
|
});
|
|
272
272
|
const signalHandlers = /* @__PURE__ */ new Map();
|
|
273
|
+
const processEvents = process;
|
|
273
274
|
for (const signal of ["SIGINT", "SIGTERM", "SIGHUP"]) {
|
|
274
275
|
const handler = () => {
|
|
275
276
|
requestedSignalOutcome ??= { exitCode: 0 };
|
|
@@ -293,14 +294,14 @@ async function start(options) {
|
|
|
293
294
|
}
|
|
294
295
|
});
|
|
295
296
|
} catch (error) {
|
|
296
|
-
for (const [signal, handler] of signalHandlers)
|
|
297
|
+
for (const [signal, handler] of signalHandlers) processEvents.off(signal, handler);
|
|
297
298
|
throw error;
|
|
298
299
|
}
|
|
299
300
|
if (requestedSignalOutcome) {
|
|
300
301
|
try {
|
|
301
302
|
await launch.close();
|
|
302
303
|
} finally {
|
|
303
|
-
for (const [signal, handler] of signalHandlers)
|
|
304
|
+
for (const [signal, handler] of signalHandlers) processEvents.off(signal, handler);
|
|
304
305
|
}
|
|
305
306
|
return;
|
|
306
307
|
}
|
|
@@ -366,14 +367,14 @@ async function start(options) {
|
|
|
366
367
|
cleanupError ??= error;
|
|
367
368
|
}
|
|
368
369
|
await controlStopped;
|
|
369
|
-
for (const [signal, handler] of signalHandlers)
|
|
370
|
+
for (const [signal, handler] of signalHandlers) processEvents.off(signal, handler);
|
|
370
371
|
if (outcome.exitCode !== 0) throw new Error(outcome.message ?? "Google Chrome stopped unexpectedly.");
|
|
371
372
|
if (cleanupError) throw cleanupError;
|
|
372
373
|
} catch (error) {
|
|
373
374
|
try {
|
|
374
375
|
await launch.close().catch(() => void 0);
|
|
375
376
|
} finally {
|
|
376
|
-
for (const [signal, handler] of signalHandlers)
|
|
377
|
+
for (const [signal, handler] of signalHandlers) processEvents.off(signal, handler);
|
|
377
378
|
}
|
|
378
379
|
throw error;
|
|
379
380
|
}
|
package/dist/mjs/package.json
CHANGED