From efe6fd22ce0495710dcac8b5b29c346f1d6bc5ef Mon Sep 17 00:00:00 2001 From: Matthew Yarmolinsky Date: Wed, 20 Jul 2022 13:45:39 +0000 Subject: [PATCH] fleet: Add `--fields` and `--json` options Change-type: minor Signed-off-by: Matthew Yarmolinsky --- docs/balena-cli.md | 8 ++++++++ lib/commands/fleet/index.ts | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/balena-cli.md b/docs/balena-cli.md index cdc5605a..bf5efc2b 100644 --- a/docs/balena-cli.md +++ b/docs/balena-cli.md @@ -367,6 +367,14 @@ fleet name, slug (preferred), or numeric ID (deprecated) open fleet dashboard page +#### --fields FIELDS + +only show provided fields (comma-separated) + +#### -j, --json + +output in json format + ## fleet create <name> Create a new balena fleet. diff --git a/lib/commands/fleet/index.ts b/lib/commands/fleet/index.ts index a7b99f37..1f9ff687 100644 --- a/lib/commands/fleet/index.ts +++ b/lib/commands/fleet/index.ts @@ -24,7 +24,6 @@ import * as cf from '../../utils/common-flags'; import * as ca from '../../utils/common-args'; import { getBalenaSdk, stripIndent } from '../../utils/lazy'; import { applicationIdInfo } from '../../utils/messages'; -import { isV14 } from '../../utils/version'; import type { DataOutputOptions } from '../../framework'; interface FlagsDef extends DataOutputOptions { @@ -60,7 +59,7 @@ export default class FleetCmd extends Command { default: false, description: 'open fleet dashboard page', }), - ...(isV14() ? cf.dataOutputFlags : {}), + ...cf.dataOutputFlags, }; public static authenticated = true;