@hasna/browser 0.0.1
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/dashboard/dist/assets/index-fnTihDNb.js +40 -0
- package/dashboard/dist/index.html +16 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +8625 -0
- package/dist/cli/index.test.d.ts +2 -0
- package/dist/cli/index.test.d.ts.map +1 -0
- package/dist/db/agents.d.ts +16 -0
- package/dist/db/agents.d.ts.map +1 -0
- package/dist/db/agents.test.d.ts +2 -0
- package/dist/db/agents.test.d.ts.map +1 -0
- package/dist/db/console-log.d.ts +6 -0
- package/dist/db/console-log.d.ts.map +1 -0
- package/dist/db/crawl-results.d.ts +6 -0
- package/dist/db/crawl-results.d.ts.map +1 -0
- package/dist/db/heartbeats.d.ts +6 -0
- package/dist/db/heartbeats.d.ts.map +1 -0
- package/dist/db/network-log.d.ts +7 -0
- package/dist/db/network-log.d.ts.map +1 -0
- package/dist/db/projects.d.ts +9 -0
- package/dist/db/projects.d.ts.map +1 -0
- package/dist/db/projects.test.d.ts +2 -0
- package/dist/db/projects.test.d.ts.map +1 -0
- package/dist/db/recordings.d.ts +11 -0
- package/dist/db/recordings.d.ts.map +1 -0
- package/dist/db/recordings.test.d.ts +2 -0
- package/dist/db/recordings.test.d.ts.map +1 -0
- package/dist/db/schema.d.ts +5 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.test.d.ts +2 -0
- package/dist/db/schema.test.d.ts.map +1 -0
- package/dist/db/sessions.d.ts +17 -0
- package/dist/db/sessions.d.ts.map +1 -0
- package/dist/db/sessions.test.d.ts +2 -0
- package/dist/db/sessions.test.d.ts.map +1 -0
- package/dist/db/snapshots.d.ts +7 -0
- package/dist/db/snapshots.d.ts.map +1 -0
- package/dist/engines/cdp.d.ts +26 -0
- package/dist/engines/cdp.d.ts.map +1 -0
- package/dist/engines/lightpanda.d.ts +25 -0
- package/dist/engines/lightpanda.d.ts.map +1 -0
- package/dist/engines/playwright.d.ts +27 -0
- package/dist/engines/playwright.d.ts.map +1 -0
- package/dist/engines/selector.d.ts +17 -0
- package/dist/engines/selector.d.ts.map +1 -0
- package/dist/engines/selector.test.d.ts +2 -0
- package/dist/engines/selector.test.d.ts.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2080 -0
- package/dist/lib/actions.d.ts +33 -0
- package/dist/lib/actions.d.ts.map +1 -0
- package/dist/lib/actions.test.d.ts +2 -0
- package/dist/lib/actions.test.d.ts.map +1 -0
- package/dist/lib/agents.d.ts +9 -0
- package/dist/lib/agents.d.ts.map +1 -0
- package/dist/lib/agents.test.d.ts +2 -0
- package/dist/lib/agents.test.d.ts.map +1 -0
- package/dist/lib/console.d.ts +6 -0
- package/dist/lib/console.d.ts.map +1 -0
- package/dist/lib/crawler.d.ts +3 -0
- package/dist/lib/crawler.d.ts.map +1 -0
- package/dist/lib/extractor.d.ts +14 -0
- package/dist/lib/extractor.d.ts.map +1 -0
- package/dist/lib/extractor.test.d.ts +2 -0
- package/dist/lib/extractor.test.d.ts.map +1 -0
- package/dist/lib/network.d.ts +11 -0
- package/dist/lib/network.d.ts.map +1 -0
- package/dist/lib/network.test.d.ts +2 -0
- package/dist/lib/network.test.d.ts.map +1 -0
- package/dist/lib/performance.d.ts +13 -0
- package/dist/lib/performance.d.ts.map +1 -0
- package/dist/lib/recorder.d.ts +11 -0
- package/dist/lib/recorder.d.ts.map +1 -0
- package/dist/lib/recorder.test.d.ts +2 -0
- package/dist/lib/recorder.test.d.ts.map +1 -0
- package/dist/lib/screenshot.d.ts +9 -0
- package/dist/lib/screenshot.d.ts.map +1 -0
- package/dist/lib/session.d.ts +21 -0
- package/dist/lib/session.d.ts.map +1 -0
- package/dist/lib/storage.d.ts +19 -0
- package/dist/lib/storage.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +5944 -0
- package/dist/mcp/index.test.d.ts +2 -0
- package/dist/mcp/index.test.d.ts.map +1 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +1580 -0
- package/dist/server/index.test.d.ts +2 -0
- package/dist/server/index.test.d.ts.map +1 -0
- package/dist/types/index.d.ts +313 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +74 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Page } from "playwright";
|
|
2
|
+
export interface ClickOptions {
|
|
3
|
+
button?: "left" | "right" | "middle";
|
|
4
|
+
clickCount?: number;
|
|
5
|
+
delay?: number;
|
|
6
|
+
timeout?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface TypeOptions {
|
|
9
|
+
delay?: number;
|
|
10
|
+
clear?: boolean;
|
|
11
|
+
timeout?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface WaitOptions {
|
|
14
|
+
state?: "attached" | "detached" | "visible" | "hidden";
|
|
15
|
+
timeout?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function click(page: Page, selector: string, opts?: ClickOptions): Promise<void>;
|
|
18
|
+
export declare function type(page: Page, selector: string, text: string, opts?: TypeOptions): Promise<void>;
|
|
19
|
+
export declare function fill(page: Page, selector: string, value: string, timeout?: number): Promise<void>;
|
|
20
|
+
export declare function scroll(page: Page, direction?: "up" | "down" | "left" | "right", amount?: number): Promise<void>;
|
|
21
|
+
export declare function scrollTo(page: Page, selector: string): Promise<void>;
|
|
22
|
+
export declare function hover(page: Page, selector: string, timeout?: number): Promise<void>;
|
|
23
|
+
export declare function selectOption(page: Page, selector: string, value: string, timeout?: number): Promise<string[]>;
|
|
24
|
+
export declare function checkBox(page: Page, selector: string, checked: boolean, timeout?: number): Promise<void>;
|
|
25
|
+
export declare function uploadFile(page: Page, selector: string, filePaths: string | string[], timeout?: number): Promise<void>;
|
|
26
|
+
export declare function goBack(page: Page, timeout?: number): Promise<void>;
|
|
27
|
+
export declare function goForward(page: Page, timeout?: number): Promise<void>;
|
|
28
|
+
export declare function reload(page: Page, timeout?: number): Promise<void>;
|
|
29
|
+
export declare function navigate(page: Page, url: string, timeout?: number): Promise<void>;
|
|
30
|
+
export declare function waitForSelector(page: Page, selector: string, opts?: WaitOptions): Promise<void>;
|
|
31
|
+
export declare function waitForNavigation(page: Page, timeout?: number): Promise<void>;
|
|
32
|
+
export declare function pressKey(page: Page, key: string): Promise<void>;
|
|
33
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/lib/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGvC,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAsB,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAc5F;AAED,wBAAsB,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,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C,IAAI,CAAC,CAM1E;AAED,wBAAsB,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,SAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAMvE;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,SAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAMtF;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CASrG;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,SAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAMlF;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAErE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.test.d.ts","sourceRoot":"","sources":["../../src/lib/actions.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Agent } from "../types/index.js";
|
|
2
|
+
import { getAgent, getAgentByName, listAgents, updateAgent, deleteAgent, cleanStaleAgents, type RegisterAgentOptions } from "../db/agents.js";
|
|
3
|
+
export { getAgent, getAgentByName, listAgents, updateAgent, deleteAgent, cleanStaleAgents };
|
|
4
|
+
export type { RegisterAgentOptions };
|
|
5
|
+
export declare function registerAgent(name: string, opts?: RegisterAgentOptions): Agent;
|
|
6
|
+
export declare function heartbeat(agentId: string): void;
|
|
7
|
+
export declare function isAgentStale(agent: Agent, thresholdMs?: number): boolean;
|
|
8
|
+
export declare function getActiveAgents(thresholdMs?: number): Agent[];
|
|
9
|
+
//# sourceMappingURL=agents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/lib/agents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAA8D,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE1M,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;AAC5F,YAAY,EAAE,oBAAoB,EAAE,CAAC;AAErC,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,oBAAyB,GAAG,KAAK,CAElF;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,SAAgB,GAAG,OAAO,CAG/E;AAED,wBAAgB,eAAe,CAAC,WAAW,SAAgB,GAAG,KAAK,EAAE,CAEpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.test.d.ts","sourceRoot":"","sources":["../../src/lib/agents.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Page } from "playwright";
|
|
2
|
+
import { getConsoleLog, clearConsoleLog } from "../db/console-log.js";
|
|
3
|
+
export declare function enableConsoleCapture(page: Page, sessionId: string): () => void;
|
|
4
|
+
export { getConsoleLog, clearConsoleLog };
|
|
5
|
+
export declare function capturePageErrors(page: Page, sessionId: string): Promise<() => void>;
|
|
6
|
+
//# sourceMappingURL=console.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../src/lib/console.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAA8C,MAAM,YAAY,CAAC;AAEnF,OAAO,EAAqB,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEzF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,IAAI,CA4B9E;AAED,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAE1C,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,IAAI,CAAC,CAgBrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crawler.d.ts","sourceRoot":"","sources":["../../src/lib/crawler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAe,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAQhF,wBAAsB,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAoE3F"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Page, ElementHandle } from "playwright";
|
|
2
|
+
import type { ExtractOptions, ExtractResult } from "../types/index.js";
|
|
3
|
+
export declare function getText(page: Page, selector?: string): Promise<string>;
|
|
4
|
+
export declare function getHTML(page: Page, selector?: string): Promise<string>;
|
|
5
|
+
export declare function getLinks(page: Page, baseUrl?: string): Promise<string[]>;
|
|
6
|
+
export declare function getTitle(page: Page): Promise<string>;
|
|
7
|
+
export declare function getUrl(page: Page): Promise<string>;
|
|
8
|
+
export declare function getMetaTags(page: Page): Promise<Record<string, string>>;
|
|
9
|
+
export declare function findElements(page: Page, selector: string): Promise<ElementHandle[]>;
|
|
10
|
+
export declare function extractStructured(page: Page, schema: Record<string, string>): Promise<Record<string, string | string[]>>;
|
|
11
|
+
export declare function extractTable(page: Page, selector: string): Promise<string[][]>;
|
|
12
|
+
export declare function getAriaSnapshot(page: Page): Promise<string>;
|
|
13
|
+
export declare function extract(page: Page, opts?: ExtractOptions): Promise<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,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CASpF;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAiBjE;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,GAAE,cAAmB,GAAG,OAAO,CAAC,aAAa,CAAC,CAuB3F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractor.test.d.ts","sourceRoot":"","sources":["../../src/lib/extractor.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Page } from "playwright";
|
|
2
|
+
import type { HAR, HAREntry, InterceptRule } from "../types/index.js";
|
|
3
|
+
export declare function enableNetworkLogging(page: Page, sessionId: string): () => void;
|
|
4
|
+
export declare function addInterceptRule(page: Page, rule: InterceptRule): Promise<void>;
|
|
5
|
+
export declare function clearInterceptRules(page: Page): Promise<void>;
|
|
6
|
+
export interface HARCapture {
|
|
7
|
+
entries: HAREntry[];
|
|
8
|
+
stop: () => HAR;
|
|
9
|
+
}
|
|
10
|
+
export declare function startHAR(page: Page): HARCapture;
|
|
11
|
+
//# sourceMappingURL=network.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/lib/network.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAA4B,MAAM,YAAY,CAAC;AACjE,OAAO,KAAK,EAAkB,GAAG,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAMtF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,IAAI,CAoC9E;AAID,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAerF;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnE;AAID,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,CAAC;CACjB;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,CA6D/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network.test.d.ts","sourceRoot":"","sources":["../../src/lib/network.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Page } from "playwright";
|
|
2
|
+
import type { PerformanceMetrics, CoverageResult } from "../types/index.js";
|
|
3
|
+
export declare function getPerformanceMetrics(page: Page): Promise<PerformanceMetrics>;
|
|
4
|
+
export declare function getMemoryUsage(page: Page): Promise<{
|
|
5
|
+
used: number;
|
|
6
|
+
total: number;
|
|
7
|
+
} | null>;
|
|
8
|
+
export declare function getTimingEntries(page: Page): Promise<PerformanceEntry[]>;
|
|
9
|
+
export interface CoverageSession {
|
|
10
|
+
stop: () => Promise<CoverageResult>;
|
|
11
|
+
}
|
|
12
|
+
export declare function startCoverage(page: Page): Promise<CoverageSession>;
|
|
13
|
+
//# sourceMappingURL=performance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../src/lib/performance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAG5E,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAuCnF;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,CAWhG;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAI9E;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,CAAC;CACrC;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,CA4CxE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Page } from "playwright";
|
|
2
|
+
import type { Recording, RecordingStep, ReplayResult } from "../types/index.js";
|
|
3
|
+
import { getRecording, listRecordings } from "../db/recordings.js";
|
|
4
|
+
export declare function startRecording(sessionId: string, name: string, startUrl?: string): Recording;
|
|
5
|
+
export declare function attachPageListeners(page: Page, recordingId: string): void;
|
|
6
|
+
export declare function recordStep(recordingId: string, step: Omit<RecordingStep, "timestamp">): void;
|
|
7
|
+
export declare function stopRecording(recordingId: string): Recording;
|
|
8
|
+
export declare function replayRecording(recordingId: string, page: Page): Promise<ReplayResult>;
|
|
9
|
+
export declare function exportRecording(recordingId: string, format?: "json" | "playwright" | "puppeteer"): string;
|
|
10
|
+
export { listRecordings, getRecording };
|
|
11
|
+
//# sourceMappingURL=recorder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../src/lib/recorder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAmB,YAAY,EAAmB,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAYrG,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAa5F;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAmBzE;AAED,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,GAAG,IAAI,CAI5F;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAQ5D;AAED,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,YAAY,CAAC,CAuDvB;AAED,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,GAAG,YAAY,GAAG,WAAoB,GAAG,MAAM,CAqDjH;AAED,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recorder.test.d.ts","sourceRoot":"","sources":["../../src/lib/recorder.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Page } from "playwright";
|
|
2
|
+
import type { ScreenshotOptions, ScreenshotResult } from "../types/index.js";
|
|
3
|
+
export declare function takeScreenshot(page: Page, opts?: ScreenshotOptions & {
|
|
4
|
+
projectId?: string;
|
|
5
|
+
}): Promise<ScreenshotResult>;
|
|
6
|
+
export declare function generatePDF(page: Page, opts?: import("../types/index.js").PDFOptions & {
|
|
7
|
+
projectId?: string;
|
|
8
|
+
}): Promise<import("../types/index.js").PDFResult>;
|
|
9
|
+
//# sourceMappingURL=screenshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../src/lib/screenshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAIvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAa7E,wBAAsB,cAAc,CAClC,IAAI,EAAE,IAAI,EACV,IAAI,CAAC,EAAE,iBAAiB,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAChD,OAAO,CAAC,gBAAgB,CAAC,CAuC3B;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,OAAO,mBAAmB,EAAE,UAAU,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,OAAO,mBAAmB,EAAE,SAAS,CAAC,CA6BpK"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Browser, Page } from "playwright";
|
|
2
|
+
import type { Session, SessionOptions, SessionStatus } from "../types/index.js";
|
|
3
|
+
import { BrowserEngine } from "../types/index.js";
|
|
4
|
+
export interface CreateSessionResult {
|
|
5
|
+
session: Session;
|
|
6
|
+
page: Page;
|
|
7
|
+
}
|
|
8
|
+
export declare function createSession(opts?: SessionOptions): Promise<CreateSessionResult>;
|
|
9
|
+
export declare function getSessionPage(sessionId: string): Page;
|
|
10
|
+
export declare function getSessionBrowser(sessionId: string): Browser;
|
|
11
|
+
export declare function getSessionEngine(sessionId: string): BrowserEngine;
|
|
12
|
+
export declare function hasActiveHandle(sessionId: string): boolean;
|
|
13
|
+
export declare function closeSession(sessionId: string): Promise<Session>;
|
|
14
|
+
export declare function getSession(sessionId: string): Session;
|
|
15
|
+
export declare function listSessions(filter?: {
|
|
16
|
+
status?: SessionStatus;
|
|
17
|
+
projectId?: string;
|
|
18
|
+
}): Session[];
|
|
19
|
+
export declare function getActiveSessions(): Session[];
|
|
20
|
+
export declare function closeAllSessions(): Promise<void>;
|
|
21
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/lib/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAW,MAAM,mBAAmB,CAAC;AAmB3D,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,wBAAsB,aAAa,CAAC,IAAI,GAAE,cAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA6C3F;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAItD;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAI5D;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,CAIjE;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAYtE;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,aAAa,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,EAAE,CAE/F;AAED,wBAAgB,iBAAiB,IAAI,OAAO,EAAE,CAE7C;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAItD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Page } from "playwright";
|
|
2
|
+
import type { Cookie } from "playwright";
|
|
3
|
+
export declare function getCookies(page: Page, filter?: {
|
|
4
|
+
name?: string;
|
|
5
|
+
domain?: string;
|
|
6
|
+
}): Promise<Cookie[]>;
|
|
7
|
+
export declare function setCookie(page: Page, cookie: Cookie): Promise<void>;
|
|
8
|
+
export declare function clearCookies(page: Page, filter?: {
|
|
9
|
+
name?: string;
|
|
10
|
+
domain?: string;
|
|
11
|
+
}): Promise<void>;
|
|
12
|
+
export declare function getLocalStorage(page: Page, key?: string): Promise<Record<string, string> | string | null>;
|
|
13
|
+
export declare function setLocalStorage(page: Page, key: string, value: string): Promise<void>;
|
|
14
|
+
export declare function clearLocalStorage(page: Page): Promise<void>;
|
|
15
|
+
export declare function getSessionStorage(page: Page, key?: string): Promise<Record<string, string> | string | null>;
|
|
16
|
+
export declare function setSessionStorage(page: Page, key: string, value: string): Promise<void>;
|
|
17
|
+
export declare function clearSessionStorage(page: Page): Promise<void>;
|
|
18
|
+
export declare function getIndexedDB(page: Page, dbName: string, storeName: string): Promise<unknown[]>;
|
|
19
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/lib/storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIzC,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAK3G;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzE;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA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