node-queue-bus
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -1,6 +0,8 @@ | ||
var utils = require(__dirname + '/utils.js'); | ||
var uuid = require('node-uuid'); | ||
var os = require('os'); | ||
var child_process = require('child_process'); | ||
var utils = require(__dirname + '/utils.js'); | ||
var uuid = require('node-uuid'); | ||
var os = require('os'); | ||
var system_timezone = require('system-timezone'); | ||
var systemTimezone = system_timezone(); | ||
var publish = function(eventType, args, callback){ | ||
@@ -79,34 +81,2 @@ var self = this; | ||
var getSystemTimezone = function(){ | ||
// THIS IS TERRIBLE, but there is no way to get this from node directly... | ||
// This only works on *nix hosts | ||
// shelling out is slow | ||
var command = ''; | ||
command += 'if [ -f /etc/timezone ]; then\n'; | ||
command += ' cat /etc/timezone\n'; | ||
command += 'elif [ -h /etc/localtime ]; then\n'; | ||
command += ' readlink /etc/localtime | sed "s/\\/usr\\/share\\/zoneinfo\\///"\n'; | ||
command += 'else'; | ||
command += ' checksum=\`md5sum /etc/localtime | cut -d\' \' -f1\`\n'; | ||
command += ' find /usr/share/zoneinfo/ -type f -exec md5sum {} \\; | grep "^$checksum" | sed "s/.*\\/usr\\/share\\/zoneinfo\\///" | head -n 1\n'; | ||
command += 'fi'; | ||
if(child_process.execSync){ | ||
try{ | ||
var stdout = child_process.execSync(command).toString(); | ||
return stdout.replace(/\n/g, ''); | ||
}catch(e){ | ||
console.log(e); | ||
throw(e); | ||
} | ||
}else{ | ||
child_process.exec(command, function(error, stdout, stderr){ | ||
if(error){ throw(error); } | ||
if(stderr){ throw(new Error(stderr)); } | ||
systemTimezone = stdout.replace(/\n/g, ''); | ||
}); | ||
} | ||
}; | ||
var systemTimezone = getSystemTimezone(); | ||
exports.publish = publish; | ||
@@ -113,0 +83,0 @@ exports.publishAt = publishAt; |
@@ -5,7 +5,7 @@ { | ||
"description": "an implementation of queuebus in node", | ||
"version": "0.1.0", | ||
"homepage": "http://github.com/queuebus/node-queue-bus", | ||
"version": "0.1.1", | ||
"homepage": "http://github.com/queue-bus/node-queue-bus", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/queuebus/node-queue-bus.git" | ||
"url": "git://github.com/queue-bus/node-queue-bus.git" | ||
}, | ||
@@ -29,3 +29,4 @@ "main": "index.js", | ||
"node-resque": "1.0.1", | ||
"node-uuid": "1.x.x" | ||
"node-uuid": "1.x.x", | ||
"system-timezone": "0.0.2" | ||
}, | ||
@@ -32,0 +33,0 @@ "devDependencies": { |
@@ -5,3 +5,3 @@ # node-queue-bus | ||
[![Build Status](https://travis-ci.org/queue-bus/node-queue-bus.png?branch=master)](https://travis-ci.org/queue-bus/node-queuebus) | ||
[![Build Status](https://travis-ci.org/queue-bus/node-queue-bus.png?branch=master)](https://travis-ci.org/queue-bus/node-queue-bus) | ||
@@ -8,0 +8,0 @@ ## Acknowledgments |
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
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
1
0
197017
4
1150
+ Addedsystem-timezone@0.0.2
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedcommander@0.6.12.3.0(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addeddebug@2.2.0(transitive)
+ Addeddiff@1.4.0(transitive)
+ Addedescape-string-regexp@1.0.2(transitive)
+ Addedglob@3.2.115.0.15(transitive)
+ Addedgrowl@1.9.2(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedjade@0.26.3(transitive)
+ Addedlru-cache@2.7.3(transitive)
+ Addedminimatch@0.3.03.1.2(transitive)
+ Addedminimist@0.0.8(transitive)
+ Addedmkdirp@0.3.00.5.1(transitive)
+ Addedmocha@2.5.3(transitive)
+ Addedms@0.7.1(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedsigmund@1.0.1(transitive)
+ Addedsupports-color@1.2.0(transitive)
+ Addedsystem-timezone@0.0.2(transitive)
+ Addedto-iso-string@0.0.2(transitive)
+ Addedwrappy@1.0.2(transitive)