generated from salesforcecli/plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1247 from salesforcecli/sh/enhanced-gen-manifest
feat: support an include or exclude list of metadata when building a manifest from an org
- Loading branch information
Showing
9 changed files
with
181 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1282,8 +1282,9 @@ Create a project manifest that lists the metadata components you want to deploy | |
|
||
``` | ||
USAGE | ||
$ sf project generate manifest [--json] [--flags-dir <value>] [--api-version <value>] [-m <value>...] [-p <value>...] [-n | ||
<value> | -t pre|post|destroy|package] [-c managed|unlocked... --from-org <value>] [-d <value>] | ||
$ sf project generate manifest [--json] [--flags-dir <value>] [--api-version <value>] [-m <value>... | -p <value>...] [-n | ||
<value> | -t pre|post|destroy|package] [-c managed|unlocked... --from-org <value>] [--excluded-metadata <value>... ] | ||
[-d <value>] | ||
FLAGS | ||
-c, --include-packages=<option>... Package types (managed, unlocked) whose metadata is included in the manifest; by | ||
|
@@ -1297,6 +1298,8 @@ FLAGS | |
-t, --type=<option> Type of manifest to create; the type determines the name of the created file. | ||
<options: pre|post|destroy|package> | ||
--api-version=<value> Override the api version used for api requests made by this command | ||
--excluded-metadata=<value>... Metadata types to exclude when building a manifest from an org. Specify the name | ||
of the type, not the name of a specific component. | ||
--from-org=<value> Username or alias of the org that contains the metadata components from which to | ||
build a manifest. | ||
|
@@ -1329,6 +1332,14 @@ DESCRIPTION | |
multiple names separated by spaces. Enclose names that contain spaces in one set of double quotes. The same syntax | ||
applies to --include-packages and --source-dir. | ||
To build a manifest from the metadata in an org, use the --from-org flag. You can combine --from-org with the | ||
--metadata flag to include only certain metadata types, or with the --excluded-metadata flag to exclude certain | ||
metadata types. When building a manifest from an org, the command makes many concurrent API calls to discover the | ||
metadata that exists in the org. To limit the number of concurrent requests, use the SF_LIST_METADATA_BATCH_SIZE | ||
environment variable and set it to a size that works best for your org and environment. If you experience timeouts or | ||
inconsistent manifest contents, then setting this environment variable can improve accuracy. However, the command | ||
takes longer to run because it sends fewer requests at a time. | ||
ALIASES | ||
$ sf force source manifest create | ||
|
@@ -1349,6 +1360,14 @@ EXAMPLES | |
Create a manifest from the metadata components in the specified org and include metadata in any unlocked packages: | ||
$ sf project generate manifest --from-org [email protected] --include-packages unlocked | ||
Create a manifest from specific metadata types in an org: | ||
$ sf project generate manifest --from-org [email protected] --metadata ApexClass,CustomObject,CustomLabels | ||
Create a manifest from all metadata components in an org excluding specific metadata types: | ||
$ sf project generate manifest --from-org [email protected] --excluded-metadata StandardValueSet | ||
``` | ||
|
||
_See code: [src/commands/project/generate/manifest.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.16.6/src/commands/project/generate/manifest.ts)_ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,8 @@ Use --name to specify a custom name for the generated manifest if the pre-define | |
|
||
To include multiple metadata components, either set multiple --metadata <name> 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 --include-packages and --source-dir. | ||
|
||
To build a manifest from the metadata in an org, use the --from-org flag. You can combine --from-org with the --metadata flag to include only certain metadata types, or with the --excluded-metadata flag to exclude certain metadata types. When building a manifest from an org, the command makes many concurrent API calls to discover the metadata that exists in the org. To limit the number of concurrent requests, use the SF_LIST_METADATA_BATCH_SIZE environment variable and set it to a size that works best for your org and environment. If you experience timeouts or inconsistent manifest contents, then setting this environment variable can improve accuracy. However, the command takes longer to run because it sends fewer requests at a time. | ||
|
||
# examples | ||
|
||
- Create a manifest for deploying or retrieving all Apex classes and custom objects: | ||
|
@@ -37,10 +39,22 @@ To include multiple metadata components, either set multiple --metadata <name> f | |
|
||
$ <%= config.bin %> <%= command.id %> --from-org [email protected] --include-packages unlocked | ||
|
||
- Create a manifest from specific metadata types in an org: | ||
|
||
$ <%= config.bin %> <%= command.id %> --from-org [email protected] --metadata ApexClass,CustomObject,CustomLabels | ||
|
||
- Create a manifest from all metadata components in an org excluding specific metadata types: | ||
|
||
$ <%= config.bin %> <%= command.id %> --from-org [email protected] --excluded-metadata StandardValueSet | ||
|
||
# flags.include-packages.summary | ||
|
||
Package types (managed, unlocked) whose metadata is included in the manifest; by default, metadata in managed and unlocked packages is excluded. Metadata in unmanaged packages is always included. | ||
|
||
# flags.excluded-metadata.summary | ||
|
||
Metadata types to exclude when building a manifest from an org. Specify the name of the type, not the name of a specific component. | ||
|
||
# flags.from-org.summary | ||
|
||
Username or alias of the org that contains the metadata components from which to build a manifest. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.