Skip to content

Commit 54d22b3

Browse files
authored
Merge pull request #612 from salesforcecli/jshackell/messages
fix: edit messages for sf-ized list metadata commands
2 parents 5e123e1 + 0beb428 commit 54d22b3

File tree

5 files changed

+54
-88
lines changed

5 files changed

+54
-88
lines changed

messages/list.metadata.md

Lines changed: 21 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,47 @@
11
# description
22

3-
This command is useful when you want to identify individual components in your manifest file or if you want a high-level
4-
view of particular components in your organization. For example, you could use this target to return a list of names of
5-
all Layout components in your org, then use this information in a retrieve operation that returns a subset of these
6-
components.
3+
Use this command to identify individual components in your manifest file or if you want a high-level view of particular metadata types in your org. For example, you can use this command to return a list of names of all the CustomObject or Layout components in your org, then use this information in a retrieve command that returns a subset of these components.
4+
5+
The username that you use to connect to the org must have the Modify All Data or Modify Metadata Through Metadata API Functions permission.
76

87
# summary
98

10-
display properties of metadata components of a specified type
9+
List the metadata components and properties of a specified type.
1110

1211
# examples
1312

14-
- $ <%= config.bin %> <%= command.id %> -m CustomObject
15-
16-
- $ <%= config.bin %> <%= command.id %> -m CustomObject -a 43.0
17-
18-
- $ <%= config.bin %> <%= command.id %> -m CustomObject -o [email protected]
19-
20-
- $ <%= config.bin %> <%= command.id %> -m CustomObject -f /path/to/outputfilename.txt
21-
22-
- $ <%= config.bin %> <%= command.id %> -m Dashboard --folder foldername
23-
24-
- $ <%= config.bin %> <%= command.id %> -m Dashboard --folder foldername -a 43.0
25-
26-
- $ <%= config.bin %> <%= command.id %> -m Dashboard --folder foldername -o [email protected]
27-
28-
- $ <%= config.bin %> <%= command.id %> -m Dashboard --folder foldername -f /path/to/outputfilename.txt
29-
30-
- $ <%= config.bin %> <%= command.id %> -m CustomObject -o [email protected] -f /path/to/outputfilename.txt
31-
32-
# flags.api-version
13+
- List the CustomObject components, and their properties, in the org with alias "my-dev-org":
3314

34-
API version to use
15+
$ <%= config.bin %> <%= command.id %> --metadata-type CustomObject --target-org my-dev-org
3516

36-
# flags.output-file
17+
- List the CustomObject components in your default org, write the output to the specified file, and use API version 57.0:
3718

38-
path to the file where results are stored
19+
$ <%= config.bin %> <%= command.id %> --metadata-type CustomObject --api-version 57.0 --output-file /path/to/outputfilename.txt
3920

40-
# flags.metadatatype
21+
- List the Dashboard components in your default org that are contained in the "folderSales" folder, write the output to the specified file, and use API version 57.0:
4122

42-
metadata type to be retrieved, such as CustomObject; metadata type value is case-sensitive
23+
$ <%= config.bin %> <%= command.id %> --metadata-type Dashboard --folder folderSales --api-version 57.0 --output-file /path/to/outputfilename.txt
4324

44-
# flags.folder
25+
# flags.api-version.summary
4526

46-
folder associated with the component; required for components that use folders; folder names are case-sensitive
27+
API version to use; default is the most recent API version.
4728

48-
# flagsLong.apiversion
29+
# flags.output-file.summary
4930

50-
The API version to use. The default is the latest API version
31+
Pathname of the file in which to write the results.
5132

52-
# flagsLong.output-file
33+
# flags.metadata-type.summary
5334

54-
The path to the file where the results of the command are stored. The default output destination is the console.
35+
Metadata type to be retrieved, such as CustomObject; metadata type names are case-sensitive.
5536

56-
# flagsLong.metadatatype
37+
# flags.folder.summary
5738

58-
The metadata type to be retrieved, such as CustomObject or Report. The metadata type value is case-sensitive.
39+
Folder associated with the component; required for components that use folders; folder names are case-sensitive.
5940

60-
# flagsLong.folder
41+
# flags.folder.description
6142

