New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

printeer

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

printeer - npm Package Compare versions

Comparing version 1.2.12 to 1.2.13

18

bin/index.js

@@ -6,17 +6,2 @@ #!/usr/bin/env node

import { normalize } from "path";
// src/utils.ts
import * as os from "os";
var isCurrentUserRoot = function() {
console.log("UserInfo", os.userInfo());
if (process && process.getuid) {
return process.getuid() === 0;
}
if (os.userInfo().username == "root") {
return true;
}
return false;
};
// src/printeer.ts
var printeer_default = async (url, outputFile, outputType = null) => {

@@ -26,3 +11,2 @@ getPackageJson();

outputFile = normalize(outputFile);
console.log("Printeer to:", outputFile);
if (!url.startsWith("http")) {

@@ -33,3 +17,3 @@ reject("URL must start with http or https");

headless: true,
args: isCurrentUserRoot() ? ["--no-sandbox", "--disable-setuid-sandbox"] : []
args: ["--no-sandbox", "--disable-setuid-sandbox"]
};

@@ -36,0 +20,0 @@ const exePath = process.env.PUPPETEER_EXECUTABLE_PATH;

// src/printeer.ts
import puppeteer from "puppeteer";
import { normalize } from "path";
// src/utils.ts
import * as os from "os";
var isCurrentUserRoot = function() {
console.log("UserInfo", os.userInfo());
if (process && process.getuid) {
return process.getuid() === 0;
}
if (os.userInfo().username == "root") {
return true;
}
return false;
};
// src/printeer.ts
var printeer_default = async (url, outputFile, outputType = null) => {

@@ -23,3 +8,2 @@ getPackageJson();

outputFile = normalize(outputFile);
console.log("Printeer to:", outputFile);
if (!url.startsWith("http")) {

@@ -30,3 +14,3 @@ reject("URL must start with http or https");

headless: true,
args: isCurrentUserRoot() ? ["--no-sandbox", "--disable-setuid-sandbox"] : []
args: ["--no-sandbox", "--disable-setuid-sandbox"]
};

@@ -33,0 +17,0 @@ const exePath = process.env.PUPPETEER_EXECUTABLE_PATH;

2

package.json
{
"name": "printeer",
"version": "1.2.12",
"version": "1.2.13",
"description": "Prints specified web url to PDF (or Image - Coming Soon)!",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -21,5 +21,2 @@ import puppeteer from 'puppeteer';

outputFile = normalize(outputFile);
console.log("Printeer to:", outputFile)
if (!url.startsWith('http')) {

@@ -29,6 +26,5 @@ reject('URL must start with http or https');

const launchOptions:any = {
headless: true,
args: isCurrentUserRoot() ? ['--no-sandbox', '--disable-setuid-sandbox'] : []
args: ['--no-sandbox', '--disable-setuid-sandbox'] // <- Handle this better
}

@@ -35,0 +31,0 @@

@@ -5,3 +5,2 @@ import * as os from 'os';

export const isCurrentUserRoot = function():Boolean {
console.log("UserInfo", os.userInfo())
if (process && process.getuid) {

@@ -8,0 +7,0 @@ return process.getuid() === 0; // UID 0 is always root

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc