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/README.md +81 -672
- package/dist/actions.cjs +1058 -41
- package/dist/actions.d.cts +11 -3
- package/dist/actions.d.ts +11 -3
- package/dist/actions.mjs +1 -1
- package/dist/browser-MEWT75IB.mjs +11 -0
- package/dist/browser.cjs +1021 -40
- package/dist/browser.d.cts +3 -3
- package/dist/browser.d.ts +3 -3
- package/dist/browser.mjs +3 -3
- package/dist/cdp.cjs +5 -1
- package/dist/cdp.d.cts +1 -1
- package/dist/cdp.d.ts +1 -1
- package/dist/cdp.mjs +1 -1
- package/dist/{chunk-XMJABKCF.mjs → chunk-7YVCOL2W.mjs} +1058 -41
- package/dist/{chunk-KIFB526Y.mjs → chunk-BVZALQT4.mjs} +5 -1
- package/dist/chunk-DTVRFXKI.mjs +35 -0
- package/dist/{chunk-SPSZZH22.mjs → chunk-LCNFBXB5.mjs} +9 -33
- package/dist/{chunk-7NDR6V7S.mjs → chunk-USYSHCI3.mjs} +1369 -517
- package/dist/chunk-WPNW23CE.mjs +466 -0
- package/dist/{chunk-IN5HPAPB.mjs → chunk-ZAXQ5OTV.mjs} +6 -2
- package/dist/cli.mjs +2522 -1048
- package/dist/{client-Ck2nQksT.d.cts → client-B5QBRgIy.d.cts} +2 -0
- package/dist/{client-Ck2nQksT.d.ts → client-B5QBRgIy.d.ts} +2 -0
- package/dist/{client-3AFV2IAF.mjs → client-JWWZWO6L.mjs} +4 -2
- package/dist/index.cjs +1067 -42
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +3 -3
- package/dist/page-XPS6IC6V.mjs +7 -0
- package/dist/{types-CjT0vClo.d.ts → types-C9ySEdOX.d.cts} +17 -3
- package/dist/{types-BSoh5v1Y.d.cts → types-Cvvf0oGu.d.ts} +17 -3
- package/package.json +1 -1
- package/dist/browser-LZTEHUDI.mjs +0 -9
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-
|
|
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-
|
|
4
|
-
import { C as CDPClient } from './client-
|
|
5
|
-
export { a as CDPClientOptions, c as createCDPClient } from './client-
|
|
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-
|
|
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-
|
|
4
|
-
import { C as CDPClient } from './client-
|
|
5
|
-
export { a as CDPClientOptions, c as createCDPClient } from './client-
|
|
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-
|
|
19
|
+
} from "./chunk-ZAXQ5OTV.mjs";
|
|
20
20
|
import {
|
|
21
21
|
createCDPClient
|
|
22
|
-
} from "./chunk-
|
|
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-
|
|
38
|
+
} from "./chunk-7YVCOL2W.mjs";
|
|
39
39
|
import {
|
|
40
40
|
CDPError
|
|
41
41
|
} from "./chunk-JXAUPHZM.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CDPClient } from './client-
|
|
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-
|
|
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