browser-pilot 0.0.14 → 0.0.15

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
@@ -1,8 +1,8 @@
1
1
  export { BatchExecutor, ValidationError, ValidationResult, addBatchToPage, validateSteps } from './actions.cjs';
2
- import { R as RequestPattern, a as RequestHandler, C as CaptureResult } from './types-BSoh5v1Y.cjs';
3
- export { l as ActionOptions, m as ActionResult, A as ActionType, e as AudioChunk, f as AudioInput, g as AudioInputState, h as AudioOutput, B as BatchOptions, b as BatchResult, i as CaptureOptions, a7 as ClearCookiesOptions, n as ConsoleHandler, o as ConsoleMessage, p as ConsoleMessageType, a0 as ContinueRequestOptions, a8 as Cookie, q as CustomSelectConfig, a9 as DeleteCookieOptions, Z as DeviceDescriptor, _ as DeviceName, D as Dialog, r as DialogHandler, s as DialogType, t as Download, E as ElementInfo, u as ElementNotFoundError, v as EmulationState, w as ErrorHandler, a1 as FailRequestOptions, F as FileInput, x as FillOptions, y as FormField, z as FormOption, a2 as FulfillRequestOptions, G as GeolocationOptions, I as InteractiveElement, a3 as InterceptedRequest, N as NavigationError, H as NetworkIdleOptions, J as Page, K as PageError, L as PageSnapshot, P as PlayOptions, c as RecordOptions, a4 as RequestActions, a5 as ResourceType, j as RoundTripOptions, k as RoundTripResult, a6 as RouteOptions, aa as SetCookieOptions, M as SnapshotNode, O as SnapshotOptions, S as Step, d as StepResult, Q as SubmitOptions, T as TimeoutError, U as TypeOptions, V as UserAgentMetadata, W as UserAgentOptions, X as ViewportOptions, Y as WaitForOptions, ab as WaitOptions, ac as WaitResult, ad as WaitState, $ as devices, ae as waitForAnyElement, af as waitForElement, ag as waitForNavigation, ah as waitForNetworkIdle } from './types-BSoh5v1Y.cjs';
4
- import { C as CDPClient } from './client-Ck2nQksT.cjs';
5
- export { a as CDPClientOptions, c as createCDPClient } from './client-Ck2nQksT.cjs';
2
+ import { R as RequestPattern, a as RequestHandler, C as CaptureResult } from './types-C9ySEdOX.cjs';
3
+ export { l as ActionOptions, m as ActionResult, A as ActionType, e as AudioChunk, f as AudioInput, g as AudioInputState, h as AudioOutput, B as BatchOptions, b as BatchResult, i as CaptureOptions, a7 as ClearCookiesOptions, n as ConsoleHandler, o as ConsoleMessage, p as ConsoleMessageType, a0 as ContinueRequestOptions, a8 as Cookie, q as CustomSelectConfig, a9 as DeleteCookieOptions, Z as DeviceDescriptor, _ as DeviceName, D as Dialog, r as DialogHandler, s as DialogType, t as Download, E as ElementInfo, u as ElementNotFoundError, v as EmulationState, w as ErrorHandler, a1 as FailRequestOptions, F as FileInput, x as FillOptions, y as FormField, z as FormOption, a2 as FulfillRequestOptions, G as GeolocationOptions, I as InteractiveElement, a3 as InterceptedRequest, N as NavigationError, H as NetworkIdleOptions, J as Page, K as PageError, L as PageSnapshot, P as PlayOptions, c as RecordOptions, a4 as RequestActions, a5 as ResourceType, j as RoundTripOptions, k as RoundTripResult, a6 as RouteOptions, aa as SetCookieOptions, M as SnapshotNode, O as SnapshotOptions, S as Step, d as StepResult, Q as SubmitOptions, T as TimeoutError, U as TypeOptions, V as UserAgentMetadata, W as UserAgentOptions, X as ViewportOptions, Y as WaitForOptions, ab as WaitOptions, ac as WaitResult, ad as WaitState, $ as devices, ae as waitForAnyElement, af as waitForElement, ag as waitForNavigation, ah as waitForNetworkIdle } from './types-C9ySEdOX.cjs';
4
+ import { C as CDPClient } from './client-B5QBRgIy.cjs';
5
+ export { a as CDPClientOptions, c as createCDPClient } from './client-B5QBRgIy.cjs';
6
6
  export { Browser, BrowserOptions, PageOptions, connect } from './browser.cjs';
