Skip to content

Commit

Permalink
v5.10.0 Add as support to meshblu-get
Browse files Browse the repository at this point in the history
  • Loading branch information
redaphid / royvandewater committed Feb 7, 2017
1 parent 49f7588 commit 53c654d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions command-get.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,23 @@ class GetCommand extends BaseCommand
@parseOptions()
meshbluHttp = @getMeshbluHttp()
@uuid ?= @getMeshbluConfig().uuid
meshbluHttp.device @uuid, (error, data) =>
meshbluHttp.device @uuid, {@as}, (error, data) =>
return @die error if error?

console.log JSON.stringify(data, null, 2)
process.exit 0

parseOptions: =>
commander
.option '-a, --as <uuid>', 'the uuid to send the message as (defaults to meshblu.json)'
.option '-u, --uuid <uuid>', 'Meshblu device to get (defaults to uuid from meshblu.json)'
.usage '[options] <path/to/meshblu.json>'
.parse process.argv

@filename = _.first commander.args
@uuid = commander.uuid
@uuid = commander.uuid
@as = commander.as
@events = (commander.events ? 'message,config').split ','
@types = (commander.types ? 'broadcast,received,sent').split ','
@types = (commander.types ? 'broadcast,received,sent').split ','

(new GetCommand()).run()
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meshblu-util",
"version": "5.9.0",
"version": "5.10.0",
"description": "Utils for managing Meshblu devices",
"main": "index.js",
"bin": {
Expand Down

0 comments on commit 53c654d

Please sign in to comment.