Comparing version 1.2.10 to 1.2.11
@@ -8,2 +8,3 @@ #!/usr/bin/env node | ||
// src/utils.ts | ||
import * as os from "os"; | ||
var isCurrentUserRoot = function() { | ||
@@ -13,2 +14,6 @@ if (process && process.getuid) { | ||
} | ||
console.log(os.userInfo().username); | ||
if (os.userInfo().username == "root") { | ||
return true; | ||
} | ||
return false; | ||
@@ -22,2 +27,3 @@ }; | ||
outputFile = normalize(outputFile); | ||
console.log("Printeer to:", outputFile); | ||
if (!url.startsWith("http")) { | ||
@@ -24,0 +30,0 @@ reject("URL must start with http or https"); |
@@ -6,2 +6,3 @@ // src/printeer.ts | ||
// src/utils.ts | ||
import * as os from "os"; | ||
var isCurrentUserRoot = function() { | ||
@@ -11,2 +12,6 @@ if (process && process.getuid) { | ||
} | ||
console.log(os.userInfo().username); | ||
if (os.userInfo().username == "root") { | ||
return true; | ||
} | ||
return false; | ||
@@ -20,2 +25,3 @@ }; | ||
outputFile = normalize(outputFile); | ||
console.log("Printeer to:", outputFile); | ||
if (!url.startsWith("http")) { | ||
@@ -22,0 +28,0 @@ reject("URL must start with http or https"); |
{ | ||
"name": "printeer", | ||
"version": "1.2.10", | ||
"version": "1.2.11", | ||
"description": "Prints specified web url to PDF (or Image - Coming Soon)!", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -22,2 +22,4 @@ import puppeteer from 'puppeteer'; | ||
console.log("Printeer to:", outputFile) | ||
if (!url.startsWith('http')) { | ||
@@ -46,2 +48,3 @@ reject('URL must start with http or https'); | ||
let browser:any = null | ||
try { | ||
@@ -48,0 +51,0 @@ browser = await puppeteer.launch(launchOptions); |
@@ -0,3 +1,3 @@ | ||
import * as os from 'os'; | ||
// Checks if the current user is root. | ||
@@ -9,3 +9,9 @@ export const isCurrentUserRoot = function():Boolean { | ||
console.log(os.userInfo().username) | ||
if (os.userInfo().username == 'root') { | ||
return true; | ||
} | ||
return false; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
32386
382