mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 17:22:59 -05:00
Merge from vscode fcf3346a8e9f5ee1e00674461d9e2c2292a14ee3 (#12295)
* Merge from vscode fcf3346a8e9f5ee1e00674461d9e2c2292a14ee3 * Fix test build break * Update distro * Fix build errors * Update distro * Update REH build file * Update build task names for REL * Fix product build yaml * Fix product REH task name * Fix type in task name * Update linux build step * Update windows build tasks * Turn off server publish * Disable REH * Fix typo * Bump distro * Update vscode tests * Bump distro * Fix type in disto * Bump distro * Turn off docker build * Remove docker step from release Co-authored-by: ADS Merger <andresse@microsoft.com> Co-authored-by: Karl Burtram <karlb@microsoft.com>
This commit is contained in:
@@ -45,7 +45,6 @@ import { Memento } from 'vs/workbench/common/memento';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { entries } from 'sql/base/common/collections';
|
||||
import { find } from 'vs/base/common/arrays';
|
||||
import { values } from 'vs/base/common/collections';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
@@ -795,7 +794,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
||||
return AzureResource.Sql;
|
||||
}
|
||||
|
||||
let result = find(ConnectionManagementService._azureResources, r => AzureResource[r] === provider.properties.azureResource);
|
||||
let result = ConnectionManagementService._azureResources.find(r => AzureResource[r] === provider.properties.azureResource);
|
||||
return result ? result : AzureResource.Sql;
|
||||
}
|
||||
|
||||
@@ -814,7 +813,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
||||
const azureAccounts = accounts.filter(a => a.key.providerId.startsWith('azure'));
|
||||
if (azureAccounts && azureAccounts.length > 0) {
|
||||
let accountId = (connection.authenticationType === Constants.azureMFA || connection.authenticationType === Constants.azureMFAAndUser) ? connection.azureAccount : connection.userName;
|
||||
let account = find(azureAccounts, account => account.key.accountId === accountId);
|
||||
let account = azureAccounts.find(account => account.key.accountId === accountId);
|
||||
if (account) {
|
||||
this._logService.debug(`Getting security token for Azure account ${account.key.accountId}`);
|
||||
if (account.isStale) {
|
||||
@@ -1094,7 +1093,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
||||
];
|
||||
|
||||
return this._quickInputService.pick(choices.map(x => x.key), { placeHolder: nls.localize('cancelConnectionConfirmation', "Are you sure you want to cancel this connection?"), ignoreFocusLost: true }).then((choice) => {
|
||||
let confirm = find(choices, x => x.key === choice);
|
||||
let confirm = choices.find(x => x.key === choice);
|
||||
return confirm && confirm.value;
|
||||
});
|
||||
}
|
||||
@@ -1350,10 +1349,10 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
||||
}
|
||||
|
||||
public async getConnectionCredentials(profileId: string): Promise<{ [name: string]: string }> {
|
||||
let profile = find(this.getActiveConnections(), connectionProfile => connectionProfile.id === profileId);
|
||||
let profile = this.getActiveConnections().find(connectionProfile => connectionProfile.id === profileId);
|
||||
if (!profile) {
|
||||
// Couldn't find an active profile so try all profiles now - fetching the password if we found one
|
||||
profile = find(this.getConnections(), connectionProfile => connectionProfile.id === profileId);
|
||||
profile = this.getConnections().find(connectionProfile => connectionProfile.id === profileId);
|
||||
if (!profile) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -1361,7 +1360,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
||||
}
|
||||
|
||||
// Find the password option for the connection provider
|
||||
let passwordOption = find(this._capabilitiesService.getCapabilities(profile.providerName).connection.connectionOptions,
|
||||
let passwordOption = this._capabilitiesService.getCapabilities(profile.providerName).connection.connectionOptions.find(
|
||||
option => option.specialValueType === ConnectionOptionSpecialType.password);
|
||||
if (!passwordOption) {
|
||||
return undefined;
|
||||
@@ -1449,7 +1448,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
||||
const connections = this.getActiveConnections();
|
||||
|
||||
const connectionExists: (conn: ConnectionProfile) => boolean = (conn) => {
|
||||
return find(connections, existingConnection => existingConnection.id === conn.id) !== undefined;
|
||||
return connections.find(existingConnection => existingConnection.id === conn.id) !== undefined;
|
||||
};
|
||||
|
||||
if (!activeConnectionsOnly) {
|
||||
|
||||
Reference in New Issue
Block a user