diff --git a/kayle/lib/config.ts b/kayle/lib/config.ts index f3154f0..0ab55dd 100644 --- a/kayle/lib/config.ts +++ b/kayle/lib/config.ts @@ -57,7 +57,7 @@ type Browser = { type Target = {}; // dom lifecycles -type LifeCycleEvent = +export type LifeCycleEvent = | "load" | "domcontentloaded" // playwright @@ -69,7 +69,7 @@ type LifeCycleEvent = | "networkidle2"; // wait for options -type WaitForOptions = { +export type WaitForOptions = { timeout?: number; waitUntil?: LifeCycleEvent | LifeCycleEvent[] | string; }; diff --git a/kayle/lib/index.ts b/kayle/lib/index.ts index 2eb4ae2..b68f168 100644 --- a/kayle/lib/index.ts +++ b/kayle/lib/index.ts @@ -11,5 +11,5 @@ export { sendCDPPageConfigurationEnable, sendCDPPageConfigurationReset, } from "./utils/cdp-blocking"; -export { setLogging, Standard, RunnerConfig, Runner } from "./config"; +export { setLogging, Standard, type RunnerConfig, type Runner, type LifeCycleEvent, type WaitForOptions } from "./config"; export { extractLinks, innateBuilder } from "./wasm"; diff --git a/kayle/lib/utils/go-to-page.ts b/kayle/lib/utils/go-to-page.ts index ddf2b09..13b4262 100644 --- a/kayle/lib/utils/go-to-page.ts +++ b/kayle/lib/utils/go-to-page.ts @@ -35,7 +35,9 @@ export const goToPage = async ( o: Partial ): Promise => { await setCDPIntercept(o); + const { page, timeout, waitUntil, origin } = o; + let valid = false; try { diff --git a/kayle/package.json b/kayle/package.json index 88bb689..7d3a454 100644 --- a/kayle/package.json +++ b/kayle/package.json @@ -1,6 +1,6 @@ { "name": "kayle", - "version": "0.8.2", + "version": "0.8.6", "description": "Extremely fast and accurate accessibility engine built for any headless tool like playwright or puppeteer.", "main": "./build/index.js", "keywords": [