Skip to content

Commit ef72ed3

Browse files
fix: clean up messages for two convert commands
1 parent fc6e117 commit ef72ed3

File tree

4 files changed

+61
-77
lines changed

4 files changed

+61
-77
lines changed

messages/convert.mdapi.md

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,52 @@
11
# summary
22

3-
convert metadata from the Metadata API format into the source format
3+
Convert metadata retrieved via Metadata API into the source format used in Salesforce DX projects.
44

55
# description
66

7-
Converts metadata retrieved via Metadata API into the source format used in Salesforce DX projects.
7+
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.
88

9-
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 "sfdx force:mdapi:convert".
10-
11-
To convert files from the source format back to the metadata format, so that you can deploy them using "<%= config.bin %> project deploy", run "<%= config.bin %> project convert source".
9+
To convert files from the source format back to the metadata format, run "<%= config.bin %> project convert source".
1210

1311
# examples
1412

15-
- $ <%= config.bin %> <%= command.id %> -r path/to/metadata
16-
17-
- $ <%= config.bin %> <%= command.id %> -r path/to/metadata -d path/to/outputdir
18-
19-
# flags.root-dir
20-
21-
the root directory containing the Metadata API–formatted metadata
22-
23-
# flags.output-dir
24-
25-
the output directory to store the source–formatted files
13+
- Convert metadata formatted files in the specified directory into source formatted files; writes converted files to your default package directory:
2614

27-
# flags.manifest
15+
$ <%= config.bin %> <%= command.id %> --root-dir path/to/metadata
2816

29-
file path to manifest (package.xml) of metadata types to convert.
17+
- Similar to previous example, but writes converted files to the specified output directory:
3018

31-
# flags.metadata-path
19+
$ <%= config.bin %> <%= command.id %> --root-dir path/to/metadata --output-dir path/to/outputdir
3220

33-
comma-separated list of metadata file paths to convert
21+
# flags.root-dir.summary
3422

35-
# flags.metadata
23+
Root directory that contains the Metadata API–formatted metadata.
3624

37-
comma-separated list of metadata component names to convert
25+
# flags.output-dir.summary
3826

39-
# flagsLong.root-dir
27+
Directory to store your files in after they’re converted to source format; can be an absolute or relative path.
4028

41-
The root directory that contains the metadata you retrieved using Metadata API.
29+
# flags.manifest.summary
4230

43-
# flagsLong.output-dir
31+
File path to manifest (package.xml) of metadata types to convert.
4432

45-
The directory to store your files in after they’re converted to the source format. Can be an absolute or relative path.
33+
# flags.metadata-path.summary
4634

47-
# flagsLong.manifest
35+
Comma-separated list of paths to the local metadata files to convert.
4836

49-
- The complete path to the manifest (package.xml) file that specifies the metadata types to convert.
37+
# flags.metadata.summary
5038

51-
- If you specify this parameter, don’t specify --metadata or --source-path.
39+
Comma-separated list of metadata component names to convert.
5240

53-
# flagsLong.metadata-path
41+
# flags.manifest.description
5442

55-
- A comma-separated list of paths to the local metadata files to convert. The supplied paths 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 sub-directories).
43+
If you specify this parameter, don’t specify --metadata or --source-path.
5644

57-
- If you specify this parameter, don’t specify --manifest or --metadata. If the comma-separated list you’re supplying contains spaces, enclose the entire comma-separated list in one set of double quotes.
45+
# flags.metadata-path.description
5846

59-
# flagsLong.metadata
47+
The supplied paths 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 sub-directories).
6048

61-
A comma-separated list of metadata component names to convert.
49+
If you specify this flag, don’t specify --manifest or --metadata. If the comma-separated list you’re supplying contains spaces, enclose the entire comma-separated list in one set of double quotes.
6250

6351
# expectedDirectory
6452

messages/convert.source.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,58 @@
11
# summary
22

3-
convert source into Metadata API format
3+
Convert source-formatted files into metadata that you can deploy using Metadata API.
44

55
# description
66

7-
convert source into Metadata API format
8-
Converts source-formatted files into metadata that you can deploy using Metadata API.
9-
To convert source-formatted files into the metadata format, so that you can deploy them using Metadata API,
10-
run "<%= config.bin %> project convert mdapi". Then deploy the metadata using "<%= config.bin %> project deploy".
7+
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".
118

129
To convert Metadata API–formatted files into the source format, run "<%= config.bin %> project convert mdapi".
1310

1411
To specify a package name that includes spaces, enclose the name in single quotes.
1512

1613
# examples
1714

18-
- $ <%= config.bin %> <%= command.id %> -r path/to/source
15+
- Convert source-formatted files in the specified directory into metadata-formatted files; writes converted files into a new directory:
1916

20-
- $ <%= config.bin %> <%= command.id %> -r path/to/source -d path/to/outputdir -n 'My Package'
17+
$ <%= config.bin %> <%= command.id %> --root-dir path/to/source
2118

22-
# flags.root-dir
19+
- Similar to previous example, but writes converted files to the specified output directory and associates the files with the specified package:
2320

24-
a source directory other than the default package to convert
21+
$ <%= config.bin %> <%= command.id %> --root-dir path/to/source --output-dir path/to/outputdir --package-name 'My Package'
2522

26-
# flags.output-dir
23+
# flags.root-dir.summary
2724

28-
output directory to store the Metadata API–formatted files in
25+
Source directory other than the default package to convert.
2926

30-
# flags.package-name
27+
# flags.output-dir.summary
3128

32-
name of the package to associate with the metadata-formatted files
29+
Output directory to store the Metadata API–formatted files in.
3330

