v12 preparations: Add feature switch for 'balena apps --verbose'

Connects-to: #1770
Change-type: patch
This commit is contained in:
Paulo Castro 2020-05-29 17:24:03 +01:00
parent a38b41f339
commit fcc13f9476

View File

@ -21,6 +21,7 @@ import { stripIndent } from 'common-tags';
import Command from '../command'; import Command from '../command';
import * as cf from '../utils/common-flags'; import * as cf from '../utils/common-flags';
import { getBalenaSdk, getVisuals } from '../utils/lazy'; import { getBalenaSdk, getVisuals } from '../utils/lazy';
import { isV12 } from '../utils/version';
interface ExtendedApplication extends Application { interface ExtendedApplication extends Application {
device_count?: number; device_count?: number;
@ -49,7 +50,9 @@ export default class AppsCmd extends Command {
help: cf.help, help: cf.help,
verbose: flags.boolean({ verbose: flags.boolean({
char: 'v', char: 'v',
description: 'add extra columns in the tabular output (SLUG)', description: isV12()
? 'No-op since release v12.0.0'
: 'add extra columns in the tabular output (SLUG)',
}), }),
}; };
@ -83,7 +86,7 @@ export default class AppsCmd extends Command {
getVisuals().table.horizontal(applications, [ getVisuals().table.horizontal(applications, [
'id', 'id',
'app_name', 'app_name',
options.verbose ? 'slug' : '', options.verbose || isV12() ? 'slug' : '',
'device_type', 'device_type',
'online_devices', 'online_devices',
'device_count', 'device_count',