Move protocol client out (#643)

* close

* connection is working

* formatting

* adds all

* formatting

* formatting and changing how features are initialized

* formatting

* changed named of typings file

* update

* updated to use dataprotocol npm

* formatting

* removed unneeded logging

* readd npm shrinkwrap

* still not working

* removed unnecessary codfe

* addressed comments

* readded azure resource provider

* fix capabilities cacheing

* added backwards capat for older protocol

* update shrinkwrap

* update shrinkwrap

* updated shrinkwrap

* fixed tests

* removed dead code

* remove dead code

* fix compile

* remove backcompat stuff

* change location of npm

* vbump sqltools

* merge master

* fix imports

* fix build breaks

* update for sqlops

* update yarn dependencies
This commit is contained in:
Anthony Dresser
2018-02-20 13:38:16 -08:00
committed by GitHub
parent 8a9ee40524
commit 8570910a43
159 changed files with 4421 additions and 7180 deletions

View File

@@ -11,9 +11,9 @@ import { Emitter } from 'vs/base/common/event';
import { deepClone } from 'vs/base/common/objects';
import * as vscode from 'vscode';
import * as data from 'data';
import * as sqlops from 'sqlops';
class ExtHostDashboardWebview implements data.DashboardWebview {
class ExtHostDashboardWebview implements sqlops.DashboardWebview {
private _html: string;
public onMessageEmitter = new Emitter<any>();
@@ -22,8 +22,8 @@ class ExtHostDashboardWebview implements data.DashboardWebview {
constructor(
private readonly _proxy: MainThreadDashboardWebviewShape,
private readonly _handle: number,
private readonly _connection: data.connection.Connection,
private readonly _serverInfo: data.ServerInfo
private readonly _connection: sqlops.connection.Connection,
private readonly _serverInfo: sqlops.ServerInfo
) { }
public postMessage(message: any): Thenable<any> {
@@ -38,11 +38,11 @@ class ExtHostDashboardWebview implements data.DashboardWebview {
return this.onClosedEmitter.event;
}
public get connection(): data.connection.Connection {
public get connection(): sqlops.connection.Connection {
return deepClone(this._connection);
}
public get serverInfo(): data.ServerInfo {
public get serverInfo(): sqlops.ServerInfo {
return deepClone(this._serverInfo);
}
@@ -62,7 +62,7 @@ export class ExtHostDashboardWebviews implements ExtHostDashboardWebviewsShape {
private readonly _proxy: MainThreadDashboardWebviewShape;
private readonly _webviews = new Map<number, ExtHostDashboardWebview>();
private readonly _handlers = new Map<string, (webview: data.DashboardWebview) => void>();
private readonly _handlers = new Map<string, (webview: sqlops.DashboardWebview) => void>();
constructor(
mainContext: IMainContext
@@ -81,12 +81,12 @@ export class ExtHostDashboardWebviews implements ExtHostDashboardWebviewsShape {
this._webviews.delete(handle);
}
$registerProvider(widgetId: string, handler: (webview: data.DashboardWebview) => void): void {
$registerProvider(widgetId: string, handler: (webview: sqlops.DashboardWebview) => void): void {
this._handlers.set(widgetId, handler);
this._proxy.$registerProvider(widgetId);
}
$registerWidget(handle: number, id: string, connection: data.connection.Connection, serverInfo: data.ServerInfo): void {
$registerWidget(handle: number, id: string, connection: sqlops.connection.Connection, serverInfo: sqlops.ServerInfo): void {
let webview = new ExtHostDashboardWebview(this._proxy, handle, connection, serverInfo);
this._webviews.set(handle, webview);
this._handlers.get(id)(webview);