Add STS root folder override (#16927)

* Add STS root folder override

* Display message to user

* Show once for any service
This commit is contained in:
Charles Gagnon
2021-08-30 09:07:33 -07:00
committed by GitHub
parent 2c75f199e8
commit fde114bb14
4 changed files with 89 additions and 54 deletions

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import { SqlOpsDataClient, ClientOptions, SqlOpsFeature } from 'dataprotocol-client';
import { IConfig, ServerProvider } from '@microsoft/ads-service-downloader';
import { IConfig } from '@microsoft/ads-service-downloader';
import { ServerOptions, RPCMessageType, ClientCapabilities, ServerCapabilities, TransportKind } from 'vscode-languageclient';
import { Disposable } from 'vscode';
import * as UUID from 'vscode-languageclient/lib/utils/uuid';
@@ -77,17 +77,15 @@ export class CredentialStore {
}
}
public start() {
let serverdownloader = new ServerProvider(this._config);
public async start(): Promise<void> {
let clientOptions: ClientOptions = {
providerId: Constants.providerId,
features: [CredentialsFeature]
};
return serverdownloader.getOrDownloadServer().then(e => {
let serverOptions = this.generateServerOptions(e);
this._client = new SqlOpsDataClient(Constants.serviceName, serverOptions, clientOptions);
this._client.start();
});
const serverPath = await Utils.getOrDownloadServer(this._config);
const serverOptions = this.generateServerOptions(serverPath);
this._client = new SqlOpsDataClient(Constants.serviceName, serverOptions, clientOptions);
this._client.start();
}
dispose() {