62-
The folder associated with the component. This parameter is required for components that use folders, such as Dashboard,
63-
Document, EmailTemplate, or Report. The folder name value is case-sensitive.
43+
Examples of metadata types that use folders are Dashboard, Document, EmailTemplate, and Report.
6444

6545
# noMatchingMetadata
6646

67-
No metadata found for type: %s in org: %s
47+
No metadata found for type: %s in org: %s.

messages/metadata-types.md

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,37 @@
11
# description
22

3-
Use this information to identify the syntax needed for a <name> element in package.xml. The most recent API version is
4-
the default, or you can specify an older version.
3+
The information includes Apex classes and triggers, custom objects, custom fields on standard objects, tab sets that define an app, and many other metadata types. Use this information to identify the syntax needed for a <name> element in a manifest file (package.xml).
54

6-
The default target username is the admin user for the default scratch org. The username must have the Modify All Data
7-
permission or the Modify Metadata permission (Beta). For more information about permissions, see Salesforce Help.
5+
The username that you use to connect to the org must have the Modify All Data or Modify Metadata Through Metadata API Functions permission.
86

97
# summary
108

11-
display details about the metadata types enabled for your org
9+
Display details about the metadata types that are enabled for your org.
1210

1311
# examples
1412

15-
- $ <%= config.bin %> <%= command.id %> -a 43.0
13+
- Display information about all known and enabled metadata types in the org with alias "my-dev-org" using API version 57.0:
1614

17-
- $ <%= config.bin %> <%= command.id %> -o [email protected]
15+
$ <%= config.bin %> <%= command.id %> --api-version 57.0 --target-org my-dev-org
1816

19-
- $ <%= config.bin %> <%= command.id %> -f /path/to/outputfilename.txt
17+
- Display only the metadata types that aren't yet supported by Salesforce CLI in your default org and write the results to the specified file:
2018

21-
- $ <%= config.bin %> <%= command.id %> -o [email protected] -f /path/to/outputfilename.txt
19+
$ <%= config.bin %> <%= command.id %> --output-file /path/to/outputfilename.txt --filter-known
2220

23-
# flags.api-version
21+
# flags.api-version.summary
2422

25-
API version to use
23+
API version to use; default is the most recent API version.
2624

27-
# flags.output-file
25+
# flags.output-file.summary
2826

29-
path to the file where results are stored
27+
Pathname of the file in which to write the results.
3028

31-
# flags.filterknown
29+
# flags.filter-known.summary
3230

33-
filter metadata known by the CLI
34-
35-
# flagsLong.apiversion
36-
37-
The API version to use. The default is the latest API version
31+
Filter the known metadata types from the result to display only the types not yet fully supported by Salesforce CLI.
3832

39-
# flagsLong.output-file
40-
41-
The path to the file where the results of the command are stored. Directing the output to a file makes it easier to
42-
extract relevant information for your package.xml manifest file. The default output destination is the console.
33+
filter metadata known by the CLI
4334

44-
# flagsLong.filterknown
35+
# flags.output-file.description
4536

46-
Filters all the known metadata from the result such that all that is left are the types not yet fully supported by the
47-
CLI.
37+
Directing the output to a file makes it easier to extract relevant information for your package.xml manifest file. The default output destination is the terminal or command window console.

messages/open.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ Open your default scratch org, or another specified org, in a browser.
44

55
# description
66

7-
To open a specific page, specify the portion of the URL after "https://MyDomainName.my.salesforce.com/" as the value for
8-
the --path flag. For example, specify "--path lightning" to open Lightning Experience, or specify "--path
9-
/apex/YourPage" to open a Visualforce page.
7+
To open a specific page, specify the portion of the URL after "https://MyDomainName.my.salesforce.com/" as the value for the --path flag. For example, specify "--path lightning" to open Lightning Experience, or specify "--path /apex/YourPage" to open a Visualforce page.
8+
9+
Use the --source-file to open a Lightning Page from your local project in Lightning App Builder. Lightning page files have the suffix .flexipage-meta.xml, and are stored in the "flexipages" directory.
1010

1111
To generate a URL but not launch it in your browser, specify --url-only.
1212

