From f7aed30d30ffa5d5bfc8354cf021e155452f219e Mon Sep 17 00:00:00 2001 From: mshanemc Date: Thu, 30 May 2024 14:34:10 -0500 Subject: [PATCH] feat: add a default summary for optional orgs --- messages/messages.md | 8 ++++++++ src/flags/orgFlags.ts | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/messages/messages.md b/messages/messages.md index bd07f6f4..4a4f4827 100644 --- a/messages/messages.md +++ b/messages/messages.md @@ -42,10 +42,18 @@ The specified org %s is not a Dev Hub. Username or alias of the target org. Not required if the `target-org` configuration variable is already set. +# flags.optionalTargetOrg.summary + +Username or alias of the target org. + # flags.targetDevHubOrg.summary Username or alias of the Dev Hub org. Not required if the `target-dev-hub` configuration variable is already set. +# flags.optionalTargetDevHubOrg.summary + +Username or alias of the Dev Hub org. + # flags.apiVersion.description Override the api version used for api requests made by this command diff --git a/src/flags/orgFlags.ts b/src/flags/orgFlags.ts index 5a70d286..62b17ae8 100644 --- a/src/flags/orgFlags.ts +++ b/src/flags/orgFlags.ts @@ -102,6 +102,7 @@ export const optionalOrgFlag = Flags.custom({ char: 'o', noCacheDefault: true, parse: async (input: string | undefined) => maybeGetOrg(input), + summary: messages.getMessage('flags.optionalTargetOrg.summary'), default: async () => maybeGetOrg(), defaultHelp: async (context) => { if (context.options instanceof Org) { @@ -211,7 +212,7 @@ export const requiredHubFlag = Flags.custom({ */ export const optionalHubFlag = Flags.custom({ char: 'v', - summary: messages.getMessage('flags.targetDevHubOrg.summary'), + summary: messages.getMessage('flags.optionalTargetDevHubOrg.summary'), noCacheDefault: true, parse: async (input: string | undefined) => maybeGetHub(input), default: async () => maybeGetHub(),