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:
Christopher Suh
2020-10-03 14:42:05 -04:00
committed by GitHub
parent 58d02b76db
commit 6ff1e3866b
687 changed files with 10507 additions and 9104 deletions

View File

@@ -17,7 +17,6 @@ import { EditDataInput } from 'sql/workbench/browser/editData/editDataInput';
import { DashboardInput } from 'sql/workbench/browser/editor/profiler/dashboardInput';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput';
import { find } from 'vs/base/common/arrays';
/**
* Workbench action to clear the recent connnections list
@@ -83,7 +82,7 @@ export class ClearRecentConnectionsAction extends Action {
];
self._quickInputService.pick(choices.map(x => x.key), { placeHolder: nls.localize('ClearRecentlyUsedLabel', "Clear List"), ignoreFocusLost: true }).then((choice) => {
let confirm = find(choices, x => x.key === choice);
let confirm = choices.find(x => x.key === choice);
resolve(confirm && confirm.value);
});
});

View File

@@ -18,7 +18,6 @@ import { IServerGroupController } from 'sql/platform/serverGroup/common/serverGr
import { ILogService } from 'vs/platform/log/common/log';
import { ConnectionProviderProperties } from 'sql/platform/capabilities/common/capabilitiesService';
import { assign } from 'vs/base/common/objects';
import { find } from 'vs/base/common/arrays';
export class ConnectionController implements IConnectionComponentController {
private _advancedController: AdvancedPropertiesController;
@@ -166,7 +165,7 @@ export class ConnectionController implements IConnectionComponentController {
this._connectionWidget.updateServerGroup(this.getAllServerGroups(providers));
this._model = connectionInfo;
this._model.providerName = this._providerName;
let appNameOption = find(this._providerOptions, option => option.specialValueType === ConnectionOptionSpecialType.appName);
let appNameOption = this._providerOptions.find(option => option.specialValueType === ConnectionOptionSpecialType.appName);
if (appNameOption) {
let appNameKey = appNameOption.name;
this._model.options[appNameKey] = Constants.applicationName;

View File

@@ -29,7 +29,6 @@ import { localize } from 'vs/nls';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { CmsConnectionController } from 'sql/workbench/services/connection/browser/cmsConnectionController';
import { entries } from 'sql/base/common/collections';
import { find } from 'vs/base/common/arrays';
import { onUnexpectedError } from 'vs/base/common/errors';
import { ILogService } from 'vs/platform/log/common/log';
@@ -316,7 +315,7 @@ export class ConnectionDialogService implements IConnectionDialogService {
}
if (!isProviderInParams) {
let uniqueProvidersMap = this._connectionManagementService.getUniqueConnectionProvidersByNameMap(this._providerNameToDisplayNameMap);
this._currentProviderType = find(Object.keys(uniqueProvidersMap), (key) => uniqueProvidersMap[key] === input.selectedProviderDisplayName);
this._currentProviderType = Object.keys(uniqueProvidersMap).find((key) => uniqueProvidersMap[key] === input.selectedProviderDisplayName);
}
}
this._model.providerName = this._currentProviderType;

View File

@@ -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) {

View File

@@ -35,7 +35,6 @@ import { endsWith, startsWith } from 'vs/base/common/strings';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ILogService } from 'vs/platform/log/common/log';
import { find } from 'vs/base/common/arrays';
export enum AuthenticationType {
SqlLogin = 'SqlLogin',
@@ -136,7 +135,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
protected getAuthTypeDefault(option: azdata.ConnectionOption, os: OperatingSystem): string {
// Check for OS-specific default value
if (option.defaultValueOsOverrides) {
let result = find(option.defaultValueOsOverrides, d => ConnectionWidget._osByName[d.os] === os);
let result = option.defaultValueOsOverrides.find(d => ConnectionWidget._osByName[d.os] === os);
if (result) {
return result.defaultValueOverride;
}
@@ -413,7 +412,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
if (this._refreshCredentialsLink) {
this._register(DOM.addDisposableListener(this._refreshCredentialsLink, DOM.EventType.CLICK, async () => {
let account = find(this._azureAccountList, account => account.key.accountId === this._azureAccountDropdown.value);
let account = this._azureAccountList.find(account => account.key.accountId === this._azureAccountDropdown.value);
if (account) {
await this._accountManagementService.refreshAccount(account);
await this.fillInAzureAccountOptions();
@@ -537,7 +536,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
}
private updateRefreshCredentialsLink(): void {
let chosenAccount = find(this._azureAccountList, account => account.key.accountId === this._azureAccountDropdown.value);
let chosenAccount = this._azureAccountList.find(account => account.key.accountId === this._azureAccountDropdown.value);
if (chosenAccount && chosenAccount.isStale) {
DOM.removeClass(this._tableContainer, 'hide-refresh-link');
} else {
@@ -558,7 +557,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
await this.fillInAzureAccountOptions();
// If a new account was added find it and select it, otherwise select the first account
let newAccount = find(this._azureAccountList, option => !oldAccountIds.some(oldId => oldId === option.key.accountId));
let newAccount = this._azureAccountList.find(option => !oldAccountIds.some(oldId => oldId === option.key.accountId));
if (newAccount) {
this._azureAccountDropdown.selectWithOptionName(newAccount.key.accountId);
} else {
@@ -570,7 +569,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
// Display the tenant select box if needed
const hideTenantsClassName = 'hide-azure-tenants';
let selectedAccount = find(this._azureAccountList, account => account.key.accountId === this._azureAccountDropdown.value);
let selectedAccount = this._azureAccountList.find(account => account.key.accountId === this._azureAccountDropdown.value);
if (selectedAccount && selectedAccount.properties.tenants && selectedAccount.properties.tenants.length > 1) {
// There are multiple tenants available so let the user select one
let options = selectedAccount.properties.tenants.map(tenant => tenant.displayName);
@@ -589,7 +588,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
private onAzureTenantSelected(tenantIndex: number): void {
this._azureTenantId = undefined;
let account = find(this._azureAccountList, account => account.key.accountId === this._azureAccountDropdown.value);
let account = this._azureAccountList.find(account => account.key.accountId === this._azureAccountDropdown.value);
if (account && account.properties.tenants) {
let tenant = account.properties.tenants[tenantIndex];
if (tenant) {
@@ -708,7 +707,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
this._azureAccountDropdown.selectWithOptionName(this.getModelValue(accountName));
await this.onAzureAccountSelected();
let tenantId = connectionInfo.azureTenantId;
let account = find(this._azureAccountList, account => account.key.accountId === this._azureAccountDropdown.value);
let account = this._azureAccountList.find(account => account.key.accountId === this._azureAccountDropdown.value);
if (account && account.properties.tenants.length > 1) {
let tenant = account.properties.tenants.find(tenant => tenant.id === tenantId);
if (tenant) {
@@ -912,12 +911,12 @@ export class ConnectionWidget extends lifecycle.Disposable {
private findGroupId(groupFullName: string): string {
let group: IConnectionProfileGroup;
if (ConnectionProfileGroup.isRoot(groupFullName)) {
group = find(this._serverGroupOptions, g => ConnectionProfileGroup.isRoot(g.name));
group = this._serverGroupOptions.find(g => ConnectionProfileGroup.isRoot(g.name));
if (group === undefined) {
group = find(this._serverGroupOptions, g => g.name === this.DefaultServerGroup.name);
group = this._serverGroupOptions.find(g => g.name === this.DefaultServerGroup.name);
}
} else {
group = find(this._serverGroupOptions, g => g.name === groupFullName);
group = this._serverGroupOptions.find(g => g.name === groupFullName);
}
return group ? group.id : undefined;
}
@@ -926,7 +925,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
if (!displayName) {
return undefined;
}
return find(ConnectionWidget._authTypes, authType => this.getAuthTypeDisplayName(authType) === displayName);
return ConnectionWidget._authTypes.find(authType => this.getAuthTypeDisplayName(authType) === displayName);
}
public closeDatabaseDropdown(): void {