Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: flag naming convention #750

Merged
merged 3 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions messages/clone.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ Set the --targetusername (-u) parameter to a production org with sandbox license

- $ <%= config.bin %> <%= command.id %> -t sandbox SandboxName=NewClonedSandbox SourceSandboxName=ExistingSandbox -u prodOrg -a MyDevSandbox

# flags.type
# flags.type.summary

Type of org to create.

# flags.wait
# flags.wait.summary

Number of minutes to wait while polling for status.

# flags.setdefaultusername
# flags.setdefaultusername.summary

Set the cloned org as your default.

# flags.setalias
# flags.setalias.summary

Alias for the cloned org.

# flags.definitionfile
# flags.definitionfile.summary

Path to the sandbox definition file.

# flagsLong.wait
# flags.wait.description

Sets the streaming client socket timeout, in minutes. If the streaming client socket has no contact from the server for a number of minutes, the client exits. Specify a longer wait time if timeouts occur frequently.

Expand Down
20 changes: 10 additions & 10 deletions messages/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,43 +20,43 @@ Creates a scratch org or a sandbox org using the values specified in a configura

- $ <%= config.bin %> <%= command.id %> -t sandbox -f config/dev-sandbox-def.json -a MyDevSandbox -u prodOrg

# flags.clientId
# flags.clientid.summary

Connected app consumer key; not supported for sandbox org creation.

# flags.setDefaultUsername
# flags.setdefaultusername.summary

Set the created org as the default username.

# flags.setAlias
# flags.setalias.summary

Alias for the created org.

# flags.definitionFile
# flags.definitionfile.summary

Path to an org definition file.

# flags.noNamespace
# flags.nonamespace.summary

Create the scratch org with no namespace.

# flags.noAncestors
# flags.noancestors.summary

Do not include second-generation package ancestors in the scratch org.

# flags.type
# flags.type.summary

Type of org to create.

# flags.durationDays
# flags.durationdays.summary

Duration of the scratch org (in days) (default:7, min:1, max:30).

# flags.retry
# flags.retry.summary

Number of scratch org auth retries after scratch org is successfully signed up.

# flags.wait
# flags.wait.summary

Streaming client socket timeout (in minutes).

Expand Down
8 changes: 4 additions & 4 deletions messages/create_scratch.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ You must specify a Dev Hub to create a scratch org, either with the --target-dev

<%= config.bin %> <%= command.id %> --edition enterprise --alias my-scratch-org --target-dev-hub MyHub --release preview

# flags.target-hub.summary
# flags.target-dev-hub.summary

Username or alias of the Dev Hub org.

# flags.target-hub.description
# flags.target-dev-hub.description

Overrides the value of the target-dev-hub configuration variable, if set.

Expand Down Expand Up @@ -86,11 +86,11 @@ The scratch org definition file is a blueprint for the scratch org. It mimics th

Consumer key of the Dev Hub connected app.

# flags.adminEmail.summary
# flags.admin-email.summary

Email address that will be applied to the org's admin user. Overrides the value of the "adminEmail" option in the definition file, if set.

# flags.sourceOrg.summary
# flags.source-org.summary

15-character ID of the org whose shape the new scratch org will be based on. Overrides the value of the "sourceOrg" option in the definition file, if set.

Expand Down
4 changes: 2 additions & 2 deletions messages/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To mark the org for deletion without being prompted to confirm, specify --noprom

- $ <%= config.bin %> <%= command.id %> -u MyOrgAlias -p

# flags.noprompt
# flags.no-prompt.summary

No prompt to confirm deletion.

Expand All @@ -30,7 +30,7 @@ Unable to determine the username of the org to delete. Specify the username with

Username or alias of the target org.

# flags.targetdevhubusername
# flags.targetdevhubusername.summary

The targetdevhubusername flag exists only for backwards compatibility. It is not necessary and has no effect.

Expand Down
4 changes: 2 additions & 2 deletions messages/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ Include expired, deleted, and unknown-status scratch orgs.

Remove all local org authorizations for non-active scratch orgs. Use "org logout" to remove non-scratch orgs.

# flags.noPrompt.summary
# flags.no-prompt.summary

