From ac6909a501f8cff58627166b60fb01b392a6661a Mon Sep 17 00:00:00 2001 From: rupareddy5 Date: Mon, 5 Dec 2022 13:34:00 +0530 Subject: [PATCH] fixed short-form of --clear-credentials flag --- docs/www/docs/cli/swa-deploy.md | 2 +- docs/www/docs/cli/swa-login.md | 2 +- src/cli/commands/login.ts | 2 +- src/core/utils/options.spec.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/www/docs/cli/swa-deploy.md b/docs/www/docs/cli/swa-deploy.md index a850dfe6..bf307ad5 100644 --- a/docs/www/docs/cli/swa-deploy.md +++ b/docs/www/docs/cli/swa-deploy.md @@ -168,7 +168,7 @@ Here are the options you can use with `swa deploy`: - `-C, --client-id `: Azure client ID - `-CS, --client-secret `: Azure client secret - `-n, --app-name `: Azure Static Web App application name -- `-cc, --clear-credentials`: clear persisted credentials before login (default: `false`) +- `-CC, --clear-credentials`: clear persisted credentials before login (default: `false`) - `-u, --use-keychain`: enable using the operating system native keychain for persistent credentials (default: `true`) - `-nu, --no-use-keychain`: disable using the operating system native keychain - `-h, --help`: display help for command diff --git a/docs/www/docs/cli/swa-login.md b/docs/www/docs/cli/swa-login.md index 675233bb..a254cf11 100644 --- a/docs/www/docs/cli/swa-login.md +++ b/docs/www/docs/cli/swa-login.md @@ -25,7 +25,7 @@ Here are the options you can use with `swa login`: - `-C, --client-id `: Azure client ID - `-CS, --client-secret `: Azure client secret - `-n, --app-name `: Azure Static Web App application name -- `-cc, --clear-credentials`: clear persisted credentials before login (default: `false`) +- `-CC, --clear-credentials`: clear persisted credentials before login (default: `false`) - `-u, --use-keychain`: enable using the operating system native keychain for persistent credentials (default: `true`) - `-u, --no-use-keychain`: disable using the operating system native keychain - `-h, --help`: display help for command diff --git a/src/cli/commands/login.ts b/src/cli/commands/login.ts index 87985a4f..3ba925f0 100644 --- a/src/cli/commands/login.ts +++ b/src/cli/commands/login.ts @@ -20,7 +20,7 @@ export function addSharedLoginOptionsToCommand(command: Command) { .option("-C, --client-id ", "Azure client ID", DEFAULT_CONFIG.clientId) .option("-CS, --client-secret ", "Azure client secret", DEFAULT_CONFIG.clientSecret) .option("-n, --app-name ", "Azure Static Web App application name", DEFAULT_CONFIG.appName) - .option("-cc, --clear-credentials", "clear persisted credentials before login", DEFAULT_CONFIG.clearCredentials) + .option("-CC, --clear-credentials", "clear persisted credentials before login", DEFAULT_CONFIG.clearCredentials) .option("-u, --use-keychain", "enable using the operating system native keychain for persistent credentials", DEFAULT_CONFIG.useKeychain) // Note: Commander does not automatically recognize the --no-* option, so we have to explicitly use --no-use-keychain- instead diff --git a/src/core/utils/options.spec.ts b/src/core/utils/options.spec.ts index 9b3dce9e..22502e74 100644 --- a/src/core/utils/options.spec.ts +++ b/src/core/utils/options.spec.ts @@ -231,7 +231,7 @@ describe("Testing aliases for each of the commands and their options", () => { .option("-C, --client-id [clientId]") .option("-CS, --client-secret [clientSecret]") .option("-n, --app-name [appName]") - .option("-cc, --clear-credentials") + .option("-CC, --clear-credentials") .option("-u, --use-keychain") .option("-nu, --no-use-keychain") .parseAsync([ @@ -249,7 +249,7 @@ describe("Testing aliases for each of the commands and their options", () => { "clientSecret", "-n", "appName", - "-cc", + "-CC", "-nu", ]);