thsq-agent
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "thsq-agent", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Thingsquare agent for Linux gateways", | ||
@@ -5,0 +5,0 @@ "main": "thsq-agent.js", |
@@ -15,4 +15,8 @@ #!/usr/bin/env node | ||
var getopts = require('getopts'); | ||
require('console-stamp')(console, { pattern : 'HH:MM:ss.l' }); | ||
if (console.restoreConsole === undefined) { | ||
/* If another module has defined console-stamp, it may have defined it with other disabled levels, so we only call console-stamp if no one else has */ | ||
require('console-stamp')(console, { pattern : 'HH:MM:ss.l' }); | ||
} | ||
var events = require('events'); | ||
@@ -111,4 +115,8 @@ var em = new events.EventEmitter(); | ||
} | ||
var npm_pkg_version = require('./package.json').version; | ||
virtualdevice.pushVariable('s', 'version', npm_pkg_version); | ||
if (options.version) { | ||
virtualdevice.pushVariable('s', 'version', options.version); | ||
} else { | ||
var npm_pkg_version = require('./package.json').version; | ||
virtualdevice.pushVariable('s', 'version', npm_pkg_version); | ||
} | ||
@@ -154,11 +162,11 @@ thsq.getDevice(auth, function(device) { | ||
module.exports.run = run; | ||
module.exports.setVariable = function(type, variable, val, options, callback) { | ||
module.exports.setVariable = function (type, variable, val, options, callback) { | ||
thsq.setVariable(auth, type, variable, val, options, callback); | ||
}, | ||
module.exports.unique = function() { | ||
}; | ||
module.exports.unique = function () { | ||
return unique; | ||
}, | ||
module.exports.auth = function() { | ||
}; | ||
module.exports.auth = function () { | ||
return auth; | ||
} | ||
}; | ||
} | ||
@@ -165,0 +173,0 @@ } else { |
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
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
14908
373