Archived
Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 (#7206)
* Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 * fix config changes * fix strictnull checks
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
{
|
||||
"downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/v{#version#}/microsoft.sqltools.servicelayer-{#fileName#}",
|
||||
"version": "2.0.0-release.12",
|
||||
"downloadFileNames": {
|
||||
"Windows_86": "win-x86-netcoreapp2.2.zip",
|
||||
"Windows_64": "win-x64-netcoreapp2.2.zip",
|
||||
"OSX": "osx-x64-netcoreapp2.2.tar.gz",
|
||||
"CentOS_7": "rhel-x64-netcoreapp2.2.tar.gz",
|
||||
"Debian_8": "rhel-x64-netcoreapp2.2.tar.gz",
|
||||
"Fedora_23": "rhel-x64-netcoreapp2.2.tar.gz",
|
||||
"OpenSUSE_13_2": "rhel-x64-netcoreapp2.2.tar.gz",
|
||||
"RHEL_7": "rhel-x64-netcoreapp2.2.tar.gz",
|
||||
"SLES_12_2": "rhel-x64-netcoreapp2.2.tar.gz",
|
||||
"Ubuntu_14": "rhel-x64-netcoreapp2.2.tar.gz",
|
||||
"Ubuntu_16": "rhel-x64-netcoreapp2.2.tar.gz"
|
||||
},
|
||||
"installDirectory": "../sqltoolsservice/{#platform#}/{#version#}",
|
||||
"executableFiles": ["MicrosoftSqlToolsServiceLayer.exe", "MicrosoftSqlToolsServiceLayer"],
|
||||
"retry": {
|
||||
"retries": 15,
|
||||
"factor": 2,
|
||||
"minTimeout": 1000,
|
||||
"maxTimeout": 300000,
|
||||
"randomize": false
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@ class CredentialsFeature extends SqlOpsFeature<any> {
|
||||
const client = this._client;
|
||||
|
||||
let readCredential = (credentialId: string): Thenable<azdata.Credential> => {
|
||||
return client.sendRequest(Contracts.ReadCredentialRequest.type, { credentialId });
|
||||
return client.sendRequest(Contracts.ReadCredentialRequest.type, { credentialId, password: undefined });
|
||||
};
|
||||
|
||||
let saveCredential = (credentialId: string, password: string): Thenable<boolean> => {
|
||||
@@ -49,7 +49,7 @@ class CredentialsFeature extends SqlOpsFeature<any> {
|
||||
};
|
||||
|
||||
let deleteCredential = (credentialId: string): Thenable<boolean> => {
|
||||
return client.sendRequest(Contracts.DeleteCredentialRequest.type, { credentialId });
|
||||
return client.sendRequest(Contracts.DeleteCredentialRequest.type, { credentialId, password: undefined });
|
||||
};
|
||||
|
||||
return azdata.credentials.registerProvider({
|
||||
|
||||
@@ -55,9 +55,9 @@ class FireWallFeature extends SqlOpsFeature<any> {
|
||||
|
||||
}
|
||||
}, {
|
||||
handleFirewallRule,
|
||||
createFirewallRule
|
||||
});
|
||||
handleFirewallRule,
|
||||
createFirewallRule
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ import { AppContext } from './appContext';
|
||||
import { DacFxService } from './dacfx/dacFxService';
|
||||
import { CmsService } from './cms/cmsService';
|
||||
import { CompletionExtensionParams, CompletionExtLoadRequest } from './contracts';
|
||||
|
||||
const baseConfig = require('./config.json');
|
||||
import { promisify } from 'util';
|
||||
import { readFile } from 'fs';
|
||||
|
||||
const outputChannel = vscode.window.createOutputChannel(Constants.serviceName);
|
||||
const statusView = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left);
|
||||
@@ -35,7 +35,7 @@ export class SqlToolsServer {
|
||||
public async start(context: AppContext): Promise<SqlOpsDataClient> {
|
||||
try {
|
||||
const installationStart = Date.now();
|
||||
const path = await this.download();
|
||||
const path = await this.download(context);
|
||||
const installationComplete = Date.now();
|
||||
let serverOptions = generateServerOptions(context.extensionContext.logPath, path);
|
||||
let clientOptions = getClientOptions(context);
|
||||
@@ -69,8 +69,9 @@ export class SqlToolsServer {
|
||||
}
|
||||
}
|
||||
|
||||
private download() {
|
||||
this.config = JSON.parse(JSON.stringify(baseConfig));
|
||||
private async download(context: AppContext): Promise<string> {
|
||||
const rawConfig = await promisify(readFile)(path.join(context.extensionContext.extensionPath, 'config.json'));
|
||||
this.config = JSON.parse(rawConfig.toString());
|
||||
this.config.installDirectory = path.join(__dirname, this.config.installDirectory);
|
||||
this.config.proxy = vscode.workspace.getConfiguration('http').get('proxy');
|
||||
this.config.strictSSL = vscode.workspace.getConfiguration('http').get('proxyStrictSSL') || true;
|
||||
|
||||
Reference in New Issue
Block a user