Comparing version 1.2.4 to 1.2.5
{ | ||
"name": "printeer", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"description": "Prints specified web url to PDF (or Image - Coming Soon)!", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -26,7 +26,18 @@ import puppeteer from 'puppeteer'; | ||
const browser = await puppeteer.launch({ | ||
const launchOptions:any = { | ||
headless: true, | ||
args: isCurrentUserRoot() ? ['--no-sandbox', '--disable-setuid-sandbox'] : [] | ||
}); | ||
} | ||
// PUPPETEER_EXECUTABLE_PATH | ||
// Read the environment variable PUPPETEER_EXECUTABLE_PATH and use it as the path to the executable. | ||
// If the environment variable is not set, the default executable path is used. | ||
const exePath = process.env.PUPPETEER_EXECUTABLE_PATH; | ||
if (exePath) { | ||
launchOptions.executablePath = exePath; | ||
} | ||
const browser = await puppeteer.launch(launchOptions); | ||
const page = await browser.newPage(); | ||
@@ -33,0 +44,0 @@ const res = await page.goto(url, {waitUntil: 'networkidle0'}); |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
27115
313
0