Make sure everything uses the same shared deviceApiKey option

This commit is contained in:
Tim Perry 2017-11-16 19:09:20 +01:00
parent 7e306fbce8
commit 08c40195e5
7 changed files with 18 additions and 25 deletions

View File

@ -44,6 +44,13 @@ exports.optionalDevice = {
alias: 'd'
};
exports.optionalDeviceApiKey = {
signature: 'deviceApiKey',
description: 'custom device key - note that this is only supported on ResinOS 2.0.3+',
parameter: 'device-api-key',
alias: 'k'
};
exports.booleanDevice = {
signature: 'device',
description: 'device',

View File

@ -196,12 +196,7 @@ exports.generate = {
description: 'generate a config.json file',
help: 'Use this command to generate a config.json for a device or application.\n\nThis is interactive by default, but you can do this automatically without interactivity\nby specifying an option for each question on the command line, if you know the questions\nthat will be asked for the relevant device type.\n\nExamples:\n\n $ resin config generate --device 7cf02a6\n $ resin config generate --device 7cf02a6 --device-api-key <existingDeviceKey>\n $ resin config generate --device 7cf02a6 --output config.json\n $ resin config generate --app MyApp\n $ resin config generate --app MyApp --output config.json\n $ resin config generate --app MyApp --network wifi --wifiSsid mySsid --wifiKey abcdefgh --appUpdatePollInterval 1',
options: [
commandOptions.optionalApplication, commandOptions.optionalDevice, {
signature: 'deviceApiKey',
description: 'custom device key - note that this is only supported on ResinOS 2.0.3+',
parameter: 'device-api-key',
alias: 'k'
}, {
commandOptions.optionalApplication, commandOptions.optionalDevice, commandOptions.optionalDeviceApiKey, {
signature: 'output',
description: 'output',
parameter: 'output',

View File

@ -92,12 +92,7 @@ exports.register = {
description: 'custom uuid',
parameter: 'uuid',
alias: 'u'
}, {
signature: 'deviceApiKey',
description: 'custom device key',
parameter: 'device-api-key',
alias: 'k'
}
}, commandOptions.optionalDeviceApiKey
],
action: function(params, options, done) {
var Promise, ref, ref1, resin;

View File

@ -350,7 +350,7 @@ custom uuid
#### --deviceApiKey, -k &#60;device-api-key&#62;
custom device key
custom device key - note that this is only supported on ResinOS 2.0.3+
## device rm &#60;uuid&#62;

View File

@ -38,6 +38,12 @@ exports.optionalDevice =
description: 'device uuid'
alias: 'd'
exports.optionalDeviceApiKey =
signature: 'deviceApiKey'
description: 'custom device key - note that this is only supported on ResinOS 2.0.3+'
parameter: 'device-api-key'
alias: 'k'
exports.booleanDevice =
signature: 'device'
description: 'device'

View File

@ -237,12 +237,7 @@ exports.generate =
options: [
commandOptions.optionalApplication
commandOptions.optionalDevice
{
signature: 'deviceApiKey'
description: 'custom device key - note that this is only supported on ResinOS 2.0.3+'
parameter: 'device-api-key'
alias: 'k'
}
commandOptions.optionalDeviceApiKey
{
signature: 'output'
description: 'output'

View File

@ -147,12 +147,7 @@ exports.register =
parameter: 'uuid'
alias: 'u'
}
{
signature: 'deviceApiKey'
description: 'custom device key'
parameter: 'device-api-key'
alias: 'k'
}
commandOptions.optionalDeviceApiKey
]
action: (params, options, done) ->
Promise = require('bluebird')