* Update dataprotocol-client

* Fix compile

* bump cachesalt
This commit is contained in:
Charles Gagnon 2023-10-23 13:46:09 -07:00 коммит произвёл GitHub
Родитель 77e1287c98
Коммит f0ed943b27
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
21 изменённых файлов: 126 добавлений и 113 удалений

Просмотреть файл

@ -1 +1 @@
2023-07-20T13:31:34.746Z
2023-10-21T13:31:34.746Z

Просмотреть файл

@ -209,7 +209,7 @@
"update-grammar": "node ../../build/npm/update-grammar.js Microsoft/vscode-azuremonitor ./syntaxes/azuremonitor.tmLanguage"
},
"dependencies": {
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.8",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#2.0.0",
"figures": "^2.0.0",
"find-remove": "1.2.1",
"@microsoft/ads-service-downloader": "^1.2.1",

Просмотреть файл

@ -85,8 +85,8 @@ export class AzureMonitorObjectExplorerNodeProvider extends ProviderBase impleme
return Promise.resolve(response);
}
registerOnExpandCompleted(handler: (response: azdata.ObjectExplorerExpandInfo) => any): void {
this.expandCompleteEmitter.event(handler);
registerOnExpandCompleted(handler: (response: azdata.ObjectExplorerExpandInfo) => any): vscode.Disposable {
return this.expandCompleteEmitter.event(handler);
}
notifyNodeChanged(node: TreeNode): void {

Просмотреть файл

@ -75,9 +75,9 @@ concat-map@0.0.1:
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#1.3.8":
version "1.3.8"
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/828b7a5e5c1c077a0f6eb7f6acecd191fbaae13d"
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#2.0.0":
version "2.0.0"
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/39d7544771a4f44e707d0a38eb2fda1f08793d08"
dependencies:
vscode-languageclient "5.2.1"

Просмотреть файл

@ -107,7 +107,7 @@
"dependencies": {
"@microsoft/ads-extension-telemetry": "^3.0.1",
"@microsoft/ads-service-downloader": "^1.2.1",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.8",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#2.0.0",
"vscode-nls": "^5.2.0"
},
"devDependencies": {

Просмотреть файл

@ -497,9 +497,9 @@ crypt@0.0.2:
resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b"
integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#1.3.8":
version "1.3.8"
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/828b7a5e5c1c077a0f6eb7f6acecd191fbaae13d"
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#2.0.0":
version "2.0.0"
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/39d7544771a4f44e707d0a38eb2fda1f08793d08"
dependencies:
vscode-languageclient "5.2.1"

Просмотреть файл

@ -77,7 +77,7 @@
}
},
"dependencies": {
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.8",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#2.0.0",
"htmlparser2": "^3.10.1",
"@microsoft/ads-service-downloader": "^1.2.1",
"@microsoft/ads-extension-telemetry": "^3.0.1",

Просмотреть файл

@ -84,22 +84,22 @@ export class TestQueryProvider implements azdata.QueryProvider {
setQueryExecutionOptions(ownerUri: string, options: azdata.QueryExecutionOptions): Thenable<void> {
throw new Error('Method not implemented.');
}
registerOnQueryComplete(handler: (result: azdata.QueryExecuteCompleteNotificationResult) => any): void {
registerOnQueryComplete(handler: (result: azdata.QueryExecuteCompleteNotificationResult) => any): vscode.Disposable {
throw new Error('Method not implemented.');
}
registerOnBatchStart(handler: (batchInfo: azdata.QueryExecuteBatchNotificationParams) => any): void {
registerOnBatchStart(handler: (batchInfo: azdata.QueryExecuteBatchNotificationParams) => any): vscode.Disposable {
throw new Error('Method not implemented.');
}
registerOnBatchComplete(handler: (batchInfo: azdata.QueryExecuteBatchNotificationParams) => any): void {
registerOnBatchComplete(handler: (batchInfo: azdata.QueryExecuteBatchNotificationParams) => any): vscode.Disposable {
throw new Error('Method not implemented.');
}
registerOnResultSetAvailable(handler: (resultSetInfo: azdata.QueryExecuteResultSetNotificationParams) => any): void {
registerOnResultSetAvailable(handler: (resultSetInfo: azdata.QueryExecuteResultSetNotificationParams) => any): vscode.Disposable {
throw new Error('Method not implemented.');
}
registerOnResultSetUpdated(handler: (resultSetInfo: azdata.QueryExecuteResultSetNotificationParams) => any): void {
registerOnResultSetUpdated(handler: (resultSetInfo: azdata.QueryExecuteResultSetNotificationParams) => any): vscode.Disposable {
throw new Error('Method not implemented.');
}
registerOnMessage(handler: (message: azdata.QueryExecuteMessageParams) => any): void {
registerOnMessage(handler: (message: azdata.QueryExecuteMessageParams) => any): vscode.Disposable {
throw new Error('Method not implemented.');
}
commitEdit(ownerUri: string): Thenable<void> {
@ -129,7 +129,7 @@ export class TestQueryProvider implements azdata.QueryProvider {
getEditRows(rowData: azdata.EditSubsetParams): Thenable<azdata.EditSubsetResult> {
throw new Error('Method not implemented.');
}
registerOnEditSessionReady(handler: (ownerUri: string, success: boolean, message: string) => any): void {
registerOnEditSessionReady(handler: (ownerUri: string, success: boolean, message: string) => any): vscode.Disposable {
throw new Error('Method not implemented.');
}
handle?: number;

Просмотреть файл

@ -572,9 +572,9 @@ crypt@~0.0.1:
resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b"
integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#1.3.8":
version "1.3.8"
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/828b7a5e5c1c077a0f6eb7f6acecd191fbaae13d"
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#2.0.0":
version "2.0.0"
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/39d7544771a4f44e707d0a38eb2fda1f08793d08"
dependencies:
vscode-languageclient "5.2.1"

Просмотреть файл

@ -427,7 +427,7 @@
}
},
"dependencies": {
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.8",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#2.0.0",
"figures": "^2.0.0",
"find-remove": "1.2.1",
"@microsoft/ads-service-downloader": "^1.2.1",

Просмотреть файл

@ -86,8 +86,8 @@ export class KustoObjectExplorerNodeProvider extends ProviderBase implements azd
return Promise.resolve(response);
}
registerOnExpandCompleted(handler: (response: azdata.ObjectExplorerExpandInfo) => any): void {
this.expandCompleteEmitter.event(handler);
registerOnExpandCompleted(handler: (response: azdata.ObjectExplorerExpandInfo) => any): vscode.Disposable {
return this.expandCompleteEmitter.event(handler);
}
notifyNodeChanged(node: TreeNode): void {

Просмотреть файл

@ -124,9 +124,9 @@ concat-map@0.0.1:
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#1.3.8":
version "1.3.8"
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/828b7a5e5c1c077a0f6eb7f6acecd191fbaae13d"
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#2.0.0":
version "2.0.0"
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/39d7544771a4f44e707d0a38eb2fda1f08793d08"
dependencies:
vscode-languageclient "5.2.1"

Просмотреть файл

@ -32,12 +32,12 @@ function createContext(): TestContext {
connectionUriChanged: () => { return Promise.reject(); },
saveResults: () => { return Promise.reject(); },
setQueryExecutionOptions: () => { return Promise.reject(); },
registerOnQueryComplete: () => { return Promise.reject(); },
registerOnBatchStart: () => { return Promise.reject(); },
registerOnBatchComplete: () => { return Promise.reject(); },
registerOnResultSetAvailable: () => { return Promise.reject(); },
registerOnResultSetUpdated: () => { return Promise.reject(); },
registerOnMessage: () => { return Promise.reject(); },
registerOnQueryComplete: () => { return Promise.reject() as any; },
registerOnBatchStart: () => { return Promise.reject() as any; },
registerOnBatchComplete: () => { return Promise.reject() as any; },
registerOnResultSetAvailable: () => { return Promise.reject() as any; },
registerOnResultSetUpdated: () => { return Promise.reject() as any; },
registerOnMessage: () => { return Promise.reject() as any; },
commitEdit: () => { return Promise.reject(); },
createRow: () => { return Promise.reject(); },
deleteRow: () => { return Promise.reject(); },
@ -47,7 +47,7 @@ function createContext(): TestContext {
revertRow: () => { return Promise.reject(); },
updateCell: () => { return Promise.reject(); },
getEditRows: () => { return Promise.reject(); },
registerOnEditSessionReady: () => { return Promise.reject(); },
registerOnEditSessionReady: () => { return Promise.reject() as any; },
}
};
}

Просмотреть файл

@ -1684,7 +1684,7 @@
"dependencies": {
"@microsoft/ads-extension-telemetry": "^3.0.1",
"@microsoft/ads-service-downloader": "^1.2.1",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.8",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#2.0.0",
"find-remove": "1.2.1",
"vscode-languageclient": "5.2.1",
"vscode-nls": "^4.0.0"

Просмотреть файл

@ -1076,8 +1076,9 @@ export class ProfilerFeature extends SqlOpsFeature<undefined> {
);
};
const onProfilerEventsAvailableEventEmitter = this.registerNotificationEmitter(contracts.ProfilerEventsAvailableNotification.type);
let registerOnSessionEventsAvailable = (handler: (response: azdata.ProfilerSessionEvents) => any): void => {
client.onNotification(contracts.ProfilerEventsAvailableNotification.type, (params: contracts.ProfilerEventsAvailableParams) => {
onProfilerEventsAvailableEventEmitter.event(params => {
handler(<azdata.ProfilerSessionEvents>{
sessionId: params.ownerUri,
events: params.events,
@ -1086,24 +1087,25 @@ export class ProfilerFeature extends SqlOpsFeature<undefined> {
});
};
const onProfilerSessionStoppedEventEmitter = this.registerNotificationEmitter(contracts.ProfilerSessionStoppedNotification.type);
let registerOnSessionStopped = (handler: (response: azdata.ProfilerSessionStoppedParams) => any): void => {
client.onNotification(contracts.ProfilerSessionStoppedNotification.type, (params: contracts.ProfilerSessionStoppedParams) => {
onProfilerSessionStoppedEventEmitter.event(params => {
handler(<azdata.ProfilerSessionStoppedParams>{
ownerUri: params.ownerUri,
sessionId: params.sessionId
});
});
})
};
const onProfilerSessionCreatedEventEmitter = this.registerNotificationEmitter(contracts.ProfilerSessionCreatedNotification.type);
let registerOnProfilerSessionCreated = (handler: (response: azdata.ProfilerSessionCreatedParams) => any): void => {
client.onNotification(contracts.ProfilerSessionCreatedNotification.type, (params: contracts.ProfilerSessionCreatedParams) => {
onProfilerSessionCreatedEventEmitter.event(params => {
handler(<azdata.ProfilerSessionCreatedParams>{
ownerUri: params.ownerUri,
sessionName: params.sessionName,
templateName: params.templateName
});
});
})
};

Просмотреть файл

@ -166,7 +166,17 @@ export async function activate(context: vscode.ExtensionContext): Promise<IExten
// context.subscriptions.push(new SqlNotebookController()); Temporarily disabled due to breaking query editor
context.subscriptions.push(TelemetryReporter);
var provider = azdata.dataprotocol.getProvider<azdata.QueryProvider>('MSSQL', azdata.DataProviderType.QueryProvider);
var disposable = provider.registerOnQueryComplete(params => {
console.log(params.ownerUri);
disposable.dispose();
});
var connProvider = azdata.dataprotocol.getProvider<azdata.ConnectionProvider>('MSSQL', azdata.DataProviderType.ConnectionProvider);
var disposable2 = connProvider.registerOnConnectionComplete(params => {
console.log(params.ownerUri);
disposable2.dispose();
}) as any as vscode.Disposable;
return createMssqlApi(appContext, server);
}

Просмотреть файл

@ -511,9 +511,9 @@ crypt@~0.0.1:
resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b"
integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#1.3.8":
version "1.3.8"
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/828b7a5e5c1c077a0f6eb7f6acecd191fbaae13d"
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#2.0.0":
version "2.0.0"
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/39d7544771a4f44e707d0a38eb2fda1f08793d08"
dependencies:
vscode-languageclient "5.2.1"

Просмотреть файл

@ -162,7 +162,7 @@
]
},
"dependencies": {
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.8",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#2.0.0",
"@microsoft/ads-service-downloader": "^1.2.1",
"@microsoft/ads-extension-telemetry": "^3.0.1",
"uuid": "^8.3.2",

Просмотреть файл

@ -62,9 +62,9 @@ chownr@^2.0.0:
resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece"
integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#1.3.8":
version "1.3.8"
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/828b7a5e5c1c077a0f6eb7f6acecd191fbaae13d"
"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#2.0.0":
version "2.0.0"
resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/39d7544771a4f44e707d0a38eb2fda1f08793d08"
dependencies:
vscode-languageclient "5.2.1"

114
src/sql/azdata.d.ts поставляемый
Просмотреть файл

@ -623,26 +623,26 @@ declare module 'azdata' {
/**
* Registers a handler for ConnectionComplete events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnConnectionComplete(handler: (connSummary: ConnectionInfoSummary) => any): void;
registerOnConnectionComplete(handler: (connSummary: ConnectionInfoSummary) => any): vscode.Disposable;
/**
* Registers a handler for IntellisenseCacheComplete events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnIntelliSenseCacheComplete(handler: (connectionUri: string) => any): void;
registerOnIntelliSenseCacheComplete(handler: (connectionUri: string) => any): vscode.Disposable;
/**
* Registers a handler for ConnectionChanged events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnConnectionChanged(handler: (changedConnInfo: ChangedConnectionInfo) => any): void;
registerOnConnectionChanged(handler: (changedConnInfo: ChangedConnectionInfo) => any): vscode.Disposable;
}
export enum ServiceOptionType {
@ -891,10 +891,10 @@ declare module 'azdata' {
/**
* Registers a handler for ScriptingComplete events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnScriptingComplete(handler: (scriptingCompleteResult: ScriptingCompleteResult) => any): void;
registerOnScriptingComplete(handler: (scriptingCompleteResult: ScriptingCompleteResult) => any): vscode.Disposable;
}
export interface ScriptingCompleteResult {
@ -962,45 +962,45 @@ declare module 'azdata' {
/**
* Registers a handler for QueryComplete events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnQueryComplete(handler: (result: QueryExecuteCompleteNotificationResult) => any): void;
registerOnQueryComplete(handler: (result: QueryExecuteCompleteNotificationResult) => any): vscode.Disposable;
/**
* Registers a handler for BatchStart events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnBatchStart(handler: (batchInfo: QueryExecuteBatchNotificationParams) => any): void;
registerOnBatchStart(handler: (batchInfo: QueryExecuteBatchNotificationParams) => any): vscode.Disposable;
/**
* Registers a handler for BatchComplete events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnBatchComplete(handler: (batchInfo: QueryExecuteBatchNotificationParams) => any): void;
registerOnBatchComplete(handler: (batchInfo: QueryExecuteBatchNotificationParams) => any): vscode.Disposable;
/**
* Registers a handler for ResultSetAvailable events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnResultSetAvailable(handler: (resultSetInfo: QueryExecuteResultSetNotificationParams) => any): void;
registerOnResultSetAvailable(handler: (resultSetInfo: QueryExecuteResultSetNotificationParams) => any): vscode.Disposable;
/**
* Registers a handler for ResultSetUpdated events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnResultSetUpdated(handler: (resultSetInfo: QueryExecuteResultSetNotificationParams) => any): void;
registerOnResultSetUpdated(handler: (resultSetInfo: QueryExecuteResultSetNotificationParams) => any): vscode.Disposable;
/**
* Registers a handler for Message events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnMessage(handler: (message: QueryExecuteMessageParams) => any): void;
registerOnMessage(handler: (message: QueryExecuteMessageParams) => any): vscode.Disposable;
// Edit Data Requests
commitEdit(ownerUri: string): Thenable<void>;
@ -1017,10 +1017,10 @@ declare module 'azdata' {
/**
* Registers a handler for EditSessionReady events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnEditSessionReady(handler: (ownerUri: string, success: boolean, message: string) => any): void;
registerOnEditSessionReady(handler: (ownerUri: string, success: boolean, message: string) => any): vscode.Disposable;
}
export interface IDbColumn {
@ -1465,10 +1465,10 @@ declare module 'azdata' {
/**
* Registers a handler for ExpandCompleted events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnExpandCompleted(handler: (response: ObjectExplorerExpandInfo) => any): void;
registerOnExpandCompleted(handler: (response: ObjectExplorerExpandInfo) => any): vscode.Disposable;
}
export interface ObjectExplorerProvider extends ObjectExplorerProviderBase {
@ -1479,18 +1479,18 @@ declare module 'azdata' {
/**
* Registers a handler for SessionCreated events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnSessionCreated(handler: (response: ObjectExplorerSession) => any): void;
registerOnSessionCreated(handler: (response: ObjectExplorerSession) => any): vscode.Disposable;
/**
* Registers a handler for SessionDisconnected events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnSessionDisconnected?(handler: (response: ObjectExplorerSession) => any): void;
registerOnSessionDisconnected?(handler: (response: ObjectExplorerSession) => any): vscode.Disposable;
}
export interface ObjectExplorerNodeProvider extends ObjectExplorerProviderBase {
@ -2084,18 +2084,18 @@ declare module 'azdata' {
/**
* Registers a handler for TaskCreated events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnTaskCreated(handler: (response: TaskInfo) => any): void;
registerOnTaskCreated(handler: (response: TaskInfo) => any): vscode.Disposable;
/**
* Registers a handler for TaskStatusChanged events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnTaskStatusChanged(handler: (response: TaskProgressInfo) => any): void;
registerOnTaskStatusChanged(handler: (response: TaskProgressInfo) => any): vscode.Disposable;
}
// Disaster Recovery interfaces -----------------------------------------------------------------------
@ -2284,26 +2284,26 @@ declare module 'azdata' {
/**
* Registers a handler for FileBrowserOpened events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnFileBrowserOpened(handler: (response: FileBrowserOpenedParams) => any): void;
registerOnFileBrowserOpened(handler: (response: FileBrowserOpenedParams) => any): vscode.Disposable;
expandFolderNode(ownerUri: string, expandPath: string): Thenable<boolean>;
/**
* Registers a handler for FolderNodeExpanded events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnFolderNodeExpanded(handler: (response: FileBrowserExpandedParams) => any): void;
registerOnFolderNodeExpanded(handler: (response: FileBrowserExpandedParams) => any): vscode.Disposable;
validateFilePaths(ownerUri: string, serviceType: string, selectedFiles: string[]): Thenable<boolean>;
/**
* Registers a handler for FilePathsValidated events.
*
* **WARNING** This should only ever be called by the extension creating the provider. Any other extensions calling this
* will overwrite the handler registered by the provider extension which will likely break this functionality.
* @param handler The function that will be called when this event is triggered
* @returns A disposable that will unregister the handler when disposed
*/
registerOnFilePathsValidated(handler: (response: FileBrowserValidatedParams) => any): void;
registerOnFilePathsValidated(handler: (response: FileBrowserValidatedParams) => any): vscode.Disposable;
closeFileBrowser(ownerUri: string): Thenable<FileBrowserCloseResponse>;
}

Просмотреть файл

@ -3,6 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import { mssqlProviderName } from 'sql/platform/connection/common/constants';
// Test stubs for commonly used objects
@ -27,19 +28,19 @@ export class TestObjectExplorerProvider implements azdata.ObjectExplorerProvider
return Promise.resolve(undefined);
}
public registerOnSessionCreated(handler: (response: azdata.ObjectExplorerSession) => any): void {
public registerOnSessionCreated(handler: (response: azdata.ObjectExplorerSession) => any): vscode.Disposable {
return undefined;
}
public registerOnSessionDisconnected(handler: (response: azdata.ObjectExplorerSession) => any): void {
public registerOnSessionDisconnected(handler: (response: azdata.ObjectExplorerSession) => any): vscode.Disposable {
return undefined;
}
public registerOnExpandCompleted(handler: (response: azdata.ObjectExplorerExpandInfo) => any): void {
public registerOnExpandCompleted(handler: (response: azdata.ObjectExplorerExpandInfo) => any): vscode.Disposable {
return undefined;
}
public findNodes(findNodesInfo: azdata.FindNodesInfo): Thenable<azdata.ObjectExplorerFindNodesResponse> {
return undefined;
}
}
}