Skip to content

Commit 464e762

Browse files
Merge pull request #546 from salesforcecli/js/sf-ify-messages
Js/sf ify messages
2 parents ecd2b5d + 30aeb80 commit 464e762

File tree

12 files changed

+200
-187
lines changed

12 files changed

+200
-187
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-dir
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-dir.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-dir.
39+
Comma-separated list of metadata component names to convert.
5240

53-
# flagsLong.metadata-dir
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-dir.
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-dir.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-dir
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-dir.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-dir.
47+
# flags.manifest.description
5148

52-
# flagsLong.source-dir
49+
If you specify this parameter, don’t specify --metadata or --source-dir.
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-dir.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

messages/delete.source.md

Lines changed: 57 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,110 @@
11
# summary
22

3-
delete source from your project and from a non-source-tracked org.
3+
Delete source from your project and from a non-source-tracked org.
44

55
# description
66

7-
delete source from your project and from a non-source-tracked org
8-
IMPORTANT: Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.
7+
Use this command to delete components from orgs that don’t have source tracking. To remove deleted items from orgs that have source tracking enabled, "sf project deploy start".
98

10-
Use this command to delete components from orgs that don’t have source tracking.
11-
To remove deleted items from scratch orgs, which have change tracking, use "sf project deploy start".
9+
When you run this command, both the local source file and the metadata component in the org are deleted.
1210

1311
# examples
1412

15-
- $ <%= config.bin %> <%= command.id %> -m <metadata>
13+
- Delete all local Apex source files and all Apex classes from the org with alias "my-scratch":
1614

17-
- $ <%= config.bin %> <%= command.id %> -p path/to/source
15+
<%= config.bin %> <%= command.id %> --metadata ApexClass --target-org my-scratch
1816

19-
# flags.source-dir
17+
- Delete a specific Apex class and a Profile that has a space in it from your default org; don't prompt for confirmation:
2018

21-
comma-separated list of source file paths to delete
19+
<%= config.bin %> <%= command.id %> --metadata ApexClass:MyFabulousApexClass --metadata "Profile: My Profile" --no-prompt
2220

23-
# flags.metadata
21+
- Run the tests that aren’t in any managed packages as part of the deletion; if the delete succeeds, and the org has source-tracking enabled, update the source tracking information:
2422

25-
comma-separated list of names of metadata components to delete
23+
<%= config.bin %> <%= command.id %> --metadata ApexClass --test-level RunLocalTests --track-source
2624

27-
# flags.no-prompt
25+
- Delete the Apex source files in a directory and the corresponding components from your default org:
2826

29-
do not prompt for delete confirmation
27+
<%= config.bin %> <%= command.id %> --source-dir force-app/main/default/classes
3028

31-
# flags.wait
29+
- Delete all components listed in a manifest:
3230

33-
wait time for command to finish in minutes
31+
<%= config.bin %> <%= command.id %> --manifest path/to/package.xml
3432

35-
# flags.check-only
33+
# flags.source-dir.summary
3634

37-
validate delete command but do not delete from the org or delete files locally
35+
Comma-separated list of source file paths to delete.
3836

39-
# flags.test-Level
37+
# flags.metadata.summary
4038

41-
deployment testing level
39+
Comma-separated list of names of metadata components to delete.
4240

43-
# flags.track-source
41+
# flags.no-prompt.summary
4442

45-
If the delete succeeds, update the source tracking information, similar to push
43+
Don't prompt for delete confirmation.
4644

47-
# flags.force-overwrite
45+
# flags.wait.summary
4846

49-
ignore conflict warnings and overwrite changes to the org
47+
Number of minutes to wait for the command to finish.
5048

51-
# flags.verbose
49+
# flags.check-only.summary
5250

53-
verbose output of delete result
51+
Validate delete command but don't delete anything from the org or the local project.
5452

55-
# flagsLong.check-only
53+
# flags.test-Level.summary
5654

