Skip to content

Commit 7318c46

Browse files
committed
refactor: other instead of regularOrgs
1 parent 05e8876 commit 7318c46

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/commands/org/list.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export type OrgListResult = {
2626
nonScratchOrgs: ExtendedAuthFields[];
2727
scratchOrgs: FullyPopulatedScratchOrgFields[];
2828
sandboxes: ExtendedAuthFields[];
29-
regularOrgs: ExtendedAuthFields[];
29+
other: ExtendedAuthFields[];
3030
devHubs: ExtendedAuthFields[];
3131
};
3232

@@ -68,7 +68,7 @@ export class OrgListCommand extends SfCommand<OrgListResult> {
6868
const metaConfigs = await OrgListUtil.readLocallyValidatedMetaConfigsGroupedByOrgType(fileNames, flags);
6969
const groupedSortedOrgs = {
7070
devHubs: metaConfigs.devHubs.map(decorateWithDefaultStatus).sort(comparator),
71-
regularOrgs: metaConfigs.regularOrgs.map(decorateWithDefaultStatus).sort(comparator),
71+
other: metaConfigs.other.map(decorateWithDefaultStatus).sort(comparator),
7272
sandboxes: metaConfigs.sandboxes.map(decorateWithDefaultStatus).sort(comparator),
7373
nonScratchOrgs: metaConfigs.nonScratchOrgs.map(decorateWithDefaultStatus).sort(comparator),
7474
scratchOrgs: metaConfigs.scratchOrgs.map(decorateWithDefaultStatus).sort(comparator),
@@ -84,7 +84,7 @@ export class OrgListCommand extends SfCommand<OrgListResult> {
8484
}
8585

8686
const result = {
87-
regularOrgs: groupedSortedOrgs.regularOrgs,
87+
other: groupedSortedOrgs.other,
8888
sandboxes: groupedSortedOrgs.sandboxes,
8989
nonScratchOrgs: groupedSortedOrgs.nonScratchOrgs,
9090
devHubs: groupedSortedOrgs.devHubs,
@@ -95,7 +95,7 @@ export class OrgListCommand extends SfCommand<OrgListResult> {
9595

9696
this.printOrgTable({
9797
devHubs: result.devHubs,
98-
regularOrgs: result.regularOrgs,
98+
other: result.other,
9999
sandboxes: result.sandboxes,
100100
scratchOrgs: result.scratchOrgs,
101101
skipconnectionstatus: flags['skip-connection-status'],
@@ -143,17 +143,17 @@ Legend: ${defaultHubEmoji}=Default DevHub, ${defaultOrgEmoji}=Default Org ${
143143
protected printOrgTable({
144144
devHubs,
145145
scratchOrgs,
146-
regularOrgs,
146+
other,
147147
sandboxes,
148148
skipconnectionstatus,
149149
}: {
150150
devHubs: ExtendedAuthFields[];
151-
regularOrgs: ExtendedAuthFields[];
151+
other: ExtendedAuthFields[];
152152
sandboxes: ExtendedAuthFields[];
153153
scratchOrgs: FullyPopulatedScratchOrgFields[];
154154
skipconnectionstatus: boolean;
155155
}): void {
156-
if (!devHubs.length && !regularOrgs.length && !sandboxes.length) {
156+
if (!devHubs.length && !other.length && !sandboxes.length) {
157157
this.info(messages.getMessage('noResultsFound'));
158158
return;
159159
}
@@ -164,7 +164,7 @@ Legend: ${defaultHubEmoji}=Default DevHub, ${defaultOrgEmoji}=Default Org ${
164164
.map((row) => getStyledObject(row))
165165
.map(statusToEmoji),
166166

167-
...regularOrgs
167+
...other
168168
.map(colorEveryFieldButConnectedStatus(chalk.magentaBright))
169169
.map((row) => getStyledObject(row))
170170
.map(statusToEmoji),

src/shared/orgListUtil.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type OrgGroups = {
3838
type OrgGroupsFullyPopulated = {
3939
nonScratchOrgs: ExtendedAuthFields[];
4040
scratchOrgs: FullyPopulatedScratchOrgFields[];
41-
regularOrgs: ExtendedAuthFields[];
41+
other: ExtendedAuthFields[];
4242
sandboxes: ExtendedAuthFields[];
4343
devHubs: ExtendedAuthFields[];
4444
};
@@ -97,7 +97,7 @@ export class OrgListUtil {
9797
nonScratchOrgs,
9898
scratchOrgs,
9999
sandboxes: nonScratchOrgs.filter(sandboxFilter),
100-
regularOrgs: nonScratchOrgs.filter(regularOrgFilter),
100+
other: nonScratchOrgs.filter(regularOrgFilter),
101101
devHubs: nonScratchOrgs.filter(devHubFilter),
102102
};
103103
}

test/shared/orgListMock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class OrgListMock {
104104
},
105105
],
106106
sandboxes: [],
107-
regularOrgs: [],
107+
other: [],
108108
};
109109

110110
public static get devHubUsername(): string {

0 commit comments

Comments
 (0)