Auto-merge for PR #925 via VersionBot

Update logs to use new v10 MC SDK
This commit is contained in:
resin-io-versionbot[bot] 2018-07-12 13:59:28 +00:00 committed by GitHub
commit 9561d4da2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 23 deletions

View File

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
This project adheres to [Semantic Versioning](http://semver.org/).
## v7.7.1 - 2018-07-12
* Update CLI to SDK v10 (include new API logs) #925 [Tim Perry]
## v7.7.0 - 2018-07-11
* Add --generate-device-api-key parameter to config generate #921 [Tim Perry]

View File

@ -757,10 +757,6 @@ By default, the command prints all log messages and exit.
To continuously stream output, and see new logs in real time, use the `--tail` option.
Note that for now you need to provide the whole UUID for this command to work correctly.
This is due to some technical limitations that we plan to address soon.
Examples:
$ resin logs 23c73a1

View File

@ -26,10 +26,6 @@ module.exports =
To continuously stream output, and see new logs in real time, use the `--tail` option.
Note that for now you need to provide the whole UUID for this command to work correctly.
This is due to some technical limitations that we plan to address soon.
Examples:
$ resin logs 23c73a1
@ -47,25 +43,19 @@ module.exports =
primary: true
action: (params, options, done) ->
normalizeUuidProp(params)
resin = require('resin-sdk-preconfigured')
resin = require('resin-sdk').fromSharedOptions()
moment = require('moment')
printLine = (line) ->
timestamp = moment(line.timestamp).format('DD.MM.YY HH:mm:ss (ZZ)')
console.log("#{timestamp} #{line.message}")
promise = resin.logs.history(params.uuid).each(printLine)
if not options.tail
# PubNub keeps the process alive after a history query.
# Until this is fixed, we force the process to exit.
# This of course prevents this command to be used programatically
return promise.catch(done).finally ->
process.exit(0)
promise.then ->
if options.tail
resin.logs.subscribe(params.uuid).then (logs) ->
logs.on('line', printLine)
logs.on('error', done)
.catch(done)
.catch(done)
else
resin.logs.history(params.uuid)
.each(printLine)
.catch(done)

View File

@ -1,6 +1,6 @@
{
"name": "resin-cli",
"version": "7.7.0",
"version": "7.7.1",
"description": "The official resin.io CLI tool",
"main": "./build/actions/index.js",
"homepage": "https://github.com/resin-io/resin-cli",
@ -148,7 +148,7 @@
"resin-multibuild": "^0.5.1",
"resin-preload": "^6.3.0",
"resin-release": "^1.2.0",
"resin-sdk": "9.0.0-beta18",
"resin-sdk": "10.0.0-beta1",
"resin-sdk-preconfigured": "^6.9.0",
"resin-settings-client": "^3.6.1",
"resin-stream-logger": "^0.1.0",