@letsscrapedata/controller 0.0.41 → 0.0.43
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/index.cjs +76 -64
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +76 -64
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1365,7 +1365,7 @@ var PlaywrightBrowserContext = class extends import_node_events2.default {
|
|
|
1365
1365
|
if (!this.#lsdBrowser.doesMeetBrowserContextRequirements(browserContextRequirements)) {
|
|
1366
1366
|
return false;
|
|
1367
1367
|
}
|
|
1368
|
-
const { incognitos } = browserContextRequirements;
|
|
1368
|
+
const { browserIncognitos: incognitos } = browserContextRequirements;
|
|
1369
1369
|
return incognitos.length === 0 || incognitos.includes(this.#incognito);
|
|
1370
1370
|
}
|
|
1371
1371
|
async getPage(always = false) {
|
|
@@ -1439,37 +1439,43 @@ var PlaywrightBrowserContext = class extends import_node_events2.default {
|
|
|
1439
1439
|
if (!this.#browserContext) {
|
|
1440
1440
|
throw new Error("No valid browserContext");
|
|
1441
1441
|
}
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1442
|
+
try {
|
|
1443
|
+
const { cookies, localStorage: localStorageOrigins } = stateData;
|
|
1444
|
+
const page = await this.getPage();
|
|
1445
|
+
if (!page) {
|
|
1446
|
+
return false;
|
|
1447
|
+
}
|
|
1448
|
+
const origPage = page._origPage();
|
|
1449
|
+
if (cookies.length > 0) {
|
|
1450
|
+
await this.#browserContext.addCookies(cookies);
|
|
1451
|
+
}
|
|
1452
|
+
if (localStorageOrigins.length > 0) {
|
|
1453
|
+
await origPage.route("**/*", async (route) => {
|
|
1454
|
+
const request = route.request();
|
|
1455
|
+
await route.fulfill({
|
|
1456
|
+
status: 200,
|
|
1457
|
+
// contentType: "text/html; charset=utf-8", // "text/plain",
|
|
1458
|
+
body: `<html><body><h1>${request.url()}</h1></body></html>`
|
|
1459
|
+
});
|
|
1458
1460
|
});
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
}
|
|
1467
|
-
}
|
|
1461
|
+
for (const localStorageOrigin of localStorageOrigins) {
|
|
1462
|
+
const { origin, localStorage } = localStorageOrigin;
|
|
1463
|
+
await origPage.goto(origin);
|
|
1464
|
+
await origPage.evaluate((localStorageItems) => {
|
|
1465
|
+
for (const item of localStorageItems) {
|
|
1466
|
+
window.localStorage.setItem(item.name, item.value);
|
|
1467
|
+
}
|
|
1468
|
+
}, localStorage);
|
|
1469
|
+
}
|
|
1468
1470
|
}
|
|
1471
|
+
await (0, import_utils3.sleep)(2e3);
|
|
1472
|
+
await origPage.unrouteAll();
|
|
1473
|
+
await page.free();
|
|
1474
|
+
return true;
|
|
1475
|
+
} catch (err) {
|
|
1476
|
+
(0, import_utils3.logerr)(err);
|
|
1477
|
+
return false;
|
|
1469
1478
|
}
|
|
1470
|
-
await origPage.unrouteAll();
|
|
1471
|
-
await page.free();
|
|
1472
|
-
return true;
|
|
1473
1479
|
}
|
|
1474
1480
|
_origBrowserContext() {
|
|
1475
1481
|
return this.#browserContext;
|
|
@@ -1532,7 +1538,7 @@ var PlaywrightBrowser = class extends import_node_events3.default {
|
|
|
1532
1538
|
}
|
|
1533
1539
|
const incognito = typeof options?.incognito === "boolean" ? options.incognito : true;
|
|
1534
1540
|
for (const browserContext of browserContexts) {
|
|
1535
|
-
const lsdBrowserContext = new PlaywrightBrowserContext(this, browserContext, incognito, this.#proxy, this.#browserIdx
|
|
1541
|
+
const lsdBrowserContext = new PlaywrightBrowserContext(this, browserContext, incognito, this.#proxy, this.#browserIdx, this.#nextBrowserContextIdx++, this.#maxPagesPerBrowserContext(), this.#maxPageFreeSeconds(), maxViewportOfNewPage);
|
|
1536
1542
|
this.#lsdBrowserContexts.push(lsdBrowserContext);
|
|
1537
1543
|
(0, import_utils4.loginfo)(`##browserContext ${lsdBrowserContext.id()} ${this.#browserCreationMethod}ed`);
|
|
1538
1544
|
}
|
|
@@ -1590,7 +1596,7 @@ var PlaywrightBrowser = class extends import_node_events3.default {
|
|
|
1590
1596
|
}
|
|
1591
1597
|
const browserContext = await this.#browser.newContext(browserContextOptions);
|
|
1592
1598
|
const { maxViewportOfNewPage = this.#options.maxViewportOfNewPage } = options ? options : {};
|
|
1593
|
-
const lsdBrowserContext = new PlaywrightBrowserContext(this, browserContext, true, proxy, this.#browserIdx
|
|
1599
|
+
const lsdBrowserContext = new PlaywrightBrowserContext(this, browserContext, true, proxy, this.#browserIdx, this.#nextBrowserContextIdx++, this.#maxPagesPerBrowserContext(), this.#maxPageFreeSeconds(), maxViewportOfNewPage);
|
|
1594
1600
|
this.#lsdBrowserContexts.push(lsdBrowserContext);
|
|
1595
1601
|
(0, import_utils4.loginfo)(`##browser ${lsdBrowserContext.id()} created`);
|
|
1596
1602
|
return lsdBrowserContext;
|
|
@@ -1618,8 +1624,8 @@ var PlaywrightBrowser = class extends import_node_events3.default {
|
|
|
1618
1624
|
return this.#browserType;
|
|
1619
1625
|
}
|
|
1620
1626
|
doesMeetBrowserContextRequirements(browserContextRequirements) {
|
|
1621
|
-
const { browserControllerTypes, browserTypes,
|
|
1622
|
-
return (browserControllerTypes.length === 0 || browserControllerTypes.includes(this.#browserControllerType)) && (browserTypes.length === 0 || browserTypes.includes(this.#browserType)) && (
|
|
1627
|
+
const { browserControllerTypes, browserTypes, browserHeadlesses } = browserContextRequirements;
|
|
1628
|
+
return (browserControllerTypes.length === 0 || browserControllerTypes.includes(this.#browserControllerType)) && (browserTypes.length === 0 || browserTypes.includes(this.#browserType)) && (browserHeadlesses.length === 0 || browserHeadlesses.includes(this.#headless));
|
|
1623
1629
|
}
|
|
1624
1630
|
executablePath() {
|
|
1625
1631
|
return this.#executablePath;
|
|
@@ -2902,7 +2908,7 @@ var PuppeteerBrowserContext = class extends import_node_events5.default {
|
|
|
2902
2908
|
if (!this.#lsdBrowser.doesMeetBrowserContextRequirements(browserContextRequirements)) {
|
|
2903
2909
|
return false;
|
|
2904
2910
|
}
|
|
2905
|
-
const { incognitos } = browserContextRequirements;
|
|
2911
|
+
const { browserIncognitos: incognitos } = browserContextRequirements;
|
|
2906
2912
|
return incognitos.length === 0 || incognitos.includes(this.#incognito);
|
|
2907
2913
|
}
|
|
2908
2914
|
async getPage(always = false) {
|
|
@@ -2978,37 +2984,43 @@ var PuppeteerBrowserContext = class extends import_node_events5.default {
|
|
|
2978
2984
|
if (!this.#browserContext) {
|
|
2979
2985
|
throw new Error("No valid browserContext");
|
|
2980
2986
|
}
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2987
|
+
try {
|
|
2988
|
+
const { cookies, localStorage: localStorageOrigins } = stateData;
|
|
2989
|
+
const page = await this.getPage();
|
|
2990
|
+
if (!page) {
|
|
2991
|
+
return false;
|
|
2992
|
+
}
|
|
2993
|
+
const origPage = page._origPage();
|
|
2994
|
+
if (cookies.length > 0) {
|
|
2995
|
+
await origPage.setCookie(...cookies);
|
|
2996
|
+
}
|
|
2997
|
+
if (localStorageOrigins.length > 0) {
|
|
2998
|
+
await origPage.setRequestInterception(true);
|
|
2999
|
+
origPage.on("request", (request) => {
|
|
3000
|
+
request.respond({
|
|
3001
|
+
status: 200,
|
|
3002
|
+
// contentType: "text/html; charset=utf-8", // "text/plain",
|
|
3003
|
+
body: `<html><body><h1>${request.url()}</h1></body></html>`
|
|
3004
|
+
});
|
|
2997
3005
|
});
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
}
|
|
3006
|
-
}
|
|
3006
|
+
for (const localStorageOrigin of localStorageOrigins) {
|
|
3007
|
+
const { origin, localStorage } = localStorageOrigin;
|
|
3008
|
+
await origPage.goto(origin);
|
|
3009
|
+
await origPage.evaluate((localStorageItems) => {
|
|
3010
|
+
for (const item of localStorageItems) {
|
|
3011
|
+
window.localStorage.setItem(item.name, item.value);
|
|
3012
|
+
}
|
|
3013
|
+
}, localStorage);
|
|
3014
|
+
}
|
|
3007
3015
|
}
|
|
3016
|
+
await (0, import_utils7.sleep)(2e3);
|
|
3017
|
+
await origPage.setRequestInterception(false);
|
|
3018
|
+
await page.free();
|
|
3019
|
+
return true;
|
|
3020
|
+
} catch (err) {
|
|
3021
|
+
(0, import_utils7.logerr)(err);
|
|
3022
|
+
return false;
|
|
3008
3023
|
}
|
|
3009
|
-
await origPage.setRequestInterception(false);
|
|
3010
|
-
await page.free();
|
|
3011
|
-
return true;
|
|
3012
3024
|
}
|
|
3013
3025
|
_origBrowserContext() {
|
|
3014
3026
|
return this.#browserContext;
|
|
@@ -3153,8 +3165,8 @@ var PuppeteerBrowser = class extends import_node_events6.default {
|
|
|
3153
3165
|
return this.#browserType;
|
|
3154
3166
|
}
|
|
3155
3167
|
doesMeetBrowserContextRequirements(browserContextRequirements) {
|
|
3156
|
-
const { browserControllerTypes, browserTypes,
|
|
3157
|
-
return (browserControllerTypes.length === 0 || browserControllerTypes.includes(this.#browserControllerType)) && (browserTypes.length === 0 || browserTypes.includes(this.#browserType)) && (
|
|
3168
|
+
const { browserControllerTypes, browserTypes, browserHeadlesses } = browserContextRequirements;
|
|
3169
|
+
return (browserControllerTypes.length === 0 || browserControllerTypes.includes(this.#browserControllerType)) && (browserTypes.length === 0 || browserTypes.includes(this.#browserType)) && (browserHeadlesses.length === 0 || browserHeadlesses.includes(this.#headless));
|
|
3158
3170
|
}
|
|
3159
3171
|
executablePath() {
|
|
3160
3172
|
return this.#executablePath;
|
package/dist/index.d.cts
CHANGED
|
@@ -16,8 +16,8 @@ type LsdBrowserType = "chromium" | "firefox" | "webkit";
|
|
|
16
16
|
interface BrowserContextRequirements {
|
|
17
17
|
browserControllerTypes: BrowserControllerType[];
|
|
18
18
|
browserTypes: LsdBrowserType[];
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
browserHeadlesses: boolean[];
|
|
20
|
+
browserIncognitos: boolean[];
|
|
21
21
|
}
|
|
22
22
|
interface ProxyInController {
|
|
23
23
|
proxyUrl: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ type LsdBrowserType = "chromium" | "firefox" | "webkit";
|
|
|
16
16
|
interface BrowserContextRequirements {
|
|
17
17
|
browserControllerTypes: BrowserControllerType[];
|
|
18
18
|
browserTypes: LsdBrowserType[];
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
browserHeadlesses: boolean[];
|
|
20
|
+
browserIncognitos: boolean[];
|
|
21
21
|
}
|
|
22
22
|
interface ProxyInController {
|
|
23
23
|
proxyUrl: string;
|
package/dist/index.js
CHANGED
|
@@ -1319,7 +1319,7 @@ var PlaywrightBrowserContext = class extends EventEmitter2 {
|
|
|
1319
1319
|
if (!this.#lsdBrowser.doesMeetBrowserContextRequirements(browserContextRequirements)) {
|
|
1320
1320
|
return false;
|
|
1321
1321
|
}
|
|
1322
|
-
const { incognitos } = browserContextRequirements;
|
|
1322
|
+
const { browserIncognitos: incognitos } = browserContextRequirements;
|
|
1323
1323
|
return incognitos.length === 0 || incognitos.includes(this.#incognito);
|
|
1324
1324
|
}
|
|
1325
1325
|
async getPage(always = false) {
|
|
@@ -1393,37 +1393,43 @@ var PlaywrightBrowserContext = class extends EventEmitter2 {
|
|
|
1393
1393
|
if (!this.#browserContext) {
|
|
1394
1394
|
throw new Error("No valid browserContext");
|
|
1395
1395
|
}
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1396
|
+
try {
|
|
1397
|
+
const { cookies, localStorage: localStorageOrigins } = stateData;
|
|
1398
|
+
const page = await this.getPage();
|
|
1399
|
+
if (!page) {
|
|
1400
|
+
return false;
|
|
1401
|
+
}
|
|
1402
|
+
const origPage = page._origPage();
|
|
1403
|
+
if (cookies.length > 0) {
|
|
1404
|
+
await this.#browserContext.addCookies(cookies);
|
|
1405
|
+
}
|
|
1406
|
+
if (localStorageOrigins.length > 0) {
|
|
1407
|
+
await origPage.route("**/*", async (route) => {
|
|
1408
|
+
const request = route.request();
|
|
1409
|
+
await route.fulfill({
|
|
1410
|
+
status: 200,
|
|
1411
|
+
// contentType: "text/html; charset=utf-8", // "text/plain",
|
|
1412
|
+
body: `<html><body><h1>${request.url()}</h1></body></html>`
|
|
1413
|
+
});
|
|
1412
1414
|
});
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
}
|
|
1421
|
-
}
|
|
1415
|
+
for (const localStorageOrigin of localStorageOrigins) {
|
|
1416
|
+
const { origin, localStorage } = localStorageOrigin;
|
|
1417
|
+
await origPage.goto(origin);
|
|
1418
|
+
await origPage.evaluate((localStorageItems) => {
|
|
1419
|
+
for (const item of localStorageItems) {
|
|
1420
|
+
window.localStorage.setItem(item.name, item.value);
|
|
1421
|
+
}
|
|
1422
|
+
}, localStorage);
|
|
1423
|
+
}
|
|
1422
1424
|
}
|
|
1425
|
+
await sleep(2e3);
|
|
1426
|
+
await origPage.unrouteAll();
|
|
1427
|
+
await page.free();
|
|
1428
|
+
return true;
|
|
1429
|
+
} catch (err) {
|
|
1430
|
+
logerr2(err);
|
|
1431
|
+
return false;
|
|
1423
1432
|
}
|
|
1424
|
-
await origPage.unrouteAll();
|
|
1425
|
-
await page.free();
|
|
1426
|
-
return true;
|
|
1427
1433
|
}
|
|
1428
1434
|
_origBrowserContext() {
|
|
1429
1435
|
return this.#browserContext;
|
|
@@ -1486,7 +1492,7 @@ var PlaywrightBrowser = class extends EventEmitter3 {
|
|
|
1486
1492
|
}
|
|
1487
1493
|
const incognito = typeof options?.incognito === "boolean" ? options.incognito : true;
|
|
1488
1494
|
for (const browserContext of browserContexts) {
|
|
1489
|
-
const lsdBrowserContext = new PlaywrightBrowserContext(this, browserContext, incognito, this.#proxy, this.#browserIdx
|
|
1495
|
+
const lsdBrowserContext = new PlaywrightBrowserContext(this, browserContext, incognito, this.#proxy, this.#browserIdx, this.#nextBrowserContextIdx++, this.#maxPagesPerBrowserContext(), this.#maxPageFreeSeconds(), maxViewportOfNewPage);
|
|
1490
1496
|
this.#lsdBrowserContexts.push(lsdBrowserContext);
|
|
1491
1497
|
loginfo4(`##browserContext ${lsdBrowserContext.id()} ${this.#browserCreationMethod}ed`);
|
|
1492
1498
|
}
|
|
@@ -1544,7 +1550,7 @@ var PlaywrightBrowser = class extends EventEmitter3 {
|
|
|
1544
1550
|
}
|
|
1545
1551
|
const browserContext = await this.#browser.newContext(browserContextOptions);
|
|
1546
1552
|
const { maxViewportOfNewPage = this.#options.maxViewportOfNewPage } = options ? options : {};
|
|
1547
|
-
const lsdBrowserContext = new PlaywrightBrowserContext(this, browserContext, true, proxy, this.#browserIdx
|
|
1553
|
+
const lsdBrowserContext = new PlaywrightBrowserContext(this, browserContext, true, proxy, this.#browserIdx, this.#nextBrowserContextIdx++, this.#maxPagesPerBrowserContext(), this.#maxPageFreeSeconds(), maxViewportOfNewPage);
|
|
1548
1554
|
this.#lsdBrowserContexts.push(lsdBrowserContext);
|
|
1549
1555
|
loginfo4(`##browser ${lsdBrowserContext.id()} created`);
|
|
1550
1556
|
return lsdBrowserContext;
|
|
@@ -1572,8 +1578,8 @@ var PlaywrightBrowser = class extends EventEmitter3 {
|
|
|
1572
1578
|
return this.#browserType;
|
|
1573
1579
|
}
|
|
1574
1580
|
doesMeetBrowserContextRequirements(browserContextRequirements) {
|
|
1575
|
-
const { browserControllerTypes, browserTypes,
|
|
1576
|
-
return (browserControllerTypes.length === 0 || browserControllerTypes.includes(this.#browserControllerType)) && (browserTypes.length === 0 || browserTypes.includes(this.#browserType)) && (
|
|
1581
|
+
const { browserControllerTypes, browserTypes, browserHeadlesses } = browserContextRequirements;
|
|
1582
|
+
return (browserControllerTypes.length === 0 || browserControllerTypes.includes(this.#browserControllerType)) && (browserTypes.length === 0 || browserTypes.includes(this.#browserType)) && (browserHeadlesses.length === 0 || browserHeadlesses.includes(this.#headless));
|
|
1577
1583
|
}
|
|
1578
1584
|
executablePath() {
|
|
1579
1585
|
return this.#executablePath;
|
|
@@ -2856,7 +2862,7 @@ var PuppeteerBrowserContext = class extends EventEmitter5 {
|
|
|
2856
2862
|
if (!this.#lsdBrowser.doesMeetBrowserContextRequirements(browserContextRequirements)) {
|
|
2857
2863
|
return false;
|
|
2858
2864
|
}
|
|
2859
|
-
const { incognitos } = browserContextRequirements;
|
|
2865
|
+
const { browserIncognitos: incognitos } = browserContextRequirements;
|
|
2860
2866
|
return incognitos.length === 0 || incognitos.includes(this.#incognito);
|
|
2861
2867
|
}
|
|
2862
2868
|
async getPage(always = false) {
|
|
@@ -2932,37 +2938,43 @@ var PuppeteerBrowserContext = class extends EventEmitter5 {
|
|
|
2932
2938
|
if (!this.#browserContext) {
|
|
2933
2939
|
throw new Error("No valid browserContext");
|
|
2934
2940
|
}
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2941
|
+
try {
|
|
2942
|
+
const { cookies, localStorage: localStorageOrigins } = stateData;
|
|
2943
|
+
const page = await this.getPage();
|
|
2944
|
+
if (!page) {
|
|
2945
|
+
return false;
|
|
2946
|
+
}
|
|
2947
|
+
const origPage = page._origPage();
|
|
2948
|
+
if (cookies.length > 0) {
|
|
2949
|
+
await origPage.setCookie(...cookies);
|
|
2950
|
+
}
|
|
2951
|
+
if (localStorageOrigins.length > 0) {
|
|
2952
|
+
await origPage.setRequestInterception(true);
|
|
2953
|
+
origPage.on("request", (request) => {
|
|
2954
|
+
request.respond({
|
|
2955
|
+
status: 200,
|
|
2956
|
+
// contentType: "text/html; charset=utf-8", // "text/plain",
|
|
2957
|
+
body: `<html><body><h1>${request.url()}</h1></body></html>`
|
|
2958
|
+
});
|
|
2951
2959
|
});
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
}
|
|
2960
|
-
}
|
|
2960
|
+
for (const localStorageOrigin of localStorageOrigins) {
|
|
2961
|
+
const { origin, localStorage } = localStorageOrigin;
|
|
2962
|
+
await origPage.goto(origin);
|
|
2963
|
+
await origPage.evaluate((localStorageItems) => {
|
|
2964
|
+
for (const item of localStorageItems) {
|
|
2965
|
+
window.localStorage.setItem(item.name, item.value);
|
|
2966
|
+
}
|
|
2967
|
+
}, localStorage);
|
|
2968
|
+
}
|
|
2961
2969
|
}
|
|
2970
|
+
await sleep2(2e3);
|
|
2971
|
+
await origPage.setRequestInterception(false);
|
|
2972
|
+
await page.free();
|
|
2973
|
+
return true;
|
|
2974
|
+
} catch (err) {
|
|
2975
|
+
logerr6(err);
|
|
2976
|
+
return false;
|
|
2962
2977
|
}
|
|
2963
|
-
await origPage.setRequestInterception(false);
|
|
2964
|
-
await page.free();
|
|
2965
|
-
return true;
|
|
2966
2978
|
}
|
|
2967
2979
|
_origBrowserContext() {
|
|
2968
2980
|
return this.#browserContext;
|
|
@@ -3107,8 +3119,8 @@ var PuppeteerBrowser = class extends EventEmitter6 {
|
|
|
3107
3119
|
return this.#browserType;
|
|
3108
3120
|
}
|
|
3109
3121
|
doesMeetBrowserContextRequirements(browserContextRequirements) {
|
|
3110
|
-
const { browserControllerTypes, browserTypes,
|
|
3111
|
-
return (browserControllerTypes.length === 0 || browserControllerTypes.includes(this.#browserControllerType)) && (browserTypes.length === 0 || browserTypes.includes(this.#browserType)) && (
|
|
3122
|
+
const { browserControllerTypes, browserTypes, browserHeadlesses } = browserContextRequirements;
|
|
3123
|
+
return (browserControllerTypes.length === 0 || browserControllerTypes.includes(this.#browserControllerType)) && (browserTypes.length === 0 || browserTypes.includes(this.#browserType)) && (browserHeadlesses.length === 0 || browserHeadlesses.includes(this.#headless));
|
|
3112
3124
|
}
|
|
3113
3125
|
executablePath() {
|
|
3114
3126
|
return this.#executablePath;
|
package/package.json
CHANGED