browser-pilot 0.0.14 → 0.0.16

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.
Files changed (44) hide show
  1. package/README.md +89 -667
  2. package/dist/actions.cjs +1073 -41
  3. package/dist/actions.d.cts +11 -3
  4. package/dist/actions.d.ts +11 -3
  5. package/dist/actions.mjs +1 -1
  6. package/dist/browser-ZCR6AA4D.mjs +11 -0
  7. package/dist/browser.cjs +1431 -62
  8. package/dist/browser.d.cts +4 -4
  9. package/dist/browser.d.ts +4 -4
  10. package/dist/browser.mjs +4 -4
  11. package/dist/cdp.cjs +5 -1
  12. package/dist/cdp.d.cts +1 -1
  13. package/dist/cdp.d.ts +1 -1
  14. package/dist/cdp.mjs +1 -1
  15. package/dist/{chunk-7NDR6V7S.mjs → chunk-6GBYX7C2.mjs} +1405 -528
  16. package/dist/{chunk-KIFB526Y.mjs → chunk-BVZALQT4.mjs} +5 -1
  17. package/dist/chunk-DTVRFXKI.mjs +35 -0
  18. package/dist/chunk-EZNZ72VA.mjs +563 -0
  19. package/dist/{chunk-SPSZZH22.mjs → chunk-LCNFBXB5.mjs} +9 -33
  20. package/dist/{chunk-IN5HPAPB.mjs → chunk-NNEHWWHL.mjs} +28 -10
  21. package/dist/chunk-TJ5B56NV.mjs +804 -0
  22. package/dist/{chunk-XMJABKCF.mjs → chunk-V3VLBQAM.mjs} +1073 -41
  23. package/dist/cli.mjs +2799 -1176
  24. package/dist/{client-Ck2nQksT.d.cts → client-B5QBRgIy.d.cts} +2 -0
  25. package/dist/{client-Ck2nQksT.d.ts → client-B5QBRgIy.d.ts} +2 -0
  26. package/dist/{client-3AFV2IAF.mjs → client-JWWZWO6L.mjs} +4 -2
  27. package/dist/index.cjs +1441 -52
  28. package/dist/index.d.cts +5 -5
  29. package/dist/index.d.ts +5 -5
  30. package/dist/index.mjs +19 -7
  31. package/dist/page-IUUTJ3SW.mjs +7 -0
  32. package/dist/providers.cjs +637 -2
  33. package/dist/providers.d.cts +2 -2
  34. package/dist/providers.d.ts +2 -2
  35. package/dist/providers.mjs +17 -3
  36. package/dist/{types-CjT0vClo.d.ts → types-BflRmiDz.d.cts} +17 -3
  37. package/dist/{types-BSoh5v1Y.d.cts → types-BzM-IfsL.d.ts} +17 -3
  38. package/dist/types-DeVSWhXj.d.cts +142 -0
  39. package/dist/types-DeVSWhXj.d.ts +142 -0
  40. package/package.json +1 -1
  41. package/dist/browser-LZTEHUDI.mjs +0 -9
  42. package/dist/chunk-BRAFQUMG.mjs +0 -229
  43. package/dist/types--wXNHUwt.d.cts +0 -56
  44. package/dist/types--wXNHUwt.d.ts +0 -56
@@ -1,8 +1,8 @@
1
- import { C as CDPClient } from './client-Ck2nQksT.cjs';
1
+ import { C as CDPClient } from './client-B5QBRgIy.cjs';
2
2
  import { TargetInfo } from './cdp.cjs';
3
- import { b as ConnectOptions } from './types--wXNHUwt.cjs';
4
- import { J as Page } from './types-BSoh5v1Y.cjs';
5
- export { l as ActionOptions, m as ActionResult, n as ConsoleHandler, o as ConsoleMessage, p as ConsoleMessageType, q as CustomSelectConfig, D as Dialog, r as DialogHandler, s as DialogType, t as Download, E as ElementInfo, u as ElementNotFoundError, v as EmulationState, w as ErrorHandler, ai as FailureHint, F as FileInput, x as FillOptions, y as FormField, z as FormOption, G as GeolocationOptions, I as InteractiveElement, N as NavigationError, H as NetworkIdleOptions, K as PageError, L as PageSnapshot, M as SnapshotNode, O as SnapshotOptions, Q as SubmitOptions, T as TimeoutError, U as TypeOptions, V as UserAgentMetadata, W as UserAgentOptions, X as ViewportOptions, Y as WaitForOptions } from './types-BSoh5v1Y.cjs';
3
+ import { b as ConnectOptions } from './types-DeVSWhXj.cjs';
4
+ import { J as Page } from './types-BflRmiDz.cjs';
5
+ export { l as ActionOptions, m as ActionResult, n as ConsoleHandler, o as ConsoleMessage, p as ConsoleMessageType, q as CustomSelectConfig, D as Dialog, r as DialogHandler, s as DialogType, t as Download, E as ElementInfo, u as ElementNotFoundError, v as EmulationState, w as ErrorHandler, ai as FailureHint, F as FileInput, x as FillOptions, y as FormField, z as FormOption, G as GeolocationOptions, I as InteractiveElement, N as NavigationError, H as NetworkIdleOptions, K as PageError, L as PageSnapshot, M as SnapshotNode, O as SnapshotOptions, Q as SubmitOptions, T as TimeoutError, U as TypeOptions, V as UserAgentMetadata, W as UserAgentOptions, X as ViewportOptions, Y as WaitForOptions } from './types-BflRmiDz.cjs';
6
6
 