57-
- Validates the deleted metadata and runs all Apex tests, but prevents the deletion from being saved to the org.
55+
Deployment Apex testing level.
5856

59-
- If you change a field type from Master-Detail to Lookup or vice versa, that change isn’t supported when using the --chec-konly parameter to test a deletion (validation). This kind of change isn’t supported for test deletions to avoid the risk of data loss or corruption. If a change that isn’t supported for test deletions is included in a deletion package, the test deletion fails and issues an error.
57+
# flags.track-source.summary
6058

61-
- If your deletion package changes a field type from Master-Detail to Lookup or vice versa, you can still validate the changes prior to deploying to Production by performing a full deletion to another test Sandbox. A full deletion includes a validation of the changes as part of the deletion process.
59+
If the delete succeeds, update the source tracking information.
6260

63-
- Note: A Metadata API deletion that includes Master-Detail relationships deletes all detail records in the Recycle Bin in the following cases.
61+
# flags.force-overwrite.summary
6462

65-
- 1. For a deletion with a new Master-Detail field, soft delete (send to the Recycle Bin) all detail records before proceeding to delete the Master-Detail field, or the deletion fails. During the deletion, detail records are permanently deleted from the Recycle Bin and cannot be recovered.
63+
Ignore conflict warnings and overwrite changes to the org.
6664

67-
- 2. For a deletion that converts a Lookup field relationship to a Master-Detail relationship, detail records must reference a master record or be soft-deleted (sent to the Recycle Bin) for the deletion to succeed. However, a successful deletion permanently deletes any detail records in the Recycle Bin.
65+
# flags.verbose.summary
6866

69-
# flagsLong.metadata
67+
Verbose output of the delete result.
7068

71-
- A comma-separated list of names of metadata components to delete from your project and your org.
69+
# flags.check-only.description
7270

73-
- If you specify this parameter, don’t specify --source-dir.
71+
IMPORTANT: Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.
7472

75-
# flagsLong.source-dir
73+
Validates the deleted metadata and runs all Apex tests, but prevents the deletion from being saved to the org.
7674

77-
- A comma-separated list of paths to the local metadata to delete. The supplied paths can be a single file (in which case the operation is applied to only one file) or a folder (in which case the operation is applied to all metadata types in the directory and its sub-directories).
75+
If you change a field type from Master-Detail to Lookup or vice versa, that change isn’t supported when using the --chec-konly parameter to test a deletion (validation). This kind of change isn’t supported for test deletions to avoid the risk of data loss or corruption. If a change that isn’t supported for test deletions is included in a deletion package, the test deletion fails and issues an error.
7876

79-
- If you specify this parameter, don’t specify --metadata.
77+
If your deletion package changes a field type from Master-Detail to Lookup or vice versa, you can still validate the changes prior to deploying to Production by performing a full deletion to another test Sandbox. A full deletion includes a validation of the changes as part of the deletion process.
8078

81-
# flagsLong.wait
79+
Note: A Metadata API deletion that includes Master-Detail relationships deletes all detail records in the Recycle Bin in the following cases.
8280

83-
Number of minutes to wait for the command to complete and display results to the terminal window. If the command continues to run after the wait period, the CLI returns control of the terminal window to you.
81+
1. For a deletion with a new Master-Detail field, soft delete (send to the Recycle Bin) all detail records before proceeding to delete the Master-Detail field, or the deletion fails. During the deletion, detail records are permanently deleted from the Recycle Bin and cannot be recovered.
8482

85-
# flagsLong.test-Level
83+
2. For a deletion that converts a Lookup field relationship to a Master-Detail relationship, detail records must reference a master record or be soft-deleted (sent to the Recycle Bin) for the deletion to succeed. However, a successful deletion permanently deletes any detail records in the Recycle Bin.
8684

87-
- Specifies which level of deployment tests to run. Valid values are:
85+
# flags.metadata.description
8886

89-
- NoTestRu — No tests are run. This test level applies only to deployments to development environments, such as sandbox, Developer Edition, or trial orgs. This test level is the default for development environments.
87+
If you specify this parameter, don’t specify --source-dir.
9088