7
7
  export { CDPError } from './cdp.cjs';
8
8
  export { BrowserBaseProvider, BrowserlessProvider, GenericProvider, createProvider, discoverTargets, getBrowserWebSocketUrl } from './providers.cjs';
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { BatchExecutor, ValidationError, ValidationResult, addBatchToPage, validateSteps } from './actions.js';
2
- import { R as RequestPattern, a as RequestHandler, C as CaptureResult } from './types-CjT0vClo.js';
3
- export { l as ActionOptions, m as ActionResult, A as ActionType, e as AudioChunk, f as AudioInput, g as AudioInputState, h as AudioOutput, B as BatchOptions, b as BatchResult, i as CaptureOptions, a7 as ClearCookiesOptions, n as ConsoleHandler, o as ConsoleMessage, p as ConsoleMessageType, a0 as ContinueRequestOptions, a8 as Cookie, q as CustomSelectConfig, a9 as DeleteCookieOptions, Z as DeviceDescriptor, _ as DeviceName, D as Dialog, r as DialogHandler, s as DialogType, t as Download, E as ElementInfo, u as ElementNotFoundError, v as EmulationState, w as ErrorHandler, a1 as FailRequestOptions, F as FileInput, x as FillOptions, y as FormField, z as FormOption, a2 as FulfillRequestOptions, G as GeolocationOptions, I as InteractiveElement, a3 as InterceptedRequest, N as NavigationError, H as NetworkIdleOptions, J as Page, K as PageError, L as PageSnapshot, P as PlayOptions, c as RecordOptions, a4 as RequestActions, a5 as ResourceType, j as RoundTripOptions, k as RoundTripResult, a6 as RouteOptions, aa as SetCookieOptions, M as SnapshotNode, O as SnapshotOptions, S as Step, d as StepResult, Q as SubmitOptions, T as TimeoutError, U as TypeOptions, V as UserAgentMetadata, W as UserAgentOptions, X as ViewportOptions, Y as WaitForOptions, ab as WaitOptions, ac as WaitResult, ad as WaitState, $ as devices, ae as waitForAnyElement, af as waitForElement, ag as waitForNavigation, ah as waitForNetworkIdle } from './types-CjT0vClo.js';
4
- import { C as CDPClient } from './client-Ck2nQksT.js';
5
- export { a as CDPClientOptions, c as createCDPClient } from './client-Ck2nQksT.js';
2
+ import { R as RequestPattern, a as RequestHandler, C as CaptureResult } from './types-Cvvf0oGu.js';
3
+ export { l as ActionOptions, m as ActionResult, A as ActionType, e as AudioChunk, f as AudioInput, g as AudioInputState, h as AudioOutput, B as BatchOptions, b as BatchResult, i as CaptureOptions, a7 as ClearCookiesOptions, n as ConsoleHandler, o as ConsoleMessage, p as ConsoleMessageType, a0 as ContinueRequestOptions, a8 as Cookie, q as CustomSelectConfig, a9 as DeleteCookieOptions, Z as DeviceDescriptor, _ as DeviceName, D as Dialog, r as DialogHandler, s as DialogType, t as Download, E as ElementInfo, u as ElementNotFoundError, v as EmulationState, w as ErrorHandler, a1 as FailRequestOptions, F as FileInput, x as FillOptions, y as FormField, z as FormOption, a2 as FulfillRequestOptions, G as GeolocationOptions, I as InteractiveElement, a3 as InterceptedRequest, N as NavigationError, H as NetworkIdleOptions, J as Page, K as PageError, L as PageSnapshot, P as PlayOptions, c as RecordOptions, a4 as RequestActions, a5 as ResourceType, j as RoundTripOptions, k as RoundTripResult, a6 as RouteOptions, aa as SetCookieOptions, M as SnapshotNode, O as SnapshotOptions, S as Step, d as StepResult, Q as SubmitOptions, T as TimeoutError, U as TypeOptions, V as UserAgentMetadata, W as UserAgentOptions, X as ViewportOptions, Y as WaitForOptions, ab as WaitOptions, ac as WaitResult, ad as WaitState, $ as devices, ae as waitForAnyElement, af as waitForElement, ag as waitForNavigation, ah as waitForNetworkIdle } from './types-Cvvf0oGu.js';
4
+ import { C as CDPClient } from './client-B5QBRgIy.js';
5
+ export { a as CDPClientOptions, c as createCDPClient } from './client-B5QBRgIy.js';
6
6
  export { Browser, BrowserOptions, PageOptions, connect } from './browser.js';
