browser-manager
Advanced tools
Comparing version 1.1.27 to 1.1.29
@@ -74,3 +74,4 @@ /* tslint:disable:no-console */ | ||
await page?.route('**/*', (route) => { | ||
const isBlackUrl = blackUrls?.some((bl) => new RegExp(bl).test(route.request().url())); | ||
const requrl = route.request().url(); | ||
const isBlackUrl = blackUrls?.some((bl) => new RegExp(bl).test(requrl)); | ||
const isBlackType = blackTypes?.includes(route.request().resourceType()); | ||
@@ -81,3 +82,3 @@ return isBlackUrl || isBlackType ? route.abort() : route.continue(); | ||
if (url) { | ||
await page.goto(url, { | ||
await page?.goto(url, { | ||
waitUntil | ||
@@ -84,0 +85,0 @@ }); |
import { BrowserContextOptions, BrowserType, LaunchOptions } from 'playwright'; | ||
export declare type TTorOpts = { | ||
export type TTorOpts = { | ||
proto?: string; | ||
@@ -8,3 +8,3 @@ host: string; | ||
}; | ||
export declare type TBrowserOpts = { | ||
export type TBrowserOpts = { | ||
appPath?: string; | ||
@@ -21,3 +21,3 @@ profileName?: string; | ||
}; | ||
export declare type TNewPageOpts = { | ||
export type TNewPageOpts = { | ||
url?: string; | ||
@@ -28,5 +28,5 @@ waitUntil?: 'domcontentloaded' | 'load' | 'networkidle'; | ||
}; | ||
export declare type TBlackListOpts = { | ||
export type TBlackListOpts = { | ||
urls?: string[]; | ||
resourceTypes?: ('image' | 'stylesheet' | 'media' | 'font' | 'script' | 'texttrack' | 'xhr' | 'fetch' | 'eventsource' | 'websocket' | 'manifest' | 'other')[]; | ||
}; |
{ | ||
"name": "browser-manager", | ||
"version": "1.1.27", | ||
"version": "1.1.29", | ||
"description": "", | ||
@@ -11,2 +11,3 @@ "main": "lib/index.js", | ||
"build": "tsc", | ||
"pub": "yarn version --pre --patch && yarn run build && npm publish", | ||
"format": "prettier --write \"src/**/*.ts\"", | ||
@@ -36,8 +37,8 @@ "lint": "tslint -p tsconfig.json", | ||
"devDependencies": { | ||
"@types/lodash": "^4.14.182", | ||
"@types/node": "^18.0.5", | ||
"prettier": "^2.7.1", | ||
"@types/lodash": "^4.14.191", | ||
"@types/node": "^18.11.12", | ||
"prettier": "^2.8.1", | ||
"tslint": "^6.1.3", | ||
"tslint-config-prettier": "^1.18.0", | ||
"typescript": "^4.7.4" | ||
"typescript": "^4.9.4" | ||
}, | ||
@@ -50,3 +51,3 @@ "files": [ | ||
"lodash": "^4.17.21", | ||
"playwright": "^1.23.4", | ||
"playwright": "^1.28.1", | ||
"time-helpers": "^1.0.0", | ||
@@ -53,0 +54,0 @@ "tor-mgr": "^1.0.0" |
Sorry, the diff of this file is not supported yet
21630
305
Updatedplaywright@^1.28.1