puppetarazzi
Advanced tools
Comparing version 0.2.23 to 0.2.24
16
index.js
@@ -10,3 +10,3 @@ #!/usr/bin/env node | ||
// for debugging | ||
process.on("unhandledRejection", r => console.log(r)); | ||
process.on("unhandledRejection", r => console.error(r)); | ||
@@ -26,3 +26,13 @@ // command-line arguments | ||
// call Puppetarazzi | ||
var p = new Puppetarazzi(configJson); | ||
p.run(); | ||
(async() => { | ||
try { | ||
var p = new Puppetarazzi(configJson); | ||
await p.run(); | ||
} catch (e) { | ||
console.error(e); | ||
process.exit(1); | ||
} | ||
process.exit(0); | ||
})(); |
{ | ||
"name": "puppetarazzi", | ||
"version": "0.2.23", | ||
"version": "0.2.24", | ||
"description": "Takes screenshots of your website and annoys you by pointing out your flaws (mixed-content, uncompressed content, 404s, etc)\"", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# Puppetarazzi | ||
v0.2.23 | ||
v0.2.24 | ||
@@ -214,5 +214,8 @@ Copyright 2020 Nic Jansma | ||
* `puppeteerOptions` - Options to pass to `puppeteer.launch()` | ||
* `timeout` - Timeout per page | ||
## Version History | ||
* v0.2.24 - 2020-05-15 | ||
* Use `process.exit()` after run is complete to force it to close | ||
* v0.2.23 - 2020-05-05 | ||
@@ -219,0 +222,0 @@ * Option `waitUntil` (puppet option) at global or page level |
@@ -48,2 +48,4 @@ // | ||
let disconnecting = false; | ||
// test each device individually | ||
@@ -55,2 +57,8 @@ for (let device of this.config.devices) { | ||
browser.on("disconnected", function() { | ||
if (!disconnecting) { | ||
console.error("Browser disconnected!"); | ||
} | ||
}); | ||
// create a new page | ||
@@ -172,3 +180,4 @@ let page = await browser.newPage(); | ||
// stop the browser | ||
browser.close(); | ||
disconnecting = true; | ||
await browser.close(); | ||
} | ||
@@ -175,0 +184,0 @@ |
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
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
2078949
1472
288