@microsoft/vscode-azext-azureauth 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -81,9 +81,9 @@ class VSCodeAzureSubscriptionProvider extends vscode.Disposable {
81
81
  getSubscriptions(filter = true) {
82
82
  return __awaiter(this, void 0, void 0, function* () {
83
83
  const tenantIds = yield this.getTenantFilters();
84
- const tenantFilterNormalized = filter && !!tenantIds.length; // If the list is empty it is treated as "no filter"
84
+ const shouldFilterTenants = filter && !!tenantIds.length; // If the list is empty it is treated as "no filter"
85
85
  const subscriptionIds = yield this.getSubscriptionFilters();
86
- const subscriptionFilterNormalized = filter && !!subscriptionIds.length; // If the list is empty it is treated as "no filter"
86
+ const shouldFilterSubscriptions = filter && !!subscriptionIds.length; // If the list is empty it is treated as "no filter"
87
87
  const results = [];
88
88
  try {
89
89
  this.suppressSignInEvents = true;
@@ -92,13 +92,13 @@ class VSCodeAzureSubscriptionProvider extends vscode.Disposable {
92
92
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
93
93
  const tenantId = tenant.tenantId;
94
94
  // If filtering is enabled, and the current tenant is not in that list, then skip it
95
- if (tenantFilterNormalized && !tenantIds.includes(tenantId)) {
95
+ if (shouldFilterTenants && !tenantIds.includes(tenantId)) {
96
96
  continue;
97
97
  }
98
98
  // For each tenant, get the list of subscriptions
99
99
  for (const subscription of yield this.getSubscriptionsForTenant(tenantId)) {
100
100
  // If filtering is enabled, and the current subscription is not in that list, then skip it
101
- if (subscriptionFilterNormalized && !subscriptionIds.includes(subscription.subscriptionId)) {
101
+ if (shouldFilterSubscriptions && !subscriptionIds.includes(subscription.subscriptionId)) {
102
102
  continue;
103
103
  }
104
104
  results.push(subscription);
@@ -108,7 +108,7 @@ class VSCodeAzureSubscriptionProvider extends vscode.Disposable {
108
108
  finally {
109
109
  this.suppressSignInEvents = false;
110
110
  }
111
- return results;
111
+ return results.sort((a, b) => a.name.localeCompare(b.name));
112
112
  });
113
113
  }
114
114
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@microsoft/vscode-azext-azureauth",
3
3
  "author": "Microsoft Corporation",
4
- "version": "1.1.1",
4
+ "version": "1.1.2",
5
5
  "description": "Azure authentication helpers for Visual Studio Code",
6
6
  "tags": [
7
7
  "azure",