diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b3310ad..62030ca8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.5.5](https://github.com/salesforcecli/plugin-deploy-retrieve/compare/v1.5.4...v1.5.5) (2022-08-23) + ### [1.5.4](https://github.com/salesforcecli/plugin-deploy-retrieve/compare/v1.5.3...v1.5.4) (2022-08-15) ### Bug Fixes diff --git a/README.md b/README.md index a9126643..f002cb39 100644 --- a/README.md +++ b/README.md @@ -67,11 +67,13 @@ sf plugins - [`sf deploy`](#sf-deploy) - [`sf deploy metadata`](#sf-deploy-metadata) - [`sf deploy metadata cancel`](#sf-deploy-metadata-cancel) +- [`sf deploy metadata preview`](#sf-deploy-metadata-preview) - [`sf deploy metadata quick`](#sf-deploy-metadata-quick) - [`sf deploy metadata report`](#sf-deploy-metadata-report) - [`sf deploy metadata resume`](#sf-deploy-metadata-resume) - [`sf deploy metadata validate`](#sf-deploy-metadata-validate) - [`sf retrieve metadata`](#sf-retrieve-metadata) +- [`sf retrieve metadata preview`](#sf-retrieve-metadata-preview) ## `sf deploy` @@ -115,7 +117,7 @@ EXAMPLES $ sf deploy --interactive ``` -_See code: [src/commands/deploy.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/v1.5.3/src/commands/deploy.ts)_ +_See code: [src/commands/deploy.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/v1.5.4/src/commands/deploy.ts)_ ## `sf deploy metadata` @@ -138,8 +140,7 @@ FLAGS -o, --target-org= Login username or alias for the target org. -r, --ignore-errors Ignore any errors and don’t roll back deployment. -t, --tests=... Apex tests to run when --test-level is RunSpecifiedTests. - -w, --wait= [default: 33 minutes] Number of minutes to wait for command to complete and display - results. + -w, --wait= Number of minutes to wait for command to complete and display results. -x, --manifest= Full file path for manifest (package.xml) of components to deploy. --async Run the command asynchronously. --concise Show concise output of the deploy result. @@ -207,8 +208,8 @@ EXAMPLES FLAG DESCRIPTIONS -a, --api-version= Target API version for the deploy. - Use this flag to override the default API version, which is the latest version supported the CLI, with the API - version of your package.xml file. + Use this flag to override the default API version with the API version of your package.xml file. The default API + version is the latest version supported by the CLI. -c, --ignore-conflicts Ignore conflicts and deploy local files, even if they overwrite changes in the org. @@ -346,6 +347,83 @@ FLAG DESCRIPTIONS deploy metadata report". ``` +## `sf deploy metadata preview` + +Preview a deployment to see what will deploy to the org, the potential conflicts, and the ignored files. + +``` +USAGE + $ sf deploy metadata preview [--json] [-c] [-x | -d | -m ] [-o ] + +FLAGS + -c, --ignore-conflicts Ignore conflicts and deploy local files, even if they overwrite changes in the org. + -d, --source-dir=... Path to the local source files to preview. + -m, --metadata=... Metadata component names to preview. + -o, --target-org= Login username or alias for the target org. + -x, --manifest= Full file path for manifest (package.xml) of components to preview. + +GLOBAL FLAGS + --json Format output as json. + +DESCRIPTION + Preview a deployment to see what will deploy to the org, the potential conflicts, and the ignored files. + + You must run this command from within a project. + + The command outputs a table that describes what will happen if you run the "sf deploy metadata" 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 considers conflicts between the org and local. Some orgs, such + as production orgs, never allow source tracking. Use the "--no-track-source" flag when you create a scratch or sandbox + org to disable source tracking. + + 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 "sf deploy metadata" for more examples that you can adapt for previewing. + + Preview the deployment of source files in a directory, such as force-app: + + $ sf deploy metadata preview --source-dir force-app + + Preview the deployment of all Apex classes: + + $ sf deploy metadata preview --metadata ApexClass + + Preview deployment of a specific Apex class: + + $ sf deploy metadata preview --metadata ApexClass:MyApexClass + + Preview deployment of all components listed in a manifest: + + $ sf deploy metadata preview --manifest path/to/package.xml + +FLAG DESCRIPTIONS + -c, --ignore-conflicts Ignore conflicts and deploy local files, even if they overwrite changes in the org. + + This flag applies only to orgs that allow source tracking. It has no effect on orgs that don't allow it, such as + production orgs. + + -d, --source-dir=... Path to the local source files to preview. + + The supplied path can be to a single file (in which case the operation is applied to only one file) or to a folder + (in which case the operation is applied to all metadata types in the directory and its subdirectories). + + If you specify this flag, don’t specify --metadata or --manifest. + + -o, --target-org= Login username or alias for the target org. + + Overrides your default org. + + -x, --manifest= Full file path for manifest (package.xml) of components to preview. + + All child components are included. If you specify this flag, don’t specify --metadata or --source-dir. +``` + ## `sf deploy metadata quick` Quickly deploy a validated deployment to an org. @@ -358,8 +436,7 @@ FLAGS -i, --job-id= Job ID of the deployment you want to quick deploy. -o, --target-org= Login username or alias for the target org. -r, --use-most-recent Use the job ID of the most recently validated deployment. - -w, --wait= [default: 33 minutes] Number of minutes to wait for the command to complete and display - results. + -w, --wait= Number of minutes to wait for the command to complete and display results. --async Run the command asynchronously. --concise Show concise output of the deploy result. --verbose Show verbose output of the deploy result. @@ -548,8 +625,7 @@ FLAGS -m, --metadata=... Metadata component names to validate for deployment. -o, --target-org= Login username or alias for the target org. -t, --tests=... Apex tests to run when --test-level is RunSpecifiedTests. - -w, --wait= [default: 33 minutes] Number of minutes to wait for the command to complete and display - results. + -w, --wait= Number of minutes to wait for the command to complete and display results. -x, --manifest= Full file path for manifest (package.xml) of components to validate for deployment. --async Run the command asynchronously. --concise Show concise output of the validation result. @@ -600,8 +676,8 @@ EXAMPLES FLAG DESCRIPTIONS -a, --api-version= Target API version for the validation. - Use this flag to override the default API version, which is the latest version supported the CLI, with the API - version in your package.xml file. + Use this flag to override the default API version with the API version of your package.xml file. The default API + version is the latest version supported by the CLI. -d, --source-dir=... Path to the local source files to validate for deployment. @@ -667,8 +743,8 @@ FLAGS -m, --metadata=... Metadata component names to retrieve. -n, --package-name=... Package names to retrieve. -o, --target-org= Login username or alias for the target org. - -w, --wait= [default: 33 minutes] Number of minutes to wait for the command to complete and display - results to the terminal window. + -w, --wait= Number of minutes to wait for the command to complete and display results to the + terminal window. -x, --manifest= File path for the manifest (package.xml) that specifies the components to retrieve. GLOBAL FLAGS @@ -758,4 +834,56 @@ FLAG DESCRIPTIONS If you specify this parameter, don’t specify --metadata or --source-dir. ``` +## `sf retrieve metadata preview` + +Preview a retrieval to see what will be retrieved from the org, the potential conflicts, and the ignored files. + +``` +USAGE + $ sf retrieve metadata preview [--json] [-c] [-o ] + +FLAGS + -c, --ignore-conflicts Ignore conflicts and preview the retrieve of remote components, even if they will overwrite + local changes. + -o, --target-org= Login username or alias for the target org. + +GLOBAL FLAGS + --json Format output as json. + +DESCRIPTION + Preview a retrieval to see what will be retrieved from the org, the potential conflicts, and the ignored files. + + You must run this command from within a project. + + The command outputs a table that describes what will happen if you run the "sf retrieve metadata" 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 considers conflicts between the org and local. Some orgs, such + as production orgs, never allow source tracking. Use the "--no-track-source" flag when you create a scratch or sandbox + org to disable source tracking. + +EXAMPLES + Preview the retrieve of all changes from the org: + + $ sf retrieve metadata preview + + Preview the retrieve when ignoring any conflicts: + + $ sf retrieve metadata preview --ignore-conflicts + +FLAG DESCRIPTIONS + -c, --ignore-conflicts + + Ignore conflicts and preview the retrieve of remote components, even if they will overwrite local changes. + + This flag applies only to orgs that allow source tracking. It has no effect on orgs that don't allow it, such as + production orgs. + + -o, --target-org= Login username or alias for the target org. + + Overrides your default org. +``` + diff --git a/package.json b/package.json index deb49f05..7112b0d8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@salesforce/plugin-deploy-retrieve", "description": "deploy and retrieve commands for sf", - "version": "1.5.4", + "version": "1.5.5", "author": "Salesforce", "bugs": "https://github.com/forcedotcom/cli/issues", "dependencies": { diff --git a/yarn.lock b/yarn.lock index 770a4ceb..c390f131 100644 --- a/yarn.lock +++ b/yarn.lock @@ -924,7 +924,7 @@ is-wsl "^2.1.1" tslib "^2.3.1" -"@oclif/core@1.15.0", "@oclif/core@^1.0.8", "@oclif/core@^1.15.0", "@oclif/core@^1.2.1", "@oclif/core@^1.3.4", "@oclif/core@^1.3.6", "@oclif/core@^1.6.0", "@oclif/core@^1.6.3", "@oclif/core@^1.6.4", "@oclif/core@^1.7.0", "@oclif/core@^1.9.5", "@oclif/core@^1.9.9": +"@oclif/core@^1.0.8", "@oclif/core@^1.15.0", "@oclif/core@^1.2.1", "@oclif/core@^1.3.4", "@oclif/core@^1.3.6", "@oclif/core@^1.6.0", "@oclif/core@^1.6.3", "@oclif/core@^1.6.4", "@oclif/core@^1.7.0", "@oclif/core@^1.9.5", "@oclif/core@^1.9.9": version "1.15.0" resolved "https://registry.yarnpkg.com/@oclif/core/-/core-1.15.0.tgz#af015520456568a362a3592656b845d973494ffe" integrity sha512-H+l0SybcYJiVPRXTu88TsEXNQZV9ZZ6k/xtiHbgE6LItPk77/st9HH4uI/IKK1nMOJS8KkxNmkLKyrcuiL7Bjw==