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

chore!: remove deprecated hub flag #864

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
106 changes: 40 additions & 66 deletions command-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,100 +1,74 @@
[
{
"command": "force:user:password:generate",
"plugin": "@salesforce/plugin-user",
"flags": [
"api-version",
"complexity",
"json",
"length",
"loglevel",
"on-behalf-of",
"target-dev-hub",
"target-org"
],
"alias": [],
"flagChars": ["c", "l", "o", "u", "v"],
"flagAliases": ["apiversion", "onbehalfof", "targetdevhubusername", "targetusername"]
"command": "force:user:password:generate",
"flagAliases": ["apiversion", "onbehalfof", "targetusername"],
"flagChars": ["c", "l", "o", "u"],
"flags": ["api-version", "complexity", "json", "length", "loglevel", "on-behalf-of", "target-org"],
"plugin": "@salesforce/plugin-user"
},
{
"command": "force:user:permset:assign",
"plugin": "@salesforce/plugin-user",
"flags": ["api-version", "json", "loglevel", "on-behalf-of", "perm-set-name", "target-org"],
"alias": [],
"command": "force:user:permset:assign",
"flagAliases": ["apiversion", "onbehalfof", "permsetname", "targetusername"],
"flagChars": ["n", "o", "u"],
"flagAliases": ["apiversion", "onbehalfof", "permsetname", "targetusername"]
"flags": ["api-version", "json", "loglevel", "on-behalf-of", "perm-set-name", "target-org"],
"plugin": "@salesforce/plugin-user"
},
{
"command": "force:user:permsetlicense:assign",
"plugin": "@salesforce/plugin-user",
"flags": ["api-version", "json", "loglevel", "name", "on-behalf-of", "target-org"],
"alias": [],
"command": "force:user:permsetlicense:assign",
"flagAliases": ["apiversion", "onbehalfof", "perm-set-license", "psl", "targetusername"],
"flagChars": ["b", "n", "u"],
"flagAliases": ["apiversion", "onbehalfof", "perm-set-license", "psl", "targetusername"]
"flags": ["api-version", "json", "loglevel", "name", "on-behalf-of", "target-org"],
"plugin": "@salesforce/plugin-user"
},
{
"command": "org:assign:permset",
"plugin": "@salesforce/plugin-user",
"flags": ["api-version", "json", "name", "on-behalf-of", "target-org"],
"alias": [],
"command": "org:assign:permset",
"flagAliases": ["onbehalfof", "permsetname"],
"flagChars": ["b", "n", "o"],
"flagAliases": ["onbehalfof", "permsetname"]
"flags": ["api-version", "json", "name", "on-behalf-of", "target-org"],
"plugin": "@salesforce/plugin-user"
},
{
"command": "org:assign:permsetlicense",
"plugin": "@salesforce/plugin-user",
"flags": ["api-version", "json", "name", "on-behalf-of", "target-org"],
"alias": [],
"command": "org:assign:permsetlicense",
"flagAliases": ["onbehalfof", "perm-set-license", "psl"],
"flagChars": ["b", "n", "o"],
"flagAliases": ["onbehalfof", "perm-set-license", "psl"]
"flags": ["api-version", "json", "name", "on-behalf-of", "target-org"],
"plugin": "@salesforce/plugin-user"
},
{
"command": "org:create:user",
"plugin": "@salesforce/plugin-user",
"flags": [
"api-version",
"definition-file",
"json",
"loglevel",
"set-alias",
"set-unique-username",
"target-dev-hub",
"target-org"
],
"alias": ["force:user:create"],
"flagChars": ["a", "f", "o", "s", "v"],
"flagAliases": [
"apiversion",
"definitionfile",
"setalias",
"setuniqueusername",
"targetdevhubusername",
"targetusername",
"u"
]
"command": "org:create:user",
"flagAliases": ["apiversion", "definitionfile", "setalias", "setuniqueusername", "targetusername", "u"],
"flagChars": ["a", "f", "o", "s"],
"flags": ["api-version", "definition-file", "json", "loglevel", "set-alias", "set-unique-username", "target-org"],
"plugin": "@salesforce/plugin-user"
},
{
"command": "org:display:user",
"plugin": "@salesforce/plugin-user",
"flags": ["api-version", "json", "loglevel", "target-dev-hub", "target-org"],
"alias": ["force:user:display"],
"flagChars": ["o", "v"],
"flagAliases": ["apiversion", "targetdevhubusername", "targetusername", "u"]
"command": "org:display:user",
"flagAliases": ["apiversion", "targetusername", "u"],
"flagChars": ["o"],
"flags": ["api-version", "json", "loglevel", "target-org"],
"plugin": "@salesforce/plugin-user"
},
{
"command": "org:generate:password",
"plugin": "@salesforce/plugin-user",
"flags": ["api-version", "complexity", "json", "length", "on-behalf-of", "target-org"],
"alias": [],
"command": "org:generate:password",
"flagAliases": ["onbehalfof"],
"flagChars": ["b", "c", "l", "o"],
"flagAliases": ["onbehalfof"]
"flags": ["api-version", "complexity", "json", "length", "on-behalf-of", "target-org"],
"plugin": "@salesforce/plugin-user"
},
{
"command": "org:list:users",
"plugin": "@salesforce/plugin-user",
"flags": ["api-version", "json", "loglevel", "target-dev-hub", "target-org"],
"alias": ["force:user:list"],
"flagChars": ["o", "v"],
"flagAliases": ["apiversion", "targetusername", "u"]
"command": "org:list:users",
"flagAliases": ["apiversion", "targetusername", "u"],
"flagChars": ["o"],
"flags": ["api-version", "json", "loglevel", "target-org"],
"plugin": "@salesforce/plugin-user"
}
]
4 changes: 0 additions & 4 deletions messages/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ The username "%s" already exists in this or another Salesforce org. Usernames mu
Successfully created user "%s" with ID %s for org %s.%s
See more details about this user by running "%s org user display -o %s".

