browserclaw 0.12.1 → 0.12.2

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/index.d.cts CHANGED
@@ -1729,7 +1729,7 @@ declare class BrowserClaw {
1729
1729
  * will be terminated. If connected via `BrowserClaw.connect()`, only the
1730
1730
  * Playwright connection is closed.
1731
1731
  *
1732
- * @param exitReason - Optional structured reason for stopping (e.g. `'success'`, `'auth_failed'`, `'timeout'`)
1732
+ * @param exitReason - Optional structured reason for stopping. One of: `'success'`, `'auth_failed'`, `'timeout'`, `'error'`, `'manual'`, `'nav_failed'`, `'crash'`, `'disconnected'`
1733
1733
  */
1734
1734
  stop(exitReason?: ExitReason | (string & {})): Promise<void>;
1735
1735
  /**
package/dist/index.d.ts CHANGED
@@ -1729,7 +1729,7 @@ declare class BrowserClaw {
1729
1729
  * will be terminated. If connected via `BrowserClaw.connect()`, only the
1730
1730
  * Playwright connection is closed.
1731
1731
  *
1732
- * @param exitReason - Optional structured reason for stopping (e.g. `'success'`, `'auth_failed'`, `'timeout'`)
1732
+ * @param exitReason - Optional structured reason for stopping. One of: `'success'`, `'auth_failed'`, `'timeout'`, `'error'`, `'manual'`, `'nav_failed'`, `'crash'`, `'disconnected'`
1733
1733
  */
1734
1734
  stop(exitReason?: ExitReason | (string & {})): Promise<void>;
1735
1735
  /**
package/dist/index.js CHANGED
@@ -1538,10 +1538,10 @@ async function launchChrome(opts = {}) {
1538
1538
  proc.stderr.on("data", onStderr);
1539
1539
  const readyDeadline = Date.now() + 15e3;
1540
1540
  while (Date.now() < readyDeadline) {
1541
- if (await isChromeReachable(cdpUrl, 500)) break;
1541
+ if (await isChromeCdpReady(cdpUrl, 500)) break;
1542
1542
  await new Promise((r) => setTimeout(r, 200));
1543
1543
  }
1544
- if (!await isChromeReachable(cdpUrl, 500)) {
1544
+ if (!await isChromeCdpReady(cdpUrl, 500)) {
1545
1545
  const stderrOutput = Buffer.concat(stderrChunks).toString("utf8").trim();
1546
1546
  const stderrHint = stderrOutput ? `
1547
1547
  Chrome stderr:
@@ -6705,7 +6705,7 @@ var BrowserClaw = class _BrowserClaw {
6705
6705
  * will be terminated. If connected via `BrowserClaw.connect()`, only the
6706
6706
  * Playwright connection is closed.
6707
6707
  *
6708
- * @param exitReason - Optional structured reason for stopping (e.g. `'success'`, `'auth_failed'`, `'timeout'`)
6708
+ * @param exitReason - Optional structured reason for stopping. One of: `'success'`, `'auth_failed'`, `'timeout'`, `'error'`, `'manual'`, `'nav_failed'`, `'crash'`, `'disconnected'`
6709
6709
  */
6710
6710
  async stop(exitReason) {
6711
6711
  this._telemetry.timestamps.stoppedAt = (/* @__PURE__ */ new Date()).toISOString();