Skip to content

Commit

Permalink
fix: message naming conventions from linter, node: imports (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc authored Oct 30, 2023
1 parent 1775c91 commit 468de2f
Show file tree
Hide file tree
Showing 13 changed files with 211 additions and 243 deletions.
10 changes: 5 additions & 5 deletions messages/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,23 @@ For more information about user limits, defaults, and other considerations when

<%= config.bin %> <%= command.id %> --definition-file config/project-user-def.json email=[email protected] generatepassword=true --set-unique-username

# flags.alias.summary
# flags.set-alias.summary

Set an alias for the created username to reference in other CLI commands.

# flags.definitionfile.summary
# flags.definition-file.summary

File path to a user definition file for customizing the new user.

# flags.definitionfile.description
# flags.definition-file.description

The user definition file uses JSON format and can include any Salesforce User sObject field and Salesforce DX-specific options. See https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_users_def_file.htm for more information.

# flags.setuniqueusername.summary
# flags.set-unique-username.summary

Force the username, if specified in the definition file or at the command line, to be unique by appending the org ID.

# flags.setuniqueusername.description
# flags.set-unique-username.description

The new user’s username must be unique across all Salesforce orgs and in the form of an email address. If you let this command generate a username for you, it's guaranteed to be unique. If you specify an existing username in a definition file, the command fails. Set this flag to force the username to be unique; as a result, the username might be different than what you specify in the definition file.

Expand Down
4 changes: 2 additions & 2 deletions messages/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ For scratch orgs, the list includes any users you've created with the "org creat

<%= config.bin %> <%= command.id %> --target-org [email protected]

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

Username or alias of the Dev Hub org.

# flags.target-hub.deprecation
# flags.target-dev-hub.deprecation

The --target-dev-hub flag is deprecated and is no longer used by this command. The flag will be removed in API version 57.0 or later.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@
"@oclif/plugin-command-snapshot": "^4.0.13",
"@salesforce/cli-plugins-testkit": "^4.4.10",
"@salesforce/dev-config": "^4.0.1",
"@salesforce/dev-scripts": "^5.11.0",
"@salesforce/dev-scripts": "^5.12.0",
"@salesforce/plugin-command-reference": "^3.0.45",
"@salesforce/prettier-config": "^0.0.3",
"@salesforce/ts-sinon": "^1.4.17",
"@swc/core": "^1.3.36",
"@types/inquirer": "^9.0.6",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.61.0",
"chai": "^4.3.8",
"chai": "^4.3.10",
"chai-each": "^0.0.1",
"eslint": "^8.50.0",
"eslint": "^8.52.0",
"eslint-config-prettier": "^8.10.0",
"eslint-config-salesforce": "^2.0.2",
"eslint-config-salesforce-license": "^0.2.0",
"eslint-config-salesforce-typescript": "^1.1.2",
"eslint-config-salesforce-typescript": "^2.0.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jsdoc": "^43.0.5",
"eslint-plugin-jsdoc": "^46.8.2",
"eslint-plugin-sf-plugin": "^1.16.12",
"husky": "^7.0.4",
"mocha": "^9.1.3",
Expand All @@ -45,8 +45,8 @@
"shx": "0.3.4",
"sinon": "^15.2.0",
"ts-node": "^10.0.0",
"typescript": "^4.9.5",
"wireit": "^0.14.0"
"typescript": "^5.2.2",
"wireit": "^0.14.1"
},
"config": {},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion src/baseCommands/user/password/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as os from 'os';
import * as os from 'node:os';
import { SfCommand } from '@salesforce/sf-plugins-core';
import { AuthInfo, Connection, Messages, Org, SfError, StateAggregator, User } from '@salesforce/core';

Expand Down
14 changes: 7 additions & 7 deletions src/commands/org/create/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as os from 'os';
import * as fs from 'fs';
import * as os from 'node:os';
import * as fs from 'node:fs';
import {
AuthInfo,
Connection,
Expand Down Expand Up @@ -61,21 +61,21 @@ export class CreateUserCommand extends SfCommand<CreateUserOutput> {
public static readonly flags = {
'set-alias': Flags.string({
char: 'a',
summary: messages.getMessage('flags.alias.summary'),
summary: messages.getMessage('flags.set-alias.summary'),
aliases: ['setalias'],
deprecateAliases: true,
}),
'definition-file': Flags.string({
char: 'f',
summary: messages.getMessage('flags.definitionfile.summary'),
description: messages.getMessage('flags.definitionfile.description'),
summary: messages.getMessage('flags.definition-file.summary'),
description: messages.getMessage('flags.definition-file.description'),
aliases: ['definitionfile'],
deprecateAliases: true,
}),
'set-unique-username': Flags.boolean({
char: 's',
summary: messages.getMessage('flags.setuniqueusername.summary'),
description: messages.getMessage('flags.setuniqueusername.description'),
summary: messages.getMessage('flags.set-unique-username.summary'),
description: messages.getMessage('flags.set-unique-username.description'),
aliases: ['setuniqueusername'],
deprecateAliases: true,
}),
Expand Down
4 changes: 2 additions & 2 deletions src/commands/org/list/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ export class ListUsersCommand extends SfCommand<ListUsers> {
public static readonly flags = {
'target-dev-hub': Flags.optionalOrg({
char: 'v',
summary: messages.getMessage('flags.target-hub.summary'),
summary: messages.getMessage('flags.target-dev-hub.summary'),
hidden: true,
deprecated: {
message: messages.getMessage('flags.target-hub.deprecation'),
message: messages.getMessage('flags.target-dev-hub.deprecation'),
},
}),
'target-org': requiredOrgFlagWithDeprecations,
Expand Down
2 changes: 1 addition & 1 deletion test/allCommands.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import * as path from 'path';
import * as path from 'node:path';
import { expect, use } from 'chai';
import * as chaiEach from 'chai-each';

Expand Down
2 changes: 1 addition & 1 deletion test/allCommandsNoJSON.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as path from 'path';
import * as path from 'node:path';

import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit';

Expand Down
2 changes: 1 addition & 1 deletion test/commands/create.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import * as path from 'path';
import * as path from 'node:path';
import { expect } from 'chai';
import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit';
import { AuthInfo, Connection } from '@salesforce/core';
Expand Down
2 changes: 1 addition & 1 deletion test/commands/create.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/* eslint-disable @typescript-eslint/ban-ts-comment */

import * as fs from 'fs';
import * as fs from 'node:fs';
import { AuthInfo, Connection, DefaultUserFields, Logger, Org, User } from '@salesforce/core';
import { Config } from '@oclif/core';
import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup';
Expand Down
2 changes: 1 addition & 1 deletion test/commands/permsetlicense/assign.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as path from 'path';
import * as path from 'node:path';
import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit';
import { expect } from 'chai';
import { PSLResult } from '../../../src/baseCommands/user/permsetlicense/assign';
Expand Down
2 changes: 1 addition & 1 deletion test/forceCommands.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import * as path from 'path';
import * as path from 'node:path';
import { expect, use } from 'chai';
import * as chaiEach from 'chai-each';

Expand Down
Loading

0 comments on commit 468de2f

Please sign in to comment.