Skip to content

Commit 79ed858

Browse files
Merge pull request #549 from salesforcecli/sm/out-of-beta
feat: take project commands out of beta
2 parents 7a83740 + f992f4c commit 79ed858

File tree

24 files changed

+86
-74
lines changed

24 files changed

+86
-74
lines changed

command-snapshot.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"command": "project:convert:mdapi",
1010
"plugin": "@salesforce/plugin-deploy-retrieve",
1111
"flags": ["api-version", "json", "loglevel", "manifest", "metadata", "metadata-dir", "output-dir", "root-dir"],
12-
"alias": ["force:mdapi:beta:convert", "force:mdapi:convert"]
12+
"alias": ["force:mdapi:convert"]
1313
},
1414
{
1515
"command": "project:convert:source",
@@ -51,7 +51,7 @@
5151
"command": "project:delete:tracking",
5252
"plugin": "@salesforce/plugin-deploy-retrieve",
5353
"flags": ["api-version", "json", "loglevel", "no-prompt", "target-org"],
54-
"alias": ["force:source:beta:tracking:clear", "force:source:tracking:clear"]
54+
"alias": ["force:source:tracking:clear"]
5555
},
5656
{
5757
"command": "project:deploy:cancel",
@@ -155,33 +155,33 @@
155155
"alias": ["deploy:metadata:validate"]
156156
},
157157
{
158-
"command": "project:list:ignored",
159-
"plugin": "@salesforce/plugin-deploy-retrieve",
160-
"flags": ["json", "source-dir"],
161-
"alias": ["force:source:ignored:list"]
162-
},
163-
{
164-
"command": "project:manifest:create",
158+
"command": "project:generate:manifest",
165159
"plugin": "@salesforce/plugin-deploy-retrieve",
166160
"flags": [
167161
"api-version",
168162
"from-org",
169163
"include-packages",
170164
"json",
171165
"loglevel",
172-
"manifest-name",
173-
"manifest-type",
174166
"metadata",
167+
"name",
175168
"output-dir",
176-
"source-dir"
169+
"source-dir",
170+
"type"
177171
],
178172
"alias": ["force:source:manifest:create"]
179173
},
174+
{
175+
"command": "project:list:ignored",
176+
"plugin": "@salesforce/plugin-deploy-retrieve",
177+
"flags": ["json", "source-dir"],
178+
"alias": ["force:source:ignored:list"]
179+
},
180180
{
181181
"command": "project:reset:tracking",
182182
"plugin": "@salesforce/plugin-deploy-retrieve",
183183
"flags": ["api-version", "json", "loglevel", "no-prompt", "revision", "target-org"],
184-
"alias": ["force:source:beta:tracking:reset", "force:source:tracking:reset"]
184+
"alias": ["force:source:tracking:reset"]
185185
},
186186
{
187187
"command": "project:retrieve:preview",

messages/convert.source.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ To specify a package name that includes spaces, enclose the name in single quote
2020

2121
$ <%= config.bin %> <%= command.id %> --root-dir path/to/source --output-dir path/to/outputdir --package-name 'My Package'
2222

23+
# flags.api-version.summary
24+
25+
API Version to use in the generated project's manifest. By default, will use the version from sfdx-project.json
26+
2327
# flags.root-dir.summary
2428

2529
Source directory other than the default package to convert.

messages/manifest.create.md renamed to messages/manifest.generate.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Create a project manifest that lists the metadata components you want to deploy
66

77
Create a manifest from a list of metadata components (--metadata) or from one or more local directories that contain source files (--source-dir). You can specify either of these parameters, not both.
88

9-
Use --manifest-type to specify the type of manifest you want to create. The resulting manifest files have specific names, such as the standard package.xml or destructiveChanges.xml to delete metadata. Valid values for this parameter, and their respective file names, are:
9+
Use --type to specify the type of manifest you want to create. The resulting manifest files have specific names, such as the standard package.xml or destructiveChanges.xml to delete metadata. Valid values for this parameter, and their respective file names, are:
1010

1111
* package : package.xml (default)
1212
* pre : destructiveChangesPre.xml
@@ -15,7 +15,7 @@ Use --manifest-type to specify the type of manifest you want to create. The resu
1515

1616
See https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_deleting_files.htm for information about these destructive manifest files.
1717

18-
Use --manifest-name to specify a custom name for the generated manifest if the pre-defined ones don’t suit your needs. You can specify either --manifest-type or --manifest-name, but not both.
18+
Use --name to specify a custom name for the generated manifest if the pre-defined ones don’t suit your needs. You can specify either --type or --name, but not both.
1919

2020
# examples
2121

@@ -25,11 +25,11 @@ Use --manifest-name to specify a custom name for the generated manifest if the p
2525

2626
- Create a manifest for deleting the specified Apex class:
2727

28-
$ <%= config.bin %> <%= command.id %> --metadata ApexClass:MyApexClass --manifest-type destroy
28+
$ <%= config.bin %> <%= command.id %> --metadata ApexClass:MyApexClass --type destroy
2929

3030
- Create a manifest for deploying or retrieving all the metadata components in the specified local directory; name the file myNewManifest.xml:
3131

32-
$ <%= config.bin %> <%= command.id %> --source-dir force-app --manifest-name myNewManifest
32+
$ <%= config.bin %> <%= command.id %> --source-dir force-app --name myNewManifest
3333

3434
- Create a manifest from the metadata components in the specified org and include metadata in any unlocked packages:
3535

@@ -43,11 +43,11 @@ Comma-separated list of package types (managed, unlocked) whose metadata is incl
4343

4444
Username or alias of the org that contains the metadata components from which to build a manifest.
4545

46-
# flags.manifest-type.summary
46+
# flags.type.summary
4747

4848
Type of manifest to create; the type determines the name of the created file.
4949

50-
# flags.manifest-name.summary
50+
# flags.name.summary
5151

5252
Name of a custom manifest file to create.
5353

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"delete": {
119119
"description": "Commands to delete metadata from a Salesforce org."
120120
},
121-
"manifest": {
121+
"generate": {
122122
"description": "Commands to create a manifest file."
123123
},
124124
"reset": {

schemas/project-manifest-create.json renamed to schemas/project-generate-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"$ref": "#/definitions/CreateCommandResult",
3+
"$ref": "#/definitions/ManifestGenerateCommandResult",
44
"definitions": {
5-
"CreateCommandResult": {
5+
"ManifestGenerateCommandResult": {
66
"type": "object",
77
"properties": {
88
"name": {

src/commands/project/convert/mdapi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export interface EnsureFsFlagOptions {
3535
throwOnENOENT?: boolean;
3636
}
3737
export class Mdapi extends SfCommand<ConvertMdapiJson> {
38-
public static readonly aliases = ['force:mdapi:beta:convert', 'force:mdapi:convert'];
38+
public static readonly aliases = ['force:mdapi:convert'];
3939
public static readonly deprecateAliases = true;
4040
public static readonly summary = messages.getMessage('summary');
4141
public static readonly description = messages.getMessage('description');

src/commands/project/convert/source.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class Source extends SfCommand<ConvertResultJson> {
3939
public static readonly aliases = ['force:source:convert'];
4040
public static readonly deprecateAliases = true;
4141
public static readonly flags = {
42-
'api-version': orgApiVersionFlagWithDeprecations,
42+
'api-version': { ...orgApiVersionFlagWithDeprecations, summary: messages.getMessage('flags.api-version.summary') },
4343
loglevel,
4444
'root-dir': Flags.directory({
4545
aliases: ['rootdir'],
@@ -117,7 +117,7 @@ export class Source extends SfCommand<ConvertResultJson> {
117117
}
118118

119119
this.componentSet = await ComponentSetBuilder.build({
120-
sourceapiversion: await getSourceApiVersion(),
120+
sourceapiversion: this.flags['api-version'] ?? (await getSourceApiVersion()),
121121
sourcepath: paths,
122122
manifest: manifest
123123
? {

src/commands/project/delete/tracking.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export type DeleteTrackingResult = {
2525

2626
export class DeleteTracking extends SfCommand<DeleteTrackingResult> {
2727
public static readonly deprecateAliases = true;
28-
public static readonly aliases = ['force:source:beta:tracking:clear', 'force:source:tracking:clear'];
28+
public static readonly aliases = ['force:source:tracking:clear'];
2929
public static readonly summary = messages.getMessage('deleteSummary');
3030
public static readonly description = messages.getMessage('deleteDescription');
3131
public static readonly requiresProject = true;

src/commands/project/deploy/cancel.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export default class DeployMetadataCancel extends SfCommand<DeployResultJson> {
2323
public static readonly summary = messages.getMessage('summary');
2424
public static readonly examples = messages.getMessages('examples');
2525
public static readonly requiresProject = true;
26-
public static readonly state = 'beta';
2726
public static readonly aliases = ['deploy:metadata:cancel'];
2827
public static readonly deprecateAliases = true;
2928

src/commands/project/deploy/preview.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export default class DeployMetadataPreview extends SfCommand<PreviewResult> {
2121
public static readonly summary = messages.getMessage('summary');
2222
public static readonly examples = messages.getMessages('examples');
2323
public static readonly requiresProject = true;
24-
public static readonly state = 'beta';
2524
public static readonly aliases = ['deploy:metadata:preview'];
2625
public static readonly deprecateAliases = true;
2726

0 commit comments

Comments
 (0)