7
7
  export { CDPError } from './cdp.js';
8
8
  export { BrowserBaseProvider, BrowserlessProvider, GenericProvider, createProvider, discoverTargets, getBrowserWebSocketUrl } from './providers.js';
package/dist/index.mjs CHANGED
@@ -16,10 +16,10 @@ import {
16
16
  waitForElement,
17
17
  waitForNavigation,
18
18
  waitForNetworkIdle
19
- } from "./chunk-IN5HPAPB.mjs";
19
+ } from "./chunk-ZAXQ5OTV.mjs";
20
20
  import {
21
21
  createCDPClient
22
- } from "./chunk-KIFB526Y.mjs";
22
+ } from "./chunk-BVZALQT4.mjs";
23
23
  import {
24
24
  BrowserBaseProvider,
25
25
  BrowserlessProvider,
@@ -35,7 +35,7 @@ import {
35
35
  TimeoutError,
36
36
  addBatchToPage,
37
37
  validateSteps
38
- } from "./chunk-XMJABKCF.mjs";
38
+ } from "./chunk-7YVCOL2W.mjs";
39
39
  import {
40
40
  CDPError
41
41
  } from "./chunk-JXAUPHZM.mjs";
@@ -0,0 +1,7 @@
1
+ import {
2
+ Page
3
+ } from "./chunk-USYSHCI3.mjs";
4
+ import "./chunk-DTVRFXKI.mjs";
5
+ export {
6
+ Page
7
+ };
@@ -1,4 +1,4 @@
1
- import { C as CDPClient } from './client-Ck2nQksT.js';
1
+ import { C as CDPClient } from './client-B5QBRgIy.cjs';
2
2
 
3
3
  /**
4
4
  * Audio I/O type definitions
@@ -1247,7 +1247,7 @@ declare class Page {
1247
1247
  */
1248
1248
 
1249
1249
  type FailureReason = 'missing' | 'hidden' | 'covered' | 'disabled' | 'readonly' | 'detached' | 'replaced' | 'notEditable' | 'timeout' | 'navigation' | 'cdpError' | 'unknown';
