@crawlee/browser-pool 3.0.0-alpha.7 → 3.0.0-beta.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/README.md +2 -0
- package/abstract-classes/browser-controller.d.ts +153 -0
- package/abstract-classes/browser-controller.d.ts.map +1 -0
- package/abstract-classes/browser-controller.js +230 -0
- package/abstract-classes/browser-controller.js.map +1 -0
- package/abstract-classes/browser-plugin.d.ts +102 -0
- package/abstract-classes/browser-plugin.d.ts.map +1 -0
- package/abstract-classes/browser-plugin.js +154 -0
- package/abstract-classes/browser-plugin.js.map +1 -0
- package/abstract-classes/utils.d.ts +2 -0
- package/abstract-classes/utils.d.ts.map +1 -0
- package/abstract-classes/utils.js +8 -0
- package/abstract-classes/utils.js.map +1 -0
- package/anonymize-proxy.d.ts +4 -0
- package/anonymize-proxy.d.ts.map +1 -0
- package/anonymize-proxy.js +34 -0
- package/anonymize-proxy.js.map +1 -0
- package/browser-pool.d.ts +405 -0
- package/browser-pool.d.ts.map +1 -0
- package/browser-pool.js +583 -0
- package/browser-pool.js.map +1 -0
- package/events.d.ts +11 -0
- package/events.d.ts.map +1 -0
- package/events.js +17 -0
- package/events.js.map +1 -0
- package/fingerprinting/hooks.d.ts +17 -0
- package/fingerprinting/hooks.d.ts.map +1 -0
- package/fingerprinting/hooks.js +87 -0
- package/fingerprinting/hooks.js.map +1 -0
- package/fingerprinting/types.d.ts +33 -0
- package/fingerprinting/types.d.ts.map +1 -0
- package/fingerprinting/types.js +21 -0
- package/fingerprinting/types.js.map +1 -0
- package/fingerprinting/utils.d.ts +4 -0
- package/fingerprinting/utils.d.ts.map +1 -0
- package/fingerprinting/utils.js +47 -0
- package/fingerprinting/utils.js.map +1 -0
- package/index.d.ts +35 -0
- package/index.d.ts.map +1 -0
- package/index.js.map +1 -0
- package/index.mjs +11 -0
- package/launch-context.d.ts +68 -0
- package/launch-context.d.ts.map +1 -0
- package/launch-context.js +94 -0
- package/launch-context.js.map +1 -0
- package/logger.d.ts +2 -0
- package/logger.d.ts.map +1 -0
- package/logger.js +9 -0
- package/logger.js.map +1 -0
- package/package.json +6 -9
- package/playwright/browser.d.ts +26 -0
- package/playwright/browser.d.ts.map +1 -0
- package/playwright/browser.js +66 -0
- package/playwright/browser.js.map +1 -0
- package/playwright/playwright-controller.d.ts +11 -0
- package/playwright/playwright-controller.d.ts.map +1 -0
- package/playwright/playwright-controller.js +71 -0
- package/playwright/playwright-controller.js.map +1 -0
- package/playwright/playwright-plugin.d.ts +12 -0
- package/playwright/playwright-plugin.d.ts.map +1 -0
- package/playwright/playwright-plugin.js +89 -0
- package/playwright/playwright-plugin.js.map +1 -0
- package/proxy-server.d.ts +2 -0
- package/proxy-server.d.ts.map +1 -0
- package/proxy-server.js +18 -0
- package/proxy-server.js.map +1 -0
- package/puppeteer/puppeteer-controller.d.ts +11 -0
- package/puppeteer/puppeteer-controller.d.ts.map +1 -0
- package/puppeteer/puppeteer-controller.js +112 -0
- package/puppeteer/puppeteer-controller.js.map +1 -0
- package/puppeteer/puppeteer-plugin.d.ts +12 -0
- package/puppeteer/puppeteer-plugin.d.ts.map +1 -0
- package/puppeteer/puppeteer-plugin.js +151 -0
- package/puppeteer/puppeteer-plugin.js.map +1 -0
- package/puppeteer/puppeteer-proxy-per-page.d.ts +25 -0
- package/tsconfig.build.tsbuildinfo +1 -0
- package/utils.d.ts +6 -0
- package/utils.d.ts.map +1 -0
- package/utils.js +6 -0
- package/utils.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-plugin.js","sourceRoot":"","sources":["../../src/abstract-classes/browser-plugin.ts"],"names":[],"mappings":";;;;AAAA,wEAAiC;AACjC,sDAAwE;AAExE,mCAAoD;AAGpD;;;;;;;GAOG;AACU,QAAA,kBAAkB,GAAG,2GAA2G,CAAC;AAmD7I,CAAC;AAUF;;;;;GAKG;AACH,MAAsB,aAAa;IAmB/B,YAAY,OAAgB,EAAE,UAAgD,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;IAED,8DAA8D;IAC9D,mGAAmG;IAChF,uBAAuB,CAAC,aAAkG;QACzI,IAAA,iCAAyB,EAAC,yBAAyB,CAAC,CAAC;IACzD,CAAC;IAED;;OAEG;IACH,8DAA8D;IAC3C,OAAO,CAAC,aAAkG;QACzH,IAAA,iCAAyB,EAAC,SAAS,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,8DAA8D;IAC9D,uDAAuD;IACpC,iBAAiB;QAChC,IAAA,iCAAyB,EAAC,mBAAmB,CAAC,CAAC;IACnD,CAAC;CACJ;AA3ID,sCA2IC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/abstract-classes/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,KAAK,CAEnE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.throwImplementationNeeded = void 0;
|
|
4
|
+
function throwImplementationNeeded(methodName) {
|
|
5
|
+
throw new Error(`You need to implement method ${methodName}.`);
|
|
6
|
+
}
|
|
7
|
+
exports.throwImplementationNeeded = throwImplementationNeeded;
|
|
8
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/abstract-classes/utils.ts"],"names":[],"mappings":";;;AAAA,SAAgB,yBAAyB,CAAC,UAAkB;IACxD,MAAM,IAAI,KAAK,CAAC,gCAAgC,UAAU,GAAG,CAAC,CAAC;AACnE,CAAC;AAFD,8DAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anonymize-proxy.d.ts","sourceRoot":"","sources":["../src/anonymize-proxy.ts"],"names":[],"mappings":"AAEA,aAAK,WAAW,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;AAEvC,eAAO,MAAM,mBAAmB,cACjB,MAAM,aACN,MAAM,aACN,MAAM,KAClB,QAAQ,CAAC,MAAM,GAAG,SAAS,EAAE,WAAW,CAAC,CAgC3C,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.anonymizeProxySugar = void 0;
|
|
4
|
+
const proxy_chain_1 = require("proxy-chain");
|
|
5
|
+
const anonymizeProxySugar = async (proxyUrl, username, password) => {
|
|
6
|
+
if (proxyUrl) {
|
|
7
|
+
const url = new URL(proxyUrl);
|
|
8
|
+
if (username || password) {
|
|
9
|
+
url.username = username ?? '';
|
|
10
|
+
url.password = password ?? '';
|
|
11
|
+
}
|
|
12
|
+
if (url.username || url.password) {
|
|
13
|
+
const anonymized = await (0, proxy_chain_1.anonymizeProxy)(url.href);
|
|
14
|
+
return [
|
|
15
|
+
anonymized,
|
|
16
|
+
async () => {
|
|
17
|
+
await (0, proxy_chain_1.closeAnonymizedProxy)(anonymized, true);
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
return [
|
|
22
|
+
undefined,
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
24
|
+
async () => { },
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
return [
|
|
28
|
+
undefined,
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
30
|
+
async () => { },
|
|
31
|
+
];
|
|
32
|
+
};
|
|
33
|
+
exports.anonymizeProxySugar = anonymizeProxySugar;
|
|
34
|
+
//# sourceMappingURL=anonymize-proxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anonymize-proxy.js","sourceRoot":"","sources":["../src/anonymize-proxy.ts"],"names":[],"mappings":";;;AAAA,6CAAmE;AAI5D,MAAM,mBAAmB,GAAG,KAAK,EACpC,QAAiB,EACjB,QAAiB,EACjB,QAAiB,EACyB,EAAE;IAC5C,IAAI,QAAQ,EAAE;QACV,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;QAE9B,IAAI,QAAQ,IAAI,QAAQ,EAAE;YACtB,GAAG,CAAC,QAAQ,GAAG,QAAQ,IAAI,EAAE,CAAC;YAC9B,GAAG,CAAC,QAAQ,GAAG,QAAQ,IAAI,EAAE,CAAC;SACjC;QAED,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,EAAE;YAC9B,MAAM,UAAU,GAAG,MAAM,IAAA,4BAAc,EAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAElD,OAAO;gBACH,UAAU;gBACV,KAAK,IAAI,EAAE;oBACP,MAAM,IAAA,kCAAoB,EAAC,UAAU,EAAE,IAAI,CAAC,CAAC;gBACjD,CAAC;aACJ,CAAC;SACL;QAED,OAAO;YACH,SAAS;YACT,gEAAgE;YAChE,KAAK,IAAI,EAAE,GAAE,CAAC;SACjB,CAAC;KACL;IAED,OAAO;QACH,SAAS;QACT,gEAAgE;QAChE,KAAK,IAAI,EAAE,GAAE,CAAC;KACjB,CAAC;AACN,CAAC,CAAC;AApCW,QAAA,mBAAmB,uBAoC9B"}
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
import { TypedEmitter } from 'tiny-typed-emitter';
|
|
2
|
+
import { Fingerprint, FingerprintInjector } from 'fingerprint-injector';
|
|
3
|
+
import QuickLRU from 'quick-lru';
|
|
4
|
+
import { BrowserController } from './abstract-classes/browser-controller';
|
|
5
|
+
import { BrowserPlugin } from './abstract-classes/browser-plugin';
|
|
6
|
+
import { BROWSER_POOL_EVENTS } from './events';
|
|
7
|
+
import { LaunchContext } from './launch-context';
|
|
8
|
+
import { InferBrowserPluginArray, UnwrapPromise } from './utils';
|
|
9
|
+
import { FingerprintGeneratorOptions } from './fingerprinting/types';
|
|
10
|
+
export interface BrowserPoolEvents<BC extends BrowserController, Page> {
|
|
11
|
+
[BROWSER_POOL_EVENTS.PAGE_CREATED]: (page: Page) => void | Promise<void>;
|
|
12
|
+
[BROWSER_POOL_EVENTS.PAGE_CLOSED]: (page: Page) => void | Promise<void>;
|
|
13
|
+
[BROWSER_POOL_EVENTS.BROWSER_RETIRED]: (browserController: BC) => void | Promise<void>;
|
|
14
|
+
[BROWSER_POOL_EVENTS.BROWSER_LAUNCHED]: (browserController: BC) => void | Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export interface FingerprintsOptions {
|
|
17
|
+
fingerprintGeneratorOptions?: FingerprintGeneratorOptions;
|
|
18
|
+
/**
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
useFingerprintPerProxyCache?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* @default 10000
|
|
24
|
+
*/
|
|
25
|
+
fingerprintPerProxyCacheSize?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface BrowserPoolOptions<Plugin extends BrowserPlugin = BrowserPlugin> {
|
|
28
|
+
/**
|
|
29
|
+
* Browser plugins are wrappers of browser automation libraries that
|
|
30
|
+
* allow `BrowserPool` to control browsers with those libraries.
|
|
31
|
+
* `browser-pool` comes with a `PuppeteerPlugin` and a `PlaywrightPlugin`.
|
|
32
|
+
*/
|
|
33
|
+
browserPlugins: readonly Plugin[];
|
|
34
|
+
/**
|
|
35
|
+
* Sets the maximum number of pages that can be open in a browser at the
|
|
36
|
+
* same time. Once reached, a new browser will be launched to handle the excess.
|
|
37
|
+
*
|
|
38
|
+
* @default 20
|
|
39
|
+
*/
|
|
40
|
+
maxOpenPagesPerBrowser?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Browsers tend to get bloated after processing a lot of pages. This option
|
|
43
|
+
* configures the number of processed pages after which the browser will
|
|
44
|
+
* automatically retire and close. A new browser will launch in its place.
|
|
45
|
+
*
|
|
46
|
+
* @default 100
|
|
47
|
+
*/
|
|
48
|
+
retireBrowserAfterPageCount?: number;
|
|
49
|
+
/**
|
|
50
|
+
* As we know from experience, async operations of the underlying libraries,
|
|
51
|
+
* such as launching a browser or opening a new page, can get stuck.
|
|
52
|
+
* To prevent `BrowserPool` from getting stuck, we add a timeout
|
|
53
|
+
* to those operations and you can configure it with this option.
|
|
54
|
+
*
|
|
55
|
+
* @default 15
|
|
56
|
+
*/
|
|
57
|
+
operationTimeoutSecs?: number;
|
|
58
|
+
/**
|
|
59
|
+
* Browsers normally close immediately after their last page is processed.
|
|
60
|
+
* However, there could be situations where this does not happen. Browser Pool
|
|
61
|
+
* makes sure all inactive browsers are closed regularly, to free resources.
|
|
62
|
+
*
|
|
63
|
+
* @default 300
|
|
64
|
+
*/
|
|
65
|
+
closeInactiveBrowserAfterSecs?: number;
|
|
66
|
+
/**
|
|
67
|
+
* @default true
|
|
68
|
+
*/
|
|
69
|
+
useFingerprints?: boolean;
|
|
70
|
+
fingerprintsOptions?: FingerprintsOptions;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Pre-launch hooks are executed just before a browser is launched and provide
|
|
74
|
+
* a good opportunity to dynamically change the launch options.
|
|
75
|
+
* The hooks are called with two arguments:
|
|
76
|
+
* `pageId`: `string` and `launchContext`: {@link LaunchContext}
|
|
77
|
+
*/
|
|
78
|
+
export declare type PreLaunchHook<LC extends LaunchContext> = (pageId: string, launchContext: LC) => void | Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Post-launch hooks are executed as soon as a browser is launched.
|
|
81
|
+
* The hooks are called with two arguments:
|
|
82
|
+
* `pageId`: `string` and `browserController`: {@link BrowserController}
|
|
83
|
+
* To guarantee order of execution before other hooks in the same browser,
|
|
84
|
+
* the {@link BrowserController} methods cannot be used until the post-launch
|
|
85
|
+
* hooks complete. If you attempt to call `await browserController.close()` from
|
|
86
|
+
* a post-launch hook, it will deadlock the process. This API is subject to change.
|
|
87
|
+
*/
|
|
88
|
+
export declare type PostLaunchHook<BC extends BrowserController> = (pageId: string, browserController: BC) => void | Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Pre-page-create hooks are executed just before a new page is created. They
|
|
91
|
+
* are useful to make dynamic changes to the browser before opening a page.
|
|
92
|
+
* The hooks are called with three arguments:
|
|
93
|
+
* `pageId`: `string`, `browserController`: {@link BrowserController} and
|
|
94
|
+
* `pageOptions`: `object|undefined` - This only works if the underlying `BrowserController` supports new page options.
|
|
95
|
+
* So far, new page options are only supported by `PlaywrightController`.
|
|
96
|
+
* If the page options are not supported by `BrowserController` the `pageOptions` argument is `undefined`.
|
|
97
|
+
*/
|
|
98
|
+
export declare type PrePageCreateHook<BC extends BrowserController, PO = Parameters<BC['newPage']>[0]> = (pageId: string, browserController: BC, pageOptions?: PO) => void | Promise<void>;
|
|
99
|
+
/**
|
|
100
|
+
* Post-page-create hooks are called right after a new page is created
|
|
101
|
+
* and all internal actions of Browser Pool are completed. This is the
|
|
102
|
+
* place to make changes to a page that you would like to apply to all
|
|
103
|
+
* pages. Such as injecting a JavaScript library into all pages.
|
|
104
|
+
* The hooks are called with two arguments:
|
|
105
|
+
* `page`: `Page` and `browserController`: {@link BrowserController}
|
|
106
|
+
*/
|
|
107
|
+
export declare type PostPageCreateHook<BC extends BrowserController, Page = UnwrapPromise<ReturnType<BC['newPage']>>> = (page: Page, browserController: BC) => void | Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* Pre-page-close hooks give you the opportunity to make last second changes
|
|
110
|
+
* in a page that's about to be closed, such as saving a snapshot or updating
|
|
111
|
+
* state.
|
|
112
|
+
* The hooks are called with two arguments:
|
|
113
|
+
* `page`: `Page` and `browserController`: {@link BrowserController}
|
|
114
|
+
*/
|
|
115
|
+
export declare type PrePageCloseHook<BC extends BrowserController, Page = UnwrapPromise<ReturnType<BC['newPage']>>> = (page: Page, browserController: BC) => void | Promise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* Post-page-close hooks allow you to do page related clean up.
|
|
118
|
+
* The hooks are called with two arguments:
|
|
119
|
+
* `pageId`: `string` and `browserController`: {@link BrowserController}
|
|
120
|
+
*/
|
|
121
|
+
export declare type PostPageCloseHook<BC extends BrowserController> = (pageId: string, browserController: BC) => void | Promise<void>;
|
|
122
|
+
export interface BrowserPoolHooks<BC extends BrowserController, LC extends LaunchContext, PR extends UnwrapPromise<ReturnType<BC['newPage']>> = UnwrapPromise<ReturnType<BC['newPage']>>> {
|
|
123
|
+
/**
|
|
124
|
+
* Pre-launch hooks are executed just before a browser is launched and provide
|
|
125
|
+
* a good opportunity to dynamically change the launch options.
|
|
126
|
+
* The hooks are called with two arguments:
|
|
127
|
+
* `pageId`: `string` and `launchContext`: {@link LaunchContext}
|
|
128
|
+
*/
|
|
129
|
+
preLaunchHooks?: PreLaunchHook<LC>[];
|
|
130
|
+
/**
|
|
131
|
+
* Post-launch hooks are executed as soon as a browser is launched.
|
|
132
|
+
* The hooks are called with two arguments:
|
|
133
|
+
* `pageId`: `string` and `browserController`: {@link BrowserController}
|
|
134
|
+
* To guarantee order of execution before other hooks in the same browser,
|
|
135
|
+
* the {@link BrowserController} methods cannot be used until the post-launch
|
|
136
|
+
* hooks complete. If you attempt to call `await browserController.close()` from
|
|
137
|
+
* a post-launch hook, it will deadlock the process. This API is subject to change.
|
|
138
|
+
*/
|
|
139
|
+
postLaunchHooks?: PostLaunchHook<BC>[];
|
|
140
|
+
/**
|
|
141
|
+
* Pre-page-create hooks are executed just before a new page is created. They
|
|
142
|
+
* are useful to make dynamic changes to the browser before opening a page.
|
|
143
|
+
* The hooks are called with three arguments:
|
|
144
|
+
* `pageId`: `string`, `browserController`: {@link BrowserController} and
|
|
145
|
+
* `pageOptions`: `object|undefined` - This only works if the underlying `BrowserController` supports new page options.
|
|
146
|
+
* So far, new page options are only supported by `PlaywrightController`.
|
|
147
|
+
* If the page options are not supported by `BrowserController` the `pageOptions` argument is `undefined`.
|
|
148
|
+
*/
|
|
149
|
+
prePageCreateHooks?: PrePageCreateHook<BC>[];
|
|
150
|
+
/**
|
|
151
|
+
* Post-page-create hooks are called right after a new page is created
|
|
152
|
+
* and all internal actions of Browser Pool are completed. This is the
|
|
153
|
+
* place to make changes to a page that you would like to apply to all
|
|
154
|
+
* pages. Such as injecting a JavaScript library into all pages.
|
|
155
|
+
* The hooks are called with two arguments:
|
|
156
|
+
* `page`: `Page` and `browserController`: {@link BrowserController}
|
|
157
|
+
*/
|
|
158
|
+
postPageCreateHooks?: PostPageCreateHook<BC, PR>[];
|
|
159
|
+
/**
|
|
160
|
+
* Pre-page-close hooks give you the opportunity to make last second changes
|
|
161
|
+
* in a page that's about to be closed, such as saving a snapshot or updating
|
|
162
|
+
* state.
|
|
163
|
+
* The hooks are called with two arguments:
|
|
164
|
+
* `page`: `Page` and `browserController`: {@link BrowserController}
|
|
165
|
+
*/
|
|
166
|
+
prePageCloseHooks?: PrePageCloseHook<BC, PR>[];
|
|
167
|
+
/**
|
|
168
|
+
* Post-page-close hooks allow you to do page related clean up.
|
|
169
|
+
* The hooks are called with two arguments:
|
|
170
|
+
* `pageId`: `string` and `browserController`: {@link BrowserController}
|
|
171
|
+
*/
|
|
172
|
+
postPageCloseHooks?: PostPageCloseHook<BC>[];
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* The `BrowserPool` class is the most important class of the `browser-pool` module.
|
|
176
|
+
* It manages opening and closing of browsers and their pages and its constructor
|
|
177
|
+
* options allow easy configuration of the browsers' and pages' lifecycle.
|
|
178
|
+
*
|
|
179
|
+
* The most important and useful constructor options are the various lifecycle hooks.
|
|
180
|
+
* Those allow you to sequentially call a list of (asynchronous) functions at each
|
|
181
|
+
* stage of the browser / page lifecycle.
|
|
182
|
+
*
|
|
183
|
+
* **Example:**
|
|
184
|
+
* ```js
|
|
185
|
+
* const { BrowserPool, PlaywrightPlugin } = require('@crawlee/browser-pool');
|
|
186
|
+
* const playwright = require('playwright');
|
|
187
|
+
*
|
|
188
|
+
* const browserPool = new BrowserPool({
|
|
189
|
+
* browserPlugins: [ new PlaywrightPlugin(playwright.chromium)],
|
|
190
|
+
* preLaunchHooks: [(pageId, launchContext) => {
|
|
191
|
+
* // do something before a browser gets launched
|
|
192
|
+
* launchContext.launchOptions.headless = false;
|
|
193
|
+
* }],
|
|
194
|
+
* postLaunchHooks: [(pageId, browserController) => {
|
|
195
|
+
* // manipulate the browser right after launch
|
|
196
|
+
* console.dir(browserController.browser.contexts());
|
|
197
|
+
* }],
|
|
198
|
+
* prePageCreateHooks: [(pageId, browserController) => {
|
|
199
|
+
* if (pageId === 'my-page') {
|
|
200
|
+
* // make changes right before a specific page is created
|
|
201
|
+
* }
|
|
202
|
+
* }],
|
|
203
|
+
* postPageCreateHooks: [async (page, browserController) => {
|
|
204
|
+
* // update some or all new pages
|
|
205
|
+
* await page.evaluate(() => {
|
|
206
|
+
* // now all pages will have 'foo'
|
|
207
|
+
* window.foo = 'bar'
|
|
208
|
+
* })
|
|
209
|
+
* }],
|
|
210
|
+
* prePageCloseHooks: [async (page, browserController) => {
|
|
211
|
+
* // collect information just before a page closes
|
|
212
|
+
* await page.screenshot();
|
|
213
|
+
* }],
|
|
214
|
+
* postPageCloseHooks: [(pageId, browserController) => {
|
|
215
|
+
* // clean up or log after a job is done
|
|
216
|
+
* console.log('Page closed: ', pageId)
|
|
217
|
+
* }]
|
|
218
|
+
* });
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
export declare class BrowserPool<Options extends BrowserPoolOptions = BrowserPoolOptions, BrowserPlugins extends BrowserPlugin[] = InferBrowserPluginArray<Options['browserPlugins']>, BrowserControllerReturn extends BrowserController = ReturnType<BrowserPlugins[number]['createController']>, LaunchContextReturn extends LaunchContext = ReturnType<BrowserPlugins[number]['createLaunchContext']>, PageOptions = Parameters<BrowserControllerReturn['newPage']>[0], PageReturn extends UnwrapPromise<ReturnType<BrowserControllerReturn['newPage']>> = UnwrapPromise<ReturnType<BrowserControllerReturn['newPage']>>> extends TypedEmitter<BrowserPoolEvents<BrowserControllerReturn, PageReturn>> {
|
|
222
|
+
browserPlugins: BrowserPlugins;
|
|
223
|
+
maxOpenPagesPerBrowser: number;
|
|
224
|
+
retireBrowserAfterPageCount: number;
|
|
225
|
+
operationTimeoutMillis: number;
|
|
226
|
+
closeInactiveBrowserAfterMillis: number;
|
|
227
|
+
useFingerprints?: boolean;
|
|
228
|
+
fingerprintsOptions: FingerprintsOptions;
|
|
229
|
+
preLaunchHooks: PreLaunchHook<LaunchContextReturn>[];
|
|
230
|
+
postLaunchHooks: PostLaunchHook<BrowserControllerReturn>[];
|
|
231
|
+
prePageCreateHooks: PrePageCreateHook<BrowserControllerReturn, PageOptions>[];
|
|
232
|
+
postPageCreateHooks: PostPageCreateHook<BrowserControllerReturn, PageReturn>[];
|
|
233
|
+
prePageCloseHooks: PrePageCloseHook<BrowserControllerReturn, PageReturn>[];
|
|
234
|
+
postPageCloseHooks: PostPageCloseHook<BrowserControllerReturn>[];
|
|
235
|
+
pageCounter: number;
|
|
236
|
+
pages: Map<string, PageReturn>;
|
|
237
|
+
pageIds: WeakMap<PageReturn, string>;
|
|
238
|
+
activeBrowserControllers: Set<BrowserControllerReturn>;
|
|
239
|
+
retiredBrowserControllers: Set<BrowserControllerReturn>;
|
|
240
|
+
pageToBrowserController: WeakMap<PageReturn, BrowserControllerReturn>;
|
|
241
|
+
fingerprintInjector?: FingerprintInjector;
|
|
242
|
+
fingerprintGenerator?: any;
|
|
243
|
+
fingerprintCache?: QuickLRU<string, Fingerprint>;
|
|
244
|
+
private browserKillerInterval?;
|
|
245
|
+
private limiter;
|
|
246
|
+
constructor(options: Options & BrowserPoolHooks<BrowserControllerReturn, LaunchContextReturn, PageReturn>);
|
|
247
|
+
/**
|
|
248
|
+
* Opens a new page in one of the running browsers or launches
|
|
249
|
+
* a new browser and opens a page there, if no browsers are active,
|
|
250
|
+
* or their page limits have been exceeded.
|
|
251
|
+
*/
|
|
252
|
+
newPage(options?: BrowserPoolNewPageOptions<PageOptions, BrowserPlugins[number]>): Promise<PageReturn>;
|
|
253
|
+
/**
|
|
254
|
+
* Unlike {@link newPage}, `newPageInNewBrowser` always launches a new
|
|
255
|
+
* browser to open the page in. Use the `launchOptions` option to
|
|
256
|
+
* configure the new browser.
|
|
257
|
+
*/
|
|
258
|
+
newPageInNewBrowser(options?: BrowserPoolNewPageInNewBrowserOptions<PageOptions, BrowserPlugins[number]>): Promise<PageReturn>;
|
|
259
|
+
/**
|
|
260
|
+
* Opens new pages with all available plugins and returns an array
|
|
261
|
+
* of pages in the same order as the plugins were provided to `BrowserPool`.
|
|
262
|
+
* This is useful when you want to run a script in multiple environments
|
|
263
|
+
* at the same time, typically in testing or website analysis.
|
|
264
|
+
*
|
|
265
|
+
* **Example:**
|
|
266
|
+
* ```js
|
|
267
|
+
* const browserPool = new BrowserPool({
|
|
268
|
+
* browserPlugins: [
|
|
269
|
+
* new PlaywrightPlugin(playwright.chromium),
|
|
270
|
+
* new PlaywrightPlugin(playwright.firefox),
|
|
271
|
+
* new PlaywrightPlugin(playwright.webkit),
|
|
272
|
+
* new PuppeteerPlugin(puppeteer),
|
|
273
|
+
* ]
|
|
274
|
+
* });
|
|
275
|
+
*
|
|
276
|
+
* const pages = await browserPool.newPageWithEachPlugin();
|
|
277
|
+
* const [chromiumPage, firefoxPage, webkitPage, puppeteerPage] = pages;
|
|
278
|
+
* ```
|
|
279
|
+
*/
|
|
280
|
+
newPageWithEachPlugin(optionsList?: Omit<BrowserPoolNewPageOptions<PageOptions, BrowserPlugins[number]>, 'browserPlugin'>[]): Promise<PageReturn[]>;
|
|
281
|
+
/**
|
|
282
|
+
* Retrieves a {@link BrowserController} for a given page. This is useful
|
|
283
|
+
* when you're working only with pages and need to access the browser
|
|
284
|
+
* manipulation functionality.
|
|
285
|
+
*
|
|
286
|
+
* You could access the browser directly from the page,
|
|
287
|
+
* but that would circumvent `BrowserPool` and most likely
|
|
288
|
+
* cause weird things to happen, so please always use `BrowserController`
|
|
289
|
+
* to control your browsers. The function returns `undefined` if the
|
|
290
|
+
* browser is closed.
|
|
291
|
+
*
|
|
292
|
+
* @param page - Browser plugin page
|
|
293
|
+
*/
|
|
294
|
+
getBrowserControllerByPage(page: PageReturn): BrowserControllerReturn | undefined;
|
|
295
|
+
/**
|
|
296
|
+
* If you provided a custom ID to one of your pages or saved the
|
|
297
|
+
* randomly generated one, you can use this function to retrieve
|
|
298
|
+
* the page. If the page is no longer open, the function will
|
|
299
|
+
* return `undefined`.
|
|
300
|
+
*/
|
|
301
|
+
getPage(id: string): PageReturn | undefined;
|
|
302
|
+
/**
|
|
303
|
+
* Page IDs are used throughout `BrowserPool` as a method of linking
|
|
304
|
+
* events. You can use a page ID to track the full lifecycle of the page.
|
|
305
|
+
* It is created even before a browser is launched and stays with the page
|
|
306
|
+
* until it's closed.
|
|
307
|
+
*/
|
|
308
|
+
getPageId(page: PageReturn): string | undefined;
|
|
309
|
+
private _createPageForBrowser;
|
|
310
|
+
/**
|
|
311
|
+
* Removes a browser controller from the pool. The underlying
|
|
312
|
+
* browser will be closed after all its pages are closed.
|
|
313
|
+
*
|
|
314
|
+
*/
|
|
315
|
+
retireBrowserController(browserController: BrowserControllerReturn): void;
|
|
316
|
+
/**
|
|
317
|
+
* Removes a browser from the pool. It will be
|
|
318
|
+
* closed after all its pages are closed.
|
|
319
|
+
*/
|
|
320
|
+
retireBrowserByPage(page: PageReturn): void;
|
|
321
|
+
/**
|
|
322
|
+
* Removes all active browsers from the pool. The browsers will be
|
|
323
|
+
* closed after all their pages are closed.
|
|
324
|
+
*/
|
|
325
|
+
retireAllBrowsers(): void;
|
|
326
|
+
/**
|
|
327
|
+
* Closes all managed browsers without waiting for pages to close.
|
|
328
|
+
* @return {Promise<void>}
|
|
329
|
+
*/
|
|
330
|
+
closeAllBrowsers(): Promise<void>;
|
|
331
|
+
/**
|
|
332
|
+
* Closes all managed browsers and tears down the pool.
|
|
333
|
+
*/
|
|
334
|
+
destroy(): Promise<void>;
|
|
335
|
+
private _teardown;
|
|
336
|
+
private _getAllBrowserControllers;
|
|
337
|
+
private _launchBrowser;
|
|
338
|
+
/**
|
|
339
|
+
* Picks plugins round robin.
|
|
340
|
+
* @private
|
|
341
|
+
*/
|
|
342
|
+
private _pickBrowserPlugin;
|
|
343
|
+
private _pickBrowserWithFreeCapacity;
|
|
344
|
+
private _closeInactiveRetiredBrowsers;
|
|
345
|
+
private _overridePageClose;
|
|
346
|
+
private _executeHooks;
|
|
347
|
+
private _closeRetiredBrowserWithNoPages;
|
|
348
|
+
private _initializeFingerprinting;
|
|
349
|
+
private _addFingerprintHooks;
|
|
350
|
+
}
|
|
351
|
+
export interface BrowserPoolNewPageOptions<PageOptions, BP extends BrowserPlugin> {
|
|
352
|
+
/**
|
|
353
|
+
* Assign a custom ID to the page. If you don't a random string ID
|
|
354
|
+
* will be generated.
|
|
355
|
+
*/
|
|
356
|
+
id?: string;
|
|
357
|
+
/**
|
|
358
|
+
* Some libraries (Playwright) allow you to open new pages with specific
|
|
359
|
+
* options. Use this property to set those options.
|
|
360
|
+
*/
|
|
361
|
+
pageOptions?: PageOptions;
|
|
362
|
+
/**
|
|
363
|
+
* Choose a plugin to open the page with. If none is provided,
|
|
364
|
+
* one of the pool's available plugins will be used.
|
|
365
|
+
*
|
|
366
|
+
* It must be one of the plugins browser pool was created with.
|
|
367
|
+
* If you wish to start a browser with a different configuration,
|
|
368
|
+
* see the `newPageInNewBrowser` function.
|
|
369
|
+
*/
|
|
370
|
+
browserPlugin?: BP;
|
|
371
|
+
/**
|
|
372
|
+
* Proxy URL.
|
|
373
|
+
*/
|
|
374
|
+
proxyUrl?: string;
|
|
375
|
+
}
|
|
376
|
+
export interface BrowserPoolNewPageInNewBrowserOptions<PageOptions, BP extends BrowserPlugin> {
|
|
377
|
+
/**
|
|
378
|
+
* Assign a custom ID to the page. If you don't a random string ID
|
|
379
|
+
* will be generated.
|
|
380
|
+
*/
|
|
381
|
+
id?: string;
|
|
382
|
+
/**
|
|
383
|
+
* Some libraries (Playwright) allow you to open new pages with specific
|
|
384
|
+
* options. Use this property to set those options.
|
|
385
|
+
*/
|
|
386
|
+
pageOptions?: PageOptions;
|
|
387
|
+
/**
|
|
388
|
+
* Provide a plugin to launch the browser. If none is provided,
|
|
389
|
+
* one of the pool's available plugins will be used.
|
|
390
|
+
*
|
|
391
|
+
* If you configured `BrowserPool` to rotate multiple libraries,
|
|
392
|
+
* such as both Puppeteer and Playwright, you should always set
|
|
393
|
+
* the `browserPlugin` when using the `launchOptions` option.
|
|
394
|
+
*
|
|
395
|
+
* The plugin will not be added to the list of plugins used by
|
|
396
|
+
* the pool. You can either use one of those, to launch a specific
|
|
397
|
+
* browser, or provide a completely new configuration.
|
|
398
|
+
*/
|
|
399
|
+
browserPlugin?: BP;
|
|
400
|
+
/**
|
|
401
|
+
* Options that will be used to launch the new browser.
|
|
402
|
+
*/
|
|
403
|
+
launchOptions?: BP['launchOptions'];
|
|
404
|
+
}
|
|
405
|
+
//# sourceMappingURL=browser-pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-pool.d.ts","sourceRoot":"","sources":["../src/browser-pool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAKrE,MAAM,WAAW,iBAAiB,CAAC,EAAE,SAAS,iBAAiB,EAAE,IAAI;IACjE,CAAC,mBAAmB,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,EA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