# flags.target-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.

# error.nonScratchOrg

This command works with only scratch orgs.
Expand Down
5 changes: 0 additions & 5 deletions messages/display.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,3 @@ Sharing this information is equivalent to logging someone in under the current c
access and escalation of privilege.
For additional information, review the authorization section of
the https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_web_flow.htm

# flags.target-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.
8 changes: 0 additions & 8 deletions messages/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,3 @@ For scratch orgs, the list includes any users you've created with the "org creat
- List the locally-authenticated users of the specified org:

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

# flags.target-dev-hub.summary

Username or alias of the Dev Hub org.

# 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.
4 changes: 0 additions & 4 deletions messages/password.generate.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,3 @@ Scratch org alias or login user.

Found a comma-separated list of usernames or aliases for the --on-behalf-of flag. Either specify one per flag or
separate by a space.

# flags.target-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.
3 changes: 1 addition & 2 deletions src/baseCommands/user/password/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
*/
import { EOL } from 'node:os';


import { SfCommand } from '@salesforce/sf-plugins-core';
import { AuthInfo, Connection, Messages, Org, SfError, StateAggregator, User } from '@salesforce/core';

Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('@salesforce/plugin-user', 'password.generate');

export type PasswordData = {
Expand Down
4 changes: 1 addition & 3 deletions src/baseCommands/user/permset/assign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/



import { Connection, Messages, Org, SfError, StateAggregator, User } from '@salesforce/core';
import { SfCommand } from '@salesforce/sf-plugins-core';

Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);

