phantom-workers
Advanced tools
@@ -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 @@ }); |
+4
-2
| { | ||
| "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", |
+3
-3
@@ -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) |
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
23237
1.44%490
0.62%1
-50%- Removed