From 461d9acdd41e17ed65865caa9abc2a7307af9f2b Mon Sep 17 00:00:00 2001 From: azlam Date: Sat, 16 Sep 2023 21:01:47 +1000 Subject: [PATCH] fix(commands): fix all commands to display sfp in examples --- .../src/commands/changelog/generate.ts | 2 +- .../sfpowerscripts-cli/src/commands/metrics/report.ts | 2 +- .../src/commands/orchestrator/deploy.ts | 2 +- .../src/commands/orchestrator/prepare.ts | 2 +- .../src/commands/orchestrator/promote.ts | 2 +- .../src/commands/orchestrator/publish.ts | 8 ++++---- .../src/commands/orchestrator/release.ts | 2 +- .../src/commands/orchestrator/validateAgainstOrg.ts | 2 +- .../src/commands/package/source/create.ts | 11 ++--------- .../src/commands/package/source/install.ts | 2 +- .../src/commands/package/unlocked/install.ts | 2 +- .../src/commands/pool/metrics/publish.ts | 2 +- .../src/commands/pool/org/delete.ts | 2 +- .../src/commands/profile/reconcile.ts | 6 +++--- .../src/commands/releasedefinition/generate.ts | 2 +- .../sfpowerscripts-cli/src/commands/repo/patch.ts | 2 +- 16 files changed, 22 insertions(+), 29 deletions(-) diff --git a/packages/sfpowerscripts-cli/src/commands/changelog/generate.ts b/packages/sfpowerscripts-cli/src/commands/changelog/generate.ts index acd2b4850..a65b56183 100644 --- a/packages/sfpowerscripts-cli/src/commands/changelog/generate.ts +++ b/packages/sfpowerscripts-cli/src/commands/changelog/generate.ts @@ -13,7 +13,7 @@ export default class GenerateChangelog extends SfpowerscriptsCommand { public static description = messages.getMessage('commandDescription'); public static examples = [ - `$ sfpowerscripts changelog:generate -n -d path/to/artifact/directory -w -r -b `, + `$ sfp changelog:generate -n -d path/to/artifact/directory -w -r -b `, ]; protected static requiresUsername = false; diff --git a/packages/sfpowerscripts-cli/src/commands/metrics/report.ts b/packages/sfpowerscripts-cli/src/commands/metrics/report.ts index a6e4e2266..bf596628b 100644 --- a/packages/sfpowerscripts-cli/src/commands/metrics/report.ts +++ b/packages/sfpowerscripts-cli/src/commands/metrics/report.ts @@ -18,7 +18,7 @@ export default class Report extends SfpowerscriptsCommand { protected static requiresDevhubUsername = false; protected static requiresProject = false; - public static examples = ['$ sfpowerscripts metrics:report -m -t -v ']; + public static examples = ['$ sfp metrics:report -m -t -v ']; public static flags = { metric: Flags.string({ diff --git a/packages/sfpowerscripts-cli/src/commands/orchestrator/deploy.ts b/packages/sfpowerscripts-cli/src/commands/orchestrator/deploy.ts index 32e22698f..968610594 100644 --- a/packages/sfpowerscripts-cli/src/commands/orchestrator/deploy.ts +++ b/packages/sfpowerscripts-cli/src/commands/orchestrator/deploy.ts @@ -25,7 +25,7 @@ const messages = Messages.loadMessages('@dxatscale/sfpowerscripts', 'deploy'); export default class Deploy extends SfpowerscriptsCommand { public static description = messages.getMessage('commandDescription'); - public static examples = [`$ sfpowerscripts orchestrator:deploy -u `]; + public static examples = [`$ sfp orchestrator:deploy -u `]; protected static requiresUsername = false; protected static requiresDevhubUsername = false; diff --git a/packages/sfpowerscripts-cli/src/commands/orchestrator/prepare.ts b/packages/sfpowerscripts-cli/src/commands/orchestrator/prepare.ts index a8fbb9c53..36910cd39 100644 --- a/packages/sfpowerscripts-cli/src/commands/orchestrator/prepare.ts +++ b/packages/sfpowerscripts-cli/src/commands/orchestrator/prepare.ts @@ -53,7 +53,7 @@ export default class Prepare extends SfpowerscriptsCommand { public static description = messages.getMessage('commandDescription'); - public static examples = [`$ sfpowerscripts orchestrator:prepare -f config/mypoolconfig.json -v `]; + public static examples = [`$ sfp orchestrator:prepare -f config/mypoolconfig.json -v `]; public async execute(): Promise { let executionStartTime = Date.now(); diff --git a/packages/sfpowerscripts-cli/src/commands/orchestrator/promote.ts b/packages/sfpowerscripts-cli/src/commands/orchestrator/promote.ts index 871ee449b..ea585d4c9 100644 --- a/packages/sfpowerscripts-cli/src/commands/orchestrator/promote.ts +++ b/packages/sfpowerscripts-cli/src/commands/orchestrator/promote.ts @@ -17,7 +17,7 @@ const messages = Messages.loadMessages('@dxatscale/sfpowerscripts', 'promote'); export default class Promote extends SfpowerscriptsCommand { public static description = messages.getMessage('commandDescription'); - public static examples = [`$ sfpowerscripts orchestrator:promote -d path/to/artifacts -v `]; + public static examples = [`$ sfp orchestrator:promote -d path/to/artifacts -v `]; protected static requiresDevhubUsername = true; diff --git a/packages/sfpowerscripts-cli/src/commands/orchestrator/publish.ts b/packages/sfpowerscripts-cli/src/commands/orchestrator/publish.ts index 8528e1815..71b255523 100644 --- a/packages/sfpowerscripts-cli/src/commands/orchestrator/publish.ts +++ b/packages/sfpowerscripts-cli/src/commands/orchestrator/publish.ts @@ -33,10 +33,10 @@ export default class Promote extends SfpowerscriptsCommand { public static description = messages.getMessage('commandDescription'); public static examples = [ - `$ sfpowerscripts orchestrator:publish -f path/to/script`, - `$ sfpowerscripts orchestrator:publish --npm`, - `$ sfpowerscripts orchestrator:publish -f path/to/script -p -v HubOrg`, - `$ sfpowerscripts orchestrator:publish -f path/to/script --gittag --pushgittag`, + `$ sfp orchestrator:publish -f path/to/script`, + `$ sfp orchestrator:publish --npm`, + `$ sfp orchestrator:publish -f path/to/script -p -v HubOrg`, + `$ sfp orchestrator:publish -f path/to/script --gittag --pushgittag`, ]; protected static requiresUsername = false; diff --git a/packages/sfpowerscripts-cli/src/commands/orchestrator/release.ts b/packages/sfpowerscripts-cli/src/commands/orchestrator/release.ts index 53e3d62c5..7112e54b0 100644 --- a/packages/sfpowerscripts-cli/src/commands/orchestrator/release.ts +++ b/packages/sfpowerscripts-cli/src/commands/orchestrator/release.ts @@ -25,7 +25,7 @@ export default class Release extends SfpowerscriptsCommand { public static description = messages.getMessage('commandDescription'); public static examples = [ - `sfpowerscripts orchestrator:release -p path/to/releasedefinition.yml -u myorg --npm --scope myscope --generatechangelog`, + `sfp orchestrator:release -p path/to/releasedefinition.yml -u myorg --npm --scope myscope --generatechangelog`, ]; protected static requiresUsername = false; diff --git a/packages/sfpowerscripts-cli/src/commands/orchestrator/validateAgainstOrg.ts b/packages/sfpowerscripts-cli/src/commands/orchestrator/validateAgainstOrg.ts index 48d19fe63..1c5a9d6c1 100644 --- a/packages/sfpowerscripts-cli/src/commands/orchestrator/validateAgainstOrg.ts +++ b/packages/sfpowerscripts-cli/src/commands/orchestrator/validateAgainstOrg.ts @@ -16,7 +16,7 @@ const messages = Messages.loadMessages('@dxatscale/sfpowerscripts', 'validateAga export default class ValidateAgainstOrg extends SfpowerscriptsCommand { public static description = messages.getMessage('commandDescription'); - public static examples = [`$ sfpowerscripts orchestrator:validateAgainstOrg -u `]; + public static examples = [`$ sfp orchestrator:validateAgainstOrg -u `]; public static flags = { targetorg: requiredUserNameFlag, diff --git a/packages/sfpowerscripts-cli/src/commands/package/source/create.ts b/packages/sfpowerscripts-cli/src/commands/package/source/create.ts index 37c3925da..c36fb405f 100644 --- a/packages/sfpowerscripts-cli/src/commands/package/source/create.ts +++ b/packages/sfpowerscripts-cli/src/commands/package/source/create.ts @@ -13,15 +13,8 @@ export default class CreateSourcePackage extends PackageCreateCommand { public static description = messages.getMessage('commandDescription'); public static examples = [ - `$ sfpowerscripts package:source:create -n mypackage -v `, - `$ sfpowerscripts package:source:create -n -v --diffcheck --gittag`, - `Output variable:`, - `sfpowerscripts_artifact_metadata_directory`, - `_sfpowerscripts_artifact_metadata_directory`, - `sfpowerscripts_artifact_directory`, - `_sfpowerscripts_artifact_directory`, - `sfpowerscripts_package_version_number`, - `_sfpowerscripts_package_version_number`, + `$ sfp package:source:create -n mypackage -v `, + `$ sfp package:source:create -n -v --diffcheck --gittag` ]; protected static requiresUsername = false; diff --git a/packages/sfpowerscripts-cli/src/commands/package/source/install.ts b/packages/sfpowerscripts-cli/src/commands/package/source/install.ts index d0ec5038b..94219d470 100644 --- a/packages/sfpowerscripts-cli/src/commands/package/source/install.ts +++ b/packages/sfpowerscripts-cli/src/commands/package/source/install.ts @@ -19,7 +19,7 @@ const messages = Messages.loadMessages('@dxatscale/sfpowerscripts', 'install_sou export default class InstallSourcePackage extends InstallPackageCommand { public static description = messages.getMessage('commandDescription'); - public static examples = [`$ sfpowerscripts package:source:install -n mypackage -u `]; + public static examples = [`$ sfp package:source:install -n mypackage -u `]; public static flags = { package: Flags.string({ diff --git a/packages/sfpowerscripts-cli/src/commands/package/unlocked/install.ts b/packages/sfpowerscripts-cli/src/commands/package/unlocked/install.ts index f9906f0ce..d7e6e5d88 100644 --- a/packages/sfpowerscripts-cli/src/commands/package/unlocked/install.ts +++ b/packages/sfpowerscripts-cli/src/commands/package/unlocked/install.ts @@ -18,7 +18,7 @@ const messages = Messages.loadMessages('@dxatscale/sfpowerscripts', 'install_unl export default class InstallUnlockedPackage extends InstallPackageCommand { public static description = messages.getMessage('commandDescription'); - public static examples = [`$ sfpowerscripts package:unlocked:install -n packagename -u sandboxalias -i`]; + public static examples = [`$ sfp package:unlocked:install -n packagename -u sandboxalias -i`]; public static flags = { package: Flags.string({ diff --git a/packages/sfpowerscripts-cli/src/commands/pool/metrics/publish.ts b/packages/sfpowerscripts-cli/src/commands/pool/metrics/publish.ts index 7b03b24ef..2466c76a7 100644 --- a/packages/sfpowerscripts-cli/src/commands/pool/metrics/publish.ts +++ b/packages/sfpowerscripts-cli/src/commands/pool/metrics/publish.ts @@ -21,7 +21,7 @@ export default class Publish extends SfpowerscriptsCommand { protected static requiresDevhubUsername = true; protected static requiresProject = false; - public static examples = ['$ sfpowerscripts pool:metrics:publish -v ']; + public static examples = ['$ sfp pool:metrics:publish -v ']; public static flags = { targetdevhubusername, diff --git a/packages/sfpowerscripts-cli/src/commands/pool/org/delete.ts b/packages/sfpowerscripts-cli/src/commands/pool/org/delete.ts index eef8cf9e6..7463c6908 100644 --- a/packages/sfpowerscripts-cli/src/commands/pool/org/delete.ts +++ b/packages/sfpowerscripts-cli/src/commands/pool/org/delete.ts @@ -17,7 +17,7 @@ export default class Delete extends SfpowerscriptsCommand { protected static requiresDevhubUsername = true; - public static examples = [`$ sfpowerscripts pool:org:delete -u test-xasdasd@example.com -v devhub`]; + public static examples = [`$ sfp pool:org:delete -u test-xasdasd@example.com -v devhub`]; public static flags = { 'apiversion': orgApiVersionFlagSfdxStyle, diff --git a/packages/sfpowerscripts-cli/src/commands/profile/reconcile.ts b/packages/sfpowerscripts-cli/src/commands/profile/reconcile.ts index 25f2afd9f..b9132fdd5 100644 --- a/packages/sfpowerscripts-cli/src/commands/profile/reconcile.ts +++ b/packages/sfpowerscripts-cli/src/commands/profile/reconcile.ts @@ -23,9 +23,9 @@ export default class Reconcile extends SfpowerscriptsCommand { public static description = messages.getMessage('commandDescription'); public static examples = [ - `$ sfpowerscripts profile:reconcile --folder force-app -d destfolder -s`, - `$ sfpowerscripts profile:reconcile --folder force-app,module2,module3 -u sandbox -d destfolder`, - `$ sfpowerscripts profile:reconcile -u myscratchorg -d destfolder`, + `$ sfp profile:reconcile --folder force-app -d destfolder -s`, + `$ sfp profile:reconcile --folder force-app,module2,module3 -u sandbox -d destfolder`, + `$ sfp profile:reconcile -u myscratchorg -d destfolder`, ]; diff --git a/packages/sfpowerscripts-cli/src/commands/releasedefinition/generate.ts b/packages/sfpowerscripts-cli/src/commands/releasedefinition/generate.ts index 0919b584d..fdd8c1fcb 100644 --- a/packages/sfpowerscripts-cli/src/commands/releasedefinition/generate.ts +++ b/packages/sfpowerscripts-cli/src/commands/releasedefinition/generate.ts @@ -12,7 +12,7 @@ export default class Generate extends SfpowerscriptsCommand { public static description = messages.getMessage('commandDescription'); public static examples = [ - `$ sfpowerscripts releasedefinition:generate -n `, + `$ sfp releasedefinition:generate -n `, ]; protected static requiresProject = true; diff --git a/packages/sfpowerscripts-cli/src/commands/repo/patch.ts b/packages/sfpowerscripts-cli/src/commands/repo/patch.ts index d56e65bf1..4eea2d5b4 100644 --- a/packages/sfpowerscripts-cli/src/commands/repo/patch.ts +++ b/packages/sfpowerscripts-cli/src/commands/repo/patch.ts @@ -26,7 +26,7 @@ const messages = Messages.loadMessages('@dxatscale/sfpowerscripts', 'patch'); export default class Patch extends SfpowerscriptsCommand { public static description = messages.getMessage('commandDescription'); - public static examples = [`$ sfpowerscripts repo:patch -n `]; + public static examples = [`$ sfp repo:patch -n `]; protected static requiresProject = true; protected static requiresDevhubUsername = false;