7
7
  /**
8
8
  * Browser class - manages CDP connection and pages
package/dist/browser.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { C as CDPClient } from './client-Ck2nQksT.js';
1
+ import { C as CDPClient } from './client-B5QBRgIy.js';
2
2
  import { TargetInfo } from './cdp.js';
3
- import { b as ConnectOptions } from './types--wXNHUwt.js';
4
- import { J as Page } from './types-CjT0vClo.js';
5
- export { l as ActionOptions, m as ActionResult, n as ConsoleHandler, o as ConsoleMessage, p as ConsoleMessageType, q as CustomSelectConfig, D as Dialog, r as DialogHandler, s as DialogType, t as Download, E as ElementInfo, u as ElementNotFoundError, v as EmulationState, w as ErrorHandler, ai as FailureHint, F as FileInput, x as FillOptions, y as FormField, z as FormOption, G as GeolocationOptions, I as InteractiveElement, N as NavigationError, H as NetworkIdleOptions, K as PageError, L as PageSnapshot, M as SnapshotNode, O as SnapshotOptions, Q as SubmitOptions, T as TimeoutError, U as TypeOptions, V as UserAgentMetadata, W as UserAgentOptions, X as ViewportOptions, Y as WaitForOptions } from './types-CjT0vClo.js';
3
+ import { b as ConnectOptions } from './types-DeVSWhXj.js';
4
+ import { J as Page } from './types-BzM-IfsL.js';
5
+ export { l as ActionOptions, m as ActionResult, n as ConsoleHandler, o as ConsoleMessage, p as ConsoleMessageType, q as CustomSelectConfig, D as Dialog, r as DialogHandler, s as DialogType, t as Download, E as ElementInfo, u as ElementNotFoundError, v as EmulationState, w as ErrorHandler, ai as FailureHint, F as FileInput, x as FillOptions, y as FormField, z as FormOption, G as GeolocationOptions, I as InteractiveElement, N as NavigationError, H as NetworkIdleOptions, K as PageError, L as PageSnapshot, M as SnapshotNode, O as SnapshotOptions, Q as SubmitOptions, T as TimeoutError, U as TypeOptions, V as UserAgentMetadata, W as UserAgentOptions, X as ViewportOptions, Y as WaitForOptions } from './types-BzM-IfsL.js';
6
6
 
7
7
  /**
8
8
  * Browser class - manages CDP connection and pages
package/dist/browser.mjs CHANGED
@@ -2,14 +2,14 @@ import {
2
2
  Browser,
3
3
  Page,
4
4
  connect
5
- } from "./chunk-IN5HPAPB.mjs";
6
- import "./chunk-KIFB526Y.mjs";
7
- import "./chunk-BRAFQUMG.mjs";
5
+ } from "./chunk-NNEHWWHL.mjs";
6
+ import "./chunk-EZNZ72VA.mjs";
7
+ import "./chunk-BVZALQT4.mjs";
8
8
  import {
9
9
  ElementNotFoundError,
10
10
  NavigationError,
11
11
  TimeoutError
12
- } from "./chunk-XMJABKCF.mjs";
12
+ } from "./chunk-V3VLBQAM.mjs";
13
13
  import "./chunk-JXAUPHZM.mjs";
14
14
  export {
15
15
  Browser,
package/dist/cdp.cjs CHANGED
@@ -192,7 +192,8 @@ function buildCDPClient(transport, options = {}) {
192
192
  pending.delete(response.id);
193
193
  clearTimeout(request.timer);
194
194
  if (response.error) {
195
- request.reject(new CDPError(response.error));
195
+ const error = typeof response.error === "string" ? { code: -32e3, message: response.error } : response.error;
196
+ request.reject(new CDPError(error));
196
197
  } else {
197
198
  request.resolve(response.result);
198
199
  }
@@ -308,6 +309,9 @@ function buildCDPClient(transport, options = {}) {
308
309
  get sessionId() {
309
310
  return currentSessionId;
310
311
  },
312
+ setSessionId(sessionId) {
313
+ currentSessionId = sessionId;
314
+ },
311
315
  get isConnected() {
312
316
  return connected;
313
317
  }
package/dist/cdp.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { C as CDPClient, a as CDPClientOptions, T as Transport, e as TransportOptions, c as createCDPClient, b as createCDPClientFromTransport, d as createTransport } from './client-Ck2nQksT.cjs';
1
+ export { C as CDPClient, a as CDPClientOptions, T as Transport, e as TransportOptions, c as createCDPClient, b as createCDPClientFromTransport, d as createTransport } from './client-B5QBRgIy.cjs';
2
2
 
3
3
  /**
4
4
  * CDP Protocol type definitions
package/dist/cdp.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { C as CDPClient, a as CDPClientOptions, T as Transport, e as TransportOptions, c as createCDPClient, b as createCDPClientFromTransport, d as createTransport } from './client-Ck2nQksT.js';
1
+ export { C as CDPClient, a as CDPClientOptions, T as Transport, e as TransportOptions, c as createCDPClient, b as createCDPClientFromTransport, d as createTransport } from './client-B5QBRgIy.js';
2
2
 
3
3
  /**
4
4
  * CDP Protocol type definitions
package/dist/cdp.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  createCDPClient,
3
3
  createCDPClientFromTransport,
4
4
  createTransport
5
- } from "./chunk-KIFB526Y.mjs";
5
+ } from "./chunk-BVZALQT4.mjs";
6
6
  import {
7
7
  CDPError
8
8
  } from "./chunk-JXAUPHZM.mjs";