Skip to content

Commit

Permalink
fix: use standard target-org flag messages (#1028)
Browse files Browse the repository at this point in the history
* fix: use standard target-org flag messages

* chore: bump plugins-core for new optionalOrg summary
  • Loading branch information
mshanemc authored May 30, 2024
1 parent cb52dde commit 004d275
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 122 deletions.
10 changes: 1 addition & 9 deletions messages/deploy.metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ To deploy multiple metadata components, either set multiple --metadata <name> fl
- Deploy a custom object called ExcitingObject that's in the SBQQ namespace:

sf <%= command.id %> --metadata CustomObject:SBQQ__ExcitingObject

- Deploy all custom objects in the SBQQ namespace by using a wildcard and quotes:

sf <%= command.id %> --metadata 'CustomObject:SBQQ__*'
Expand All @@ -64,10 +64,6 @@ To deploy multiple metadata components, either set multiple --metadata <name> fl

sf <%= command.id %> --metadata ApexClass --test-level RunLocalTests

# flags.target-org.summary

Login username or alias for the target org.

# flags.pre-destructive-changes.summary

File path for a manifest (destructiveChangesPre.xml) of components to delete before the deploy.
Expand All @@ -80,10 +76,6 @@ File path for a manifest (destructiveChangesPost.xml) of components to delete af

Specify that deleted components in the destructive changes manifest file are immediately eligible for deletion rather than being stored in the Recycle Bin.

# flags.target-org.description

Overrides your default org.

# flags.metadata.summary

Metadata component names to deploy. Wildcards (`*` ) supported as long as you use quotes, such as `ApexClass:MyClass*`.
Expand Down
8 changes: 0 additions & 8 deletions messages/deploy.metadata.preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,10 @@ To preview the deployment of multiple metadata components, either set multiple -

sf <%= command.id %> --manifest path/to/package.xml

# flags.target-org.summary

Login username or alias for the target org.

# flags.only-ignored.summary

Preview files to be ignored in a deployment.

# flags.target-org.description

Overrides your default org.

# flags.metadata.summary

Metadata component names to preview.
Expand Down
8 changes: 0 additions & 8 deletions messages/deploy.metadata.quick.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,6 @@ Run the command asynchronously.

The command immediately returns the control of the terminal to you. This way, you can continue to use the CLI. To resume watching the deploy, run "sf project deploy resume". To check the status of the deploy, run "sf project deploy report".

# flags.target-org.summary

Login username or alias for the target org.

# flags.target-org.description

Overrides your default org.

# error.CannotQuickDeploy

Job ID can't be used for quick deployment. Possible reasons include the deployment hasn't been validated, has already been deployed, or the validation expired because you ran it more than 10 days ago.
Expand Down
8 changes: 0 additions & 8 deletions messages/deploy.metadata.validate.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ Note: Don't use this command on sandboxes; the command is intended to be used on

sf <%= command.id %> --manifest path/to/package.xml

# flags.target-org.summary

Login username or alias for the target org.

# flags.target-org.description

Overrides your default org.

# flags.metadata.summary

Metadata component names to validate for deployment.
Expand Down
8 changes: 0 additions & 8 deletions messages/retrieve.metadata.preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ If your org allows source tracking, then this command displays potential conflic

sf <%= command.id %> --ignore-conflicts --target-org my-scratch

# flags.target-org.summary

Login username or alias for the target org.

# flags.target-org.description

Overrides your default org.

# flags.ignore-conflicts.summary

Don't display conflicts in the preview of the retrieval.
Expand Down
10 changes: 1 addition & 9 deletions messages/retrieve.start.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ To retrieve multiple metadata components, either use multiple --metadata <name>
- Retrieve a custom object called ExcitingObject that's in the SBQQ namespace:

sf <%= command.id %> --metadata CustomObject:SBQQ__ExcitingObject

- Retrieve all custom objects in the SBQQ namespace by using a wildcard and quotes:

sf <%= command.id %> --metadata 'CustomObject:SBQQ__*'
Expand Down Expand Up @@ -113,14 +113,6 @@ File paths for source to retrieve from the org.

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 source files in the directory and its subdirectories).

# flags.target-org.summary

Login username or alias for the target org.

# flags.target-org.description

Overrides your default org.

# flags.wait.summary

