@ricsam/r5d-browser 0.0.61 → 0.0.63
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.
|
@@ -258,6 +258,8 @@ function buildChromeLaunchArgs(profilePath, debuggingPort) {
|
|
|
258
258
|
`--remote-debugging-port=${debuggingPort}`,
|
|
259
259
|
"--no-first-run",
|
|
260
260
|
"--no-default-browser-check",
|
|
261
|
+
"--disable-background-networking",
|
|
262
|
+
"--disable-component-update",
|
|
261
263
|
"--new-window",
|
|
262
264
|
"about:blank"
|
|
263
265
|
];
|
|
@@ -659,6 +661,7 @@ async function launchStableChrome(options) {
|
|
|
659
661
|
};
|
|
660
662
|
} catch (error) {
|
|
661
663
|
lastError = error;
|
|
664
|
+
options.onLaunchAttemptFailed?.(attempt, MAX_LAUNCH_ATTEMPTS, error);
|
|
662
665
|
await terminateOwnedProcess({
|
|
663
666
|
child,
|
|
664
667
|
exited: observed.exited,
|
package/dist/cjs/main.cjs
CHANGED
|
@@ -298,7 +298,13 @@ async function start(options) {
|
|
|
298
298
|
chromePath: options.chromePath,
|
|
299
299
|
profilePath: requestedProfilePath,
|
|
300
300
|
playwrightDownloadsPath,
|
|
301
|
-
lockPath: (0, import_chrome_launcher.defaultChromeLockPath)()
|
|
301
|
+
lockPath: (0, import_chrome_launcher.defaultChromeLockPath)(),
|
|
302
|
+
onLaunchAttemptFailed: (attempt, attempts, error) => {
|
|
303
|
+
process.stderr.write(
|
|
304
|
+
`[r5d-browser] Chrome launch attempt ${attempt}/${attempts} failed: ${error instanceof Error ? error.message : String(error)}
|
|
305
|
+
`
|
|
306
|
+
);
|
|
307
|
+
}
|
|
302
308
|
});
|
|
303
309
|
} catch (error) {
|
|
304
310
|
for (const [signal, handler] of signalHandlers) process.off(signal, handler);
|
package/dist/cjs/package.json
CHANGED
|
@@ -215,6 +215,8 @@ function buildChromeLaunchArgs(profilePath, debuggingPort) {
|
|
|
215
215
|
`--remote-debugging-port=${debuggingPort}`,
|
|
216
216
|
"--no-first-run",
|
|
217
217
|
"--no-default-browser-check",
|
|
218
|
+
"--disable-background-networking",
|
|
219
|
+
"--disable-component-update",
|
|
218
220
|
"--new-window",
|
|
219
221
|
"about:blank"
|
|
220
222
|
];
|
|
@@ -616,6 +618,7 @@ async function launchStableChrome(options) {
|
|
|
616
618
|
};
|
|
617
619
|
} catch (error) {
|
|
618
620
|
lastError = error;
|
|
621
|
+
options.onLaunchAttemptFailed?.(attempt, MAX_LAUNCH_ATTEMPTS, error);
|
|
619
622
|
await terminateOwnedProcess({
|
|
620
623
|
child,
|
|
621
624
|
exited: observed.exited,
|
package/dist/mjs/main.mjs
CHANGED
|
@@ -275,7 +275,13 @@ async function start(options) {
|
|
|
275
275
|
chromePath: options.chromePath,
|
|
276
276
|
profilePath: requestedProfilePath,
|
|
277
277
|
playwrightDownloadsPath,
|
|
278
|
-
lockPath: defaultChromeLockPath()
|
|
278
|
+
lockPath: defaultChromeLockPath(),
|
|
279
|
+
onLaunchAttemptFailed: (attempt, attempts, error) => {
|
|
280
|
+
process.stderr.write(
|
|
281
|
+
`[r5d-browser] Chrome launch attempt ${attempt}/${attempts} failed: ${error instanceof Error ? error.message : String(error)}
|
|
282
|
+
`
|
|
283
|
+
);
|
|
284
|
+
}
|
|
279
285
|
});
|
|
280
286
|
} catch (error) {
|
|
281
287
|
for (const [signal, handler] of signalHandlers) process.off(signal, handler);
|
package/dist/mjs/package.json
CHANGED
|
@@ -10,6 +10,7 @@ export type LaunchStableChromeOptions = {
|
|
|
10
10
|
playwrightDownloadsPath: string;
|
|
11
11
|
lockPath?: string;
|
|
12
12
|
startupTimeoutMs?: number;
|
|
13
|
+
onLaunchAttemptFailed?: (attempt: number, attempts: number, error: unknown) => void;
|
|
13
14
|
};
|
|
14
15
|
export type StableChromeSession = {
|
|
15
16
|
browser: Browser;
|