Skip to content

Commit 31896a5

Browse files
authored
feat!: remove deprecated hub flag (#864)
1 parent e6f8b3c commit 31896a5

File tree

20 files changed

+63
-193
lines changed

20 files changed

+63
-193
lines changed

command-snapshot.json

Lines changed: 40 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,74 @@
11
[
22
{
3-
"command": "force:user:password:generate",
4-
"plugin": "@salesforce/plugin-user",
5-
"flags": [
6-
"api-version",
7-
"complexity",
8-
"json",
9-
"length",
10-
"loglevel",
11-
"on-behalf-of",
12-
"target-dev-hub",
13-
"target-org"
14-
],
153
"alias": [],
16-
"flagChars": ["c", "l", "o", "u", "v"],
17-
"flagAliases": ["apiversion", "onbehalfof", "targetdevhubusername", "targetusername"]
4+
"command": "force:user:password:generate",
5+
"flagAliases": ["apiversion", "onbehalfof", "targetusername"],
6+
"flagChars": ["c", "l", "o", "u"],
7+
"flags": ["api-version", "complexity", "json", "length", "loglevel", "on-behalf-of", "target-org"],
8+
"plugin": "@salesforce/plugin-user"
189
},
1910
{
20-
"command": "force:user:permset:assign",
21-
"plugin": "@salesforce/plugin-user",
22-
"flags": ["api-version", "json", "loglevel", "on-behalf-of", "perm-set-name", "target-org"],
2311
"alias": [],
12+
"command": "force:user:permset:assign",
13+
"flagAliases": ["apiversion", "onbehalfof", "permsetname", "targetusername"],
2414
"flagChars": ["n", "o", "u"],
25-
"flagAliases": ["apiversion", "onbehalfof", "permsetname", "targetusername"]
15+
"flags": ["api-version", "json", "loglevel", "on-behalf-of", "perm-set-name", "target-org"],
16+
"plugin": "@salesforce/plugin-user"
2617
},
2718
{
28-
"command": "force:user:permsetlicense:assign",
29-
"plugin": "@salesforce/plugin-user",
30-
"flags": ["api-version", "json", "loglevel", "name", "on-behalf-of", "target-org"],
3119
"alias": [],
20+
"command": "force:user:permsetlicense:assign",
21+
"flagAliases": ["apiversion", "onbehalfof", "perm-set-license", "psl", "targetusername"],
3222
"flagChars": ["b", "n", "u"],
33-
"flagAliases": ["apiversion", "onbehalfof", "perm-set-license", "psl", "targetusername"]
23+
"flags": ["api-version", "json", "loglevel", "name", "on-behalf-of", "target-org"],
24+
"plugin": "@salesforce/plugin-user"
3425
},
3526
{
36-
"command": "org:assign:permset",
37-
"plugin": "@salesforce/plugin-user",
38-
"flags": ["api-version", "json", "name", "on-behalf-of", "target-org"],
3927
"alias": [],
28+
"command": "org:assign:permset",
29+
"flagAliases": ["onbehalfof", "permsetname"],
4030
"flagChars": ["b", "n", "o"],
41-
"flagAliases": ["onbehalfof", "permsetname"]
31+
"flags": ["api-version", "json", "name", "on-behalf-of", "target-org"],
32+
"plugin": "@salesforce/plugin-user"
4233
},
4334
{
44-
"command": "org:assign:permsetlicense",
45-
"plugin": "@salesforce/plugin-user",
46-
"flags": ["api-version", "json", "name", "on-behalf-of", "target-org"],
4735
"alias": [],
36+
"command": "org:assign:permsetlicense",
37+
"flagAliases": ["onbehalfof", "perm-set-license", "psl"],
4838
"flagChars": ["b", "n", "o"],
49-
"flagAliases": ["onbehalfof", "perm-set-license", "psl"]
39+
"flags": ["api-version", "json", "name", "on-behalf-of", "target-org"],
40+
"plugin": "@salesforce/plugin-user"
5041
},
5142
{
52-
"command": "org:create:user",
53-
"plugin": "@salesforce/plugin-user",
54-
"flags": [
55-
"api-version",
56-
"definition-file",
57-
"json",
58-
"loglevel",
59-
"set-alias",
60-
"set-unique-username",
61-
"target-dev-hub",
62-
"target-org"
63-
],
6443
"alias": ["force:user:create"],
65-
"flagChars": ["a", "f", "o", "s", "v"],
66-
"flagAliases": [
67-
"apiversion",
68-
"definitionfile",
69-
"setalias",
70-
"setuniqueusername",
71-
"targetdevhubusername",
72-
"targetusername",
73-
"u"
74-
]
44+
"command": "org:create:user",
45+
"flagAliases": ["apiversion", "definitionfile", "setalias", "setuniqueusername", "targetusername", "u"],
46+
"flagChars": ["a", "f", "o", "s"],
47+
"flags": ["api-version", "definition-file", "json", "loglevel", "set-alias", "set-unique-username", "target-org"],
48+
"plugin": "@salesforce/plugin-user"
7549
},
7650
{
77-
"command": "org:display:user",
78-
"plugin": "@salesforce/plugin-user",
79-
"flags": ["api-version", "json", "loglevel", "target-dev-hub", "target-org"],
8051
"alias": ["force:user:display"],
81-
"flagChars": ["o", "v"],
82-
"flagAliases": ["apiversion", "targetdevhubusername", "targetusername", "u"]
52+
"command": "org:display:user",
53+
"flagAliases": ["apiversion", "targetusername", "u"],
54+
"flagChars": ["o"],
55+
"flags": ["api-version", "json", "loglevel", "target-org"],
56+
"plugin": "@salesforce/plugin-user"
8357
},
8458
{
85-
"command": "org:generate:password",
86-
"plugin": "@salesforce/plugin-user",
87-
"flags": ["api-version", "complexity", "json", "length", "on-behalf-of", "target-org"],
8859
"alias": [],
60+
"command": "org:generate:password",
61+
"flagAliases": ["onbehalfof"],
8962
"flagChars": ["b", "c", "l", "o"],
90-
"flagAliases": ["onbehalfof"]
63+
"flags": ["api-version", "complexity", "json", "length", "on-behalf-of", "target-org"],
64+
"plugin": "@salesforce/plugin-user"
9165
},
9266
{
93-
"command": "org:list:users",
94-
"plugin": "@salesforce/plugin-user",
95-
"flags": ["api-version", "json", "loglevel", "target-dev-hub", "target-org"],
9667
"alias": ["force:user:list"],
97-
"flagChars": ["o", "v"],
98-
"flagAliases": ["apiversion", "targetusername", "u"]
68+
"command": "org:list:users",
69+
"flagAliases": ["apiversion", "targetusername", "u"],
70+
"flagChars": ["o"],
71+
"flags": ["api-version", "json", "loglevel", "target-org"],
72+
"plugin": "@salesforce/plugin-user"
9973
}
10074
]

messages/create.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ The username "%s" already exists in this or another Salesforce org. Usernames mu
7474
Successfully created user "%s" with ID %s for org %s.%s
7575
See more details about this user by running "%s org user display -o %s".
7676

77-
# flags.target-hub.deprecation
78-
79-
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.
80-
8177
# error.nonScratchOrg
8278

8379
This command works with only scratch orgs.

messages/display.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,3 @@ Sharing this information is equivalent to logging someone in under the current c
2323
access and escalation of privilege.
2424
For additional information, review the authorization section of
2525
the https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_web_flow.htm
26-
27-
# flags.target-hub.deprecation
28-
29-
The --target-dev-hub flag is deprecated and is no longer used by this command. The flag will be removed in API version
30-
57.0 or later.

messages/list.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,3 @@ For scratch orgs, the list includes any users you've created with the "org creat
1515
- List the locally-authenticated users of the specified org:
1616

1717
<%= config.bin %> <%= command.id %> --target-org me@my.org
18-
19-
# flags.target-dev-hub.summary
20-
21-
Username or alias of the Dev Hub org.
22-
23-
# flags.target-dev-hub.deprecation
24-
25-
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.

messages/password.generate.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,3 @@ Scratch org alias or login user.
9090

9191
Found a comma-separated list of usernames or aliases for the --on-behalf-of flag. Either specify one per flag or
9292
separate by a space.
93-
94-
# flags.target-hub.deprecation
95-
96-
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.

src/baseCommands/user/password/generate.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
*/
77
import { EOL } from 'node:os';
88

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

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

1615
export type PasswordData = {

src/baseCommands/user/permset/assign.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

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

13-
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
11+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
1412

1513
type SuccessMsg = {
1614
name: string;

src/baseCommands/user/permsetlicense/assign.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

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

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

1614
type SuccessMsg = {

src/commands/force/user/password/generate.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8-
import {
9-
arrayWithDeprecation,
10-
Flags,
11-
loglevel,
12-
optionalHubFlagWithDeprecations,
13-
orgApiVersionFlagWithDeprecations,
14-
} from '@salesforce/sf-plugins-core';
8+
import { arrayWithDeprecation, Flags, loglevel, orgApiVersionFlagWithDeprecations } from '@salesforce/sf-plugins-core';
159
import { Messages } from '@salesforce/core';
1610
import { ensureArray } from '@salesforce/kit';
1711
import { GenerateResult, UserPasswordGenerateBaseCommand } from '../../../../baseCommands/user/password/generate.js';
@@ -50,13 +44,6 @@ export class ForceUserPasswordGenerateCommand extends UserPasswordGenerateBaseCo
5044
max: 5,
5145
default: 5,
5246
}),
53-
'target-dev-hub': {
54-
...optionalHubFlagWithDeprecations,
55-
hidden: true,
56-
deprecated: {
57-
message: messages.getMessage('flags.target-hub.deprecation'),
58-
},
59-
},
6047
'target-org': Flags.requiredOrg({
6148
char: 'u',
6249
summary: messages.getMessage('flags.target-org.summary'),

src/commands/org/assign/permset.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8-
9-
108
import { Messages, Org } from '@salesforce/core';
119
import { Flags } from '@salesforce/sf-plugins-core';
1210
import { ensureArray } from '@salesforce/kit';
1311
import { PermsetAssignResult, UserPermSetAssignBaseCommand } from '../../../baseCommands/user/permset/assign.js';
1412

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

1816
export class AssignPermSetCommand extends UserPermSetAssignBaseCommand {

src/commands/org/assign/permsetlicense.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8-
9-
108
import { Messages } from '@salesforce/core';
119
import { arrayWithDeprecation, Flags } from '@salesforce/sf-plugins-core';
1210
import { ensureArray } from '@salesforce/kit';
1311
import { PSLResult, UserPermSetLicenseAssignBaseCommand } from '../../../baseCommands/user/permsetlicense/assign.js';
1412

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

1816
export class AssignPermSetLicenseCommand extends UserPermSetLicenseAssignBaseCommand {

src/commands/org/create/user.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import {
2727
loglevel,
2828
orgApiVersionFlagWithDeprecations,
2929
parseVarArgs,
30-
optionalHubFlagWithDeprecations,
3130
requiredOrgFlagWithDeprecations,
3231
SfCommand,
3332
} from '@salesforce/sf-plugins-core';
@@ -74,13 +73,6 @@ export class CreateUserCommand extends SfCommand<CreateUserOutput> {
7473
aliases: ['setuniqueusername'],
7574
deprecateAliases: true,
7675
}),
77-
'target-dev-hub': {
78-
...optionalHubFlagWithDeprecations,
79-
hidden: true,
80-
deprecated: {
81-
message: messages.getMessage('flags.target-hub.deprecation'),
82-
},
83-
},
8476
'target-org': requiredOrgFlagWithDeprecations,
8577
'api-version': orgApiVersionFlagWithDeprecations,
8678
loglevel,

src/commands/org/display/user.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,16 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8-
9-
108
import { AuthFields, Connection, Logger, Messages, StateAggregator } from '@salesforce/core';
119
import { ensureString } from '@salesforce/ts-types';
1210
import {
1311
loglevel,
14-
optionalHubFlagWithDeprecations,
1512
orgApiVersionFlagWithDeprecations,
1613
requiredOrgFlagWithDeprecations,
1714
SfCommand,
1815
} from '@salesforce/sf-plugins-core';
1916

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

2320
export type DisplayUserResult = {
@@ -39,13 +36,6 @@ export class DisplayUserCommand extends SfCommand<DisplayUserResult> {
3936
public static readonly description = messages.getMessage('description');
4037
public static readonly examples = messages.getMessages('examples');
4138
public static readonly flags = {
42-
'target-dev-hub': {
43-
...optionalHubFlagWithDeprecations,
44-
hidden: true,
45-
deprecated: {
46-
message: messages.getMessage('flags.target-hub.deprecation'),
47-
},
48-
},
4939
'target-org': requiredOrgFlagWithDeprecations,
5040
'api-version': orgApiVersionFlagWithDeprecations,
5141
loglevel,

src/commands/org/generate/password.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

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

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

1716
export type PasswordData = {

src/commands/org/list/users.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import { Connection, Messages, StateAggregator } from '@salesforce/core';
99
import {
10-
Flags,
1110
loglevel,
1211
orgApiVersionFlagWithDeprecations,
1312
requiredOrgFlagWithDeprecations,
@@ -43,14 +42,6 @@ export class ListUsersCommand extends SfCommand<ListUsers> {
4342
public static readonly description = messages.getMessage('description');
4443
public static readonly examples = messages.getMessages('examples');
4544
public static readonly flags = {
46-
'target-dev-hub': Flags.optionalOrg({
47-
char: 'v',
48-
summary: messages.getMessage('flags.target-dev-hub.summary'),
49-
hidden: true,
50-
deprecated: {
51-
message: messages.getMessage('flags.target-dev-hub.deprecation'),
52-
},
53-
}),
5445
'target-org': requiredOrgFlagWithDeprecations,
5546
'api-version': orgApiVersionFlagWithDeprecations,
5647
loglevel,

0 commit comments

Comments
 (0)