@push.rocks/smartpuppeteer 2.2.0 → 2.4.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 +35 -1
- package/dist_ts/smartpuppeteer.classes.livebrowsersession.js +878 -38
- package/dist_ts/smartpuppeteer.helpers.process.d.ts +14 -0
- package/dist_ts/smartpuppeteer.helpers.process.js +132 -0
- package/dist_ts/smartpuppeteer.interfaces.livebrowser.d.ts +26 -0
- package/dist_ts/smartpuppeteer.interfaces.livebrowser.js +3 -2
- package/dist_ts/smartpuppeteer.plugins.d.ts +4 -2
- package/dist_ts/smartpuppeteer.plugins.js +5 -3
- package/package.json +3 -3
- package/readme.hints.md +1 -1
- package/readme.md +20 -2
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/smartpuppeteer.classes.livebrowsersession.ts +1120 -44
- package/ts/smartpuppeteer.helpers.process.ts +169 -0
- package/ts/smartpuppeteer.interfaces.livebrowser.ts +31 -0
- package/ts/smartpuppeteer.plugins.ts +4 -2
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@push.rocks/smartpuppeteer',
|
|
6
|
-
version: '2.
|
|
6
|
+
version: '2.4.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,20 +1,37 @@
|
|
|
1
|
-
import type { ILiveBrowserClickOptions, ILiveBrowserCreateTabOptions, ILiveBrowserEvaluateOptions, ILiveBrowserFillOptions, ILiveBrowserFrameAcknowledgement, ILiveBrowserFrameAcknowledgementRequest, ILiveBrowserInsertTextInput, ILiveBrowserKeyInput, ILiveBrowserMouseInput, ILiveBrowserNavigateOptions, ILiveBrowserNavigationOptions, ILiveBrowserObservation, ILiveBrowserObserveOptions, ILiveBrowserOperationOptions, ILiveBrowserPressOptions, ILiveBrowserSessionOptions, ILiveBrowserSnapshot, ILiveBrowserSnapshotOptions, ILiveBrowserState, ILiveBrowserTabState, ILiveBrowserViewport, ILiveBrowserWheelInput, TLiveBrowserEventListener, TLiveBrowserJsonValue } from './smartpuppeteer.interfaces.livebrowser.js';
|
|
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';
|
|
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?;
|
|
11
13
|
private browserDisconnectedListener?;
|
|
14
|
+
private browserTargetCreatedListener?;
|
|
15
|
+
private browserSecurityCdpSession?;
|
|
16
|
+
private browserSecurityConnection?;
|
|
17
|
+
private browserSecuritySessionAttachedListener?;
|
|
18
|
+
private browserSecuritySessionDetachedListener?;
|
|
19
|
+
private readonly proxySecuritySessions;
|
|
20
|
+
private readonly proxySecurityOperations;
|
|
21
|
+
private proxySecurityGeneration;
|
|
22
|
+
private proxySecurityStopping;
|
|
23
|
+
private ownedBrowserProcess?;
|
|
24
|
+
private processGeneration;
|
|
25
|
+
private startRequestCount;
|
|
26
|
+
private terminationSettled;
|
|
27
|
+
private terminationPromise?;
|
|
12
28
|
private readonly operationQueue;
|
|
13
29
|
private activeOperation?;
|
|
14
30
|
private operationRunning;
|
|
15
31
|
private admittedPublicOperations;
|
|
16
32
|
private admittedInternalOperations;
|
|
17
33
|
private shutdownPromise?;
|
|
34
|
+
private shutdownFrameDrainPromise?;
|
|
18
35
|
private status;
|
|
19
36
|
private activeTabId;
|
|
20
37
|
private viewport;
|
|
@@ -27,6 +44,8 @@ export declare class LiveBrowserSession {
|
|
|
27
44
|
constructor(optionsArg?: ILiveBrowserSessionOptions);
|
|
28
45
|
onEvent(listener: TLiveBrowserEventListener): () => void;
|
|
29
46
|
getState(): ILiveBrowserState;
|
|
47
|
+
getProcessState(): ILiveBrowserProcessState;
|
|
48
|
+
terminate(optionsArg?: ILiveBrowserTerminationOptions): Promise<ILiveBrowserTerminationResult>;
|
|
30
49
|
start(operationOptions?: ILiveBrowserOperationOptions): Promise<void>;
|
|
31
50
|
stop(): Promise<void>;
|
|
32
51
|
acknowledgeFrame(acknowledgement: ILiveBrowserFrameAcknowledgementRequest): Promise<ILiveBrowserFrameAcknowledgement>;
|
|
@@ -49,6 +68,7 @@ export declare class LiveBrowserSession {
|
|
|
49
68
|
fill(optionsArg: ILiveBrowserFillOptions, operationOptions?: ILiveBrowserOperationOptions): Promise<void>;
|
|
50
69
|
press(optionsArg: ILiveBrowserPressOptions, operationOptions?: ILiveBrowserOperationOptions): Promise<void>;
|
|
51
70
|
private enqueuePublicOperation;
|
|
71
|
+
private assertProxySecurityReady;
|
|
52
72
|
private enqueueInternalOperation;
|
|
53
73
|
private enqueueQueuedOperation;
|
|
54
74
|
private drainOperationQueue;
|
|
@@ -62,14 +82,27 @@ export declare class LiveBrowserSession {
|
|
|
62
82
|
private emitState;
|
|
63
83
|
private emitError;
|
|
64
84
|
private createTabState;
|
|
85
|
+
private releaseExitedOwnedProcess;
|
|
86
|
+
private terminateInternal;
|
|
87
|
+
private killOwnedProcessGroupSurvivors;
|
|
88
|
+
private forceOwnedBrowserProcessGroup;
|
|
65
89
|
private stopInternal;
|
|
66
90
|
private configureBrowserSecurity;
|
|
91
|
+
private configureProxySecuritySession;
|
|
92
|
+
private verifyProxySecuritySessionDetached;
|
|
93
|
+
private removeProxySecuritySession;
|
|
94
|
+
private allowOperationalCdpSessionDetach;
|
|
95
|
+
private trackProxySecurityOperation;
|
|
96
|
+
private handleProxySecurityFailure;
|
|
97
|
+
private teardownProxySecurity;
|
|
67
98
|
private requireBrowserContext;
|
|
68
99
|
private requireTab;
|
|
69
100
|
private requireActiveTab;
|
|
70
101
|
private resolveActionTab;
|
|
71
102
|
private resolveNavigationTab;
|
|
72
103
|
private ensureTabViewport;
|
|
104
|
+
private scheduleDiscoveredPageRegistration;
|
|
105
|
+
private handleDiscoveredPageFailure;
|
|
73
106
|
private registerPage;
|
|
74
107
|
private removePageListeners;
|
|
75
108
|
private retireFramesForTabInBackground;
|
|
@@ -88,6 +121,7 @@ export declare class LiveBrowserSession {
|
|
|
88
121
|
private acknowledgeCdpFrameInBackground;
|
|
89
122
|
private handleFrameAcknowledgementFailure;
|
|
90
123
|
private retireOutstandingFrames;
|
|
124
|
+
private waitForCdpFrameAcknowledgements;
|
|
91
125
|
private handlePossibleCdpDisconnection;
|
|
92
126
|
private requireRawInputTarget;
|
|
93
127
|
private requireSemanticActionTarget;
|