Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

phantom-workers

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phantom-workers - npm Package Compare versions

Comparing version
0.3.1
to
0.3.2
+2
-1
lib/phantomManager.js

@@ -47,3 +47,4 @@ /*!

portLeftBoundary: self.options.portLeftBoundary,
portRightBoundary: self.options.portRightBoundary
portRightBoundary: self.options.portRightBoundary,
phantomPath: self.options.phantomPath
}));

@@ -50,0 +51,0 @@ self._phantomInstances[i].start(function(err) {

var childProcess = require('child_process'),
phantomjs = require("phantomjs"),
cluster = require("cluster"),

@@ -40,2 +39,6 @@ http = require('http'),

if (!this.options.phantomPath) {
this.options.phantomPath = require('phantomjs').path;
}
if (options.portLeftBoundary && options.portRightBoundary) {

@@ -77,3 +80,3 @@ this.findFreePort = function (cb) {

//we send host and port as env vars to child process
self._childProcess = childProcess.execFile(phantomjs.path, childArgs, childOpts, function (error, stdout, stderr) {
self._childProcess = childProcess.execFile(self.options.phantomPath, childArgs, childOpts, function (error, stdout, stderr) {

@@ -80,0 +83,0 @@ });

{
"name": "phantom-workers",
"version": "0.3.1",
"version": "0.3.2",
"author": {

@@ -21,6 +21,8 @@ "name": "Jan Blaha",

"net-cluster": "0.0.2",
"phantomjs": "1.9.15",
"portscanner": "1.0.0",
"underscore": "1.8.2"
},
"optionalDependencies": {
"phantomjs": "1.9.15"
},
"devDependencies": {

@@ -27,0 +29,0 @@ "mocha": "2.1.0",

@@ -26,3 +26,3 @@ #phantom-workers

});
//write the result to the response

@@ -60,7 +60,7 @@ res.statusCode = 200;

`hostEnvVarName` - customize the name of the environment variable passed to the phantom script that specifies the worker host. defaults to `PHANTOM_WORKER_HOST`<br/>
`portEnvVarName` - customize the name of the environment variable passed to the phantom script that specifies the worker port. defaults to `PHANTOM_WORKER_PORT`
`portEnvVarName` - customize the name of the environment variable passed to the phantom script that specifies the worker port. defaults to `PHANTOM_WORKER_PORT`<br/>
`phantomPath` - path to the phantomjs library. If not specified, this will use the version of phantom declared in the `optionalDependencies` in `package.json`
##License
See [license](https://github.com/pofider/phantom-workers/blob/master/LICENSE)