@push.rocks/smartpuppeteer 2.3.0 → 2.5.0
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_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/smartpuppeteer.classes.livebrowsersession.d.ts +12 -1
- package/dist_ts/smartpuppeteer.classes.livebrowsersession.js +338 -68
- package/dist_ts/smartpuppeteer.interfaces.livebrowser.d.ts +11 -5
- package/dist_ts/smartpuppeteer.interfaces.livebrowser.js +3 -2
- package/package.json +1 -1
- package/readme.hints.md +2 -1
- package/readme.md +8 -3
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/smartpuppeteer.classes.livebrowsersession.ts +433 -89
- package/ts/smartpuppeteer.interfaces.livebrowser.ts +13 -6
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@push.rocks/smartpuppeteer',
|
|
6
|
-
version: '2.
|
|
6
|
+
version: '2.5.0',
|
|
7
7
|
description: 'Provides simplified access to Puppeteer for automation and testing purposes.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSw0QkFBNEI7SUFDbEMsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLDhFQUE4RTtDQUM1RixDQUFBIn0=
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import type { ILiveBrowserClickOptions, ILiveBrowserCreateTabOptions, ILiveBrowserEvaluateOptions, ILiveBrowserFillOptions, ILiveBrowserFrameAcknowledgement, ILiveBrowserFrameAcknowledgementRequest, ILiveBrowserInsertTextInput, ILiveBrowserKeyInput, ILiveBrowserMouseInput, ILiveBrowserNavigateOptions, ILiveBrowserNavigationOptions, ILiveBrowserObservation, ILiveBrowserObserveOptions, ILiveBrowserOperationOptions, ILiveBrowserPressOptions, ILiveBrowserProcessState, ILiveBrowserSessionOptions, ILiveBrowserSnapshot, ILiveBrowserSnapshotOptions, ILiveBrowserState, ILiveBrowserTabState, ILiveBrowserTerminationOptions, ILiveBrowserTerminationResult, ILiveBrowserViewport, ILiveBrowserWheelInput, TLiveBrowserEventListener, TLiveBrowserJsonValue } from './smartpuppeteer.interfaces.livebrowser.js';
|
|
1
|
+
import type { ILiveBrowserClickOptions, ILiveBrowserCreateTabOptions, ILiveBrowserEvaluateOptions, ILiveBrowserFillOptions, ILiveBrowserFrameAcknowledgement, ILiveBrowserFrameAcknowledgementRequest, ILiveBrowserFrameIdentity, ILiveBrowserInsertTextInput, ILiveBrowserKeyInput, ILiveBrowserMouseInput, ILiveBrowserNavigateOptions, ILiveBrowserNavigationOptions, ILiveBrowserObservation, ILiveBrowserObserveOptions, ILiveBrowserOperationOptions, ILiveBrowserPressOptions, ILiveBrowserProcessState, ILiveBrowserSessionOptions, ILiveBrowserSnapshot, ILiveBrowserSnapshotOptions, ILiveBrowserState, ILiveBrowserTabState, ILiveBrowserTerminationOptions, ILiveBrowserTerminationResult, ILiveBrowserViewport, ILiveBrowserWheelInput, TLiveBrowserEventListener, TLiveBrowserJsonValue } from './smartpuppeteer.interfaces.livebrowser.js';
|
|
2
2
|
export declare class LiveBrowserSession {
|
|
3
3
|
private readonly options;
|
|
4
4
|
private readonly eventListeners;
|
|
5
5
|
private readonly tabs;
|
|
6
6
|
private readonly tabIdsByPage;
|
|
7
7
|
private readonly outstandingFrames;
|
|
8
|
+
private readonly cdpFramesBeingAcknowledged;
|
|
9
|
+
private readonly maxOutstandingFrames;
|
|
8
10
|
private browser?;
|
|
9
11
|
private browserContext?;
|
|
10
12
|
private browserLifetimeController?;
|
|
@@ -29,6 +31,7 @@ export declare class LiveBrowserSession {
|
|
|
29
31
|
private admittedPublicOperations;
|
|
30
32
|
private admittedInternalOperations;
|
|
31
33
|
private shutdownPromise?;
|
|
34
|
+
private shutdownFrameDrainPromise?;
|
|
32
35
|
private status;
|
|
33
36
|
private activeTabId;
|
|
34
37
|
private viewport;
|
|
@@ -46,6 +49,7 @@ export declare class LiveBrowserSession {
|
|
|
46
49
|
start(operationOptions?: ILiveBrowserOperationOptions): Promise<void>;
|
|
47
50
|
stop(): Promise<void>;
|
|
48
51
|
acknowledgeFrame(acknowledgement: ILiveBrowserFrameAcknowledgementRequest): Promise<ILiveBrowserFrameAcknowledgement>;
|
|
52
|
+
refreshScreencast(operationOptions?: ILiveBrowserOperationOptions): Promise<ILiveBrowserFrameIdentity>;
|
|
49
53
|
createTab(optionsArg?: ILiveBrowserCreateTabOptions, operationOptions?: ILiveBrowserOperationOptions): Promise<ILiveBrowserTabState>;
|
|
50
54
|
activateTab(tabId: string, operationOptions?: ILiveBrowserOperationOptions): Promise<void>;
|
|
51
55
|
closeTab(tabId: string, operationOptions?: ILiveBrowserOperationOptions): Promise<void>;
|
|
@@ -112,12 +116,19 @@ export declare class LiveBrowserSession {
|
|
|
112
116
|
private createPuppeteerNavigationOptions;
|
|
113
117
|
private refreshTab;
|
|
114
118
|
private startScreencast;
|
|
119
|
+
private canRestoreScreencast;
|
|
120
|
+
private createScreencastAuthority;
|
|
121
|
+
private assertScreencastAuthority;
|
|
122
|
+
private waitForScreencastAuthority;
|
|
123
|
+
private invalidateScreencast;
|
|
124
|
+
private waitForScreencastFrame;
|
|
115
125
|
private stopScreencast;
|
|
116
126
|
private handleScreencastFrame;
|
|
117
127
|
private acknowledgeCdpFrame;
|
|
118
128
|
private acknowledgeCdpFrameInBackground;
|
|
119
129
|
private handleFrameAcknowledgementFailure;
|
|
120
130
|
private retireOutstandingFrames;
|
|
131
|
+
private waitForCdpFrameAcknowledgements;
|
|
121
132
|
private handlePossibleCdpDisconnection;
|
|
122
133
|
private requireRawInputTarget;
|
|
123
134
|
private requireSemanticActionTarget;
|