@mearl/native-host 2.2.0 → 2.2.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/dist/cdp-backend/cdp-utils.d.ts +2 -1
- package/dist/cdp-backend/navigation-observer.d.ts +4 -2
- package/dist/cdp-backend/send-request.d.ts +2 -0
- package/dist/extension-file-transfer.d.ts +7 -0
- package/dist/index.js +902 -387
- package/dist/send-request-file-utils.d.ts +14 -0
- package/package.json +3 -3
|
@@ -32,13 +32,14 @@ export interface CdpViewportMetrics {
|
|
|
32
32
|
export declare function nodeFetch(urlStr: string, options?: {
|
|
33
33
|
method?: string;
|
|
34
34
|
headers?: Record<string, string>;
|
|
35
|
-
body?: string;
|
|
35
|
+
body?: string | Uint8Array;
|
|
36
36
|
timeoutMs?: number;
|
|
37
37
|
}): Promise<{
|
|
38
38
|
status: number;
|
|
39
39
|
statusText: string;
|
|
40
40
|
headers: Record<string, string>;
|
|
41
41
|
body: string;
|
|
42
|
+
bodyBuffer: Buffer;
|
|
42
43
|
}>;
|
|
43
44
|
export declare function getCookiesForUrl(session: PageSession, targetUrl: string): Promise<Map<string, string>>;
|
|
44
45
|
export declare function decodeTracknick(raw: string): string;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type PageActNavigationObserver } from '@mearl/browser-core';
|
|
2
|
-
import type { PageSession } from './cdp-session.js';
|
|
3
|
-
export declare function startCdpNavigationObserver(
|
|
2
|
+
import type { CdpSession, PageSession } from './cdp-session.js';
|
|
3
|
+
export declare function startCdpNavigationObserver(cdpSession: CdpSession, pageSession: PageSession, urlBefore: string, options?: {
|
|
4
4
|
trackNetwork?: boolean;
|
|
5
5
|
networkIdleMs?: number;
|
|
6
6
|
contentReadyAfterMs?: number;
|
|
7
|
+
trackOpenedTabs?: boolean;
|
|
8
|
+
sourceTabId?: number;
|
|
7
9
|
}): Promise<PageActNavigationObserver>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type RunActionsParams, type SendRequestParams } from '@mearl/browser-core';
|
|
2
|
+
type SendExtensionTransferAction = (action: string, data: any, timeoutMs: number) => Promise<any>;
|
|
3
|
+
export declare function hasSendRequestFiles(data: unknown): boolean;
|
|
4
|
+
export declare function hasRunActionsSendRequestFiles(data: unknown): boolean;
|
|
5
|
+
export declare function sendRequestWithTransferredFiles(data: SendRequestParams, send: SendExtensionTransferAction): Promise<any>;
|
|
6
|
+
export declare function sendRunActionsWithTransferredFiles(data: RunActionsParams, send: SendExtensionTransferAction, resolveTimeoutMs: (data: RunActionsParams) => number): Promise<any>;
|
|
7
|
+
export {};
|