@push.rocks/smartpuppeteer 2.0.6 → 2.1.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/.smartconfig.json +11 -6
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/index.d.ts +2 -0
- package/dist_ts/index.js +3 -1
- package/dist_ts/smartpuppeteer.classes.livebrowsersession.d.ts +97 -0
- package/dist_ts/smartpuppeteer.classes.livebrowsersession.js +1906 -0
- package/dist_ts/smartpuppeteer.classes.smartpuppeteer.d.ts +2 -0
- package/dist_ts/smartpuppeteer.classes.smartpuppeteer.js +34 -9
- package/dist_ts/smartpuppeteer.interfaces.livebrowser.d.ts +191 -0
- package/dist_ts/smartpuppeteer.interfaces.livebrowser.js +2 -0
- package/dist_ts/smartpuppeteer.plugins.d.ts +3 -2
- package/dist_ts/smartpuppeteer.plugins.js +4 -3
- package/package.json +16 -14
- package/readme.hints.md +15 -1
- package/readme.md +120 -14
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/index.ts +2 -0
- package/ts/smartpuppeteer.classes.livebrowsersession.ts +2298 -0
- package/ts/smartpuppeteer.classes.smartpuppeteer.ts +37 -9
- package/ts/smartpuppeteer.interfaces.livebrowser.ts +235 -0
- package/ts/smartpuppeteer.plugins.ts +3 -2
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -18
package/.smartconfig.json
CHANGED
|
@@ -20,12 +20,17 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"release": {
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
"targets": {
|
|
24
|
+
"npm": {
|
|
25
|
+
"registries": [
|
|
26
|
+
"https://verdaccio.lossless.digital",
|
|
27
|
+
"https://registry.npmjs.org"
|
|
28
|
+
],
|
|
29
|
+
"accessLevel": "public"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"schemaVersion": 2
|
|
29
34
|
},
|
|
30
35
|
"@git.zone/tsdoc": {
|
|
31
36
|
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@push.rocks/smartpuppeteer',
|
|
6
|
-
version: '2.0
|
|
6
|
+
version: '2.1.0',
|
|
7
7
|
description: 'Provides simplified access to Puppeteer for automation and testing purposes.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSw0QkFBNEI7SUFDbEMsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLDhFQUE4RTtDQUM1RixDQUFBIn0=
|
package/dist_ts/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from './smartpuppeteer.classes.smartpuppeteer.js';
|
|
2
2
|
export * from './smartpuppeteer.classes.incognitobrowser.js';
|
|
3
|
+
export * from './smartpuppeteer.interfaces.livebrowser.js';
|
|
4
|
+
export * from './smartpuppeteer.classes.livebrowsersession.js';
|
|
3
5
|
import { puppeteer } from './smartpuppeteer.plugins.js';
|
|
4
6
|
export { puppeteer };
|
package/dist_ts/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// module exports
|
|
2
2
|
export * from './smartpuppeteer.classes.smartpuppeteer.js';
|
|
3
3
|
export * from './smartpuppeteer.classes.incognitobrowser.js';
|
|
4
|
+
export * from './smartpuppeteer.interfaces.livebrowser.js';
|
|
5
|
+
export * from './smartpuppeteer.classes.livebrowsersession.js';
|
|
4
6
|
// direct exports
|
|
5
7
|
import { puppeteer } from './smartpuppeteer.plugins.js';
|
|
6
8
|
export { puppeteer };
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxpQkFBaUI7QUFFakIsY0FBYyw0Q0FBNEMsQ0FBQztBQUMzRCxjQUFjLDhDQUE4QyxDQUFDO0FBQzdELGNBQWMsNENBQTRDLENBQUM7QUFDM0QsY0FBYyxnREFBZ0QsQ0FBQztBQUUvRCxpQkFBaUI7QUFDakIsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQ3hELE9BQU8sRUFBRSxTQUFTLEVBQUUsQ0FBQyJ9
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { ILiveBrowserClickOptions, ILiveBrowserCreateTabOptions, ILiveBrowserFillOptions, ILiveBrowserFrameAcknowledgement, ILiveBrowserFrameAcknowledgementRequest, ILiveBrowserInsertTextInput, ILiveBrowserKeyInput, ILiveBrowserMouseInput, ILiveBrowserNavigateOptions, ILiveBrowserNavigationOptions, ILiveBrowserObservation, ILiveBrowserObserveOptions, ILiveBrowserPressOptions, ILiveBrowserSessionOptions, ILiveBrowserSnapshot, ILiveBrowserSnapshotOptions, ILiveBrowserState, ILiveBrowserTabState, ILiveBrowserViewport, ILiveBrowserWheelInput, TLiveBrowserEventListener } from './smartpuppeteer.interfaces.livebrowser.js';
|
|
2
|
+
export declare class LiveBrowserSession {
|
|
3
|
+
private readonly options;
|
|
4
|
+
private readonly eventListeners;
|
|
5
|
+
private readonly tabs;
|
|
6
|
+
private readonly tabIdsByPage;
|
|
7
|
+
private readonly outstandingFrames;
|
|
8
|
+
private browser?;
|
|
9
|
+
private browserContext?;
|
|
10
|
+
private browserLifetimeController?;
|
|
11
|
+
private browserDisconnectedListener?;
|
|
12
|
+
private readonly operationQueue;
|
|
13
|
+
private activeOperation?;
|
|
14
|
+
private operationRunning;
|
|
15
|
+
private admittedPublicOperations;
|
|
16
|
+
private admittedInternalOperations;
|
|
17
|
+
private shutdownPromise?;
|
|
18
|
+
private status;
|
|
19
|
+
private activeTabId;
|
|
20
|
+
private viewport;
|
|
21
|
+
private viewportRevision;
|
|
22
|
+
private tabSequence;
|
|
23
|
+
private frameSequence;
|
|
24
|
+
private normalStopRequested;
|
|
25
|
+
private lastError?;
|
|
26
|
+
constructor(optionsArg?: ILiveBrowserSessionOptions);
|
|
27
|
+
onEvent(listener: TLiveBrowserEventListener): () => void;
|
|
28
|
+
getState(): ILiveBrowserState;
|
|
29
|
+
start(): Promise<void>;
|
|
30
|
+
stop(): Promise<void>;
|
|
31
|
+
acknowledgeFrame(acknowledgement: ILiveBrowserFrameAcknowledgementRequest): Promise<ILiveBrowserFrameAcknowledgement>;
|
|
32
|
+
createTab(optionsArg?: ILiveBrowserCreateTabOptions): Promise<ILiveBrowserTabState>;
|
|
33
|
+
activateTab(tabId: string): Promise<void>;
|
|
34
|
+
closeTab(tabId: string): Promise<void>;
|
|
35
|
+
navigate(optionsArg: ILiveBrowserNavigateOptions): Promise<void>;
|
|
36
|
+
back(optionsArg?: ILiveBrowserNavigationOptions): Promise<void>;
|
|
37
|
+
forward(optionsArg?: ILiveBrowserNavigationOptions): Promise<void>;
|
|
38
|
+
reload(optionsArg?: ILiveBrowserNavigationOptions): Promise<void>;
|
|
39
|
+
setViewport(viewportArg: ILiveBrowserViewport): Promise<void>;
|
|
40
|
+
dispatchMouse(input: ILiveBrowserMouseInput): Promise<void>;
|
|
41
|
+
dispatchWheel(input: ILiveBrowserWheelInput): Promise<void>;
|
|
42
|
+
dispatchKey(input: ILiveBrowserKeyInput): Promise<void>;
|
|
43
|
+
insertText(input: ILiveBrowserInsertTextInput): Promise<void>;
|
|
44
|
+
captureSnapshot(optionsArg?: ILiveBrowserSnapshotOptions): Promise<ILiveBrowserSnapshot>;
|
|
45
|
+
observe(optionsArg?: ILiveBrowserObserveOptions): Promise<ILiveBrowserObservation>;
|
|
46
|
+
click(optionsArg: ILiveBrowserClickOptions): Promise<void>;
|
|
47
|
+
fill(optionsArg: ILiveBrowserFillOptions): Promise<void>;
|
|
48
|
+
press(optionsArg: ILiveBrowserPressOptions): Promise<void>;
|
|
49
|
+
private enqueuePublicOperation;
|
|
50
|
+
private enqueueInternalOperation;
|
|
51
|
+
private enqueueQueuedOperation;
|
|
52
|
+
private drainOperationQueue;
|
|
53
|
+
private executeQueuedOperation;
|
|
54
|
+
private cancelQueuedOperations;
|
|
55
|
+
private beginShutdown;
|
|
56
|
+
private requestShutdown;
|
|
57
|
+
private scheduleOperation;
|
|
58
|
+
private emitEvent;
|
|
59
|
+
private emitState;
|
|
60
|
+
private emitError;
|
|
61
|
+
private createTabState;
|
|
62
|
+
private stopInternal;
|
|
63
|
+
private requireBrowserContext;
|
|
64
|
+
private requireTab;
|
|
65
|
+
private requireActiveTab;
|
|
66
|
+
private resolveActionTab;
|
|
67
|
+
private resolveNavigationTab;
|
|
68
|
+
private ensureTabViewport;
|
|
69
|
+
private registerPage;
|
|
70
|
+
private removePageListeners;
|
|
71
|
+
private retireFramesForTabInBackground;
|
|
72
|
+
private requestTabStateUpdate;
|
|
73
|
+
private rollbackCreatedPage;
|
|
74
|
+
private handleUnexpectedPageClose;
|
|
75
|
+
private activateTabInternal;
|
|
76
|
+
private activateReplacementTab;
|
|
77
|
+
private navigateTab;
|
|
78
|
+
private createPuppeteerNavigationOptions;
|
|
79
|
+
private refreshTab;
|
|
80
|
+
private startScreencast;
|
|
81
|
+
private stopScreencast;
|
|
82
|
+
private handleScreencastFrame;
|
|
83
|
+
private acknowledgeCdpFrame;
|
|
84
|
+
private acknowledgeCdpFrameInBackground;
|
|
85
|
+
private handleFrameAcknowledgementFailure;
|
|
86
|
+
private retireOutstandingFrames;
|
|
87
|
+
private handlePossibleCdpDisconnection;
|
|
88
|
+
private requireRawInputTarget;
|
|
89
|
+
private requireSemanticActionTarget;
|
|
90
|
+
private requireInputTarget;
|
|
91
|
+
private validateCoordinates;
|
|
92
|
+
private createModifierMask;
|
|
93
|
+
private validateUrl;
|
|
94
|
+
private validateTimeout;
|
|
95
|
+
private validateWaitUntil;
|
|
96
|
+
private validateScreencastOptions;
|
|
97
|
+
}
|