Number of minutes to wait for the command to complete and display results to the terminal window.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@salesforce/core": "^7.3.9",
"@salesforce/kit": "^3.1.2",
"@salesforce/plugin-info": "^3.3.0",
"@salesforce/sf-plugins-core": "^9.0.12",
"@salesforce/sf-plugins-core": "^9.1.0",
"@salesforce/source-deploy-retrieve": "^11.6.3",
"@salesforce/source-tracking": "^6.3.0",
"@salesforce/ts-types": "^2.0.9",
Expand Down
7 changes: 1 addition & 6 deletions src/commands/project/deploy/cancel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { DeployResultJson } from '../../../utils/types.js';

Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata.cancel');
const deployMessages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata');

export default class DeployMetadataCancel extends SfCommand<DeployResultJson> {
public static readonly description = messages.getMessage('description');
Expand All @@ -27,11 +26,7 @@ export default class DeployMetadataCancel extends SfCommand<DeployResultJson> {
public static readonly deprecateAliases = true;

public static readonly flags = {
'target-org': Flags.optionalOrg({
char: 'o',
description: deployMessages.getMessage('flags.target-org.description'),
summary: deployMessages.getMessage('flags.target-org.summary'),
}),
'target-org': Flags.optionalOrg(),
async: Flags.boolean({
summary: messages.getMessage('flags.async.summary'),
description: messages.getMessage('flags.async.description'),
Expand Down
7 changes: 1 addition & 6 deletions src/commands/project/deploy/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,7 @@ export default class DeployMetadataPreview extends SfCommand<PreviewResult> {
multiple: true,
exclusive: exclusiveFlags.filter((f) => f !== 'source-dir'),
}),
'target-org': Flags.requiredOrg({
char: 'o',
description: messages.getMessage('flags.target-org.description'),
summary: messages.getMessage('flags.target-org.summary'),
required: true,
}),
'target-org': Flags.requiredOrg(),
concise: Flags.boolean({
summary: messages.getMessage('flags.concise.summary'),
default: false,
Expand Down
6 changes: 1 addition & 5 deletions src/commands/project/deploy/quick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@ export default class DeployMetadataQuick extends SfCommand<DeployResultJson> {
summary: messages.getMessage('flags.job-id.summary'),
exactlyOne: ['use-most-recent', 'job-id'],
}),
'target-org': Flags.optionalOrg({
char: 'o',
description: messages.getMessage('flags.target-org.description'),
summary: messages.getMessage('flags.target-org.summary'),
}),
'target-org': Flags.optionalOrg(),
'use-most-recent': Flags.boolean({
char: 'r',
description: messages.getMessage('flags.use-most-recent.description'),
Expand Down
6 changes: 1 addition & 5 deletions src/commands/project/deploy/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ export default class DeployMetadataReport extends SfCommand<DeployResultJson> {
public static readonly deprecateAliases = true;

public static readonly flags = {
'target-org': Flags.optionalOrg({
char: 'o',
description: deployMessages.getMessage('flags.target-org.description'),
summary: deployMessages.getMessage('flags.target-org.summary'),
}),
'target-org': Flags.optionalOrg(),
'job-id': Flags.salesforceId({
char: 'i',
startsWith: '0Af',
Expand Down
7 changes: 1 addition & 6 deletions src/commands/project/deploy/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,7 @@ export default class DeployMetadata extends SfCommand<DeployResultJson> {
exclusive: exclusiveFlags.filter((f) => f !== 'source-dir'),
helpGroup: sourceFormatFlags,
}),
'target-org': Flags.requiredOrg({
char: 'o',
description: messages.getMessage('flags.target-org.description'),
summary: messages.getMessage('flags.target-org.summary'),
required: true,
}),
'target-org': Flags.requiredOrg(),
tests: testsFlag({ helpGroup: testFlags }),
'test-level': testLevelFlag({
description: messages.getMessage('flags.test-level.description'),
Expand Down
7 changes: 1 addition & 6 deletions src/commands/project/deploy/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,7 @@ export default class DeployMetadataValidate extends SfCommand<DeployResultJson>
dependsOn: ['metadata-dir'],
helpGroup: mdapiFormatFlags,
}),
'target-org': Flags.requiredOrg({
char: 'o',
description: messages.getMessage('flags.target-org.description'),
summary: messages.getMessage('flags.target-org.summary'),
required: true,
}),
'target-org': Flags.requiredOrg(),
tests: testsFlag({ helpGroup: testFlags }),
'test-level': testLevelFlag({
options: [TestLevel.RunAllTestsInOrg, TestLevel.RunLocalTests, TestLevel.RunSpecifiedTests],
Expand Down
7 changes: 1 addition & 6 deletions src/commands/project/retrieve/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ export default class RetrieveMetadataPreview extends SfCommand<PreviewResult> {
description: messages.getMessage('flags.ignore-conflicts.description'),
default: false,
}),
'target-org': Flags.requiredOrg({
char: 'o',
description: messages.getMessage('flags.target-org.description'),
summary: messages.getMessage('flags.target-org.summary'),
required: true,
}),
'target-org': Flags.requiredOrg(),
concise: Flags.boolean({
summary: messages.getMessage('flags.concise.summary'),
default: false,
Expand Down
7 changes: 1 addition & 6 deletions src/commands/project/retrieve/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,7 @@ export default class RetrieveMetadata extends SfCommand<RetrieveResultJson> {
exclusive: ['ignore-conflicts'],
helpGroup: mdapiFlagGroup,
}),
'target-org': Flags.requiredOrg({
char: 'o',
summary: messages.getMessage('flags.target-org.summary'),
description: messages.getMessage('flags.target-org.description'),
required: true,
}),
'target-org': Flags.requiredOrg(),
wait: Flags.duration({
char: 'w',
defaultValue: 33,
Expand Down
32 changes: 7 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1509,38 +1509,20 @@
resolved "https://registry.yarnpkg.com/@salesforce/schemas/-/schemas-1.9.0.tgz#ba477a112653a20b4edcf989c61c57bdff9aa3ca"
integrity sha512-LiN37zG5ODT6z70sL1fxF7BQwtCX9JOWofSU8iliSNIM+WDEeinnoFtVqPInRSNt8I0RiJxIKCrqstsmQRBNvA==

"@salesforce/sf-plugins-core@^9.0.11", "@salesforce/sf-plugins-core@^9.0.12", "@salesforce/sf-plugins-core@^9.0.7":
version "9.0.12"
resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-9.0.12.tgz#8bcacdb412c3570f66220acd6346636d86f81d62"
integrity sha512-KtZErzUdBrDDONpE6ZbW3V5WfBwUwo07Snttnu4IFs82rbsOkyCG/m02b+mbnGBrwWWy7auZW4e2ciRrmbZGDQ==
"@salesforce/sf-plugins-core@^9.0.11", "@salesforce/sf-plugins-core@^9.0.7", "@salesforce/sf-plugins-core@^9.1.0":
version "9.1.0"
resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-9.1.0.tgz#eb5a3456322cb6232cfb30da30277a92bd666bb9"
integrity sha512-tBfbsJ0jUv/UtvbzY8wClNVagBA10mzs61BRI5nMpNlrYppRD3domGIOaOXchldO7XsYkrUnzkJVOuungPgu8A==
dependencies:
"@inquirer/confirm" "^2.0.17"
"@inquirer/password" "^1.1.16"
"@oclif/core" "^3.26.6"
"@salesforce/core" "^7.3.8"
"@salesforce/kit" "^3.1.1"
"@salesforce/core" "^7.3.9"
"@salesforce/kit" "^3.1.2"
"@salesforce/ts-types" "^2.0.9"
chalk "^5.3.0"

"@salesforce/source-deploy-retrieve@^11.3.0":
version "11.6.2"
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-11.6.2.tgz#2d4faf3c00cc38dad0245f07a9b978131b845a5e"
integrity sha512-GEDTo4JCgisQt2hVyRY4Tu/ivEt2u9hJRzNn7A6ZDu668/0Ufq04YhdZfmSJePXAAtrtd9OqYfj8aJO5AOk1+g==
dependencies:
"@salesforce/core" "^7.3.5"
"@salesforce/kit" "^3.1.1"
"@salesforce/ts-types" "^2.0.9"
fast-levenshtein "^3.0.0"
fast-xml-parser "^4.3.6"
got "^11.8.6"
graceful-fs "^4.2.11"
ignore "^5.3.1"
jszip "^3.10.1"
mime "2.6.0"
minimatch "^5.1.6"
proxy-agent "^6.4.0"

"@salesforce/source-deploy-retrieve@^11.6.3":
"@salesforce/source-deploy-retrieve@^11.3.0", "@salesforce/source-deploy-retrieve@^11.6.3":
version "11.6.3"
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-11.6.3.tgz#24ff55a17f8d7862b1467e40968707fedaa3e624"
integrity sha512-6h/KJV8cRfzLZ3aE6PP76oP1bz28zRxL9wtCx6yD+jz4GRdIxHNjNQhiKJJI9m2Z+npWl/sjth8aHB7rrSgSrg==
Expand Down

0 comments on commit 004d275

Please sign in to comment.