type SuccessMsg = {
name: string;
Expand Down
4 changes: 1 addition & 3 deletions src/baseCommands/user/permsetlicense/assign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/



import { Connection, Logger, Messages, SfError, StateAggregator } from '@salesforce/core';
import { SfCommand } from '@salesforce/sf-plugins-core';

Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('@salesforce/plugin-user', 'permsetlicense.assign');

type SuccessMsg = {
Expand Down
15 changes: 1 addition & 14 deletions src/commands/force/user/password/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import {
arrayWithDeprecation,
Flags,
loglevel,
optionalHubFlagWithDeprecations,
orgApiVersionFlagWithDeprecations,
} from '@salesforce/sf-plugins-core';
import { arrayWithDeprecation, Flags, loglevel, orgApiVersionFlagWithDeprecations } from '@salesforce/sf-plugins-core';
import { Messages } from '@salesforce/core';
import { ensureArray } from '@salesforce/kit';
import { GenerateResult, UserPasswordGenerateBaseCommand } from '../../../../baseCommands/user/password/generate.js';
Expand Down Expand Up @@ -50,13 +44,6 @@ export class ForceUserPasswordGenerateCommand extends UserPasswordGenerateBaseCo
max: 5,
default: 5,
}),
'target-dev-hub': {
...optionalHubFlagWithDeprecations,
hidden: true,
deprecated: {
message: messages.getMessage('flags.target-hub.deprecation'),
},
},
'target-org': Flags.requiredOrg({
char: 'u',
summary: messages.getMessage('flags.target-org.summary'),
Expand Down
4 changes: 1 addition & 3 deletions src/commands/org/assign/permset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/



import { Messages, Org } from '@salesforce/core';
import { Flags } from '@salesforce/sf-plugins-core';
import { ensureArray } from '@salesforce/kit';
import { PermsetAssignResult, UserPermSetAssignBaseCommand } from '../../../baseCommands/user/permset/assign.js';

Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('@salesforce/plugin-user', 'permset.assign');

export class AssignPermSetCommand extends UserPermSetAssignBaseCommand {
Expand Down
4 changes: 1 addition & 3 deletions src/commands/org/assign/permsetlicense.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/



import { Messages } from '@salesforce/core';
import { arrayWithDeprecation, Flags } from '@salesforce/sf-plugins-core';
import { ensureArray } from '@salesforce/kit';
import { PSLResult, UserPermSetLicenseAssignBaseCommand } from '../../../baseCommands/user/permsetlicense/assign.js';

Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('@salesforce/plugin-user', 'permsetlicense.assign');

export class AssignPermSetLicenseCommand extends UserPermSetLicenseAssignBaseCommand {
Expand Down
8 changes: 0 additions & 8 deletions src/commands/org/create/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
loglevel,
orgApiVersionFlagWithDeprecations,
parseVarArgs,
optionalHubFlagWithDeprecations,
requiredOrgFlagWithDeprecations,
SfCommand,
} from '@salesforce/sf-plugins-core';
Expand Down Expand Up @@ -74,13 +73,6 @@ export class CreateUserCommand extends SfCommand<CreateUserOutput> {
aliases: ['setuniqueusername'],
deprecateAliases: true,
}),
'target-dev-hub': {
...optionalHubFlagWithDeprecations,
hidden: true,
deprecated: {
message: messages.getMessage('flags.target-hub.deprecation'),
},
},
'target-org': requiredOrgFlagWithDeprecations,
'api-version': orgApiVersionFlagWithDeprecations,
loglevel,
Expand Down
12 changes: 1 addition & 11 deletions src/commands/org/display/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,16 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/



import { AuthFields, Connection, Logger, Messages, StateAggregator } from '@salesforce/core';
import { ensureString } from '@salesforce/ts-types';
import {
loglevel,
optionalHubFlagWithDeprecations,
orgApiVersionFlagWithDeprecations,
requiredOrgFlagWithDeprecations,
SfCommand,
} from '@salesforce/sf-plugins-core';

Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('@salesforce/plugin-user', 'display');

export type DisplayUserResult = {
Expand All @@ -39,13 +36,6 @@ export class DisplayUserCommand extends SfCommand<DisplayUserResult> {
public static readonly description = messages.getMessage('description');
public static readonly examples = messages.getMessages('examples');
public static readonly flags = {
'target-dev-hub': {
...optionalHubFlagWithDeprecations,
hidden: true,
deprecated: {
message: messages.getMessage('flags.target-hub.deprecation'),
},
},
'target-org': requiredOrgFlagWithDeprecations,
'api-version': orgApiVersionFlagWithDeprecations,
loglevel,
Expand Down
3 changes: 1 addition & 2 deletions src/commands/org/generate/password.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/


import { Flags } from '@salesforce/sf-plugins-core';
import { Messages } from '@salesforce/core';
import { ensureArray } from '@salesforce/kit';
import { GenerateResult, UserPasswordGenerateBaseCommand } from '../../../baseCommands/user/password/generate.js';

Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('@salesforce/plugin-user', 'password.generate');

export type PasswordData = {
Expand Down
9 changes: 0 additions & 9 deletions src/commands/org/list/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import { Connection, Messages, StateAggregator } from '@salesforce/core';
import {
Flags,
loglevel,
orgApiVersionFlagWithDeprecations,
requiredOrgFlagWithDeprecations,
Expand Down Expand Up @@ -43,14 +42,6 @@ export class ListUsersCommand extends SfCommand<ListUsers> {
public static readonly description = messages.getMessage('description');
public static readonly examples = messages.getMessages('examples');
public static readonly flags = {
'target-dev-hub': Flags.optionalOrg({
char: 'v',
summary: messages.getMessage('flags.target-dev-hub.summary'),
hidden: true,
deprecated: {
message: messages.getMessage('flags.target-dev-hub.deprecation'),
},
}),
'target-org': requiredOrgFlagWithDeprecations,
'api-version': orgApiVersionFlagWithDeprecations,
loglevel,
Expand Down
Loading
Loading