chrome-pool
Advanced tools
Comparing version 1.0.7 to 1.0.8
15
index.js
@@ -12,10 +12,13 @@ 'use strict'; | ||
async function launchChrome(port) { | ||
const chromeFlags = [ | ||
'--disable-gpu', | ||
'--disable-extensions', | ||
'--disable-speech-api', | ||
]; | ||
if (!process.env.SHOW_CHROME) { | ||
chromeFlags.push('--headless') | ||
} | ||
const runner = new Runner({ | ||
port: port, | ||
chromeFlags: [ | ||
'--headless', | ||
'--disable-gpu', | ||
'--disable-extensions', | ||
'--disable-speech-api', | ||
] | ||
chromeFlags, | ||
}); | ||
@@ -22,0 +25,0 @@ return await runner.launch(); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
// process.on('unhandledRejection', r => console.log(r)); | ||
process.on('unhandledRejection', console.trace); | ||
@@ -8,0 +8,0 @@ describe('#ChromePool', function () { |
{ | ||
"name": "chrome-pool", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "headless chrome tabs manage pool", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -64,2 +64,6 @@ [![Npm Package](https://img.shields.io/npm/v/chrome-pool.svg?style=flat-square)](https://www.npmjs.com/package/chrome-pool) | ||
6. show chrome | ||
In dev time, you may want to know what chrome are doing rather than let chrome run in headless. | ||
You can set env `SHOW_CHROME=true` when run your nodejs app to disable headless to debug chrome. | ||
## Dependencies | ||
@@ -66,0 +70,0 @@ 1. [Chrome 59+](https://www.google.com/chrome/browser/desktop/index.html) should install on you system |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13307
276
76
1