1250
- type ActionType = 'goto' | 'click' | 'fill' | 'type' | 'select' | 'check' | 'uncheck' | 'submit' | 'press' | 'shortcut' | 'focus' | 'hover' | 'scroll' | 'wait' | 'snapshot' | 'forms' | 'screenshot' | 'evaluate' | 'text' | 'newTab' | 'closeTab' | 'switchFrame' | 'switchToMain' | 'assertVisible' | 'assertExists' | 'assertText' | 'assertUrl' | 'assertValue';
1250
+ type ActionType = 'goto' | 'click' | 'fill' | 'type' | 'select' | 'check' | 'uncheck' | 'submit' | 'press' | 'shortcut' | 'focus' | 'hover' | 'scroll' | 'wait' | 'snapshot' | 'forms' | 'screenshot' | 'evaluate' | 'text' | 'newTab' | 'closeTab' | 'switchFrame' | 'switchToMain' | 'assertVisible' | 'assertExists' | 'assertText' | 'assertUrl' | 'assertValue' | 'waitForWsMessage' | 'assertNoConsoleErrors' | 'assertTextChanged' | 'assertPermission' | 'assertMediaTrackLive';
1251
1251
  interface Step {
1252
1252
  /** Action type */
1253
1253
  action: ActionType;
@@ -1284,7 +1284,9 @@ interface Step {
1284
1284
  /** Custom select: option selector */
1285
1285
  option?: string | string[];
1286
1286
  /** Custom select: match type */
1287
- match?: 'text' | 'value' | 'contains';
1287
+ match?: 'text' | 'value' | 'contains' | string;
1288
+ /** Structured matcher for trace-backed waits */
1289
+ where?: Record<string, unknown>;
1288
1290
  /** Scroll coordinates */
1289
1291
  x?: number;
1290
1292
  y?: number;
@@ -1302,6 +1304,18 @@ interface Step {
1302
1304
  retry?: number;
1303
1305
  /** Delay between retries in ms (default: 500) */
1304
1306
  retryDelay?: number;
1307
+ /** Previous text expected before a change */
1308
+ from?: string;
1309
+ /** Text expected after a change */
1310
+ to?: string;
1311
+ /** Permission or resource name */
1312
+ name?: string;
1313
+ /** Expected permission state */
1314
+ state?: string;
1315
+ /** Media track kind */
1316
+ kind?: 'audio' | 'video';
1317
+ /** Assertion observation window in milliseconds */
1318
+ windowMs?: number;
1305
1319
  }
1306
1320
  interface RecordOptions {
1307
1321
  /** Base directory for screenshots and recording.json. */
@@ -1,4 +1,4 @@
1
- import { C as CDPClient } from './client-Ck2nQksT.cjs';
1
+ import { C as CDPClient } from './client-B5QBRgIy.js';
2
2
 
3
3
  /**
4
4
  * Audio I/O type definitions
@@ -1247,7 +1247,7 @@ declare class Page {
1247
1247
  */
1248
1248
 
1249
1249
  type FailureReason = 'missing' | 'hidden' | 'covered' | 'disabled' | 'readonly' | 'detached' | 'replaced' | 'notEditable' | 'timeout' | 'navigation' | 'cdpError' | 'unknown';
1250
- type ActionType = 'goto' | 'click' | 'fill' | 'type' | 'select' | 'check' | 'uncheck' | 'submit' | 'press' | 'shortcut' | 'focus' | 'hover' | 'scroll' | 'wait' | 'snapshot' | 'forms' | 'screenshot' | 'evaluate' | 'text' | 'newTab' | 'closeTab' | 'switchFrame' | 'switchToMain' | 'assertVisible' | 'assertExists' | 'assertText' | 'assertUrl' | 'assertValue';
1250
+ type ActionType = 'goto' | 'click' | 'fill' | 'type' | 'select' | 'check' | 'uncheck' | 'submit' | 'press' | 'shortcut' | 'focus' | 'hover' | 'scroll' | 'wait' | 'snapshot' | 'forms' | 'screenshot' | 'evaluate' | 'text' | 'newTab' | 'closeTab' | 'switchFrame' | 'switchToMain' | 'assertVisible' | 'assertExists' | 'assertText' | 'assertUrl' | 'assertValue' | 'waitForWsMessage' | 'assertNoConsoleErrors' | 'assertTextChanged' | 'assertPermission' | 'assertMediaTrackLive';
1251
1251
  interface Step {
1252
1252
  /** Action type */
1253
1253
  action: ActionType;
@@ -1284,7 +1284,9 @@ interface Step {
1284
1284
  /** Custom select: option selector */
1285
1285
  option?: string | string[];
1286
1286
  /** Custom select: match type */
1287
- match?: 'text' | 'value' | 'contains';
1287
+ match?: 'text' | 'value' | 'contains' | string;
1288
+ /** Structured matcher for trace-backed waits */
1289
+ where?: Record<string, unknown>;
1288
1290
  /** Scroll coordinates */
1289
1291
  x?: number;
1290
1292
  y?: number;
@@ -1302,6 +1304,18 @@ interface Step {
1302
1304
  retry?: number;
1303
1305
  /** Delay between retries in ms (default: 500) */
1304
1306
  retryDelay?: number;
1307
+ /** Previous text expected before a change */
1308
+ from?: string;
1309
+ /** Text expected after a change */
1310
+ to?: string;
1311
+ /** Permission or resource name */
1312
+ name?: string;
1313
+ /** Expected permission state */
1314
+ state?: string;
1315
+ /** Media track kind */
1316
+ kind?: 'audio' | 'video';
1317
+ /** Assertion observation window in milliseconds */
1318
+ windowMs?: number;
1305
1319
  }
1306
1320
  interface RecordOptions {
1307
1321
  /** Base directory for screenshots and recording.json. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-pilot",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "description": "Lightweight CDP-based browser automation for Node.js, Bun, and Cloudflare Workers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1,9 +0,0 @@
1
- import {
2
- Browser,
3
- connect
4
- } from "./chunk-7NDR6V7S.mjs";
5
- import "./chunk-SPSZZH22.mjs";
6
- export {
7
- Browser,
8
- connect
9
- };