91-
- RunLocalTests — All tests in your org are run, except the ones that originate from installed managed and unlocked packages. This test level is the default for production deployments that include Apex classes or triggers.
89+
# flags.source-dir.description
90+
91+
The supplied paths can be a single file (in which case the operation is applied to only one file) or a folder (in which case the operation is applied to all metadata types in the directory and its sub-directories).
92+
93+
If you specify this parameter, don’t specify --metadata.
9294

95+
# flags.wait.description
96+
97+
If the command continues to run after the wait period, the CLI returns control of the terminal window to you.
98+
99+
# flags.test-Level.description
100+
101+
Valid values are:
102+
103+
- NoTestRun — No tests are run. This test level applies only to deployments to development environments, such as sandbox, Developer Edition, or trial orgs. This test level is the default for development environments.
104+
- RunLocalTests — All tests in your org are run, except the ones that originate from installed managed and unlocked packages. This test level is the default for production deployments that include Apex classes or triggers.
93105
- RunAllTestsInOrg — All tests in your org are run, including tests of managed packages.
94106

95-
- If you don’t specify a test level, the default behavior depends on the contents of your deployment package. For more information, see “Running Tests in a Deployment” in the Metadata API Developer Guide.
107+
If you don’t specify a test level, the default behavior depends on the contents of your deployment package. For more information, see “Running Tests in a Deployment” in the Metadata API Developer Guide.
96108

97109
# localPrompt
98110

messages/delete.tracking.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
1-
# resetDescription
1+
# resetSummary
2+
3+
Reset local and remote source tracking.
24

3-
reset local and remote source tracking
5+
# resetDescription
46

57
WARNING: This command deletes or overwrites all existing source tracking files. Use with extreme caution.
68

7-
Resets local and remote source tracking so that the CLI no longer registers differences between your local files and those in the org. When you next run force:source:status, the CLI returns no results, even though conflicts might actually exist. The CLI then resumes tracking new source changes as usual.
9+
Resets local and remote source tracking so that Salesforce CLI no longer registers differences between your local files and those in the org. When you next run 'project deploy preview', Salesforce CLI returns no results, even though conflicts might actually exist. Salesforce CLI then resumes tracking new source changes as usual.
810

9-
Use the --revision parameter to reset source tracking to a specific revision number of an org source member. To get the revision number, query the SourceMember Tooling API object with the force:data:soql:query command. For example:
10-
$ sfdx force:data:soql:query -q "SELECT MemberName, MemberType, RevisionCounter FROM SourceMember" -t
11+
Use the --revision parameter to reset source tracking to a specific revision number of an org source member. To get the revision number, query the SourceMember Tooling API object with the 'data soql' command. For example:
1112

12-
# deleteDescription
13+
<%= config.bin %> data query --query "SELECT MemberName, MemberType, RevisionCounter FROM SourceMember" --use-tooling-api
1314

14-
delete all local source tracking information
15+
# deleteSummary
16+
17+
Delete all local source tracking information.
18+
19+
# deleteDescription
1520

1621
WARNING: This command deletes or overwrites all existing source tracking files. Use with extreme caution.
1722

18-
Deletes all local source tracking information. When you next run 'project deploy preview', the CLI displays all local and remote files as changed, and any files with the same name are listed as conflicts.
23+
Deletes all local source tracking information. When you next run 'project deploy preview', Salesforce CLI displays all local and remote files as changed, and any files with the same name are listed as conflicts.
1924

20-
# no-promptDescription
25+
# flags.no-prompt.summary
2126

22-
do not prompt for source tracking override confirmation
27+
Don't prompt for source tracking override confirmation.
2328

24-
# revisionDescription
29+
# flags.revision.summary
2530

26-
reset to a specific SourceMember revision counter number
31+
SourceMember revision counter number to reset to.
2732

2833
# promptMessage
2934

0 commit comments

Comments
 (0)