34-
# flags.manifest
31+
# flags.package-name.summary
3532

36-
file path to manifest (package.xml) of metadata types to convert.
33+
Name of the package to associate with the metadata-formatted files.
3734

38-
# flags.source-path
35+
# flags.manifest.summary
3936

40-
comma-separated list of paths to the local source files to convert
37+
Path to the manifest (package.xml) file that specifies the metadata types to convert.
4138

42-
# flags.metadata
39+
# flags.source-path.summary
4340

44-
comma-separated list of metadata component names to convert
41+
Comma-separated list of paths to the local source files to convert.
4542

46-
# flagsLong.manifest
43+
# flags.metadata.summary
4744

48-
- The complete path to the manifest (package.xml) file that specifies the metadata types to convert.
45+
Comma-separated list of metadata component names to convert.
4946

50-
- If you specify this parameter, don’t specify --metadata or --source-path.
47+
# flags.manifest.description
5148

52-
# flagsLong.source-path
49+
If you specify this parameter, don’t specify --metadata or --source-path.
5350

54-
- A comma-separated list of paths to the local source files to convert. The supplied paths 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 sub-directories).
51+
# flags.source-path.description
5552

56-
- If you specify this parameter, don’t specify --manifest or --metadata.
53+
The supplied paths 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 sub-directories).
54+
55+
If you specify this parameter, don’t specify --manifest or --metadata.
5756

5857
# success
5958

src/commands/project/convert/mdapi.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,36 +48,33 @@ export class Mdapi extends SfCommand<ConvertMdapiJson> {
4848
aliases: ['rootdir'],
4949
deprecateAliases: true,
5050
char: 'r',
51-
description: messages.getMessage('flagsLong.root-dir'),
52-
summary: messages.getMessage('flags.root-dir'),
51+
summary: messages.getMessage('flags.root-dir.summary'),
5352
required: true,
5453
exists: true,
5554
}),
5655
'output-dir': Flags.directory({
5756
aliases: ['outputdir'],
5857
deprecateAliases: true,
5958
char: 'd',
60-
description: messages.getMessage('flagsLong.output-dir'),
61-
summary: messages.getMessage('flags.output-dir'),
59+
summary: messages.getMessage('flags.output-dir.summary'),
6260
}),
6361
manifest: Flags.file({
6462
char: 'x',
65-
description: messages.getMessage('flagsLong.manifest'),
66-
summary: messages.getMessage('flags.manifest'),
63+
description: messages.getMessage('flags.manifest.description'),
64+
summary: messages.getMessage('flags.manifest.summary'),
6765
exists: true,
6866
}),
6967
'metadata-path': arrayWithDeprecation({
7068
char: 'p',
7169
aliases: ['metadatapath'],
7270
deprecateAliases: true,
73-
description: messages.getMessage('flagsLong.metadata-path'),
74-
summary: messages.getMessage('flags.metadata-path'),
71+
description: messages.getMessage('flags.metadata-path.description'),
72+
summary: messages.getMessage('flags.metadata-path.summary'),
7573
exclusive: ['manifest', 'metadata'],
7674
}),
7775
metadata: arrayWithDeprecation({
7876
char: 'm',
79-
description: messages.getMessage('flagsLong.metadata'),
80-
summary: messages.getMessage('flags.metadata'),
77+
summary: messages.getMessage('flags.metadata.summary'),
8178
exclusive: ['manifest', 'metadatapath'],
8279
}),
8380
};

src/commands/project/convert/source.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,39 +45,39 @@ export class Source extends SfCommand<ConvertResultJson> {
4545
aliases: ['rootdir'],
4646
deprecateAliases: true,
4747
char: 'r',
48-
summary: messages.getMessage('flags.root-dir'),
48+
summary: messages.getMessage('flags.root-dir.summary'),
4949
exists: true,
5050
}),
5151
'output-dir': Flags.directory({
5252
aliases: ['outputdir'],
5353
deprecateAliases: true,
5454
default: `metadataPackage_${Date.now()}`,
5555
char: 'd',
56-
summary: messages.getMessage('flags.output-dir'),
56+
summary: messages.getMessage('flags.output-dir.summary'),
5757
}),
5858
'package-name': Flags.string({
5959
char: 'n',
6060
aliases: ['packagename'],
6161
deprecateAliases: true,
62-
summary: messages.getMessage('flags.package-name'),
62+
summary: messages.getMessage('flags.package-name.summary'),
6363
}),
6464
manifest: Flags.file({
6565
char: 'x',
66-
description: messages.getMessage('flags.manifest'),
67-
summary: messages.getMessage('flagsLong.manifest'),
66+
summary: messages.getMessage('flags.manifest.summary'),
67+
description: messages.getMessage('flags.manifest.description'),
6868
exists: true,
6969
}),
7070
'source-path': arrayWithDeprecation({
7171
char: 'p',
7272
aliases: ['sourcepath'],
7373
deprecateAliases: true,
74-
description: messages.getMessage('flags.source-path'),
75-
summary: messages.getMessage('flagsLong.source-path'),
74+
description: messages.getMessage('flags.source-path.description'),
75+
summary: messages.getMessage('flags.source-path.summary'),
7676
exclusive: ['manifest', 'metadata'],
7777
}),
7878
metadata: arrayWithDeprecation({
7979
char: 'm',
80-
description: messages.getMessage('flags.metadata'),
80+
summary: messages.getMessage('flags.metadata.summary'),
8181
exclusive: ['manifest', 'sourcepath'],
8282
}),
8383
};

0 commit comments

Comments
 (0)