Don't prompt for confirmation.

# flags.skipConnectionStatus.summary
# flags.skip-connection-status.summary

Skip retrieving the connection status of non-scratch orgs.

Expand Down
8 changes: 4 additions & 4 deletions messages/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ Use the --wait (-w) parameter to specify the number of minutes that the command

Set the --target-org (-o) parameter to the username or alias of the production org that contains the sandbox license.

# flags.sandboxname
# flags.sandboxname.summary

Name of the sandbox org to check status for.

# flags.wait
# flags.wait.summary

Number of minutes to wait while polling for status.

# flags.setdefaultusername
# flags.setdefaultusername.summary

Set the created or cloned org as your default.

# flags.setalias
# flags.setalias.summary

Alias for the created or cloned org.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jsdoc": "^43.0.5",
"eslint-plugin-sf-plugin": "^1.15.6",
"eslint-plugin-sf-plugin": "^1.16.0",
"husky": "^7.0.4",
"mocha": "^10.2.0",
"moment": "^2.29.1",
Expand Down
12 changes: 6 additions & 6 deletions src/commands/force/org/clone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,27 @@ export class OrgCloneCommand extends SfCommand<SandboxProcessObject> {
options: ['sandbox'],
})({
char: 't',
summary: messages.getMessage('flags.type'),
summary: messages.getMessage('flags.type.summary'),
required: true,
}),
definitionfile: Flags.file({
char: 'f',
exists: true,
summary: messages.getMessage('flags.definitionfile'),
summary: messages.getMessage('flags.definitionfile.summary'),
}),
setdefaultusername: Flags.boolean({
char: 's',
summary: messages.getMessage('flags.setdefaultusername'),
summary: messages.getMessage('flags.setdefaultusername.summary'),
}),
setalias: Flags.string({
char: 'a',
summary: messages.getMessage('flags.setalias'),
summary: messages.getMessage('flags.setalias.summary'),
}),
wait: Flags.duration({
unit: 'minutes',
char: 'w',
summary: messages.getMessage('flags.wait'),
description: messages.getMessage('flagsLong.wait'),
summary: messages.getMessage('flags.wait.summary'),
description: messages.getMessage('flags.wait.description'),
min: 2,
defaultValue: 6,
}),
Expand Down
20 changes: 10 additions & 10 deletions src/commands/force/org/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,44 +74,44 @@ export class Create extends SfCommand<CreateResult> {
options: [OrgTypes.Scratch, OrgTypes.Sandbox],
})({
char: 't',
summary: messages.getMessage('flags.type'),
summary: messages.getMessage('flags.type.summary'),
default: OrgTypes.Scratch,
}),
definitionfile: Flags.file({
exists: true,
char: 'f',
summary: messages.getMessage('flags.definitionFile'),
summary: messages.getMessage('flags.definitionfile.summary'),
}),
nonamespace: Flags.boolean({
char: 'n',
summary: messages.getMessage('flags.noNamespace'),
summary: messages.getMessage('flags.nonamespace.summary'),
}),
noancestors: Flags.boolean({
char: 'c',
summary: messages.getMessage('flags.noAncestors'),
summary: messages.getMessage('flags.noancestors.summary'),
}),
clientid: Flags.string({
char: 'i',
summary: messages.getMessage('flags.clientId'),
summary: messages.getMessage('flags.clientid.summary'),
}),
setdefaultusername: Flags.boolean({
char: 's',
summary: messages.getMessage('flags.setDefaultUsername'),
summary: messages.getMessage('flags.setdefaultusername.summary'),
}),
setalias: Flags.string({
char: 'a',
summary: messages.getMessage('flags.setAlias'),
summary: messages.getMessage('flags.setalias.summary'),
}),
wait: Flags.duration({
unit: 'minutes',
char: 'w',
summary: messages.getMessage('flags.wait'),
summary: messages.getMessage('flags.wait.summary'),
min: 6,
defaultValue: 6,
}),
durationdays: Flags.integer({
char: 'd',
summary: messages.getMessage('flags.durationDays'),
summary: messages.getMessage('flags.durationdays.summary'),
min: 1,
max: 30,
default: 7,
Expand All @@ -120,7 +120,7 @@ export class Create extends SfCommand<CreateResult> {
hidden: true,
default: 0,
max: 10,
summary: messages.getMessage('flags.retry'),
summary: messages.getMessage('flags.retry.summary'),
}),
};
private sandboxAuth?: SandboxUserAuthResponse;
Expand Down
6 changes: 3 additions & 3 deletions src/commands/force/org/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ export class Delete extends SfCommand<DeleteResult> {
summary: messages.getMessage('flags.target-org.summary'),
}),
targetdevhubusername: Flags.string({
summary: messages.getMessage('flags.targetdevhubusername'),
summary: messages.getMessage('flags.targetdevhubusername.summary'),
char: 'v',
hidden: true,
deprecated: {
version: '58.0',
message: messages.getMessage('flags.targetdevhubusername'),
message: messages.getMessage('flags.targetdevhubusername.summary'),
},
}),
'api-version': orgApiVersionFlagWithDeprecations,
'no-prompt': Flags.boolean({
char: 'p',
summary: messages.getMessage('flags.noprompt'),
summary: messages.getMessage('flags.no-prompt.summary'),
deprecateAliases: true,
aliases: ['noprompt'],
}),
Expand Down
8 changes: 4 additions & 4 deletions src/commands/force/org/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@ export class OrgStatusCommand extends SfCommand<SandboxProcessObject> {
'api-version': orgApiVersionFlagWithDeprecations,
sandboxname: Flags.string({
char: 'n',
summary: messages.getMessage('flags.sandboxname'),
summary: messages.getMessage('flags.sandboxname.summary'),
required: true,
}),
setdefaultusername: Flags.boolean({
char: 's',
summary: messages.getMessage('flags.setdefaultusername'),
summary: messages.getMessage('flags.setdefaultusername.summary'),
}),
setalias: Flags.string({
char: 'a',
summary: messages.getMessage('flags.setalias'),
summary: messages.getMessage('flags.setalias.summary'),
}),
wait: Flags.duration({
unit: 'minutes',
char: 'w',
summary: messages.getMessage('flags.wait'),
summary: messages.getMessage('flags.wait.summary'),
min: 2,
defaultValue: 6,
}),
Expand Down
8 changes: 4 additions & 4 deletions src/commands/org/create/scratch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export default class EnvCreateScratch extends SfCommand<ScratchCreateResponse> {
}),
'target-dev-hub': Flags.requiredHub({
char: 'v',
summary: messages.getMessage('flags.target-hub.summary'),
description: messages.getMessage('flags.target-hub.description'),
summary: messages.getMessage('flags.target-dev-hub.summary'),
description: messages.getMessage('flags.target-dev-hub.description'),
required: true,
}),
'no-ancestors': Flags.boolean({
Expand Down Expand Up @@ -134,11 +134,11 @@ export default class EnvCreateScratch extends SfCommand<ScratchCreateResponse> {
helpGroup: definitionFileHelpGroupName,
}),
'admin-email': Flags.string({
summary: messages.getMessage('flags.adminEmail.summary'),
summary: messages.getMessage('flags.admin-email.summary'),
helpGroup: definitionFileHelpGroupName,
}),
'source-org': Flags.salesforceId({
summary: messages.getMessage('flags.sourceOrg.summary'),
summary: messages.getMessage('flags.source-org.summary'),
startsWith: '00D',
length: 15,
helpGroup: definitionFileHelpGroupName,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/org/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ export class OrgListCommand extends SfCommand<OrgListResult> {
}),
'no-prompt': Flags.boolean({
char: 'p',
summary: messages.getMessage('flags.noPrompt.summary'),
summary: messages.getMessage('flags.no-prompt.summary'),
dependsOn: ['clean'],
aliases: ['noprompt'],
deprecateAliases: true,
}),
'skip-connection-status': Flags.boolean({
summary: messages.getMessage('flags.skipConnectionStatus.summary'),
summary: messages.getMessage('flags.skip-connection-status.summary'),
aliases: ['skipconnectionstatus'],
deprecateAliases: true,
}),
Expand Down
Loading
Loading