autocode-puppeteer
Advanced tools
Comparing version 1.0.0 to 2.0.0-rc
27
index.js
@@ -6,2 +6,27 @@ process.env.FUNCTIONS_EMULATOR = 'aws_lambda'; | ||
module.exports = chromium; | ||
let autocodePuppeteer = chromium.puppeteer; | ||
let puppeteerLaunch = chromium.puppeteer.launch.bind(autocodePuppeteer); | ||
autocodePuppeteer.launch = async (options) => { | ||
options = options || {}; | ||
if (options.hasOwnProperty('args')) { | ||
throw new Error('You may not specify a custom "args" option when launching Puppeteer in Autocode.') | ||
} | ||
if (options.hasOwnProperty('executablePath')) { | ||
throw new Error('You may not specify a custom "executablePath" option when launching Puppeteer in Autocode.') | ||
} | ||
if (options.hasOwnProperty('headless')) { | ||
throw new Error('You may not specify a custom "headless" option when launching Puppeteer in Autocode.') | ||
} | ||
if (!options.hasOwnProperty('defaultViewport')) { | ||
options.defaultViewport = chromium.defaultViewport; | ||
} | ||
if (!options.hasOwnProperty('ignoreHTTPSErrors')) { | ||
options.ignoreHTTPSErrors = true; | ||
} | ||
options.args = chromium.args; | ||
options.executablePath = await chromium.executablePath; | ||
options.headless = chromium.headless; | ||
return puppeteerLaunch(options); | ||
}; | ||
module.exports = autocodePuppeteer; |
{ | ||
"name": "autocode-puppeteer", | ||
"version": "1.0.0", | ||
"version": "2.0.0-rc", | ||
"description": "Puppeteer for use in Autocode services", | ||
@@ -12,4 +12,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"chrome-aws-lambda": "^5.5.0", | ||
"puppeteer-core": "^5.5.0" | ||
"chrome-aws-lambda": "5.5.0", | ||
"puppeteer-core": "5.5.0" | ||
}, | ||
@@ -16,0 +16,0 @@ "repository": { |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3920
28
0
3
Updatedchrome-aws-lambda@5.5.0
Updatedpuppeteer-core@5.5.0