13-
To open in a specific browser, use the --browser flag. Supported browsers are "chrome", "edge", and "firefox". If you
14-
don't specify --browser, the org opens in your default browser.
13+
To open in a specific browser, use the --browser flag. Supported browsers are "chrome", "edge", and "firefox". If you don't specify --browser, the org opens in your default browser.
1514

1615
# examples
1716

@@ -23,22 +22,21 @@ don't specify --browser, the org opens in your default browser.
2322

2423
$ <%= config.bin %> <%= command.id %> --target-org MyTestOrg1 --browser firefox
2524

26-
- Display the navigation URL for the Lightning Experience page for your default org, but don't open the page in a
27-
browser:
25+
- Display the navigation URL for the Lightning Experience page for your default org, but don't open the page in a browser:
2826

2927
$ <%= config.bin %> <%= command.id %> --url-only --path lightning
3028

31-
- Open a specific ApexPage or Flexipage in the org using the --source-path flag
29+
- Open a local Lightning page in your default org's Lightning App Builder:
3230

33-
$ <%= config.bin %> <%= command.id %> --source-path <path to page>
31+
$ <%= config.bin %> <%= command.id %> --source-path force-app/main/default/flexipages/Hello.flexipage-meta.xml
3432

3533
# flags.browser.summary
3634

3735
Browser where the org opens.
3836

3937
# flags.source-file.summary
4038

41-
Path to an ApexPage or FlexiPage to open in the browser.
39+
Path to an ApexPage or FlexiPage to open in Lightning App Builder.
4240

4341
# flags.path.summary
4442

src/commands/org/list/metadata-types.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,22 @@ export class ListMetadataTypes extends SfCommand<DescribeMetadataResult> {
2323
'api-version': Flags.orgApiVersion({
2424
aliases: ['apiversion', 'a'],
2525
deprecateAliases: true,
26-
summary: messages.getMessage('flags.api-version'),
26+
summary: messages.getMessage('flags.api-version.summary'),
2727
}),
2828
loglevel,
2929
'target-org': requiredOrgFlagWithDeprecations,
3030
'output-file': Flags.file({
3131
aliases: ['resultfile'],
3232
deprecateAliases: true,
3333
char: 'f',
34-
summary: messages.getMessage('flags.output-file'),
35-
description: messages.getMessage('flagsLong.output-file'),
34+
summary: messages.getMessage('flags.output-file.summary'),
35+
description: messages.getMessage('flags.output-file.description'),
3636
}),
3737
'filter-known': Flags.boolean({
3838
aliases: ['filterknown'],
3939
deprecateAliases: true,
4040
char: 'k',
41-
summary: messages.getMessage('flags.filterknown'),
42-
description: messages.getMessage('flagsLong.filterknown'),
41+
summary: messages.getMessage('flags.filter-known.summary'),
4342
hidden: true,
4443
}),
4544
};

src/commands/org/list/metadata.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,26 @@ export class ListMetadata extends SfCommand<ListMetadataCommandResult> {
2525
'api-version': Flags.orgApiVersion({
2626
aliases: ['apiversion', 'a'],
2727
deprecateAliases: true,
28-
summary: messages.getMessage('flags.api-version'),
28+
summary: messages.getMessage('flags.api-version.summary'),
2929
}),
3030
loglevel,
3131
'target-org': requiredOrgFlagWithDeprecations,
3232
'output-file': Flags.file({
3333
aliases: ['resultfile'],
3434
deprecateAliases: true,
3535
char: 'f',
36-
summary: messages.getMessage('flags.output-file'),
36+
summary: messages.getMessage('flags.output-file.summary'),
3737
}),
3838
'metadata-type': Flags.string({
3939
aliases: ['metadatatype'],
4040
deprecateAliases: true,
4141
char: 'm',
42-
summary: messages.getMessage('flags.metadatatype'),
43-
description: messages.getMessage('flagsLong.metadatatype'),
42+
summary: messages.getMessage('flags.metadata-type.summary'),
4443
required: true,
4544
}),
4645
folder: Flags.string({
47-
summary: messages.getMessage('flags.folder'),
48-
description: messages.getMessage('flagsLong.folder'),
46+
summary: messages.getMessage('flags.folder.summary'),
47+
description: messages.getMessage('flags.folder.description'),
4948
}),
5049
};
5150

0 commit comments

Comments
 (0)