diff --git a/src/sql/platform/connection/common/utils.ts b/src/sql/platform/connection/common/utils.ts index 7002f2f494..d5888f5ce1 100644 --- a/src/sql/platform/connection/common/utils.ts +++ b/src/sql/platform/connection/common/utils.ts @@ -6,7 +6,6 @@ import { IConnectionProfile } from 'sql/platform/connection/common/interfaces'; import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile'; import { ConnectionProfileGroup } from 'sql/platform/connection/common/connectionProfileGroup'; -import { deepClone } from 'vs/base/common/objects'; import * as sqlExtHostTypes from 'sql/workbench/api/common/sqlExtHostTypes' // CONSTANTS ////////////////////////////////////////////////////////////////////////////////////// @@ -144,24 +143,17 @@ export function isServerConnection(profile: IConnectionProfile): boolean { * Convert a IConnectionProfile with services to an azdata.connection.ConnectionProfile * shaped object that can be sent via RPC. * @param profile The profile to be converted. - * @param deepCopyOptions whether to deep copy the options or not. - * @param removeFunction the function that strips the credentials from the connection profile if provided. * @returns An azdata.connection.ConnectionProfile shaped object that contains only the data and none of the services. */ -export function convertToRpcConnectionProfile(profile: IConnectionProfile | undefined, deepCopyOptions: boolean = false, removeFunction?: (profile: IConnectionProfile) => IConnectionProfile): sqlExtHostTypes.ConnectionProfile | undefined { +export function convertToRpcConnectionProfile(profile: IConnectionProfile | undefined): sqlExtHostTypes.ConnectionProfile | undefined { if (!profile) { return undefined; } - // If provided, that means the connection profile must be stripped of credentials. - if (removeFunction) { - profile = removeFunction(profile); - } - let connection: sqlExtHostTypes.ConnectionProfile = { providerId: profile.providerName, connectionId: profile.id, - options: deepCopyOptions ? deepClone(profile.options) : profile.options, + options: profile.options, connectionName: profile.connectionName, serverName: profile.serverName, databaseName: profile.databaseName,