browserless 10.9.3-beta.0 → 10.9.5
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/package.json +5 -5
- package/src/driver.js +16 -6
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "browserless",
|
|
3
3
|
"description": "The headless Chrome/Chromium performance driver for Node.js",
|
|
4
4
|
"homepage": "https://browserless.js.org",
|
|
5
|
-
"version": "10.9.
|
|
5
|
+
"version": "10.9.5",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"author": {
|
|
8
8
|
"email": "hello@microlink.io",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@browserless/errors": "^10.7.13",
|
|
35
|
-
"@browserless/goto": "^10.9.
|
|
36
|
-
"@browserless/pdf": "^10.9.
|
|
37
|
-
"@browserless/screenshot": "^10.9.
|
|
35
|
+
"@browserless/goto": "^10.9.4",
|
|
36
|
+
"@browserless/pdf": "^10.9.5",
|
|
37
|
+
"@browserless/screenshot": "^10.9.5",
|
|
38
38
|
"debug-logfmt": "~1.4.0",
|
|
39
39
|
"kill-process-group": "~1.0.12",
|
|
40
40
|
"p-reflect": "~2.1.0",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"timeout": "2m",
|
|
65
65
|
"workerThreads": false
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "23cf051937b5353075b988f69861a0093350f4e3"
|
|
68
68
|
}
|
package/src/driver.js
CHANGED
|
@@ -21,14 +21,17 @@ const defaultArgs = [
|
|
|
21
21
|
'--disable-site-isolation-trials', // https://source.chromium.org/search?q=lang:cpp+symbol:kDisableSiteIsolation&ss=chromium
|
|
22
22
|
'--disable-speech-api', // https://source.chromium.org/search?q=lang:cpp+symbol:kDisableSpeechAPI&ss=chromium
|
|
23
23
|
'--disk-cache-size=33554432', // https://source.chromium.org/search?q=lang:cpp+symbol:kDiskCacheSize&ss=chromium
|
|
24
|
-
`--enable-features=${['SharedArrayBuffer'].join(',')}`,
|
|
25
24
|
'--font-render-hinting=none', // https://github.com/puppeteer/puppeteer/issues/2410#issuecomment-2886054614
|
|
26
25
|
'--ignore-gpu-blocklist', // https://source.chromium.org/search?q=lang:cpp+symbol:kIgnoreGpuBlocklist&ss=chromium
|
|
27
26
|
'--in-process-gpu', // https://github.com/search?q=repo%3Achromium%2Fchromium%20in-process-gpu&type=code
|
|
28
27
|
'--no-default-browser-check', // https://source.chromium.org/search?q=lang:cpp+symbol:kNoDefaultBrowserCheck&ss=chromium
|
|
29
28
|
'--no-pings', // https://source.chromium.org/search?q=lang:cpp+symbol:kNoPings&ss=chromium
|
|
30
29
|
'--no-sandbox', // https://source.chromium.org/search?q=lang:cpp+symbol:kNoSandbox&ss=chromium
|
|
30
|
+
'--no-startup-window',
|
|
31
|
+
`--enable-features=${['SharedArrayBuffer'].join(',')}`,
|
|
31
32
|
'--no-zygote', // https://source.chromium.org/search?q=lang:cpp+symbol:kNoZygote&ss=chromium
|
|
33
|
+
'--use-angle=swiftshader', // https://chromium.googlesource.com/chromium/src/+/main/docs/gpu/swiftshader.md
|
|
34
|
+
'--use-gl=angle', // https://chromium.googlesource.com/chromium/src/+/main/docs/gpu/swiftshader.md
|
|
32
35
|
`--disable-features=${[
|
|
33
36
|
'AudioServiceOutOfProcess',
|
|
34
37
|
'CalculateNativeWinOcclusion',
|
|
@@ -37,19 +40,26 @@ const defaultArgs = [
|
|
|
37
40
|
'IsolateOrigins',
|
|
38
41
|
'PushMessaging',
|
|
39
42
|
'site-per-process', // Disables OOPIF. https://www.chromium.org/Home/chromium-security/site-isolation
|
|
40
|
-
'Vulkan',
|
|
41
|
-
'WebGPU',
|
|
42
43
|
'WebPayments'
|
|
43
44
|
].join(',')}`
|
|
44
45
|
]
|
|
45
46
|
|
|
46
47
|
const spawn = ({
|
|
47
|
-
puppeteer = requireOneOf(['puppeteer', 'puppeteer-core', 'puppeteer-firefox']),
|
|
48
|
-
mode = 'launch',
|
|
49
48
|
args = defaultArgs,
|
|
50
49
|
headless = true,
|
|
50
|
+
ignoreHTTPSErrors = true,
|
|
51
|
+
mode = 'launch',
|
|
52
|
+
puppeteer = requireOneOf(['puppeteer', 'puppeteer-core', 'puppeteer-firefox']),
|
|
53
|
+
waitForInitialPage = false,
|
|
51
54
|
...launchOpts
|
|
52
|
-
} = {}) =>
|
|
55
|
+
} = {}) =>
|
|
56
|
+
puppeteer[mode]({
|
|
57
|
+
args,
|
|
58
|
+
headless,
|
|
59
|
+
ignoreHTTPSErrors,
|
|
60
|
+
waitForInitialPage,
|
|
61
|
+
...launchOpts
|
|
62
|
+
})
|
|
53
63
|
|
|
54
64
|
const getPid = subprocess => {
|
|
55
65
|
if ('pid' in subprocess) return subprocess.pid
|
package/src/index.js
CHANGED
|
@@ -97,7 +97,7 @@ module.exports = ({ timeout: globalTimeout = 30000, ...launchOpts } = {}) => {
|
|
|
97
97
|
const closePage = async (page, name) => {
|
|
98
98
|
if (page && !page.isClosed()) {
|
|
99
99
|
const duration = debug.duration('closePage')
|
|
100
|
-
if (page.disableAdblock)
|
|
100
|
+
if (page.disableAdblock) page.disableAdblock()
|
|
101
101
|
const [browserProcess, browserContext] = await Promise.all([
|
|
102
102
|
getBrowser(),
|
|
103
103
|
getBrowserContext(),
|