mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-24 15:56:38 +00:00
Improve the supported device types listing
This commit is contained in:
parent
4ac8cb1003
commit
97480d3aa4
@ -18,6 +18,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- Add the `resin os build-config` method to pass the interactive config step once
|
||||
and reuse the built file for consequent `resin os configure` calls (added the new `--config` param to it),
|
||||
and for `resin device init` (same `--config` param)
|
||||
- Improve the supported device types listing
|
||||
|
||||
### Fixed
|
||||
|
||||
|
@ -72,10 +72,11 @@ exports.supported = {
|
||||
description: 'list all supported devices',
|
||||
help: 'Use this command to get the list of all supported devices\n\nExamples:\n\n $ resin devices supported',
|
||||
action: function(params, options, done) {
|
||||
var resin;
|
||||
var resin, visuals;
|
||||
resin = require('resin-sdk-preconfigured');
|
||||
return resin.models.config.getDeviceTypes().each(function(deviceType) {
|
||||
return console.log(deviceType.slug);
|
||||
visuals = require('resin-cli-visuals');
|
||||
return resin.models.config.getDeviceTypes().then(function(deviceTypes) {
|
||||
return console.log(visuals.table.horizontal(deviceTypes, ['slug', 'name']));
|
||||
}).nodeify(done);
|
||||
}
|
||||
};
|
||||
|
@ -116,8 +116,13 @@ exports.supported =
|
||||
'''
|
||||
action: (params, options, done) ->
|
||||
resin = require('resin-sdk-preconfigured')
|
||||
resin.models.config.getDeviceTypes().each (deviceType) ->
|
||||
console.log(deviceType.slug)
|
||||
visuals = require('resin-cli-visuals')
|
||||
|
||||
resin.models.config.getDeviceTypes().then (deviceTypes) ->
|
||||
console.log visuals.table.horizontal deviceTypes, [
|
||||
'slug'
|
||||
'name'
|
||||
]
|
||||
.nodeify(done)
|
||||
|
||||
exports.register =
|
||||
|
Loading…
Reference in New Issue
Block a user