diff --git a/command-snapshot.json b/command-snapshot.json index 3f897963..7e29bd18 100644 --- a/command-snapshot.json +++ b/command-snapshot.json @@ -239,7 +239,7 @@ "flagChars": ["c", "d", "m", "n", "p", "t"], "flags": [ "api-version", - "exclude-metadata", + "excluded-metadata", "flags-dir", "from-org", "include-packages", diff --git a/messages/manifest.generate.md b/messages/manifest.generate.md index 5fcd969c..92285e5f 100644 --- a/messages/manifest.generate.md +++ b/messages/manifest.generate.md @@ -19,7 +19,7 @@ Use --name to specify a custom name for the generated manifest if the pre-define To include 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 --include-packages and --source-dir. -To build a manifest from the metadata in an org use the --from-org flag optionally combining it with the --metadata flag to only include certain metadata types, or the --exclude-metadata flag to exclude certain metadata types. When building a manifest from an org, the command makes many API calls concurrently 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 are experiencing timeouts and/or inconsistent manifest contents then setting this environment variable should improve accuracy. However, the command will take longer to run since it sends fewer requests at a time. +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 @@ -45,15 +45,15 @@ To build a manifest from the metadata in an org use the --from-org flag optional - Create a manifest from all metadata components in an org excluding specific metadata types: - $ <%= config.bin %> <%= command.id %> --from-org test@myorg.com --exclude-metadata StandardValueSet + $ <%= config.bin %> <%= command.id %> --from-org test@myorg.com --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.exclude-metadata.summary +# flags.excluded-metadata.summary -Metadata types (types only; not names) to exclude when building a manifest from an org. +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 diff --git a/src/commands/project/generate/manifest.ts b/src/commands/project/generate/manifest.ts index a38c9979..b800f430 100644 --- a/src/commands/project/generate/manifest.ts +++ b/src/commands/project/generate/manifest.ts @@ -85,10 +85,10 @@ export class ManifestGenerate extends SfCommand { char: 'c', dependsOn: ['from-org'], }), - 'exclude-metadata': Flags.string({ + 'excluded-metadata': Flags.string({ multiple: true, delimiter: ',', - summary: messages.getMessage('flags.exclude-metadata.summary'), + summary: messages.getMessage('flags.excluded-metadata.summary'), dependsOn: ['from-org'], exclusive: ['metadata'], }), @@ -128,11 +128,11 @@ export class ManifestGenerate extends SfCommand { apiversion: flags['api-version'] ?? (await getSourceApiVersion()), sourcepath: flags['source-dir'], metadata: - flags.metadata ?? flags['exclude-metadata'] + flags.metadata ?? flags['excluded-metadata'] ? { metadataEntries: flags.metadata ?? [], directoryPaths: await getPackageDirs(), - excludedEntries: flags['exclude-metadata'], + excludedEntries: flags['excluded-metadata'], } : undefined, org: flags['from-org']