Comparing version 0.0.58 to 0.0.59
@@ -46,5 +46,19 @@ #!/usr/bin/env node | ||
eventHubF = function() { events.EventEmitter.call(this); this.LOG = 'log'; this.ERROR = 'error'; this.INFO = 'info'; }, | ||
pidFile = '/tmp/jute.pid' | ||
logfile = process.env['npm_package_config_logFile'], | ||
stream | ||
; | ||
try { | ||
stream = fs.createWriteStream(logfile); | ||
} catch(e) { | ||
console.error('Error opening logfile: ' + e); | ||
process.exit(1); | ||
} | ||
process.stdout.write = process.stderr.write = (function(write) { | ||
return function(string, encoding, fd) { | ||
stream.write(string); | ||
} | ||
})(process.stdout.write); | ||
/** | ||
@@ -80,3 +94,3 @@ * Create our event hub | ||
eventHub.on('configureDone', function() { | ||
eventHub.on('configureDone', function(config) { | ||
// Note config gets stashed in eventHub (eventHub.config) | ||
@@ -89,3 +103,2 @@ eventHub.on('actionsLoaded', function() { | ||
// Dump the config file for jute_v8 and submit_tests | ||
console.log('DMPING: ' + JSON.stringify(eventHub.config)); | ||
fs.writeFileSync('/tmp/jute.config', JSON.stringify(eventHub.config)); | ||
@@ -100,2 +113,2 @@ | ||
process.on('exit', function() { fs.unlinkSync(process.env['npm_package_config_pidfile']); }); | ||
process.on('exit', function() { fs.unlinkSync(process.env['npm_package_config_pidFile']); }); |
@@ -53,2 +53,3 @@ /* | ||
logFormat: '', | ||
logFile: '/tmp/jute.log', | ||
testRegex: '.html$', | ||
@@ -103,8 +104,2 @@ inject: 1, | ||
config.java = path.join(process.env.JAVA_HOME, 'bin', 'java'); | ||
} else if (!config.java) { | ||
exec('which java', function (error, stdout, stderr) { | ||
if (!error) { | ||
config.java = stdout.trim(); | ||
} | ||
}); | ||
} | ||
@@ -120,3 +115,2 @@ | ||
hub.emit(hub.LOG, hub.ERROR, 'Set $JAVA_HOME OR set the "java" configuration variable (% npm config set jute:java <path>)'); | ||
hub.emit(hub.LOG, hub.ERROR, 'Or add the "java" executable to your PATH'); | ||
hub.emit('configureError', { name: 'java', value: config.java, error: e } ); | ||
@@ -123,0 +117,0 @@ return; |
@@ -12,4 +12,4 @@ #!/usr/bin/env node | ||
.argv, | ||
logfile = process.env['npm_package_config_logfile'], | ||
pidfile = process.env['npm_package_config_pidfile'] | ||
logfile = process.env['npm_package_config_logFile'], | ||
pidfile = process.env['npm_package_config_pidFile'] | ||
; | ||
@@ -16,0 +16,0 @@ |
@@ -96,3 +96,8 @@ /* | ||
// Anything else is a regular file - a test or a file being tested | ||
sendFullFile(path.join(hub.config.docRoot, req.url), req, res, next); | ||
// make sure there's no funny bizness in path! | ||
var dR = hub.config.docRoot, joined = path.join(dR, req.url); | ||
if (!joined.match('^' + dR)) { | ||
joined = path.join(dR, joined); | ||
} | ||
sendFullFile(joined, req, res, next); | ||
} | ||
@@ -99,0 +104,0 @@ ).listen(hub.config.port); |
@@ -5,3 +5,3 @@ { | ||
"keywords": ["selenium", "test", "testing", "unit", "tests"], | ||
"version": "0.0.58", | ||
"version": "0.0.59", | ||
"author": "Mark Ethan Trostler <mark@zzo.com>", | ||
@@ -42,4 +42,4 @@ "preferGlobal": true, | ||
"java": "/usr/bin/java", | ||
"logfile": "/tmp/jute.log", | ||
"pidfile": "/tmp/jute.pid", | ||
"logFile": "/tmp/jute.log", | ||
"pidFile": "/tmp/jute.pid", | ||
"inject": "1", | ||
@@ -46,0 +46,0 @@ "testRegex": "*.htm*" |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances 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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
2069737
82
4051
38