mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 21:57:51 +00:00
device-type list: Add --all
flag for including no longer supported device types in the list
Change-type: minor
This commit is contained in:
parent
e5cee648f2
commit
09d52c504d
@ -1238,6 +1238,10 @@ To use one of the aliases, replace `device-type list` with the alias.
|
|||||||
|
|
||||||
List the device types supported by balena (like 'raspberrypi3' or 'intel-nuc').
|
List the device types supported by balena (like 'raspberrypi3' or 'intel-nuc').
|
||||||
|
|
||||||
|
By default, only actively supported device types are listed.
|
||||||
|
The --all option can be used to list all device types, including those that are
|
||||||
|
no longer supported by balena.
|
||||||
|
|
||||||
The --json option is recommended when scripting the output of this command,
|
The --json option is recommended when scripting the output of this command,
|
||||||
because the JSON format is less likely to change and it better represents data
|
because the JSON format is less likely to change and it better represents data
|
||||||
types like lists and empty strings (for example, the ALIASES column contains a
|
types like lists and empty strings (for example, the ALIASES column contains a
|
||||||
@ -1247,6 +1251,7 @@ list of zero or more values). The 'jq' utility may be helpful in shell scripts
|
|||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ balena device-type list
|
$ balena device-type list
|
||||||
|
$ balena device-type list --all
|
||||||
$ balena device-type list --json
|
$ balena device-type list --json
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
@ -1255,6 +1260,10 @@ Examples:
|
|||||||
|
|
||||||
produce JSON output instead of tabular output
|
produce JSON output instead of tabular output
|
||||||
|
|
||||||
|
#### --all
|
||||||
|
|
||||||
|
include device types no longer supported by balena
|
||||||
|
|
||||||
# Devices
|
# Devices
|
||||||
|
|
||||||
## device deactivate
|
## device deactivate
|
||||||
|
@ -28,6 +28,10 @@ export default class DeviceTypeListCmd extends Command {
|
|||||||
|
|
||||||
List the device types supported by balena (like 'raspberrypi3' or 'intel-nuc').
|
List the device types supported by balena (like 'raspberrypi3' or 'intel-nuc').
|
||||||
|
|
||||||
|
By default, only actively supported device types are listed.
|
||||||
|
The --all option can be used to list all device types, including those that are
|
||||||
|
no longer supported by balena.
|
||||||
|
|
||||||
The --json option is recommended when scripting the output of this command,
|
The --json option is recommended when scripting the output of this command,
|
||||||
because the JSON format is less likely to change and it better represents data
|
because the JSON format is less likely to change and it better represents data
|
||||||
types like lists and empty strings (for example, the ALIASES column contains a
|
types like lists and empty strings (for example, the ALIASES column contains a
|
||||||
@ -36,6 +40,7 @@ export default class DeviceTypeListCmd extends Command {
|
|||||||
`;
|
`;
|
||||||
public static examples = [
|
public static examples = [
|
||||||
'$ balena device-type list',
|
'$ balena device-type list',
|
||||||
|
'$ balena device-type list --all',
|
||||||
'$ balena device-type list --json',
|
'$ balena device-type list --json',
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -45,6 +50,10 @@ export default class DeviceTypeListCmd extends Command {
|
|||||||
char: 'j',
|
char: 'j',
|
||||||
description: 'produce JSON output instead of tabular output',
|
description: 'produce JSON output instead of tabular output',
|
||||||
}),
|
}),
|
||||||
|
all: Flags.boolean({
|
||||||
|
description: 'include device types no longer supported by balena',
|
||||||
|
default: false,
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
public async run() {
|
public async run() {
|
||||||
@ -59,9 +68,11 @@ export default class DeviceTypeListCmd extends Command {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
} satisfies BalenaSdk.PineOptions<BalenaSdk.DeviceType>;
|
} satisfies BalenaSdk.PineOptions<BalenaSdk.DeviceType>;
|
||||||
const dts = (await getBalenaSdk().models.deviceType.getAllSupported(
|
const dts = (
|
||||||
pineOptions,
|
options.all
|
||||||
)) as Array<
|
? await getBalenaSdk().models.deviceType.getAll(pineOptions)
|
||||||
|
: await getBalenaSdk().models.deviceType.getAllSupported(pineOptions)
|
||||||
|
) as Array<
|
||||||
BalenaSdk.PineTypedResult<BalenaSdk.DeviceType, typeof pineOptions>
|
BalenaSdk.PineTypedResult<BalenaSdk.DeviceType, typeof pineOptions>
|
||||||
>;
|
>;
|
||||||
interface DT {
|
interface DT {
|
||||||
|
Loading…
Reference in New Issue
Block a user