diff --git a/messages/convert.mdapi.md b/messages/convert.mdapi.md index 3439a114..e4bd52f9 100644 --- a/messages/convert.mdapi.md +++ b/messages/convert.mdapi.md @@ -6,7 +6,7 @@ Convert metadata retrieved via Metadata API into the source format used in Sales To use Salesforce CLI to work with components that you retrieved via Metadata API, first convert your files from the metadata format to the source format using this command. -To convert files from the source format back to the metadata format, run "<%= config.bin %> project convert source". +To convert files from the source format back to the metadata format, run "sf project convert source". To convert multiple metadata components, either set multiple --metadata flags or a single --metadata flag with multiple names separated by spaces. Enclose names that contain spaces in one set of double quotes. The same syntax applies to --manifest and --source-dir. @@ -14,11 +14,11 @@ To convert multiple metadata components, either set multiple --metadata f - Convert metadata formatted files in the specified directory into source formatted files; writes converted files to your default package directory: - $ <%= config.bin %> <%= command.id %> --root-dir path/to/metadata + $ sf <%= command.id %> --root-dir path/to/metadata - Similar to previous example, but writes converted files to the specified output directory: - $ <%= config.bin %> <%= command.id %> --root-dir path/to/metadata --output-dir path/to/outputdir + $ sf <%= command.id %> --root-dir path/to/metadata --output-dir path/to/outputdir # flags.root-dir.summary diff --git a/messages/convert.source.md b/messages/convert.source.md index 9fc49455..943c93e0 100644 --- a/messages/convert.source.md +++ b/messages/convert.source.md @@ -4,9 +4,9 @@ Convert source-formatted files into metadata that you can deploy using Metadata # description -To convert source-formatted files into the metadata format, so that you can deploy them using Metadata API, run this command. Then deploy the metadata using "<%= config.bin %> project deploy". +To convert source-formatted files into the metadata format, so that you can deploy them using Metadata API, run this command. Then deploy the metadata using "sf project deploy". -To convert Metadata API–formatted files into the source format, run "<%= config.bin %> project convert mdapi". +To convert Metadata API–formatted files into the source format, run "sf project convert mdapi". To specify a package name that includes spaces, enclose the name in single quotes. @@ -16,11 +16,11 @@ To convert multiple components, either set multiple --metadata flags or a - Convert source-formatted files in the specified directory into metadata-formatted files; writes converted files into a new directory: - $ <%= config.bin %> <%= command.id %> --root-dir path/to/source + $ sf <%= command.id %> --root-dir path/to/source - Similar to previous example, but writes converted files to the specified output directory and associates the files with the specified package: - $ <%= config.bin %> <%= command.id %> --root-dir path/to/source --output-dir path/to/outputdir --package-name 'My Package' + $ sf <%= command.id %> --root-dir path/to/source --output-dir path/to/outputdir --package-name 'My Package' # flags.api-version.summary diff --git a/messages/delete.source.md b/messages/delete.source.md index 26808a45..6f5697c2 100644 --- a/messages/delete.source.md +++ b/messages/delete.source.md @@ -4,7 +4,7 @@ Delete source from your project and from a non-source-tracked org. # description -Use this command to delete components from orgs that don’t have source tracking. To remove deleted items from orgs that have source tracking enabled, "<%= config.bin %> project deploy start". +Use this command to delete components from orgs that don’t have source tracking. To remove deleted items from orgs that have source tracking enabled, "sf project deploy start". When you run this command, both the local source file and the metadata component in the org are deleted. @@ -14,19 +14,19 @@ To delete multiple metadata components, either set multiple --metadata fl - Delete all local Apex source files and all Apex classes from the org with alias "my-scratch": - <%= config.bin %> <%= command.id %> --metadata ApexClass --target-org my-scratch + sf <%= command.id %> --metadata ApexClass --target-org my-scratch - Delete a specific Apex class and a Profile that has a space in it from your default org; don't prompt for confirmation: - <%= config.bin %> <%= command.id %> --metadata ApexClass:MyFabulousApexClass --metadata "Profile: My Profile" --no-prompt + sf <%= command.id %> --metadata ApexClass:MyFabulousApexClass --metadata "Profile: My Profile" --no-prompt - Run the tests that aren’t in any managed packages as part of the deletion; if the delete succeeds, and the org has source-tracking enabled, update the source tracking information: - <%= config.bin %> <%= command.id %> --metadata ApexClass --test-level RunLocalTests --track-source + sf <%= command.id %> --metadata ApexClass --test-level RunLocalTests --track-source - Delete the Apex source files in a directory and the corresponding components from your default org: - <%= config.bin %> <%= command.id %> --source-dir force-app/main/default/classes + sf <%= command.id %> --source-dir force-app/main/default/classes # flags.source-dir.summary @@ -70,7 +70,7 @@ IMPORTANT: Where possible, we changed noninclusive terms to align with our compa Validates the deleted metadata and runs all Apex tests, but prevents the deletion from being saved to the org. -If you change a field type from Master-Detail to Lookup or vice versa, that change isn’t supported when using the --chec-konly parameter to test a deletion (validation). This kind of change isn’t supported for test deletions to avoid the risk of data loss or corruption. If a change that isn’t supported for test deletions is included in a deletion package, the test deletion fails and issues an error. +If you change a field type from Master-Detail to Lookup or vice versa, that change isn’t supported when using the --check-only parameter to test a deletion (validation). This kind of change isn’t supported for test deletions to avoid the risk of data loss or corruption. If a change that isn’t supported for test deletions is included in a deletion package, the test deletion fails and issues an error. If your deletion package changes a field type from Master-Detail to Lookup or vice versa, you can still validate the changes prior to deploying to Production by performing a full deletion to another test Sandbox. A full deletion includes a validation of the changes as part of the deletion process. diff --git a/messages/delete.tracking.md b/messages/delete.tracking.md index 127f2c9d..f16dda75 100644 --- a/messages/delete.tracking.md +++ b/messages/delete.tracking.md @@ -10,23 +10,23 @@ Resets local and remote source tracking so that Salesforce CLI no longer registe Use the --revision parameter to reset source tracking to a specific revision number of an org source member. To get the revision number, query the SourceMember Tooling API object with the 'data soql' command. For example: - <%= config.bin %> data query --query "SELECT MemberName, MemberType, RevisionCounter FROM SourceMember" --use-tooling-api --target-org my-scratch + sf data query --query "SELECT MemberName, MemberType, RevisionCounter FROM SourceMember" --use-tooling-api --target-org my-scratch # resetExample - Reset source tracking for the org with alias "my-scratch": - $ <%= config.bin %> <%= command.id %> --target-org my-scratch + $ sf <%= command.id %> --target-org my-scratch - Reset source tracking to revision number 30 for your default org: - $ <%= config.bin %> <%= command.id %> --revision 30 + $ sf <%= command.id %> --revision 30 # deleteExample - Delete local source tracking for the org with alias "my-scratch": - $ <%= config.bin %> <%= command.id %> --target-org my-scratch + $ sf <%= command.id %> --target-org my-scratch # deleteSummary diff --git a/messages/deploy.async.md b/messages/deploy.async.md index c5b2fda5..45fe94d4 100644 --- a/messages/deploy.async.md +++ b/messages/deploy.async.md @@ -8,12 +8,12 @@ Deploy has been queued for cancellation. # info.AsyncDeployCancel -Run "%s project deploy cancel --job-id %s" to cancel the deploy. +Run "sf project deploy cancel --job-id %s" to cancel the deploy. # info.AsyncDeployStatus -Run "%s project deploy report --job-id %s" to get the latest status. +Run "sf project deploy report --job-id %s" to get the latest status. # info.AsyncDeployResume -Run "%s project deploy resume --job-id %s" to resume watching the deploy. +Run "sf project deploy resume --job-id %s" to resume watching the deploy. diff --git a/messages/deploy.metadata.cancel.md b/messages/deploy.metadata.cancel.md index 5d697927..a47c09ba 100644 --- a/messages/deploy.metadata.cancel.md +++ b/messages/deploy.metadata.cancel.md @@ -12,11 +12,11 @@ Run this command by either passing it a job ID or specifying the --use-most-rece - Cancel a deploy operation using a job ID: - <%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2 + sf <%= command.id %> --job-id 0Af0x000017yLUFCA2 - Cancel the most recent deploy operation: - <%= config.bin %> <%= command.id %> --use-most-recent + sf <%= command.id %> --use-most-recent # flags.job-id.summary @@ -26,10 +26,10 @@ Job ID of the deploy operation you want to cancel. These commands return a job ID if they time out or you specified the --async flag: -- <%= config.bin %> project deploy start -- <%= config.bin %> project deploy validate -- <%= config.bin %> project deploy quick -- <%= config.bin %> project deploy cancel +- sf project deploy start +- sf project deploy validate +- sf project deploy quick +- sf project deploy cancel The job ID is valid for 10 days from when you started the deploy operation. @@ -47,7 +47,7 @@ Number of minutes to wait for the command to complete and display results. # flags.wait.description -If the command continues to run after the wait period, the CLI returns control of the terminal window to you. To resume watching the cancellation, run "<%= config.bin %> project deploy resume". To check the status of the cancellation, run "<%= config.bin %> project deploy report". +If the command continues to run after the wait period, the CLI returns control of the terminal window to you. To resume watching the cancellation, run "sf project deploy resume". To check the status of the cancellation, run "sf project deploy report". # flags.async.summary @@ -55,7 +55,7 @@ Run the command asynchronously. # flags.async.description -The command immediately returns the control of the terminal to you. This way, you can continue to use the CLI. To resume watching the cancellation, run "<%= config.bin %> project deploy resume". To check the status of the cancellation, run "<%= config.bin %> project deploy report". +The command immediately returns the control of the terminal to you. This way, you can continue to use the CLI. To resume watching the cancellation, run "sf project deploy resume". To check the status of the cancellation, run "sf project deploy report". # error.CannotCancelDeploy diff --git a/messages/deploy.metadata.md b/messages/deploy.metadata.md index 638801f9..2b41fec6 100644 --- a/messages/deploy.metadata.md +++ b/messages/deploy.metadata.md @@ -8,7 +8,7 @@ You must run this command from within a project. Metadata components are deployed in source format by default. Deploy them in metadata format by specifying the --metadata-dir flag, which specifies the root directory or ZIP file that contains the metadata formatted files you want to deploy. -If your org allows source tracking, then this command tracks the changes in your source. Some orgs, such as production orgs, never allow source tracking. Source tracking is enabled by default on scratch and sandbox orgs; you can disable source tracking when you create the orgs by specifying the --no-track-source flag on the "<%= config.bin %> org create scratch|sandbox" commands. +If your org allows source tracking, then this command tracks the changes in your source. Some orgs, such as production orgs, never allow source tracking. Source tracking is enabled by default on scratch and sandbox orgs; you can disable source tracking when you create the orgs by specifying the --no-track-source flag on the "sf org create scratch|sandbox" commands. To deploy multiple metadata components, either set multiple --metadata flags or a single --metadata flag with multiple names separated by spaces. Enclose names that contain spaces in one set of double quotes. The same syntax applies to --manifest and --source-dir. @@ -16,45 +16,45 @@ To deploy multiple metadata components, either set multiple --metadata fl - Deploy local changes not in the org; uses your default org: - <%= config.bin %> <%= command.id %> + sf <%= command.id %> - Deploy all source files in the "force-app" directory to an org with alias "my-scratch"; show only concise output, in other words don't print a list of all the source that was deployed: - <%= config.bin %> <%= command.id %> --source-dir force-app --target-org my-scratch --concise + sf <%= command.id %> --source-dir force-app --target-org my-scratch --concise - Deploy all the Apex classes and custom objects that are in the "force-app" directory. The list views, layouts, etc, that are associated with the custom objects are also deployed. Both examples are equivalent: - <%= config.bin %> <%= command.id %> --source-dir force-app/main/default/classes force-app/main/default/objects - <%= config.bin %> <%= command.id %> --source-dir force-app/main/default/classes --source-dir force-app/main/default/objects + sf <%= command.id %> --source-dir force-app/main/default/classes force-app/main/default/objects + sf <%= command.id %> --source-dir force-app/main/default/classes --source-dir force-app/main/default/objects - Deploy all Apex classes that are in all package directories defined in the "sfdx-project.json" file: - <%= config.bin %> <%= command.id %> --metadata ApexClass + sf <%= command.id %> --metadata ApexClass - Deploy a specific Apex class; ignore any conflicts between the local project and org (be careful with this flag, because it will overwrite the Apex class in the org if there are conflicts!): - <%= config.bin %> <%= command.id %> --metadata ApexClass:MyApexClass --ignore-conflicts + sf <%= command.id %> --metadata ApexClass:MyApexClass --ignore-conflicts - Deploy specific Apex classes that match a pattern; in this example, deploy Apex classes whose names contain the string "MyApex". Also ignore any deployment warnings (again, be careful with this flag! You typically want to see the warnings): - <%= config.bin %> <%= command.id %> --metadata 'ApexClass:MyApex*' --ignore-warnings + sf <%= command.id %> --metadata 'ApexClass:MyApex*' --ignore-warnings - Deploy all custom objects and Apex classes found in all defined package directories (both examples are equivalent): - <%= config.bin %> <%= command.id %> --metadata CustomObject ApexClass - <%= config.bin %> <%= command.id %> --metadata CustomObject --metadata ApexClass + sf <%= command.id %> --metadata CustomObject ApexClass + sf <%= command.id %> --metadata CustomObject --metadata ApexClass - Deploy all Apex classes and a profile that has a space in its name: - <%= config.bin %> <%= command.id %> --metadata ApexClass --metadata "Profile:My Profile" + sf <%= command.id %> --metadata ApexClass --metadata "Profile:My Profile" - Deploy all components listed in a manifest: - <%= config.bin %> <%= command.id %> --manifest path/to/package.xml + sf <%= command.id %> --manifest path/to/package.xml - Run the tests that aren’t in any managed packages as part of a deployment: - <%= config.bin %> <%= command.id %> --metadata ApexClass --test-level RunLocalTests + sf <%= command.id %> --metadata ApexClass --test-level RunLocalTests # flags.target-org.summary @@ -114,7 +114,7 @@ Number of minutes to wait for command to complete and display results. # flags.wait.description -If the command continues to run after the wait period, the CLI returns control of the terminal window to you and returns the job ID. To resume the deployment, run "<%= config.bin %> project deploy resume". To check the status of the deployment, run "<%= config.bin %> project deploy report". +If the command continues to run after the wait period, the CLI returns control of the terminal window to you and returns the job ID. To resume the deployment, run "sf project deploy resume". To check the status of the deployment, run "sf project deploy report". # flags.manifest.summary @@ -176,7 +176,7 @@ Run the command asynchronously. # flags.async.description -The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the CLI. To resume the deployment, run "<%= config.bin %> project deploy resume". To check the status of the deployment, run "<%= config.bin %> project deploy report". +The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the CLI. To resume the deployment, run "sf project deploy resume". To check the status of the deployment, run "sf project deploy report". # flags.metadata-dir.summary @@ -201,7 +201,7 @@ You must specify tests using the --tests flag if the --test-level flag is set to # error.ClientTimeout -The command has timed out, although the deployment is still running. Use "%s project deploy resume" to resume watching the deployment. +The command has timed out, although the deployment is still running. Use "sf project deploy resume" to resume watching the deployment. # error.Conflicts @@ -211,7 +211,7 @@ There are changes in the org that conflict with the local changes you're trying - To overwrite the remote changes, rerun this command with the --ignore-conflicts flag. -- To overwrite the local changes, run the "%s project retrieve start" command with the --ignore-conflicts flag. +- To overwrite the local changes, run the "sf project retrieve start" command with the --ignore-conflicts flag. # error.nothingToDeploy @@ -219,7 +219,7 @@ No local changes to deploy. # error.nothingToDeploy.Actions -- To see conflicts and ignored files, run "%s project deploy preview" with any of the manifest, directory, or metadata flags. +- To see conflicts and ignored files, run "sf project deploy preview" with any of the manifest, directory, or metadata flags. # error.InvalidDeployId diff --git a/messages/deploy.metadata.preview.md b/messages/deploy.metadata.preview.md index 5dfa3c49..9aa096ff 100644 --- a/messages/deploy.metadata.preview.md +++ b/messages/deploy.metadata.preview.md @@ -6,31 +6,31 @@ Preview a deployment to see what will deploy to the org, the potential conflicts You must run this command from within a project. -The command outputs a table that describes what will happen if you run the "<%= config.bin %> project deploy start" command. The table lists the metadata components that will be deployed and deleted. The table also lists the current conflicts between files in your local project and components in the org. Finally, the table lists the files that won't be deployed because they're included in your .forceignore file. +The command outputs a table that describes what will happen if you run the "sf project deploy start" command. The table lists the metadata components that will be deployed and deleted. The table also lists the current conflicts between files in your local project and components in the org. Finally, the table lists the files that won't be deployed because they're included in your .forceignore file. -If your org allows source tracking, then this command displays potential conflicts between the org and your local project. Some orgs, such as production org, never allow source tracking. Source tracking is enabled by default on scratch and sandbox orgs; you can disable source tracking when you create the orgs by specifying the --no-track-source flag on the "<%= config.bin %> org create scratch|sandbox" commands. +If your org allows source tracking, then this command displays potential conflicts between the org and your local project. Some orgs, such as production org, never allow source tracking. Source tracking is enabled by default on scratch and sandbox orgs; you can disable source tracking when you create the orgs by specifying the --no-track-source flag on the "sf org create scratch|sandbox" commands. To preview the deployment of multiple metadata components, either set multiple --metadata flags or a single --metadata flag with multiple names separated by spaces. Enclose names that contain spaces in one set of double quotes. The same syntax applies to --manifest and --source-dir. # examples -- NOTE: The commands to preview a deployment and actually deploy it use similar flags. We provide a few preview examples here, but see the help for "<%= config.bin %> project deploy start" for more examples that you can adapt for previewing. +- NOTE: The commands to preview a deployment and actually deploy it use similar flags. We provide a few preview examples here, but see the help for "sf project deploy start" for more examples that you can adapt for previewing. - Preview the deployment of source files in a directory, such as force-app, to your default org: - <%= config.bin %> <%= command.id %> --source-dir force-app + sf <%= command.id %> --source-dir force-app - Preview the deployment of all Apex classes to an org with alias "my-scratch": - <%= config.bin %> <%= command.id %> --metadata ApexClass --target-org my-scratch + sf <%= command.id %> --metadata ApexClass --target-org my-scratch - Preview deployment of a specific Apex class: - <%= config.bin %> <%= command.id %> --metadata ApexClass:MyApexClass + sf <%= command.id %> --metadata ApexClass:MyApexClass - Preview deployment of all components listed in a manifest: - <%= config.bin %> <%= command.id %> --manifest path/to/package.xml + sf <%= command.id %> --manifest path/to/package.xml # flags.target-org.summary @@ -94,4 +94,4 @@ There are changes in the org that conflict with the local changes you're trying - To overwrite the remote changes, rerun this command with the --ignore-conflicts flag. -- To overwrite the local changes, run the "%s project retrieve start" command with the --ignore-conflicts flag. +- To overwrite the local changes, run the "sf project retrieve start" command with the --ignore-conflicts flag. diff --git a/messages/deploy.metadata.quick.md b/messages/deploy.metadata.quick.md index c490e789..ea494115 100644 --- a/messages/deploy.metadata.quick.md +++ b/messages/deploy.metadata.quick.md @@ -4,23 +4,23 @@ Quickly deploy a validated deployment to an org. # description -Before you run this command, first create a validated deployment with the "<%= config.bin %> project deploy validate" command, which returns a job ID. Validated deployments haven't been deployed to the org yet; you deploy them with this command. Either pass the job ID to this command or use the --use-most-recent flag to use the job ID of the most recently validated deployment. For the quick deploy to succeed, the associated validated deployment must also have succeeded. +Before you run this command, first create a validated deployment with the "sf project deploy validate" command, which returns a job ID. Validated deployments haven't been deployed to the org yet; you deploy them with this command. Either pass the job ID to this command or use the --use-most-recent flag to use the job ID of the most recently validated deployment. For the quick deploy to succeed, the associated validated deployment must also have succeeded. Executing this quick deploy command takes less time than a standard deploy because it skips running Apex tests. These tests were previously run as part of the validation. Validating first and then running a quick deploy is useful if the deployment to your production org take several hours and you don’t want to risk a failed deploy. This command doesn't support source-tracking. The source you deploy overwrites the corresponding metadata in your org. This command doesn’t attempt to merge your source with the versions in your org. -Note: Don't use this command on sandboxes; the command is intended to be used on production orgs. By default, sandboxes don't run tests during a deploy. Use `sf project deploy start` instead. +Note: Don't use this command on sandboxes; the command is intended to be used on production orgs. By default, sandboxes don't run tests during a deploy. Use `sf project deploy start` instead. # examples - Run a quick deploy to your default org using a job ID: - <%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2 + sf <%= command.id %> --job-id 0Af0x000017yLUFCA2 - Asynchronously run a quick deploy of the most recently validated deployment to an org with alias "my-prod-org": - <%= config.bin %> <%= command.id %> --async --use-most-recent --target-org my-prod-org + sf <%= command.id %> --async --use-most-recent --target-org my-prod-org # flags.job-id.summary @@ -52,7 +52,7 @@ Number of minutes to wait for the command to complete and display results. # flags.wait.description -If the command continues to run after the wait period, the CLI returns control of the terminal window to you. To resume watching the deploy, run "<%= config.bin %> project deploy resume". To check the status of the deploy, run "<%= config.bin %> project deploy report". +If the command continues to run after the wait period, the CLI returns control of the terminal window to you. To resume watching the deploy, run "sf project deploy resume". To check the status of the deploy, run "sf project deploy report". # flags.verbose.summary @@ -68,7 +68,7 @@ Run the command asynchronously. # flags.async.description -The command immediately returns the control of the terminal to you. This way, you can continue to use the CLI. To resume watching the deploy, run "<%= config.bin %> project deploy resume". To check the status of the deploy, run "<%= config.bin %> project deploy report". +The command immediately returns the control of the terminal to you. This way, you can continue to use the CLI. To resume watching the deploy, run "sf project deploy resume". To check the status of the deploy, run "sf project deploy report". # flags.target-org.summary diff --git a/messages/deploy.metadata.report.md b/messages/deploy.metadata.report.md index 9833e0e0..bbd1c36d 100644 --- a/messages/deploy.metadata.report.md +++ b/messages/deploy.metadata.report.md @@ -16,15 +16,15 @@ This command doesn't update source tracking information. - Check the status using a job ID: - <%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2 + sf <%= command.id %> --job-id 0Af0x000017yLUFCA2 - Check the status of the most recent deploy operation: - <%= config.bin %> <%= command.id %> --use-most-recent + sf <%= command.id %> --use-most-recent - Poll for the status using a job ID and target org: - <%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2 --target-org me@my.org --wait 30 + sf <%= command.id %> --job-id 0Af0x000017yLUFCA2 --target-org me@my.org --wait 30 # flags.job-id.summary @@ -34,10 +34,10 @@ Job ID of the deploy operation you want to check the status of. These commands return a job ID if they time out or you specified the --async flag: -- <%= config.bin %> project deploy start -- <%= config.bin %> project deploy validate -- <%= config.bin %> project deploy quick -- <%= config.bin %> project deploy cancel +- sf project deploy start +- sf project deploy validate +- sf project deploy quick +- sf project deploy cancel The job ID is valid for 10 days from when you started the deploy operation. diff --git a/messages/deploy.metadata.resume.md b/messages/deploy.metadata.resume.md index 4b417fab..5531f977 100644 --- a/messages/deploy.metadata.resume.md +++ b/messages/deploy.metadata.resume.md @@ -12,11 +12,11 @@ Run this command by either passing it a job ID or specifying the --use-most-rece - Resume watching a deploy operation using a job ID: - <%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2 + sf <%= command.id %> --job-id 0Af0x000017yLUFCA2 - Resume watching the most recent deploy operation: - <%= config.bin %> <%= command.id %> --use-most-recent + sf <%= command.id %> --use-most-recent # flags.job-id.summary @@ -26,10 +26,10 @@ Job ID of the deploy operation you want to resume. These commands return a job ID if they time out or you specified the --async flag: -- <%= config.bin %> project deploy start -- <%= config.bin %> project deploy validate -- <%= config.bin %> project deploy quick -- <%= config.bin %> project deploy cancel +- sf project deploy start +- sf project deploy validate +- sf project deploy quick +- sf project deploy cancel The job ID is valid for 10 days from when you started the deploy operation. @@ -47,7 +47,7 @@ Number of minutes to wait for the command to complete and display results. # flags.wait.description -If the command continues to run after the wait period, the CLI returns control of the terminal window to you. To resume watching the deploy operation, run this command again. To check the status of the deploy operation, run "<%= config.bin %> project deploy report". +If the command continues to run after the wait period, the CLI returns control of the terminal window to you. To resume watching the deploy operation, run this command again. To check the status of the deploy operation, run "sf project deploy report". # flags.verbose.summary diff --git a/messages/deploy.metadata.validate.md b/messages/deploy.metadata.validate.md index 03560d79..8519e704 100644 --- a/messages/deploy.metadata.validate.md +++ b/messages/deploy.metadata.validate.md @@ -4,7 +4,7 @@ Validate a metadata deployment without actually executing it. # description -Use this command to verify whether a deployment will succeed without actually deploying the metadata to your org. This command is similar to "<%= config.bin %> project deploy start", except you're required to run Apex tests, and the command returns a job ID rather than executing the deployment. If the validation succeeds, then you pass this job ID to the "<%= config.bin %> project deploy quick" command to actually deploy the metadata. This quick deploy takes less time because it skips running Apex tests. The job ID is valid for 10 days from when you started the validation. Validating first is useful if the deployment to your production org take several hours and you don’t want to risk a failed deploy. +Use this command to verify whether a deployment will succeed without actually deploying the metadata to your org. This command is similar to "sf project deploy start", except you're required to run Apex tests, and the command returns a job ID rather than executing the deployment. If the validation succeeds, then you pass this job ID to the "sf project deploy quick" command to actually deploy the metadata. This quick deploy takes less time because it skips running Apex tests. The job ID is valid for 10 days from when you started the validation. Validating first is useful if the deployment to your production org take several hours and you don’t want to risk a failed deploy. You must run this command from within a project. @@ -12,27 +12,27 @@ This command doesn't support source-tracking. When you quick deploy with the res To validate the deployment of multiple metadata components, either set multiple --metadata flags or a single --metadata flag with multiple names separated by spaces. Enclose names that contain spaces in one set of double quotes. The same syntax applies to --manifest and --source-dir. -Note: Don't use this command on sandboxes; the command is intended to be used on production orgs. By default, sandboxes don't run tests during a deploy. If you want to validate a deployment with tests on a sandbox, use "sf project deploy start --dry-run --test-level RunLocalTests" instead. +Note: Don't use this command on sandboxes; the command is intended to be used on production orgs. By default, sandboxes don't run tests during a deploy. If you want to validate a deployment with tests on a sandbox, use "sf project deploy start --dry-run --test-level RunLocalTests" instead. # examples -- NOTE: These examples focus on validating large deployments. See the help for "<%= config.bin %> project deploy start" for examples of deploying smaller sets of metadata which you can also use to validate. +- NOTE: These examples focus on validating large deployments. See the help for "sf project deploy start" for examples of deploying smaller sets of metadata which you can also use to validate. - Validate the deployment of all source files in the "force-app" directory to the default org: - <%= config.bin %> <%= command.id %> --source-dir force-app + sf <%= command.id %> --source-dir force-app - Validate the deployment of all source files in two directories: "force-app" and "force-app-utils": - <%= config.bin %> <%= command.id %> --source-dir force-app --source-dir force-app-utils + sf <%= command.id %> --source-dir force-app --source-dir force-app-utils - Asynchronously validate the deployment and run all tests in the org with alias "my-prod-org"; command immediately returns the job ID: - <%= config.bin %> <%= command.id %> --source-dir force-app --async --test-level RunAllTestsInOrg --target-org my-prod-org + sf <%= command.id %> --source-dir force-app --async --test-level RunAllTestsInOrg --target-org my-prod-org - Validate the deployment of all components listed in a manifest: - <%= config.bin %> <%= command.id %> --manifest path/to/package.xml + sf <%= command.id %> --manifest path/to/package.xml # flags.target-org.summary @@ -76,7 +76,7 @@ Number of minutes to wait for the command to complete and display results. # flags.wait.description -If the command continues to run after the wait period, the CLI returns control of the terminal window to you and returns the job ID. To resume watching the validation, run "<%= config.bin %> project deploy resume". To check the status of the validation, run "<%= config.bin %> project deploy report". +If the command continues to run after the wait period, the CLI returns control of the terminal window to you and returns the job ID. To resume watching the validation, run "sf project deploy resume". To check the status of the validation, run "sf project deploy report". # flags.manifest.summary @@ -112,7 +112,7 @@ Run the command asynchronously. # flags.async.description -The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the CLI. To resume watching the validation, run "<%= config.bin %> project deploy resume". To check the status of the validation, run "<%= config.bin %> project deploy report". +The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the CLI. To resume watching the validation, run "sf project deploy resume". To check the status of the validation, run "sf project deploy report". # flags.metadata-dir.summary @@ -128,7 +128,7 @@ Successfully validated the deployment (%s). # info.suggestedQuickDeploy -Run "%s project deploy quick --job-id %s" to execute this deploy +Run "sf project deploy quick --job-id %s" to execute this deploy # error.FailedValidation diff --git a/messages/list.ignored.md b/messages/list.ignored.md index 932bd4cd..0034778c 100644 --- a/messages/list.ignored.md +++ b/messages/list.ignored.md @@ -10,15 +10,15 @@ When deploying or retrieving metadata between your local project and an org, you - List all the files in all package directories that are ignored: - <%= config.bin %> <%= command.id %> + sf <%= command.id %> - List all the files in a specific directory that are ignored: - <%= config.bin %> <%= command.id %> --source-dir force-app + sf <%= command.id %> --source-dir force-app - Check if a particular file is ignored: - <%= config.bin %> <%= command.id %> --source-dir package.xml + sf <%= command.id %> --source-dir package.xml # flags.source-dir.summary diff --git a/messages/manifest.generate.md b/messages/manifest.generate.md index 9a221d9a..c7c29121 100644 --- a/messages/manifest.generate.md +++ b/messages/manifest.generate.md @@ -23,19 +23,19 @@ To include multiple metadata components, either set multiple --metadata f - Create a manifest for deploying or retrieving all Apex classes and custom objects: - $ <%= config.bin %> <%= command.id %> --metadata ApexClass --metadata CustomObject + $ sf <%= command.id %> --metadata ApexClass --metadata CustomObject - Create a manifest for deleting the specified Apex class: - $ <%= config.bin %> <%= command.id %> --metadata ApexClass:MyApexClass --type destroy + $ sf <%= command.id %> --metadata ApexClass:MyApexClass --type destroy - Create a manifest for deploying or retrieving all the metadata components in the specified local directory; name the file myNewManifest.xml: - $ <%= config.bin %> <%= command.id %> --source-dir force-app --name myNewManifest + $ sf <%= command.id %> --source-dir force-app --name myNewManifest - Create a manifest from the metadata components in the specified org and include metadata in any unlocked packages: - $ <%= config.bin %> <%= command.id %> --from-org test@myorg.com --include-packages unlocked + $ sf <%= command.id %> --from-org test@myorg.com --include-packages unlocked # flags.include-packages.summary diff --git a/messages/retrieve.metadata.preview.md b/messages/retrieve.metadata.preview.md index d98d3087..9f00f02c 100644 --- a/messages/retrieve.metadata.preview.md +++ b/messages/retrieve.metadata.preview.md @@ -6,19 +6,19 @@ Preview a retrieval to see what will be retrieved from the org, the potential co You must run this command from within a project. -The command outputs a table that describes what will happen if you run the "<%= config.bin %> project retrieve start" command. The table lists the metadata components that will be retrieved and deleted. The table also lists the current conflicts between files in your local project and components in the org. Finally, the table lists the files that won't be retrieved because they're included in your .forceignore file. +The command outputs a table that describes what will happen if you run the "sf project retrieve start" command. The table lists the metadata components that will be retrieved and deleted. The table also lists the current conflicts between files in your local project and components in the org. Finally, the table lists the files that won't be retrieved because they're included in your .forceignore file. -If your org allows source tracking, then this command displays potential conflicts between the org and your local project. Some orgs, such as production org, never allow source tracking. Source tracking is enabled by default on scratch and sandbox orgs; you can disable source tracking when you create the orgs by specifying the --no-track-source flag on the "<%= config.bin %> org create scratch|sandbox" commands. +If your org allows source tracking, then this command displays potential conflicts between the org and your local project. Some orgs, such as production org, never allow source tracking. Source tracking is enabled by default on scratch and sandbox orgs; you can disable source tracking when you create the orgs by specifying the --no-track-source flag on the "sf org create scratch|sandbox" commands. # examples - Preview the retrieve of all changes from your default org: - <%= config.bin %> <%= command.id %> + sf <%= command.id %> - Preview the retrieve when ignoring any conflicts from an org with alias "my-scratch": - <%= config.bin %> <%= command.id %> --ignore-conflicts --target-org my-scratch + sf <%= command.id %> --ignore-conflicts --target-org my-scratch # flags.target-org.summary diff --git a/messages/retrieve.start.md b/messages/retrieve.start.md index 514a1538..9095bb03 100644 --- a/messages/retrieve.start.md +++ b/messages/retrieve.start.md @@ -8,7 +8,7 @@ You must run this command from within a project. Metadata components are retrieved in source format by default. Retrieve them in metadata format by specifying the --target-metadata-dir flag, which retrieves the components into a ZIP file in the specified directory. -If your org allows source tracking, then this command tracks the changes in your source. Some orgs, such as production orgs, never allow source tracking. Source tracking is enabled by default on scratch and sandbox orgs; you can disable source tracking when you create the orgs by specifying the --no-track-source flag on the "<%= config.bin %> org create scratch|sandbox" commands. +If your org allows source tracking, then this command tracks the changes in your source. Some orgs, such as production orgs, never allow source tracking. Source tracking is enabled by default on scratch and sandbox orgs; you can disable source tracking when you create the orgs by specifying the --no-track-source flag on the "sf org create scratch|sandbox" commands. To retrieve multiple metadata components, either use multiple --metadata flags or use a single --metadata flag with multiple names separated by spaces. Enclose names that contain spaces in one set of double quotes. The same syntax applies to --manifest and --source-dir. @@ -16,54 +16,54 @@ To retrieve multiple metadata components, either use multiple --metadata - Retrieve all remote changes from your default org: - <%= config.bin %> <%= command.id %> + sf <%= command.id %> - Retrieve the source files in the "force-app" directory from an org with alias "my-scratch": - <%= config.bin %> <%= command.id %> --source-dir force-app --target-org my-scratch + sf <%= command.id %> --source-dir force-app --target-org my-scratch - Retrieve all the Apex classes and custom objects whose source is in the "force-app" directory. The list views, layouts, etc, that are associated with the custom objects are also retrieved. Both examples are equivalent: - <%= config.bin %> <%= command.id %> --source-dir force-app/main/default/classes force-app/main/default/objects - <%= config.bin %> <%= command.id %> --source-dir force-app/main/default/classes --source-dir force-app/main/default/objects + sf <%= command.id %> --source-dir force-app/main/default/classes force-app/main/default/objects + sf <%= command.id %> --source-dir force-app/main/default/classes --source-dir force-app/main/default/objects - Retrieve all Apex classes that are in all package directories defined in the "sfdx-project.json" file: - <%= config.bin %> <%= command.id %> --metadata ApexClass + sf <%= command.id %> --metadata ApexClass - Retrieve a specific Apex class; ignore any conflicts between the local project and org (be careful with this flag, because it will overwrite the Apex class source files in your local project if there are conflicts!): - <%= config.bin %> <%= command.id %> --metadata ApexClass:MyApexClass --ignore-conflicts + sf <%= command.id %> --metadata ApexClass:MyApexClass --ignore-conflicts - Retrieve specific Apex classes that match a pattern; in this example, retrieve Apex classes whose names contain the string "MyApex": - <%= config.bin %> <%= command.id %> --metadata 'ApexClass:MyApex*' + sf <%= command.id %> --metadata 'ApexClass:MyApex*' - Retrieve all custom objects and Apex classes found in all defined package directories (both examples are equivalent): - <%= config.bin %> <%= command.id %> --metadata CustomObject ApexClass - <%= config.bin %> <%= command.id %> --metadata CustomObject --metadata ApexClass + sf <%= command.id %> --metadata CustomObject ApexClass + sf <%= command.id %> --metadata CustomObject --metadata ApexClass - Retrieve all metadata components listed in a manifest: - <%= config.bin %> <%= command.id %> --manifest path/to/package.xml + sf <%= command.id %> --manifest path/to/package.xml - Retrieve metadata from a package: - <%= config.bin %> <%= command.id %> --package-name MyPackageName + sf <%= command.id %> --package-name MyPackageName - Retrieve metadata from multiple packages, one of which has a space in its name (both examples are equivalent): - <%= config.bin %> <%= command.id %> --package-name Package1 "PackageName With Spaces" Package3 - <%= config.bin %> <%= command.id %> --package-name Package1 --package-name "PackageName With Spaces" --package-name Package3 + sf <%= command.id %> --package-name Package1 "PackageName With Spaces" Package3 + sf <%= command.id %> --package-name Package1 --package-name "PackageName With Spaces" --package-name Package3 - Retrieve the metadata components listed in the force-app directory, but retrieve them in metadata format into a ZIP file in the "output" directory: - <%= config.bin %> <%= command.id %> --source-dir force-app --target-metadata-dir output + sf <%= command.id %> --source-dir force-app --target-metadata-dir output - Retrieve in metadata format and automatically extract the contents into the "output" directory: - <%= config.bin %> <%= command.id %> --source-dir force-app --target-metadata-dir output --unzip + sf <%= command.id %> --source-dir force-app --target-metadata-dir output --unzip # flags.api-version.summary @@ -161,7 +161,7 @@ There are changes in your local files that conflict with the org changes you're - To overwrite the local changes, rerun this command with the --ignore-conflicts flag. -- To overwrite the remote changes, run the "%s project deploy start" command with the --ignore-conflicts flag. +- To overwrite the remote changes, run the "sf project deploy start" command with the --ignore-conflicts flag. # info.WroteZipFile diff --git a/src/commands/project/deploy/cancel.ts b/src/commands/project/deploy/cancel.ts index 6c56eac8..5aaf828d 100644 --- a/src/commands/project/deploy/cancel.ts +++ b/src/commands/project/deploy/cancel.ts @@ -86,7 +86,7 @@ export default class DeployMetadataCancel extends SfCommand { if (flags.async) { const asyncResult = await cancelDeployAsync({ 'target-org': deployOpts['target-org'] }, jobId); - const formatter = new AsyncDeployCancelResultFormatter(asyncResult.id, this.config.bin); + const formatter = new AsyncDeployCancelResultFormatter(asyncResult.id); if (!this.jsonEnabled()) formatter.display(); return formatter.getJson(); } else { diff --git a/src/commands/project/deploy/quick.ts b/src/commands/project/deploy/quick.ts index 9656f61f..b07202f8 100644 --- a/src/commands/project/deploy/quick.ts +++ b/src/commands/project/deploy/quick.ts @@ -97,7 +97,7 @@ export default class DeployMetadataQuick extends SfCommand { this.log(`Deploy ID: ${chalk.bold(deployId)}`); if (flags.async) { - const asyncFormatter = new AsyncDeployResultFormatter(deployId, this.config.bin); + const asyncFormatter = new AsyncDeployResultFormatter(deployId); if (!this.jsonEnabled()) asyncFormatter.display(); return asyncFormatter.getJson(); } diff --git a/src/commands/project/deploy/resume.ts b/src/commands/project/deploy/resume.ts index d8557af1..9c78e8f3 100644 --- a/src/commands/project/deploy/resume.ts +++ b/src/commands/project/deploy/resume.ts @@ -120,7 +120,6 @@ export default class DeployMetadataResume extends SfCommand { // in deploy~L140, it checks the if the id is present, so this metadata-dir value is never _really_ used 'metadata-dir': deployOpts.isMdapi ? { type: 'file', path: 'testing' } : undefined, }, - this.config.bin, this.project, jobId ); diff --git a/src/commands/project/deploy/start.ts b/src/commands/project/deploy/start.ts index c6297396..7e7a570e 100644 --- a/src/commands/project/deploy/start.ts +++ b/src/commands/project/deploy/start.ts @@ -222,7 +222,6 @@ export default class DeployMetadata extends SfCommand { 'target-org': username, api, }, - this.config.bin, project ); @@ -240,7 +239,7 @@ export default class DeployMetadata extends SfCommand { if (flags['coverage-formatters']) { this.warn(messages.getMessage('asyncCoverageJunitWarning')); } - const asyncFormatter = new AsyncDeployResultFormatter(deploy.id, this.config.bin); + const asyncFormatter = new AsyncDeployResultFormatter(deploy.id); if (!this.jsonEnabled()) asyncFormatter.display(); return asyncFormatter.getJson(); } @@ -269,12 +268,12 @@ export default class DeployMetadata extends SfCommand { return super.catch({ ...error, message: messages.getMessage('error.Conflicts'), - actions: messages.getMessages('error.Conflicts.Actions', [this.config.bin]), + actions: messages.getMessages('error.Conflicts.Actions'), }); } } if (error.message.includes('client has timed out')) { - const err = messages.createError('error.ClientTimeout', [this.config.bin]); + const err = messages.createError('error.ClientTimeout'); return super.catch({ ...error, name: err.name, diff --git a/src/commands/project/deploy/validate.ts b/src/commands/project/deploy/validate.ts index 96b3190f..41b67ac5 100644 --- a/src/commands/project/deploy/validate.ts +++ b/src/commands/project/deploy/validate.ts @@ -190,7 +190,6 @@ export default class DeployMetadataValidate extends SfCommand 'target-org': username, api, }, - this.config.bin, this.project, undefined, true @@ -202,7 +201,7 @@ export default class DeployMetadataValidate extends SfCommand this.log(`Deploy ID: ${chalk.bold(deploy.id)}`); if (flags.async) { - const asyncFormatter = new AsyncDeployResultFormatter(deploy.id, this.config.bin); + const asyncFormatter = new AsyncDeployResultFormatter(deploy.id); if (!this.jsonEnabled()) asyncFormatter.display(); return asyncFormatter.getJson(); } @@ -222,7 +221,7 @@ export default class DeployMetadataValidate extends SfCommand if (result.response.status === RequestStatus.Succeeded) { this.log(); this.logSuccess(messages.getMessage('info.SuccessfulValidation', [deploy.id])); - this.log(messages.getMessage('info.suggestedQuickDeploy', [this.config.bin, deploy.id])); + this.log(messages.getMessage('info.suggestedQuickDeploy', [deploy.id])); } else { let componentDeployErrors = result.response.errorMessage; if (!result.response.errorMessage) { diff --git a/src/commands/project/retrieve/start.ts b/src/commands/project/retrieve/start.ts index f056d309..3a453445 100644 --- a/src/commands/project/retrieve/start.ts +++ b/src/commands/project/retrieve/start.ts @@ -272,7 +272,7 @@ export default class RetrieveMetadata extends SfCommand { return super.catch({ ...error, message: messages.getMessage('error.Conflicts'), - actions: messages.getMessages('error.Conflicts.Actions', [this.config.bin]), + actions: messages.getMessages('error.Conflicts.Actions'), }); } diff --git a/src/formatters/asyncDeployCancelResultFormatter.ts b/src/formatters/asyncDeployCancelResultFormatter.ts index acaad39f..21c63619 100644 --- a/src/formatters/asyncDeployCancelResultFormatter.ts +++ b/src/formatters/asyncDeployCancelResultFormatter.ts @@ -10,7 +10,7 @@ import { Messages } from '@salesforce/core'; import { AsyncDeployResultJson, DeployResultJson, Formatter } from '../utils/types.js'; export class AsyncDeployCancelResultFormatter implements Formatter { - public constructor(private id: string, private bin: string) {} + public constructor(private id: string) {} // eslint-disable-next-line @typescript-eslint/require-await public async getJson(): Promise { @@ -22,7 +22,7 @@ export class AsyncDeployCancelResultFormatter implements Formatter { - public constructor(private id: string, private bin: string) {} + public constructor(private id: string) {} // eslint-disable-next-line @typescript-eslint/require-await public async getJson(): Promise { @@ -23,8 +23,8 @@ export class AsyncDeployResultFormatter implements Formatter, stl?: Sour export async function executeDeploy( opts: Partial, - bin?: string, project?: SfProject, id?: string, throwOnEmpty?: true ): Promise<{ deploy: MetadataApiDeploy; componentSet?: ComponentSet }>; export async function executeDeploy( opts: Partial, - bin = 'sf', project?: SfProject, id?: string, throwOnEmpty = false @@ -162,7 +160,7 @@ export async function executeDeploy( throw new SfError( deployMessages.getMessage('error.nothingToDeploy'), 'NothingToDeploy', - deployMessages.getMessages('error.nothingToDeploy.Actions', [bin]) + deployMessages.getMessages('error.nothingToDeploy.Actions') ); } else { // this is a push-like "deploy changes" but there aren't any.