thsq-agent
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "thsq-agent", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Thingsquare agent for Linux gateways", | ||
@@ -17,2 +17,4 @@ "main": "thsq-agent.js", | ||
"dependencies": { | ||
"console-stamp": "^0.2.9", | ||
"getopts": "^2.2.5", | ||
"thsq": "^1.4.4", | ||
@@ -19,0 +21,0 @@ "wireless-tools": "^0.19.0" |
@@ -14,8 +14,39 @@ #!/usr/bin/env node | ||
var statefilename = 'thsq-agent.json'; | ||
var getopts = require('getopts'); | ||
require('console-stamp')(console, { pattern : 'HH:MM:ss.l' }); | ||
function run(options, callback) { | ||
var statefilename = 'thsq-agent.json'; | ||
var callbackcalled = false; | ||
function usage() { | ||
console.info('usage: node thsq-agent.js'); | ||
console.info('optional: -f <frontend> -b <backend>'); | ||
process.exit(1); | ||
} | ||
var cmdlineoptions = getopts(process.argv.slice(2), { | ||
alias: { | ||
frontend: 'f', | ||
backend: 'b', | ||
help: 'h', | ||
}, | ||
default: { | ||
frontend: '0ac48bf3-9fab-4bad-8455-e394808eda6b', | ||
backend: 'developer.thingsquare.com', | ||
} | ||
}); | ||
if (cmdlineoptions.help) { | ||
usage(); | ||
} | ||
if (options === undefined) { | ||
options = { server: cmdlineoptions.backend, frontend: cmdlineoptions.frontend }; | ||
} | ||
thsq.init(options, function () { | ||
@@ -22,0 +53,0 @@ var cookie; |
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
12920
320
4
+ Addedconsole-stamp@^0.2.9
+ Addedgetopts@^2.2.5
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedconsole-stamp@0.2.10(transitive)
+ Addeddateformat@1.0.11(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedget-stdin@9.0.0(transitive)
+ Addedgetopts@2.3.0(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedmeow@13.2.0(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)