Archived
Make mssql extension a module (#18804)
* Rebase from main branch * import from module * Add mssql module ref Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
co-authored by
Charles Gagnon
parent
ae8784e462
commit
5e68ff1dfe
@@ -6,7 +6,7 @@
|
|||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as mssql from '../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as Utils from './cmsResource/utils';
|
import * as Utils from './cmsResource/utils';
|
||||||
import { ICmsResourceNodeInfo } from './cmsResource/tree/baseTreeNodes';
|
import { ICmsResourceNodeInfo } from './cmsResource/tree/baseTreeNodes';
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
@@ -6,4 +6,5 @@
|
|||||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||||
|
/// <reference path='../../../mssql/src/mssql.d.ts'/>
|
||||||
/// <reference types='@types/node'/>
|
/// <reference types='@types/node'/>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as mssql from '../../../mssql/src/mssql';
|
import * as mssql from 'mssql';
|
||||||
|
|
||||||
export const deployOperationId = 'deploy dacpac';
|
export const deployOperationId = 'deploy dacpac';
|
||||||
export const extractOperationId = 'extract dacpac';
|
export const extractOperationId = 'extract dacpac';
|
||||||
|
|||||||
+1
@@ -6,4 +6,5 @@
|
|||||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||||
|
/// <reference path='../../../mssql/src/mssql.d.ts'/>
|
||||||
/// <reference types='@types/node'/>
|
/// <reference types='@types/node'/>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as loc from '../localizedConstants';
|
import * as loc from '../localizedConstants';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as utils from '../utils';
|
import * as utils from '../utils';
|
||||||
import { SelectOperationPage } from './pages/selectOperationpage';
|
import { SelectOperationPage } from './pages/selectOperationpage';
|
||||||
import { DeployConfigPage } from './pages/deployConfigPage';
|
import { DeployConfigPage } from './pages/deployConfigPage';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import 'mocha';
|
import 'mocha';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as utils from './utils';
|
import * as utils from './utils';
|
||||||
import * as uuid from './uuid';
|
import * as uuid from './uuid';
|
||||||
import assert = require('assert');
|
import assert = require('assert');
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import * as utils from './utils';
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as os from 'os';
|
import * as os from 'os';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import { getStandaloneServer } from './testConfig';
|
import { getStandaloneServer } from './testConfig';
|
||||||
import * as assert from 'assert';
|
import * as assert from 'assert';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import 'mocha';
|
|||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as utils from './utils';
|
import * as utils from './utils';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as os from 'os';
|
import * as os from 'os';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|||||||
@@ -5,5 +5,6 @@
|
|||||||
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.test.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.test.d.ts'/>
|
||||||
|
/// <reference path='../../../mssql/src/mssql.d.ts'/>
|
||||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||||
/// <reference types='@types/node'/>
|
/// <reference types='@types/node'/>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import { ApiWrapper } from '../common/apiWrapper';
|
import { ApiWrapper } from '../common/apiWrapper';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+4
-4
@@ -8,7 +8,7 @@ import 'mocha';
|
|||||||
import * as TypeMoq from 'typemoq';
|
import * as TypeMoq from 'typemoq';
|
||||||
import { createContext } from './utils';
|
import { createContext } from './utils';
|
||||||
import { LanguageController } from '../../../views/externalLanguages/languageController';
|
import { LanguageController } from '../../../views/externalLanguages/languageController';
|
||||||
import * as mssql from '../../../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
|
|
||||||
describe('External Languages Controller', () => {
|
describe('External Languages Controller', () => {
|
||||||
it('Should open dialog for manage languages successfully ', async function (): Promise<void> {
|
it('Should open dialog for manage languages successfully ', async function (): Promise<void> {
|
||||||
@@ -30,7 +30,7 @@ describe('External Languages Controller', () => {
|
|||||||
}]
|
}]
|
||||||
}];
|
}];
|
||||||
|
|
||||||
testContext.dialogModel.setup( x=> x.getLanguageList()).returns(() => Promise.resolve(languages));
|
testContext.dialogModel.setup(x => x.getLanguageList()).returns(() => Promise.resolve(languages));
|
||||||
let controller = new LanguageController(testContext.apiWrapper.object, '', testContext.dialogModel.object);
|
let controller = new LanguageController(testContext.apiWrapper.object, '', testContext.dialogModel.object);
|
||||||
let dialog = await controller.manageLanguages();
|
let dialog = await controller.manageLanguages();
|
||||||
let actual = await dialog.listLanguages();
|
let actual = await dialog.listLanguages();
|
||||||
@@ -48,7 +48,7 @@ describe('External Languages Controller', () => {
|
|||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
|
|
||||||
testContext.dialogModel.setup( x=> x.updateLanguage(language)).returns(() => Promise.resolve());
|
testContext.dialogModel.setup(x => x.updateLanguage(language)).returns(() => Promise.resolve());
|
||||||
let controller = new LanguageController(testContext.apiWrapper.object, '', testContext.dialogModel.object);
|
let controller = new LanguageController(testContext.apiWrapper.object, '', testContext.dialogModel.object);
|
||||||
let dialog = await controller.manageLanguages();
|
let dialog = await controller.manageLanguages();
|
||||||
await dialog.updateLanguage({
|
await dialog.updateLanguage({
|
||||||
@@ -70,7 +70,7 @@ describe('External Languages Controller', () => {
|
|||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
|
|
||||||
testContext.dialogModel.setup( x=> x.deleteLanguage(language.name)).returns(() => Promise.resolve());
|
testContext.dialogModel.setup(x => x.deleteLanguage(language.name)).returns(() => Promise.resolve());
|
||||||
let controller = new LanguageController(testContext.apiWrapper.object, '', testContext.dialogModel.object);
|
let controller = new LanguageController(testContext.apiWrapper.object, '', testContext.dialogModel.object);
|
||||||
let dialog = await controller.manageLanguages();
|
let dialog = await controller.manageLanguages();
|
||||||
await dialog.deleteLanguage({
|
await dialog.deleteLanguage({
|
||||||
|
|||||||
+2
-2
@@ -6,7 +6,7 @@
|
|||||||
import * as should from 'should';
|
import * as should from 'should';
|
||||||
import 'mocha';
|
import 'mocha';
|
||||||
import { createContext } from './utils';
|
import { createContext } from './utils';
|
||||||
import * as mssql from '../../../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import { LanguageService } from '../../../externalLanguage/languageService';
|
import { LanguageService } from '../../../externalLanguage/languageService';
|
||||||
|
|
||||||
describe('External Languages Dialog Model', () => {
|
describe('External Languages Dialog Model', () => {
|
||||||
@@ -20,7 +20,7 @@ describe('External Languages Dialog Model', () => {
|
|||||||
pathToExtension: '',
|
pathToExtension: '',
|
||||||
}]
|
}]
|
||||||
}];
|
}];
|
||||||
testContext.languageExtensionService.listLanguages = () => {return Promise.resolve(languages);};
|
testContext.languageExtensionService.listLanguages = () => { return Promise.resolve(languages); };
|
||||||
let model = new LanguageService(testContext.apiWrapper.object, testContext.languageExtensionService);
|
let model = new LanguageService(testContext.apiWrapper.object, testContext.languageExtensionService);
|
||||||
await model.load();
|
await model.load();
|
||||||
let actual = await model.getLanguageList();
|
let actual = await model.getLanguageList();
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import * as vscode from 'vscode';
|
|||||||
import * as TypeMoq from 'typemoq';
|
import * as TypeMoq from 'typemoq';
|
||||||
import { ApiWrapper } from '../../../common/apiWrapper';
|
import { ApiWrapper } from '../../../common/apiWrapper';
|
||||||
import { LanguageViewBase } from '../../../views/externalLanguages/languageViewBase';
|
import { LanguageViewBase } from '../../../views/externalLanguages/languageViewBase';
|
||||||
import * as mssql from '../../../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import { LanguageService } from '../../../externalLanguage/languageService';
|
import { LanguageService } from '../../../externalLanguage/languageService';
|
||||||
import { createViewContext } from '../utils';
|
import { createViewContext } from '../utils';
|
||||||
|
|
||||||
|
|||||||
@@ -8,4 +8,5 @@
|
|||||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||||
/// <reference path='../../../azurecore/src/azurecore.d.ts'/>
|
/// <reference path='../../../azurecore/src/azurecore.d.ts'/>
|
||||||
/// <reference path='../../../azurecore/src/azureResource/azure-resource.d.ts'/>
|
/// <reference path='../../../azurecore/src/azureResource/azure-resource.d.ts'/>
|
||||||
|
/// <reference path='../../../mssql/src/mssql.d.ts'/>
|
||||||
/// <reference types='@types/node'/>
|
/// <reference types='@types/node'/>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as mssql from '../../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import { LanguageViewBase } from './languageViewBase';
|
import { LanguageViewBase } from './languageViewBase';
|
||||||
import * as constants from '../../common/constants';
|
import * as constants from '../../common/constants';
|
||||||
import { ApiWrapper } from '../../common/apiWrapper';
|
import { ApiWrapper } from '../../common/apiWrapper';
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as mssql from '../../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import { ApiWrapper } from '../../common/apiWrapper';
|
import { ApiWrapper } from '../../common/apiWrapper';
|
||||||
import { LanguageService } from '../../externalLanguage/languageService';
|
import { LanguageService } from '../../externalLanguage/languageService';
|
||||||
import { LanguagesDialog } from './languagesDialog';
|
import { LanguagesDialog } from './languagesDialog';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as azdata from 'azdata';
|
|||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as constants from '../../common/constants';
|
import * as constants from '../../common/constants';
|
||||||
import { ApiWrapper } from '../../common/apiWrapper';
|
import { ApiWrapper } from '../../common/apiWrapper';
|
||||||
import * as mssql from '../../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
export interface LanguageUpdateModel {
|
export interface LanguageUpdateModel {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as constants from '../../common/constants';
|
import * as constants from '../../common/constants';
|
||||||
import * as mssql from '../../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import { LanguageViewBase } from './languageViewBase';
|
import { LanguageViewBase } from './languageViewBase';
|
||||||
import { ApiWrapper } from '../../common/apiWrapper';
|
import { ApiWrapper } from '../../common/apiWrapper';
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import * as contracts from '../contracts';
|
|||||||
import { AppContext } from '../appContext';
|
import { AppContext } from '../appContext';
|
||||||
import { ConnectParams, ClientCapabilities } from 'dataprotocol-client/lib/protocol';
|
import { ConnectParams, ClientCapabilities } from 'dataprotocol-client/lib/protocol';
|
||||||
import { SqlOpsDataClient, ISqlOpsFeature } from 'dataprotocol-client';
|
import { SqlOpsDataClient, ISqlOpsFeature } from 'dataprotocol-client';
|
||||||
import { ListRegisteredServersResult, ICmsService } from '../mssql';
|
import { ListRegisteredServersResult, ICmsService } from 'mssql';
|
||||||
import * as Utils from '../utils';
|
import * as Utils from '../utils';
|
||||||
|
|
||||||
export class CmsService implements ICmsService {
|
export class CmsService implements ICmsService {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { NotificationType, RequestType } from 'vscode-languageclient';
|
|||||||
import { ITelemetryEventProperties, ITelemetryEventMeasures } from './telemetry';
|
import { ITelemetryEventProperties, ITelemetryEventMeasures } from './telemetry';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { ConnectParams } from 'dataprotocol-client/lib/protocol';
|
import { ConnectParams } from 'dataprotocol-client/lib/protocol';
|
||||||
import * as mssql from './mssql';
|
import * as mssql from 'mssql';
|
||||||
|
|
||||||
// ------------------------------- < Telemetry Sent Event > ------------------------------------
|
// ------------------------------- < Telemetry Sent Event > ------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as mssql from '../mssql';
|
import * as mssql from 'mssql';
|
||||||
import { AppContext } from '../appContext';
|
import { AppContext } from '../appContext';
|
||||||
import { ISqlOpsFeature, SqlOpsDataClient } from 'dataprotocol-client';
|
import { ISqlOpsFeature, SqlOpsDataClient } from 'dataprotocol-client';
|
||||||
import { ClientCapabilities } from 'vscode-languageclient';
|
import { ClientCapabilities } from 'vscode-languageclient';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import { AppContext } from '../appContext';
|
import { AppContext } from '../appContext';
|
||||||
import { SqlOpsDataClient, ISqlOpsFeature } from 'dataprotocol-client';
|
import { SqlOpsDataClient, ISqlOpsFeature } from 'dataprotocol-client';
|
||||||
import * as constants from '../constants';
|
import * as constants from '../constants';
|
||||||
import * as mssql from '../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as Utils from '../utils';
|
import * as Utils from '../utils';
|
||||||
import { ClientCapabilities } from 'vscode-languageclient';
|
import { ClientCapabilities } from 'vscode-languageclient';
|
||||||
import * as contracts from '../contracts';
|
import * as contracts from '../contracts';
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { AppContext } from './appContext';
|
|||||||
import { UploadFilesCommand, MkDirCommand, SaveFileCommand, PreviewFileCommand, CopyPathCommand, DeleteFilesCommand, ManageAccessCommand } from './objectExplorerNodeProvider/hdfsCommands';
|
import { UploadFilesCommand, MkDirCommand, SaveFileCommand, PreviewFileCommand, CopyPathCommand, DeleteFilesCommand, ManageAccessCommand } from './objectExplorerNodeProvider/hdfsCommands';
|
||||||
import { IPrompter } from './prompts/question';
|
import { IPrompter } from './prompts/question';
|
||||||
import CodeAdapter from './prompts/adapter';
|
import CodeAdapter from './prompts/adapter';
|
||||||
import { IExtension } from './mssql';
|
import { IExtension } from 'mssql';
|
||||||
import { OpenSparkJobSubmissionDialogCommand, OpenSparkJobSubmissionDialogFromFileCommand, OpenSparkJobSubmissionDialogTask } from './sparkFeature/dialog/dialogCommands';
|
import { OpenSparkJobSubmissionDialogCommand, OpenSparkJobSubmissionDialogFromFileCommand, OpenSparkJobSubmissionDialogTask } from './sparkFeature/dialog/dialogCommands';
|
||||||
import { OpenSparkYarnHistoryTask } from './sparkFeature/historyTask';
|
import { OpenSparkYarnHistoryTask } from './sparkFeature/historyTask';
|
||||||
import { MssqlObjectExplorerNodeProvider, mssqlOutputChannel } from './objectExplorerNodeProvider/objectExplorerNodeProvider';
|
import { MssqlObjectExplorerNodeProvider, mssqlOutputChannel } from './objectExplorerNodeProvider/objectExplorerNodeProvider';
|
||||||
|
|||||||
Vendored
+256
-251
@@ -4,10 +4,10 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
// This is the place for extensions to expose APIs.
|
// This is the place for extensions to expose APIs.
|
||||||
|
declare module 'mssql' {
|
||||||
|
import * as azdata from 'azdata';
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
/**
|
||||||
|
|
||||||
/**
|
|
||||||
* Covers defining what the mssql extension exports to other extensions
|
* Covers defining what the mssql extension exports to other extensions
|
||||||
*
|
*
|
||||||
* IMPORTANT: THIS IS NOT A HARD DEFINITION unlike vscode; therefore no enums or classes should be defined here
|
* IMPORTANT: THIS IS NOT A HARD DEFINITION unlike vscode; therefore no enums or classes should be defined here
|
||||||
@@ -15,14 +15,14 @@ import * as azdata from 'azdata';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
export const enum extension {
|
export const enum extension {
|
||||||
name = 'Microsoft.mssql'
|
name = 'Microsoft.mssql'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The APIs provided by Mssql extension
|
* The APIs provided by Mssql extension
|
||||||
*/
|
*/
|
||||||
export interface IExtension {
|
export interface IExtension {
|
||||||
/**
|
/**
|
||||||
* Path to the root of the SQL Tools Service folder
|
* Path to the root of the SQL Tools Service folder
|
||||||
*/
|
*/
|
||||||
@@ -48,54 +48,54 @@ export interface IExtension {
|
|||||||
readonly sqlAssessment: ISqlAssessmentService;
|
readonly sqlAssessment: ISqlAssessmentService;
|
||||||
|
|
||||||
readonly sqlMigration: ISqlMigrationService;
|
readonly sqlMigration: ISqlMigrationService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A browser supporting actions over the object explorer connections provided by this extension.
|
* A browser supporting actions over the object explorer connections provided by this extension.
|
||||||
* Currently this is the
|
* Currently this is the
|
||||||
*/
|
*/
|
||||||
export interface MssqlObjectExplorerBrowser {
|
export interface MssqlObjectExplorerBrowser {
|
||||||
/**
|
/**
|
||||||
* Gets the matching node given a context object, e.g. one from a right-click on a node in Object Explorer
|
* Gets the matching node given a context object, e.g. one from a right-click on a node in Object Explorer
|
||||||
*/
|
*/
|
||||||
getNode<T extends ITreeNode>(objectExplorerContext: azdata.ObjectExplorerContext): Thenable<T>;
|
getNode<T extends ITreeNode>(objectExplorerContext: azdata.ObjectExplorerContext): Thenable<T>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A tree node in the object explorer tree
|
* A tree node in the object explorer tree
|
||||||
*/
|
*/
|
||||||
export interface ITreeNode {
|
export interface ITreeNode {
|
||||||
getNodeInfo(): azdata.NodeInfo;
|
getNodeInfo(): azdata.NodeInfo;
|
||||||
getChildren(refreshChildren: boolean): ITreeNode[] | Thenable<ITreeNode[]>;
|
getChildren(refreshChildren: boolean): ITreeNode[] | Thenable<ITreeNode[]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A HDFS file node. This is a leaf node in the object explorer tree, and its contents
|
* A HDFS file node. This is a leaf node in the object explorer tree, and its contents
|
||||||
* can be queried
|
* can be queried
|
||||||
*/
|
*/
|
||||||
export interface IFileNode extends ITreeNode {
|
export interface IFileNode extends ITreeNode {
|
||||||
getFileContentsAsString(maxBytes?: number): Thenable<string>;
|
getFileContentsAsString(maxBytes?: number): Thenable<string>;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#region --- schema compare
|
//#region --- schema compare
|
||||||
export interface SchemaCompareResult extends azdata.ResultStatus {
|
export interface SchemaCompareResult extends azdata.ResultStatus {
|
||||||
operationId: string;
|
operationId: string;
|
||||||
areEqual: boolean;
|
areEqual: boolean;
|
||||||
differences: DiffEntry[];
|
differences: DiffEntry[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SchemaCompareIncludeExcludeResult extends azdata.ResultStatus {
|
export interface SchemaCompareIncludeExcludeResult extends azdata.ResultStatus {
|
||||||
affectedDependencies: DiffEntry[];
|
affectedDependencies: DiffEntry[];
|
||||||
blockingDependencies: DiffEntry[];
|
blockingDependencies: DiffEntry[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SchemaCompareCompletionResult extends azdata.ResultStatus {
|
export interface SchemaCompareCompletionResult extends azdata.ResultStatus {
|
||||||
operationId: string;
|
operationId: string;
|
||||||
areEqual: boolean;
|
areEqual: boolean;
|
||||||
differences: DiffEntry[];
|
differences: DiffEntry[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DiffEntry {
|
export interface DiffEntry {
|
||||||
updateAction: SchemaUpdateAction;
|
updateAction: SchemaUpdateAction;
|
||||||
differenceType: SchemaDifferenceType;
|
differenceType: SchemaDifferenceType;
|
||||||
name: string;
|
name: string;
|
||||||
@@ -106,28 +106,28 @@ export interface DiffEntry {
|
|||||||
sourceScript: string;
|
sourceScript: string;
|
||||||
targetScript: string;
|
targetScript: string;
|
||||||
included: boolean;
|
included: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum SchemaUpdateAction {
|
export const enum SchemaUpdateAction {
|
||||||
Delete = 0,
|
Delete = 0,
|
||||||
Change = 1,
|
Change = 1,
|
||||||
Add = 2
|
Add = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum SchemaDifferenceType {
|
export const enum SchemaDifferenceType {
|
||||||
Object = 0,
|
Object = 0,
|
||||||
Property = 1
|
Property = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum SchemaCompareEndpointType {
|
export const enum SchemaCompareEndpointType {
|
||||||
Database = 0,
|
Database = 0,
|
||||||
Dacpac = 1,
|
Dacpac = 1,
|
||||||
Project = 2,
|
Project = 2,
|
||||||
// must be kept in-sync with SchemaCompareEndpointType in SQL Tools Service
|
// must be kept in-sync with SchemaCompareEndpointType in SQL Tools Service
|
||||||
// located at \src\Microsoft.SqlTools.ServiceLayer\SchemaCompare\Contracts\SchemaCompareRequest.cs
|
// located at \src\Microsoft.SqlTools.ServiceLayer\SchemaCompare\Contracts\SchemaCompareRequest.cs
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SchemaCompareEndpointInfo {
|
export interface SchemaCompareEndpointInfo {
|
||||||
endpointType: SchemaCompareEndpointType;
|
endpointType: SchemaCompareEndpointType;
|
||||||
packageFilePath: string;
|
packageFilePath: string;
|
||||||
serverDisplayName: string;
|
serverDisplayName: string;
|
||||||
@@ -140,18 +140,18 @@ export interface SchemaCompareEndpointInfo {
|
|||||||
targetScripts: string[];
|
targetScripts: string[];
|
||||||
folderStructure: string;
|
folderStructure: string;
|
||||||
dataSchemaProvider: string;
|
dataSchemaProvider: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SchemaCompareObjectId {
|
export interface SchemaCompareObjectId {
|
||||||
nameParts: string[];
|
nameParts: string[];
|
||||||
sqlObjectType: string;
|
sqlObjectType: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SchemaCompareOptionsResult extends azdata.ResultStatus {
|
export interface SchemaCompareOptionsResult extends azdata.ResultStatus {
|
||||||
defaultDeploymentOptions: DeploymentOptions;
|
defaultDeploymentOptions: DeploymentOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DeploymentOptions {
|
export interface DeploymentOptions {
|
||||||
ignoreTableOptions: boolean;
|
ignoreTableOptions: boolean;
|
||||||
ignoreSemicolonBetweenStatements: boolean;
|
ignoreSemicolonBetweenStatements: boolean;
|
||||||
ignoreRouteLifetime: boolean;
|
ignoreRouteLifetime: boolean;
|
||||||
@@ -230,12 +230,12 @@ export interface DeploymentOptions {
|
|||||||
ignoreColumnOrder: boolean;
|
ignoreColumnOrder: boolean;
|
||||||
doNotDropObjectTypes: SchemaObjectType[];
|
doNotDropObjectTypes: SchemaObjectType[];
|
||||||
excludeObjectTypes: SchemaObjectType[];
|
excludeObjectTypes: SchemaObjectType[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Values from <DacFx>\Product\Source\DeploymentApi\ObjectTypes.cs
|
* Values from <DacFx>\Product\Source\DeploymentApi\ObjectTypes.cs
|
||||||
*/
|
*/
|
||||||
export const enum SchemaObjectType {
|
export const enum SchemaObjectType {
|
||||||
Aggregates = 0,
|
Aggregates = 0,
|
||||||
ApplicationRoles = 1,
|
ApplicationRoles = 1,
|
||||||
Assemblies = 2,
|
Assemblies = 2,
|
||||||
@@ -305,14 +305,14 @@ export const enum SchemaObjectType {
|
|||||||
ServerTriggers = 66,
|
ServerTriggers = 66,
|
||||||
ExternalStreams = 67,
|
ExternalStreams = 67,
|
||||||
ExternalStreamingJobs = 68
|
ExternalStreamingJobs = 68
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SchemaCompareObjectId {
|
export interface SchemaCompareObjectId {
|
||||||
nameParts: string[];
|
nameParts: string[];
|
||||||
sqlObjectType: string;
|
sqlObjectType: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ISchemaCompareService {
|
export interface ISchemaCompareService {
|
||||||
schemaCompare(operationId: string, sourceEndpointInfo: SchemaCompareEndpointInfo, targetEndpointInfo: SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode, deploymentOptions: DeploymentOptions): Thenable<SchemaCompareResult>;
|
schemaCompare(operationId: string, sourceEndpointInfo: SchemaCompareEndpointInfo, targetEndpointInfo: SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode, deploymentOptions: DeploymentOptions): Thenable<SchemaCompareResult>;
|
||||||
schemaCompareGenerateScript(operationId: string, targetServerName: string, targetDatabaseName: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus>;
|
schemaCompareGenerateScript(operationId: string, targetServerName: string, targetDatabaseName: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus>;
|
||||||
schemaComparePublishChanges(operationId: string, targetServerName: string, targetDatabaseName: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus>;
|
schemaComparePublishChanges(operationId: string, targetServerName: string, targetDatabaseName: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus>;
|
||||||
@@ -323,9 +323,9 @@ export interface ISchemaCompareService {
|
|||||||
schemaCompareOpenScmp(filePath: string): Thenable<SchemaCompareOpenScmpResult>;
|
schemaCompareOpenScmp(filePath: string): Thenable<SchemaCompareOpenScmpResult>;
|
||||||
schemaCompareSaveScmp(sourceEndpointInfo: SchemaCompareEndpointInfo, targetEndpointInfo: SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode, deploymentOptions: DeploymentOptions, scmpFilePath: string, excludedSourceObjects: SchemaCompareObjectId[], excludedTargetObjects: SchemaCompareObjectId[]): Thenable<azdata.ResultStatus>;
|
schemaCompareSaveScmp(sourceEndpointInfo: SchemaCompareEndpointInfo, targetEndpointInfo: SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode, deploymentOptions: DeploymentOptions, scmpFilePath: string, excludedSourceObjects: SchemaCompareObjectId[], excludedTargetObjects: SchemaCompareObjectId[]): Thenable<azdata.ResultStatus>;
|
||||||
schemaCompareCancel(operationId: string): Thenable<azdata.ResultStatus>;
|
schemaCompareCancel(operationId: string): Thenable<azdata.ResultStatus>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SchemaCompareOpenScmpResult extends azdata.ResultStatus {
|
export interface SchemaCompareOpenScmpResult extends azdata.ResultStatus {
|
||||||
sourceEndpointInfo: SchemaCompareEndpointInfo;
|
sourceEndpointInfo: SchemaCompareEndpointInfo;
|
||||||
targetEndpointInfo: SchemaCompareEndpointInfo;
|
targetEndpointInfo: SchemaCompareEndpointInfo;
|
||||||
originalTargetName: string;
|
originalTargetName: string;
|
||||||
@@ -333,27 +333,27 @@ export interface SchemaCompareOpenScmpResult extends azdata.ResultStatus {
|
|||||||
deploymentOptions: DeploymentOptions;
|
deploymentOptions: DeploymentOptions;
|
||||||
excludedSourceElements: SchemaCompareObjectId[];
|
excludedSourceElements: SchemaCompareObjectId[];
|
||||||
excludedTargetElements: SchemaCompareObjectId[];
|
excludedTargetElements: SchemaCompareObjectId[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SchemaComparePublishProjectResult extends azdata.ResultStatus {
|
export interface SchemaComparePublishProjectResult extends azdata.ResultStatus {
|
||||||
changedFiles: string[];
|
changedFiles: string[];
|
||||||
addedFiles: string[];
|
addedFiles: string[];
|
||||||
deletedFiles: string[];
|
deletedFiles: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region --- dacfx
|
//#region --- dacfx
|
||||||
export const enum ExtractTarget {
|
export const enum ExtractTarget {
|
||||||
dacpac = 0,
|
dacpac = 0,
|
||||||
file = 1,
|
file = 1,
|
||||||
flat = 2,
|
flat = 2,
|
||||||
objectType = 3,
|
objectType = 3,
|
||||||
schema = 4,
|
schema = 4,
|
||||||
schemaObjectType = 5
|
schemaObjectType = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IDacFxService {
|
export interface IDacFxService {
|
||||||
exportBacpac(databaseName: string, packageFilePath: string, ownerUri: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<DacFxResult>;
|
exportBacpac(databaseName: string, packageFilePath: string, ownerUri: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<DacFxResult>;
|
||||||
importBacpac(packageFilePath: string, databaseName: string, ownerUri: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<DacFxResult>;
|
importBacpac(packageFilePath: string, databaseName: string, ownerUri: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<DacFxResult>;
|
||||||
extractDacpac(databaseName: string, packageFilePath: string, applicationName: string, applicationVersion: string, ownerUri: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<DacFxResult>;
|
extractDacpac(databaseName: string, packageFilePath: string, applicationName: string, applicationVersion: string, ownerUri: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<DacFxResult>;
|
||||||
@@ -363,38 +363,38 @@ export interface IDacFxService {
|
|||||||
generateDeployPlan(packageFilePath: string, databaseName: string, ownerUri: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<GenerateDeployPlanResult>;
|
generateDeployPlan(packageFilePath: string, databaseName: string, ownerUri: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<GenerateDeployPlanResult>;
|
||||||
getOptionsFromProfile(profilePath: string): Thenable<DacFxOptionsResult>;
|
getOptionsFromProfile(profilePath: string): Thenable<DacFxOptionsResult>;
|
||||||
validateStreamingJob(packageFilePath: string, createStreamingJobTsql: string): Thenable<ValidateStreamingJobResult>;
|
validateStreamingJob(packageFilePath: string, createStreamingJobTsql: string): Thenable<ValidateStreamingJobResult>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DacFxResult extends azdata.ResultStatus {
|
export interface DacFxResult extends azdata.ResultStatus {
|
||||||
operationId: string;
|
operationId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GenerateDeployPlanResult extends DacFxResult {
|
export interface GenerateDeployPlanResult extends DacFxResult {
|
||||||
report: string;
|
report: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DacFxOptionsResult extends azdata.ResultStatus {
|
export interface DacFxOptionsResult extends azdata.ResultStatus {
|
||||||
deploymentOptions: DeploymentOptions;
|
deploymentOptions: DeploymentOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ValidateStreamingJobResult extends azdata.ResultStatus {
|
export interface ValidateStreamingJobResult extends azdata.ResultStatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ExportParams {
|
export interface ExportParams {
|
||||||
databaseName: string;
|
databaseName: string;
|
||||||
packageFilePath: string;
|
packageFilePath: string;
|
||||||
ownerUri: string;
|
ownerUri: string;
|
||||||
taskExecutionMode: azdata.TaskExecutionMode;
|
taskExecutionMode: azdata.TaskExecutionMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ImportParams {
|
export interface ImportParams {
|
||||||
packageFilePath: string;
|
packageFilePath: string;
|
||||||
databaseName: string;
|
databaseName: string;
|
||||||
ownerUri: string;
|
ownerUri: string;
|
||||||
taskExecutionMode: azdata.TaskExecutionMode;
|
taskExecutionMode: azdata.TaskExecutionMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ExtractParams {
|
export interface ExtractParams {
|
||||||
databaseName: string;
|
databaseName: string;
|
||||||
packageFilePath: string;
|
packageFilePath: string;
|
||||||
applicationName: string;
|
applicationName: string;
|
||||||
@@ -402,62 +402,62 @@ export interface ExtractParams {
|
|||||||
ownerUri: string;
|
ownerUri: string;
|
||||||
extractTarget?: ExtractTarget;
|
extractTarget?: ExtractTarget;
|
||||||
taskExecutionMode: azdata.TaskExecutionMode;
|
taskExecutionMode: azdata.TaskExecutionMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DeployParams {
|
export interface DeployParams {
|
||||||
packageFilePath: string;
|
packageFilePath: string;
|
||||||
databaseName: string;
|
databaseName: string;
|
||||||
upgradeExisting: boolean;
|
upgradeExisting: boolean;
|
||||||
ownerUri: string;
|
ownerUri: string;
|
||||||
taskExecutionMode: azdata.TaskExecutionMode;
|
taskExecutionMode: azdata.TaskExecutionMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GenerateDeployScriptParams {
|
export interface GenerateDeployScriptParams {
|
||||||
packageFilePath: string;
|
packageFilePath: string;
|
||||||
databaseName: string;
|
databaseName: string;
|
||||||
ownerUri: string;
|
ownerUri: string;
|
||||||
taskExecutionMode: azdata.TaskExecutionMode;
|
taskExecutionMode: azdata.TaskExecutionMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GenerateDeployPlan {
|
export interface GenerateDeployPlan {
|
||||||
packageFilePath: string;
|
packageFilePath: string;
|
||||||
databaseName: string;
|
databaseName: string;
|
||||||
ownerUri: string;
|
ownerUri: string;
|
||||||
taskExecutionMode: azdata.TaskExecutionMode;
|
taskExecutionMode: azdata.TaskExecutionMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region --- Language Extensibility
|
//#region --- Language Extensibility
|
||||||
export interface ExternalLanguageContent {
|
export interface ExternalLanguageContent {
|
||||||
pathToExtension: string;
|
pathToExtension: string;
|
||||||
extensionFileName: string;
|
extensionFileName: string;
|
||||||
platform?: string;
|
platform?: string;
|
||||||
parameters?: string;
|
parameters?: string;
|
||||||
environmentVariables?: string;
|
environmentVariables?: string;
|
||||||
isLocalFile: boolean;
|
isLocalFile: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ExternalLanguage {
|
export interface ExternalLanguage {
|
||||||
name: string;
|
name: string;
|
||||||
owner?: string;
|
owner?: string;
|
||||||
contents: ExternalLanguageContent[];
|
contents: ExternalLanguageContent[];
|
||||||
createdDate?: string;
|
createdDate?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ILanguageExtensionService {
|
export interface ILanguageExtensionService {
|
||||||
listLanguages(ownerUri: string): Thenable<ExternalLanguage[]>;
|
listLanguages(ownerUri: string): Thenable<ExternalLanguage[]>;
|
||||||
deleteLanguage(ownerUri: string, languageName: string): Thenable<void>;
|
deleteLanguage(ownerUri: string, languageName: string): Thenable<void>;
|
||||||
updateLanguage(ownerUri: string, language: ExternalLanguage): Thenable<void>;
|
updateLanguage(ownerUri: string, language: ExternalLanguage): Thenable<void>;
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region --- cms
|
//#region --- cms
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Interface containing all CMS related operations
|
* Interface containing all CMS related operations
|
||||||
*/
|
*/
|
||||||
export interface ICmsService {
|
export interface ICmsService {
|
||||||
/**
|
/**
|
||||||
* Connects to or creates a Central management Server
|
* Connects to or creates a Central management Server
|
||||||
*/
|
*/
|
||||||
@@ -487,191 +487,106 @@ export interface ICmsService {
|
|||||||
* Removes a Server Group inside a CMS on a particular level
|
* Removes a Server Group inside a CMS on a particular level
|
||||||
*/
|
*/
|
||||||
removeServerGroup(ownerUri: string, relativePath: string, groupName: string): Thenable<boolean>;
|
removeServerGroup(ownerUri: string, relativePath: string, groupName: string): Thenable<boolean>;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* CMS Result interfaces as passed back to Extensions
|
* CMS Result interfaces as passed back to Extensions
|
||||||
*/
|
*/
|
||||||
export interface RegisteredServerResult {
|
export interface RegisteredServerResult {
|
||||||
name: string;
|
name: string;
|
||||||
serverName: string;
|
serverName: string;
|
||||||
description: string;
|
description: string;
|
||||||
connectionDetails: azdata.ConnectionInfo;
|
connectionDetails: azdata.ConnectionInfo;
|
||||||
relativePath: string;
|
relativePath: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RegisteredServerGroup {
|
export interface RegisteredServerGroup {
|
||||||
name: string;
|
name: string;
|
||||||
description: string;
|
description: string;
|
||||||
relativePath: string;
|
relativePath: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ListRegisteredServersResult {
|
export interface ListRegisteredServersResult {
|
||||||
registeredServersList: Array<RegisteredServerResult>;
|
registeredServersList: Array<RegisteredServerResult>;
|
||||||
registeredServerGroups: Array<RegisteredServerGroup>;
|
registeredServerGroups: Array<RegisteredServerGroup>;
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sql Assessment
|
* Sql Assessment
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// SqlAssessment interfaces -----------------------------------------------------------------------
|
// SqlAssessment interfaces -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export interface ISqlAssessmentService {
|
export interface ISqlAssessmentService {
|
||||||
assessmentInvoke(ownerUri: string, targetType: azdata.sqlAssessment.SqlAssessmentTargetType): Promise<azdata.SqlAssessmentResult>;
|
assessmentInvoke(ownerUri: string, targetType: azdata.sqlAssessment.SqlAssessmentTargetType): Promise<azdata.SqlAssessmentResult>;
|
||||||
getAssessmentItems(ownerUri: string, targetType: azdata.sqlAssessment.SqlAssessmentTargetType): Promise<azdata.SqlAssessmentResult>;
|
getAssessmentItems(ownerUri: string, targetType: azdata.sqlAssessment.SqlAssessmentTargetType): Promise<azdata.SqlAssessmentResult>;
|
||||||
generateAssessmentScript(items: azdata.SqlAssessmentResultItem[], targetServerName: string, targetDatabaseName: string, taskExecutionMode: azdata.TaskExecutionMode): Promise<azdata.ResultStatus>;
|
generateAssessmentScript(items: azdata.SqlAssessmentResultItem[], targetServerName: string, targetDatabaseName: string, taskExecutionMode: azdata.TaskExecutionMode): Promise<azdata.ResultStatus>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sql Migration
|
* Sql Migration
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// SqlMigration interfaces -----------------------------------------------------------------------
|
// SKU recommendation interfaces, mirrored from Microsoft.SqlServer.Migration.SkuRecommendation
|
||||||
|
export interface AzureSqlSkuCategory {
|
||||||
export interface SqlMigrationImpactedObjectInfo {
|
|
||||||
name: string;
|
|
||||||
impactDetail: string;
|
|
||||||
objectType: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SqlMigrationAssessmentResultItem {
|
|
||||||
rulesetVersion: string;
|
|
||||||
rulesetName: string;
|
|
||||||
ruleId: string;
|
|
||||||
targetType: string;
|
|
||||||
checkId: string;
|
|
||||||
tags: string[];
|
|
||||||
displayName: string;
|
|
||||||
description: string;
|
|
||||||
helpLink: string;
|
|
||||||
level: string;
|
|
||||||
timestamp: string;
|
|
||||||
kind: azdata.sqlAssessment.SqlAssessmentResultItemKind;
|
|
||||||
message: string;
|
|
||||||
appliesToMigrationTargetPlatform: string;
|
|
||||||
issueCategory: string;
|
|
||||||
databaseName: string;
|
|
||||||
impactedObjects: SqlMigrationImpactedObjectInfo[];
|
|
||||||
databaseRestoreFails: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ServerTargetReadiness {
|
|
||||||
numberOfDatabasesReadyForMigration: number;
|
|
||||||
numberOfNonOnlineDatabases: number;
|
|
||||||
totalNumberOfDatabases: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ErrorModel {
|
|
||||||
errorId: number;
|
|
||||||
message: string;
|
|
||||||
errorSummary: string;
|
|
||||||
possibleCauses: string;
|
|
||||||
guidance: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DatabaseTargetReadiness {
|
|
||||||
noSelectionForMigration: boolean;
|
|
||||||
numOfBlockerIssues: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DatabaseAssessmentProperties {
|
|
||||||
compatibilityLevel: string;
|
|
||||||
databaseSize: number;
|
|
||||||
isReplicationEnabled: boolean;
|
|
||||||
assessmentTimeInMilliseconds: number;
|
|
||||||
items: SqlMigrationAssessmentResultItem[];
|
|
||||||
errors: ErrorModel[];
|
|
||||||
sqlManagedInstanceTargetReadiness: DatabaseTargetReadiness;
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ServerAssessmentProperties {
|
|
||||||
cpuCoreCount: number;
|
|
||||||
physicalServerMemory: number;
|
|
||||||
serverHostPlatform: string;
|
|
||||||
serverVersion: string;
|
|
||||||
serverEngineEdition: string;
|
|
||||||
serverEdition: string;
|
|
||||||
isClustered: boolean;
|
|
||||||
numberOfUserDatabases: number;
|
|
||||||
sqlAssessmentStatus: number;
|
|
||||||
assessedDatabaseCount: number;
|
|
||||||
sqlManagedInstanceTargetReadiness: ServerTargetReadiness;
|
|
||||||
items: SqlMigrationAssessmentResultItem[];
|
|
||||||
errors: ErrorModel[];
|
|
||||||
databases: DatabaseAssessmentProperties[];
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface AssessmentResult {
|
|
||||||
startTime: string;
|
|
||||||
endedTime: string;
|
|
||||||
assessmentResult: ServerAssessmentProperties;
|
|
||||||
rawAssessmentResult: any;
|
|
||||||
errors: ErrorModel[];
|
|
||||||
}
|
|
||||||
|
|
||||||
// SKU recommendation interfaces, mirrored from Microsoft.SqlServer.Migration.SkuRecommendation
|
|
||||||
export interface AzureSqlSkuCategory {
|
|
||||||
sqlTargetPlatform: AzureSqlTargetPlatform;
|
sqlTargetPlatform: AzureSqlTargetPlatform;
|
||||||
computeTier: ComputeTier;
|
computeTier: ComputeTier;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AzureSqlSkuPaaSCategory extends AzureSqlSkuCategory {
|
export interface AzureSqlSkuPaaSCategory extends AzureSqlSkuCategory {
|
||||||
sqlPurchasingModel: AzureSqlPurchasingModel;
|
sqlPurchasingModel: AzureSqlPurchasingModel;
|
||||||
sqlServiceTier: AzureSqlPaaSServiceTier;
|
sqlServiceTier: AzureSqlPaaSServiceTier;
|
||||||
hardwareType: AzureSqlPaaSHardwareType;
|
hardwareType: AzureSqlPaaSHardwareType;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AzureSqlSkuIaaSCategory extends AzureSqlSkuCategory {
|
export interface AzureSqlSkuIaaSCategory extends AzureSqlSkuCategory {
|
||||||
virtualMachineFamilyType: VirtualMachineFamilyType;
|
virtualMachineFamilyType: VirtualMachineFamilyType;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AzureManagedDiskSku {
|
export interface AzureManagedDiskSku {
|
||||||
tier: AzureManagedDiskTier;
|
tier: AzureManagedDiskTier;
|
||||||
size: string;
|
size: string;
|
||||||
caching: AzureManagedDiskCaching;
|
caching: AzureManagedDiskCaching;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AzureVirtualMachineSku {
|
export interface AzureVirtualMachineSku {
|
||||||
virtualMachineFamily: VirtualMachineFamily;
|
virtualMachineFamily: VirtualMachineFamily;
|
||||||
sizeName: string;
|
sizeName: string;
|
||||||
computeSize: number;
|
computeSize: number;
|
||||||
azureSkuName: string;
|
azureSkuName: string;
|
||||||
vCPUsAvailable: number;
|
vCPUsAvailable: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AzureSqlSkuMonthlyCost {
|
export interface AzureSqlSkuMonthlyCost {
|
||||||
computeCost: number;
|
computeCost: number;
|
||||||
storageCost: number;
|
storageCost: number;
|
||||||
totalCost: number;
|
totalCost: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AzureSqlSku {
|
export interface AzureSqlSku {
|
||||||
category: AzureSqlSkuPaaSCategory | AzureSqlSkuIaaSCategory;
|
category: AzureSqlSkuPaaSCategory | AzureSqlSkuIaaSCategory;
|
||||||
computeSize: number;
|
computeSize: number;
|
||||||
predictedDataSizeInMb: number;
|
predictedDataSizeInMb: number;
|
||||||
predictedLogSizeInMb: number;
|
predictedLogSizeInMb: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AzureSqlPaaSSku extends AzureSqlSku {
|
export interface AzureSqlPaaSSku extends AzureSqlSku {
|
||||||
category: AzureSqlSkuPaaSCategory;
|
category: AzureSqlSkuPaaSCategory;
|
||||||
storageMaxSizeInMb: number;
|
storageMaxSizeInMb: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AzureSqlIaaSSku extends AzureSqlSku {
|
export interface AzureSqlIaaSSku extends AzureSqlSku {
|
||||||
category: AzureSqlSkuIaaSCategory;
|
category: AzureSqlSkuIaaSCategory;
|
||||||
virtualMachineSize: AzureVirtualMachineSku;
|
virtualMachineSize: AzureVirtualMachineSku;
|
||||||
dataDiskSizes: AzureManagedDiskSku[];
|
dataDiskSizes: AzureManagedDiskSku[];
|
||||||
logDiskSizes: AzureManagedDiskSku[];
|
logDiskSizes: AzureManagedDiskSku[];
|
||||||
tempDbDiskSizes: AzureManagedDiskSku[];
|
tempDbDiskSizes: AzureManagedDiskSku[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SkuRecommendationResultItem {
|
export interface SkuRecommendationResultItem {
|
||||||
sqlInstanceName: string;
|
sqlInstanceName: string;
|
||||||
databaseName: string;
|
databaseName: string;
|
||||||
targetSku: AzureSqlIaaSSku | AzureSqlPaaSSku;
|
targetSku: AzureSqlIaaSSku | AzureSqlPaaSSku;
|
||||||
@@ -679,9 +594,9 @@ export interface SkuRecommendationResultItem {
|
|||||||
ranking: number;
|
ranking: number;
|
||||||
positiveJustifications: string[];
|
positiveJustifications: string[];
|
||||||
negativeJustifications: string[];
|
negativeJustifications: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SqlInstanceRequirements {
|
export interface SqlInstanceRequirements {
|
||||||
cpuRequirementInCores: number;
|
cpuRequirementInCores: number;
|
||||||
dataStorageRequirementInMB: number;
|
dataStorageRequirementInMB: number;
|
||||||
logStorageRequirementInMB: number;
|
logStorageRequirementInMB: number;
|
||||||
@@ -697,9 +612,9 @@ export interface SqlInstanceRequirements {
|
|||||||
perfDataCollectionIntervalInSeconds: number;
|
perfDataCollectionIntervalInSeconds: number;
|
||||||
databaseLevelRequirements: SqlDatabaseRequirements[];
|
databaseLevelRequirements: SqlDatabaseRequirements[];
|
||||||
numberOfDataPointsAnalyzed: number;
|
numberOfDataPointsAnalyzed: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SqlDatabaseRequirements {
|
export interface SqlDatabaseRequirements {
|
||||||
cpuRequirementInCores: number;
|
cpuRequirementInCores: number;
|
||||||
dataIOPSRequirement: number;
|
dataIOPSRequirement: number;
|
||||||
logIOPSRequirement: number;
|
logIOPSRequirement: number;
|
||||||
@@ -712,9 +627,9 @@ export interface SqlDatabaseRequirements {
|
|||||||
cpuRequirementInPercentageOfTotalInstance: number;
|
cpuRequirementInPercentageOfTotalInstance: number;
|
||||||
numberOfDataPointsAnalyzed: number;
|
numberOfDataPointsAnalyzed: number;
|
||||||
fileLevelRequirements: SqlFileRequirements[];
|
fileLevelRequirements: SqlFileRequirements[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SqlFileRequirements {
|
export interface SqlFileRequirements {
|
||||||
fileName: string;
|
fileName: string;
|
||||||
fileType: DatabaseFileType;
|
fileType: DatabaseFileType;
|
||||||
sizeInMB: number;
|
sizeInMB: number;
|
||||||
@@ -723,82 +638,82 @@ export interface SqlFileRequirements {
|
|||||||
iopsRequirement: number;
|
iopsRequirement: number;
|
||||||
ioThroughputRequirementInMBps: number;
|
ioThroughputRequirementInMBps: number;
|
||||||
numberOfDataPointsAnalyzed: number;
|
numberOfDataPointsAnalyzed: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PaaSSkuRecommendationResultItem extends SkuRecommendationResultItem {
|
export interface PaaSSkuRecommendationResultItem extends SkuRecommendationResultItem {
|
||||||
targetSku: AzureSqlPaaSSku;
|
targetSku: AzureSqlPaaSSku;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IaaSSkuRecommendationResultItem extends SkuRecommendationResultItem {
|
export interface IaaSSkuRecommendationResultItem extends SkuRecommendationResultItem {
|
||||||
targetSku: AzureSqlIaaSSku;
|
targetSku: AzureSqlIaaSSku;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SkuRecommendationResult {
|
export interface SkuRecommendationResult {
|
||||||
sqlDbRecommendationResults: PaaSSkuRecommendationResultItem[];
|
sqlDbRecommendationResults: PaaSSkuRecommendationResultItem[];
|
||||||
sqlMiRecommendationResults: PaaSSkuRecommendationResultItem[];
|
sqlMiRecommendationResults: PaaSSkuRecommendationResultItem[];
|
||||||
sqlVmRecommendationResults: IaaSSkuRecommendationResultItem[];
|
sqlVmRecommendationResults: IaaSSkuRecommendationResultItem[];
|
||||||
instanceRequirements: SqlInstanceRequirements;
|
instanceRequirements: SqlInstanceRequirements;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SKU recommendation enums, mirrored from Microsoft.SqlServer.Migration.SkuRecommendation
|
// SKU recommendation enums, mirrored from Microsoft.SqlServer.Migration.SkuRecommendation
|
||||||
export const enum DatabaseFileType {
|
export const enum DatabaseFileType {
|
||||||
Rows = 0,
|
Rows = 0,
|
||||||
Log = 1,
|
Log = 1,
|
||||||
Filestream = 2,
|
Filestream = 2,
|
||||||
NotSupported = 3,
|
NotSupported = 3,
|
||||||
Fulltext = 4
|
Fulltext = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum AzureSqlTargetPlatform {
|
export const enum AzureSqlTargetPlatform {
|
||||||
AzureSqlDatabase = 0,
|
AzureSqlDatabase = 0,
|
||||||
AzureSqlManagedInstance = 1,
|
AzureSqlManagedInstance = 1,
|
||||||
AzureSqlVirtualMachine = 2
|
AzureSqlVirtualMachine = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum ComputeTier {
|
export const enum ComputeTier {
|
||||||
Provisioned = 0,
|
Provisioned = 0,
|
||||||
ServerLess = 1
|
ServerLess = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum AzureManagedDiskTier {
|
export const enum AzureManagedDiskTier {
|
||||||
Standard = 0,
|
Standard = 0,
|
||||||
Premium = 1,
|
Premium = 1,
|
||||||
Ultra = 2
|
Ultra = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum AzureManagedDiskCaching {
|
export const enum AzureManagedDiskCaching {
|
||||||
NotApplicable = 0,
|
NotApplicable = 0,
|
||||||
None = 1,
|
None = 1,
|
||||||
ReadOnly = 2,
|
ReadOnly = 2,
|
||||||
ReadWrite = 3
|
ReadWrite = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum AzureSqlPurchasingModel {
|
export const enum AzureSqlPurchasingModel {
|
||||||
vCore = 0,
|
vCore = 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum AzureSqlPaaSServiceTier {
|
export const enum AzureSqlPaaSServiceTier {
|
||||||
GeneralPurpose = 0,
|
GeneralPurpose = 0,
|
||||||
BusinessCritical,
|
BusinessCritical,
|
||||||
HyperScale,
|
HyperScale,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum AzureSqlPaaSHardwareType {
|
export const enum AzureSqlPaaSHardwareType {
|
||||||
Gen5 = 0,
|
Gen5 = 0,
|
||||||
PremiumSeries,
|
PremiumSeries,
|
||||||
PremiumSeriesMemoryOptimized
|
PremiumSeriesMemoryOptimized
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum VirtualMachineFamilyType {
|
export const enum VirtualMachineFamilyType {
|
||||||
GeneralPurpose,
|
GeneralPurpose,
|
||||||
ComputeOptimized,
|
ComputeOptimized,
|
||||||
MemoryOptimized,
|
MemoryOptimized,
|
||||||
StorageOptimized,
|
StorageOptimized,
|
||||||
GPU,
|
GPU,
|
||||||
HighPerformanceCompute
|
HighPerformanceCompute
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum VirtualMachineFamily {
|
export const enum VirtualMachineFamily {
|
||||||
basicAFamily,
|
basicAFamily,
|
||||||
standardA0_A7Family,
|
standardA0_A7Family,
|
||||||
standardAv2Family,
|
standardAv2Family,
|
||||||
@@ -874,27 +789,117 @@ export const enum VirtualMachineFamily {
|
|||||||
standardNVSv2Family,
|
standardNVSv2Family,
|
||||||
standardNVSv3Family,
|
standardNVSv3Family,
|
||||||
standardNVSv4Family
|
standardNVSv4Family
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface StartPerfDataCollectionResult {
|
export interface StartPerfDataCollectionResult {
|
||||||
dateTimeStarted: Date;
|
dateTimeStarted: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface StopPerfDataCollectionResult {
|
export interface StopPerfDataCollectionResult {
|
||||||
dateTimeStopped: Date;
|
dateTimeStopped: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RefreshPerfDataCollectionResult {
|
export interface RefreshPerfDataCollectionResult {
|
||||||
isCollecting: boolean;
|
isCollecting: boolean;
|
||||||
messages: string[];
|
messages: string[];
|
||||||
errors: string[];
|
errors: string[];
|
||||||
refreshTime: Date;
|
refreshTime: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ISqlMigrationService {
|
export interface ISqlMigrationService {
|
||||||
getAssessments(ownerUri: string, databases: string[]): Promise<AssessmentResult | undefined>;
|
getAssessments(ownerUri: string, databases: string[]): Promise<AssessmentResult | undefined>;
|
||||||
getSkuRecommendations(dataFolder: string, perfQueryIntervalInSec: number, targetPlatforms: string[], targetSqlInstance: string, targetPercentile: number, scalingFactor: number, startTime: string, endTime: string, includePreviewSkus: boolean, databaseAllowList: string[]): Promise<SkuRecommendationResult | undefined>;
|
getSkuRecommendations(dataFolder: string, perfQueryIntervalInSec: number, targetPlatforms: string[], targetSqlInstance: string, targetPercentile: number, scalingFactor: number, startTime: string, endTime: string, includePreviewSkus: boolean, databaseAllowList: string[]): Promise<SkuRecommendationResult | undefined>;
|
||||||
startPerfDataCollection(ownerUri: string, dataFolder: string, perfQueryIntervalInSec: number, staticQueryIntervalInSec: number, numberOfIterations: number): Promise<StartPerfDataCollectionResult | undefined>;
|
startPerfDataCollection(ownerUri: string, dataFolder: string, perfQueryIntervalInSec: number, staticQueryIntervalInSec: number, numberOfIterations: number): Promise<StartPerfDataCollectionResult | undefined>;
|
||||||
stopPerfDataCollection(): Promise<StopPerfDataCollectionResult | undefined>;
|
stopPerfDataCollection(): Promise<StopPerfDataCollectionResult | undefined>;
|
||||||
refreshPerfDataCollection(lastRefreshedTime: Date): Promise<RefreshPerfDataCollectionResult | undefined>;
|
refreshPerfDataCollection(lastRefreshedTime: Date): Promise<RefreshPerfDataCollectionResult | undefined>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// SqlMigration interfaces -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
export interface SqlMigrationImpactedObjectInfo {
|
||||||
|
name: string;
|
||||||
|
impactDetail: string;
|
||||||
|
objectType: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SqlMigrationAssessmentResultItem {
|
||||||
|
rulesetVersion: string;
|
||||||
|
rulesetName: string;
|
||||||
|
ruleId: string;
|
||||||
|
targetType: string;
|
||||||
|
checkId: string;
|
||||||
|
tags: string[];
|
||||||
|
displayName: string;
|
||||||
|
description: string;
|
||||||
|
helpLink: string;
|
||||||
|
level: string;
|
||||||
|
timestamp: string;
|
||||||
|
kind: azdata.sqlAssessment.SqlAssessmentResultItemKind;
|
||||||
|
message: string;
|
||||||
|
appliesToMigrationTargetPlatform: string;
|
||||||
|
issueCategory: string;
|
||||||
|
databaseName: string;
|
||||||
|
impactedObjects: SqlMigrationImpactedObjectInfo[];
|
||||||
|
databaseRestoreFails: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ServerTargetReadiness {
|
||||||
|
numberOfDatabasesReadyForMigration: number;
|
||||||
|
numberOfNonOnlineDatabases: number;
|
||||||
|
totalNumberOfDatabases: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ErrorModel {
|
||||||
|
errorId: number;
|
||||||
|
message: string;
|
||||||
|
errorSummary: string;
|
||||||
|
possibleCauses: string;
|
||||||
|
guidance: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DatabaseTargetReadiness {
|
||||||
|
noSelectionForMigration: boolean;
|
||||||
|
numOfBlockerIssues: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DatabaseAssessmentProperties {
|
||||||
|
compatibilityLevel: string;
|
||||||
|
databaseSize: number;
|
||||||
|
isReplicationEnabled: boolean;
|
||||||
|
assessmentTimeInMilliseconds: number;
|
||||||
|
items: SqlMigrationAssessmentResultItem[];
|
||||||
|
errors: ErrorModel[];
|
||||||
|
sqlManagedInstanceTargetReadiness: DatabaseTargetReadiness;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ServerAssessmentProperties {
|
||||||
|
cpuCoreCount: number;
|
||||||
|
physicalServerMemory: number;
|
||||||
|
serverHostPlatform: string;
|
||||||
|
serverVersion: string;
|
||||||
|
serverEngineEdition: string;
|
||||||
|
serverEdition: string;
|
||||||
|
isClustered: boolean;
|
||||||
|
numberOfUserDatabases: number;
|
||||||
|
sqlAssessmentStatus: number;
|
||||||
|
assessedDatabaseCount: number;
|
||||||
|
sqlManagedInstanceTargetReadiness: ServerTargetReadiness;
|
||||||
|
items: SqlMigrationAssessmentResultItem[];
|
||||||
|
errors: ErrorModel[];
|
||||||
|
databases: DatabaseAssessmentProperties[];
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AssessmentResult {
|
||||||
|
startTime: string;
|
||||||
|
endedTime: string;
|
||||||
|
assessmentResult: ServerAssessmentProperties;
|
||||||
|
rawAssessmentResult: any;
|
||||||
|
errors: ErrorModel[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISqlMigrationService {
|
||||||
|
getAssessments(ownerUri: string, databases: string[]): Promise<AssessmentResult | undefined>;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { AppContext } from './appContext';
|
import { AppContext } from './appContext';
|
||||||
import { IExtension, ICmsService, IDacFxService, ISchemaCompareService, MssqlObjectExplorerBrowser, ILanguageExtensionService, ISqlAssessmentService, ISqlMigrationService } from './mssql';
|
import { IExtension, ICmsService, IDacFxService, ISchemaCompareService, MssqlObjectExplorerBrowser, ILanguageExtensionService, ISqlAssessmentService, ISqlMigrationService } from 'mssql';
|
||||||
import * as constants from './constants';
|
import * as constants from './constants';
|
||||||
import { MssqlObjectExplorerNodeProvider } from './objectExplorerNodeProvider/objectExplorerNodeProvider';
|
import { MssqlObjectExplorerNodeProvider } from './objectExplorerNodeProvider/objectExplorerNodeProvider';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import { AppContext } from '../appContext';
|
import { AppContext } from '../appContext';
|
||||||
import { SqlOpsDataClient, ISqlOpsFeature } from 'dataprotocol-client';
|
import { SqlOpsDataClient, ISqlOpsFeature } from 'dataprotocol-client';
|
||||||
import * as constants from '../constants';
|
import * as constants from '../constants';
|
||||||
import * as mssql from '../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as Utils from '../utils';
|
import * as Utils from '../utils';
|
||||||
import { ClientCapabilities } from 'vscode-languageclient';
|
import { ClientCapabilities } from 'vscode-languageclient';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as mssql from '../mssql';
|
import * as mssql from 'mssql';
|
||||||
import { AppContext } from '../appContext';
|
import { AppContext } from '../appContext';
|
||||||
import { SqlOpsDataClient, ISqlOpsFeature } from 'dataprotocol-client';
|
import { SqlOpsDataClient, ISqlOpsFeature } from 'dataprotocol-client';
|
||||||
import { ClientCapabilities } from 'vscode-languageclient';
|
import { ClientCapabilities } from 'vscode-languageclient';
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as mssql from '../mssql';
|
import * as mssql from 'mssql';
|
||||||
import { AppContext } from '../appContext';
|
import { AppContext } from '../appContext';
|
||||||
import { SqlOpsDataClient, ISqlOpsFeature } from 'dataprotocol-client';
|
import { SqlOpsDataClient, ISqlOpsFeature } from 'dataprotocol-client';
|
||||||
import { ClientCapabilities } from 'vscode-languageclient';
|
import { ClientCapabilities } from 'vscode-languageclient';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as azdata from 'azdata';
|
|||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as sqldbproj from 'sqldbproj';
|
import * as sqldbproj from 'sqldbproj';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as loc from '../localizedConstants';
|
import * as loc from '../localizedConstants';
|
||||||
import { SchemaCompareMainWindow } from '../schemaCompareMainWindow';
|
import { SchemaCompareMainWindow } from '../schemaCompareMainWindow';
|
||||||
import { TelemetryReporter, TelemetryViews } from '../telemetry';
|
import { TelemetryReporter, TelemetryViews } from '../telemetry';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as loc from '../localizedConstants';
|
import * as loc from '../localizedConstants';
|
||||||
import { SchemaCompareMainWindow } from '../schemaCompareMainWindow';
|
import { SchemaCompareMainWindow } from '../schemaCompareMainWindow';
|
||||||
import { isNullOrUndefined } from 'util';
|
import { isNullOrUndefined } from 'util';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as mssql from '../../mssql/src/mssql';
|
import * as mssql from 'mssql';
|
||||||
import { SchemaCompareMainWindow } from './schemaCompareMainWindow';
|
import { SchemaCompareMainWindow } from './schemaCompareMainWindow';
|
||||||
|
|
||||||
export async function activate(extensionContext: vscode.ExtensionContext): Promise<void> {
|
export async function activate(extensionContext: vscode.ExtensionContext): Promise<void> {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
import * as loc from '../localizedConstants';
|
import * as loc from '../localizedConstants';
|
||||||
import * as mssql from '../../../mssql/src/mssql';
|
import * as mssql from 'mssql';
|
||||||
import { isNullOrUndefined } from 'util';
|
import { isNullOrUndefined } from 'util';
|
||||||
|
|
||||||
export class SchemaCompareOptionsModel {
|
export class SchemaCompareOptionsModel {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import * as vscode from 'vscode';
|
|||||||
import * as os from 'os';
|
import * as os from 'os';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as sqldbproj from 'sqldbproj';
|
import * as sqldbproj from 'sqldbproj';
|
||||||
import * as mssql from '../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as loc from './localizedConstants';
|
import * as loc from './localizedConstants';
|
||||||
import { SchemaCompareOptionsDialog } from './dialogs/schemaCompareOptionsDialog';
|
import { SchemaCompareOptionsDialog } from './dialogs/schemaCompareOptionsDialog';
|
||||||
import { TelemetryReporter, TelemetryViews } from './telemetry';
|
import { TelemetryReporter, TelemetryViews } from './telemetry';
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as should from 'should';
|
import * as should from 'should';
|
||||||
import * as mssql from '../../../../mssql/src/mssql';
|
import * as mssql from 'mssql';
|
||||||
import {SchemaCompareOptionsModel} from '../../models/schemaCompareOptionsModel';
|
import { SchemaCompareOptionsModel } from '../../models/schemaCompareOptionsModel';
|
||||||
|
|
||||||
describe('Schema Compare Options Model', () => {
|
describe('Schema Compare Options Model', () => {
|
||||||
it('Should create model and set options successfully', function (): void {
|
it('Should create model and set options successfully', function (): void {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import * as should from 'should';
|
import * as should from 'should';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as TypeMoq from 'typemoq';
|
import * as TypeMoq from 'typemoq';
|
||||||
import * as loc from '../localizedConstants';
|
import * as loc from '../localizedConstants';
|
||||||
import 'mocha';
|
import 'mocha';
|
||||||
@@ -67,7 +67,7 @@ describe('SchemaCompareMainWindow.start @DacFx@', function (): void {
|
|||||||
let sc = new SchemaCompareTestService();
|
let sc = new SchemaCompareTestService();
|
||||||
|
|
||||||
let result = new SchemaCompareMainWindowTest(sc, mockExtensionContext.object, null);
|
let result = new SchemaCompareMainWindowTest(sc, mockExtensionContext.object, null);
|
||||||
await result.start({connectionProfile: mockIConnectionProfile});
|
await result.start({ connectionProfile: mockIConnectionProfile });
|
||||||
|
|
||||||
should.notEqual(result.sourceEndpointInfo, undefined);
|
should.notEqual(result.sourceEndpointInfo, undefined);
|
||||||
should.equal(result.sourceEndpointInfo.endpointType, mssql.SchemaCompareEndpointType.Database);
|
should.equal(result.sourceEndpointInfo.endpointType, mssql.SchemaCompareEndpointType.Database);
|
||||||
@@ -502,7 +502,8 @@ describe('SchemaCompareMainWindow.execute @DacFx@', function (): void {
|
|||||||
selectSourceButtonState: true,
|
selectSourceButtonState: true,
|
||||||
selectTargetButtonState: true,
|
selectTargetButtonState: true,
|
||||||
generateScriptButtonState: true,
|
generateScriptButtonState: true,
|
||||||
applyButtonState: true} );
|
applyButtonState: true
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as should from 'should';
|
import * as should from 'should';
|
||||||
import { SchemaCompareMainWindow } from '../schemaCompareMainWindow';
|
import { SchemaCompareMainWindow } from '../schemaCompareMainWindow';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
|
|
||||||
export class SchemaCompareTestService implements mssql.ISchemaCompareService {
|
export class SchemaCompareTestService implements mssql.ISchemaCompareService {
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import should = require('should');
|
import should = require('should');
|
||||||
import { AssertionError } from 'assert';
|
import { AssertionError } from 'assert';
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import * as should from 'should';
|
import * as should from 'should';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as loc from '../localizedConstants';
|
import * as loc from '../localizedConstants';
|
||||||
import * as TypeMoq from 'typemoq';
|
import * as TypeMoq from 'typemoq';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|||||||
@@ -8,4 +8,5 @@
|
|||||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||||
/// <reference path='../../../data-workspace/src/dataworkspace.d.ts'/>
|
/// <reference path='../../../data-workspace/src/dataworkspace.d.ts'/>
|
||||||
/// <reference path='../../../sql-database-projects/src/sqldbproj.d.ts'/>
|
/// <reference path='../../../sql-database-projects/src/sqldbproj.d.ts'/>
|
||||||
|
/// <reference path='../../../mssql/src/mssql.d.ts'/>
|
||||||
/// <reference types='@types/node'/>
|
/// <reference types='@types/node'/>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import type * as azdataType from 'azdata'; // eslint-disable-line no-duplicate-imports
|
import type * as azdataType from 'azdata'; // eslint-disable-line no-duplicate-imports
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as mssql from '../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as os from 'os';
|
import * as os from 'os';
|
||||||
import * as loc from './localizedConstants';
|
import * as loc from './localizedConstants';
|
||||||
import * as dataworkspace from 'dataworkspace';
|
import * as dataworkspace from 'dataworkspace';
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as mssql from '../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { createHistoryFileName, readHistoryFileNames, getAssessmentDate, TargetWithChildren } from './utils';
|
import { createHistoryFileName, readHistoryFileNames, getAssessmentDate, TargetWithChildren } from './utils';
|
||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as mssql from '../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import { SqlAssessmentMainTab } from './tabs/assessmentMainTab';
|
import { SqlAssessmentMainTab } from './tabs/assessmentMainTab';
|
||||||
import { SqlAssessmentHistoryTab } from './tabs/historyTab';
|
import { SqlAssessmentHistoryTab } from './tabs/historyTab';
|
||||||
import { AssessmentEngine } from './engine';
|
import { AssessmentEngine } from './engine';
|
||||||
|
|||||||
@@ -6,4 +6,5 @@
|
|||||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||||
|
/// <reference path='../../../mssql/src/mssql.d.ts'/>
|
||||||
/// <reference types='@types/node'/>
|
/// <reference types='@types/node'/>
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as TypeMoq from 'typemoq';
|
import * as TypeMoq from 'typemoq';
|
||||||
import * as mssql from '../../../mssql/src/mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as vscodeMssql from 'vscode-mssql';
|
import * as vscodeMssql from 'vscode-mssql';
|
||||||
import { RequestType } from 'vscode-languageclient';
|
import { RequestType } from 'vscode-languageclient';
|
||||||
|
|
||||||
|
|||||||
@@ -6,5 +6,6 @@
|
|||||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||||
|
/// <reference path='../../../mssql/src/mssql.d.ts'/>
|
||||||
/// <reference path='../../../types/vscode-mssql.d.ts'/>
|
/// <reference path='../../../types/vscode-mssql.d.ts'/>
|
||||||
/// <reference types='@types/node'/>
|
/// <reference types='@types/node'/>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import * as constants from './constants';
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as glob from 'fast-glob';
|
import * as glob from 'fast-glob';
|
||||||
import * as dataworkspace from 'dataworkspace';
|
import * as dataworkspace from 'dataworkspace';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as vscodeMssql from 'vscode-mssql';
|
import * as vscodeMssql from 'vscode-mssql';
|
||||||
import * as fse from 'fs-extra';
|
import * as fse from 'fs-extra';
|
||||||
import * as which from 'which';
|
import * as which from 'which';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import type * as azdataType from 'azdata';
|
import type * as azdataType from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as vscodeMssql from 'vscode-mssql';
|
import * as vscodeMssql from 'vscode-mssql';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as templates from '../templates/templates';
|
import * as templates from '../templates/templates';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as constants from '../common/constants';
|
import * as constants from '../common/constants';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as os from 'os';
|
import * as os from 'os';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as utils from '../common/utils';
|
import * as utils from '../common/utils';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import type * as azdataType from 'azdata';
|
|||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as constants from '../common/constants';
|
import * as constants from '../common/constants';
|
||||||
import * as newProjectTool from '../tools/newProjectTool';
|
import * as newProjectTool from '../tools/newProjectTool';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
import { IconPathHelper } from '../common/iconHelper';
|
import { IconPathHelper } from '../common/iconHelper';
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import * as utils from '../common/utils';
|
|||||||
import { Project } from '../models/project';
|
import { Project } from '../models/project';
|
||||||
import { SqlConnectionDataSource } from '../models/dataSources/sqlConnectionStringSource';
|
import { SqlConnectionDataSource } from '../models/dataSources/sqlConnectionStringSource';
|
||||||
import { IDeploySettings } from '../models/IDeploySettings';
|
import { IDeploySettings } from '../models/IDeploySettings';
|
||||||
import { DeploymentOptions } from '../../../mssql/src/mssql';
|
import { DeploymentOptions } from 'mssql';
|
||||||
import { IconPathHelper } from '../common/iconHelper';
|
import { IconPathHelper } from '../common/iconHelper';
|
||||||
import { cssStyles } from '../common/uiConstants';
|
import { cssStyles } from '../common/uiConstants';
|
||||||
import { getAgreementDisplayText, getConnectionName, getDockerBaseImages } from './utils';
|
import { getAgreementDisplayText, getConnectionName, getDockerBaseImages } from './utils';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import type * as azdata from 'azdata';
|
import type * as azdata from 'azdata';
|
||||||
import * as constants from '../common/constants';
|
import * as constants from '../common/constants';
|
||||||
import * as newProjectTool from '../tools/newProjectTool';
|
import * as newProjectTool from '../tools/newProjectTool';
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { DeploymentOptions as mssqlDeploymentOptions } from '../../../mssql/src/mssql';
|
import { DeploymentOptions as mssqlDeploymentOptions } from 'mssql';
|
||||||
import { DeploymentOptions as vscodeMssqlDeploymentOptions } from 'vscode-mssql';
|
import { DeploymentOptions as vscodeMssqlDeploymentOptions } from 'vscode-mssql';
|
||||||
|
|
||||||
export type DeploymentOptions = mssqlDeploymentOptions | vscodeMssqlDeploymentOptions;
|
export type DeploymentOptions = mssqlDeploymentOptions | vscodeMssqlDeploymentOptions;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as mssql from '../../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as vscodeMssql from 'vscode-mssql';
|
import * as vscodeMssql from 'vscode-mssql';
|
||||||
|
|
||||||
type ExtractTarget = mssql.ExtractTarget | vscodeMssql.ExtractTarget;
|
type ExtractTarget = mssql.ExtractTarget | vscodeMssql.ExtractTarget;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as mssql from '../../../../mssql/src/mssql';
|
import * as mssql from 'mssql';
|
||||||
|
|
||||||
export interface UpdateProjectDataModel {
|
export interface UpdateProjectDataModel {
|
||||||
sourceEndpointInfo: mssql.SchemaCompareEndpointInfo;
|
sourceEndpointInfo: mssql.SchemaCompareEndpointInfo;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import * as xmldom from 'xmldom';
|
import * as xmldom from 'xmldom';
|
||||||
import * as constants from '../../common/constants';
|
import * as constants from '../../common/constants';
|
||||||
import * as utils from '../../common/utils';
|
import * as utils from '../../common/utils';
|
||||||
import * as mssql from '../../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as vscodeMssql from 'vscode-mssql';
|
import * as vscodeMssql from 'vscode-mssql';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import * as should from 'should';
|
import * as should from 'should';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as mssql from '../../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as sinon from 'sinon';
|
import * as sinon from 'sinon';
|
||||||
import { CreateProjectFromDatabaseDialog } from '../../dialogs/createProjectFromDatabaseDialog';
|
import { CreateProjectFromDatabaseDialog } from '../../dialogs/createProjectFromDatabaseDialog';
|
||||||
import { mockConnectionProfile } from '../testContext';
|
import { mockConnectionProfile } from '../testContext';
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import * as baselines from './baselines/baselines';
|
|||||||
import * as templates from '../templates/templates';
|
import * as templates from '../templates/templates';
|
||||||
import * as testUtils from './testUtils';
|
import * as testUtils from './testUtils';
|
||||||
import * as constants from '../common/constants';
|
import * as constants from '../common/constants';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as utils from '../common/utils';
|
import * as utils from '../common/utils';
|
||||||
|
|
||||||
import { SqlDatabaseProjectTreeViewProvider } from '../controllers/databaseProjectTreeViewProvider';
|
import { SqlDatabaseProjectTreeViewProvider } from '../controllers/databaseProjectTreeViewProvider';
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ import * as vscode from 'vscode';
|
|||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as TypeMoq from 'typemoq';
|
import * as TypeMoq from 'typemoq';
|
||||||
import * as mssql from '../../../mssql/src/mssql';
|
import * as mssql from 'mssql';
|
||||||
|
|
||||||
|
|
||||||
export interface TestContext {
|
export interface TestContext {
|
||||||
context: vscode.ExtensionContext;
|
context: vscode.ExtensionContext;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import * as path from 'path';
|
|||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
import * as utils from '../common/utils';
|
import * as utils from '../common/utils';
|
||||||
import { errorFindingBuildFilesLocation } from '../common/constants';
|
import { errorFindingBuildFilesLocation } from '../common/constants';
|
||||||
import * as mssql from '../../../mssql/src/mssql';
|
import * as mssql from 'mssql';
|
||||||
import * as vscodeMssql from 'vscode-mssql';
|
import * as vscodeMssql from 'vscode-mssql';
|
||||||
import * as sqldbproj from 'sqldbproj';
|
import * as sqldbproj from 'sqldbproj';
|
||||||
|
|
||||||
|
|||||||
@@ -7,5 +7,6 @@
|
|||||||
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||||
/// <reference path='../../../data-workspace/src/dataworkspace.d.ts'/>
|
/// <reference path='../../../data-workspace/src/dataworkspace.d.ts'/>
|
||||||
|
/// <reference path='../../../mssql/src/mssql.d.ts'/>
|
||||||
/// <reference path='../../../types/vscode-mssql.d.ts'/>
|
/// <reference path='../../../types/vscode-mssql.d.ts'/>
|
||||||
/// <reference types='@types/node'/>
|
/// <reference types='@types/node'/>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as azdata from 'azdata';
|
|||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import { MigrationStateModel, MigrationTargetType } from '../../models/stateMachine';
|
import { MigrationStateModel, MigrationTargetType } from '../../models/stateMachine';
|
||||||
import { SqlDatabaseTree } from './sqlDatabasesTree';
|
import { SqlDatabaseTree } from './sqlDatabasesTree';
|
||||||
import { SqlMigrationImpactedObjectInfo } from '../../../../mssql/src/mssql';
|
import { SqlMigrationImpactedObjectInfo } from 'mssql';
|
||||||
import { SKURecommendationPage } from '../../wizard/skuRecommendationPage';
|
import { SKURecommendationPage } from '../../wizard/skuRecommendationPage';
|
||||||
|
|
||||||
export type Issues = {
|
export type Issues = {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import { SqlMigrationAssessmentResultItem, SqlMigrationImpactedObjectInfo } from '../../../../mssql/src/mssql';
|
import { SqlMigrationAssessmentResultItem, SqlMigrationImpactedObjectInfo } from 'mssql';
|
||||||
import { MigrationStateModel, MigrationTargetType } from '../../models/stateMachine';
|
import { MigrationStateModel, MigrationTargetType } from '../../models/stateMachine';
|
||||||
import * as constants from '../../constants/strings';
|
import * as constants from '../../constants/strings';
|
||||||
import { debounce } from '../../api/utils';
|
import { debounce } from '../../api/utils';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as mssql from '../../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import { azureResource } from 'azureResource';
|
import { azureResource } from 'azureResource';
|
||||||
import { getLocations, getResourceGroupFromId, getBlobContainerId, getFullResourceGroupFromId, getResourceName } from '../../api/azure';
|
import { getLocations, getResourceGroupFromId, getBlobContainerId, getFullResourceGroupFromId, getResourceName } from '../../api/azure';
|
||||||
import { MigrationMode, MigrationStateModel, NetworkContainerType, SavedInfo } from '../../models/stateMachine';
|
import { MigrationMode, MigrationStateModel, NetworkContainerType, SavedInfo } from '../../models/stateMachine';
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ import * as vscode from 'vscode';
|
|||||||
import { MigrationStateModel, MigrationTargetType } from '../../models/stateMachine';
|
import { MigrationStateModel, MigrationTargetType } from '../../models/stateMachine';
|
||||||
import * as constants from '../../constants/strings';
|
import * as constants from '../../constants/strings';
|
||||||
import * as styles from '../../constants/styles';
|
import * as styles from '../../constants/styles';
|
||||||
import * as mssql from '../../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
|
|
||||||
export class SkuRecommendationResultsDialog {
|
export class SkuRecommendationResultsDialog {
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { WizardController } from './wizard/wizardController';
|
import { WizardController } from './wizard/wizardController';
|
||||||
import * as mssql from '../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
import * as loc from './constants/strings';
|
import * as loc from './constants/strings';
|
||||||
import { MigrationNotebookInfo, NotebookPathHelper } from './constants/notebookPathHelper';
|
import { MigrationNotebookInfo, NotebookPathHelper } from './constants/notebookPathHelper';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as azdata from 'azdata';
|
|||||||
import { azureResource } from 'azureResource';
|
import { azureResource } from 'azureResource';
|
||||||
import * as azurecore from 'azurecore';
|
import * as azurecore from 'azurecore';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import { getAvailableManagedInstanceProducts, getAvailableStorageAccounts, getBlobContainers, getFileShares, getSqlMigrationServices, getSubscriptions, SqlMigrationService, SqlManagedInstance, startDatabaseMigration, StartDatabaseMigrationRequest, StorageAccount, getAvailableSqlVMs, SqlVMServer, getLocations, getResourceGroups, getLocationDisplayName, getSqlManagedInstanceDatabases, getBlobs } from '../api/azure';
|
import { getAvailableManagedInstanceProducts, getAvailableStorageAccounts, getBlobContainers, getFileShares, getSqlMigrationServices, getSubscriptions, SqlMigrationService, SqlManagedInstance, startDatabaseMigration, StartDatabaseMigrationRequest, StorageAccount, getAvailableSqlVMs, SqlVMServer, getLocations, getResourceGroups, getLocationDisplayName, getSqlManagedInstanceDatabases, getBlobs } from '../api/azure';
|
||||||
import * as constants from '../constants/strings';
|
import * as constants from '../constants/strings';
|
||||||
import { MigrationLocalStorage } from './migrationLocalStorage';
|
import { MigrationLocalStorage } from './migrationLocalStorage';
|
||||||
|
|||||||
@@ -8,4 +8,5 @@
|
|||||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||||
/// <reference path='../../../azurecore/src/azurecore.d.ts'/>
|
/// <reference path='../../../azurecore/src/azurecore.d.ts'/>
|
||||||
/// <reference path='../../../azurecore/src/azureResource/azure-resource.d.ts'/>
|
/// <reference path='../../../azurecore/src/azureResource/azure-resource.d.ts'/>
|
||||||
|
/// <reference path='../../../mssql/src/mssql.d.ts'/>
|
||||||
/// <reference types='@types/node'/>
|
/// <reference types='@types/node'/>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import { MigrationWizardPage } from '../models/migrationWizardPage';
|
import { MigrationWizardPage } from '../models/migrationWizardPage';
|
||||||
import { MigrationStateModel, MigrationTargetType, PerformanceDataSourceOptions, StateChangeEvent } from '../models/stateMachine';
|
import { MigrationStateModel, MigrationTargetType, PerformanceDataSourceOptions, StateChangeEvent } from '../models/stateMachine';
|
||||||
import { AssessmentResultsDialog } from '../dialog/assessmentResults/assessmentResultsDialog';
|
import { AssessmentResultsDialog } from '../dialog/assessmentResults/assessmentResultsDialog';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as mssql from '../../../mssql';
|
import * as mssql from 'mssql';
|
||||||
import { MigrationStateModel, NetworkContainerType, Page } from '../models/stateMachine';
|
import { MigrationStateModel, NetworkContainerType, Page } from '../models/stateMachine';
|
||||||
import * as loc from '../constants/strings';
|
import * as loc from '../constants/strings';
|
||||||
import { MigrationWizardPage } from '../models/migrationWizardPage';
|
import { MigrationWizardPage } from '../models/migrationWizardPage';
|
||||||
|
|||||||
@@ -719,7 +719,7 @@ export const SqlMainContext = {
|
|||||||
MainThreadNotebook: createMainId<MainThreadNotebookShape>('MainThreadNotebook'),
|
MainThreadNotebook: createMainId<MainThreadNotebookShape>('MainThreadNotebook'),
|
||||||
MainThreadNotebookDocumentsAndEditors: createMainId<MainThreadNotebookDocumentsAndEditorsShape>('MainThreadNotebookDocumentsAndEditors'),
|
MainThreadNotebookDocumentsAndEditors: createMainId<MainThreadNotebookDocumentsAndEditorsShape>('MainThreadNotebookDocumentsAndEditors'),
|
||||||
MainThreadExtensionManagement: createMainId<MainThreadExtensionManagementShape>('MainThreadExtensionManagement'),
|
MainThreadExtensionManagement: createMainId<MainThreadExtensionManagementShape>('MainThreadExtensionManagement'),
|
||||||
MainThreadWorkspace: createMainId<MainThreadWorkspaceShape>('MainThreadWorkspace')
|
MainThreadWorkspace: createMainId<MainThreadWorkspaceShape>('MainThreadWorkspace'),
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SqlExtHostContext = {
|
export const SqlExtHostContext = {
|
||||||
@@ -742,7 +742,7 @@ export const SqlExtHostContext = {
|
|||||||
ExtHostNotebook: createExtId<ExtHostNotebookShape>('ExtHostNotebook'),
|
ExtHostNotebook: createExtId<ExtHostNotebookShape>('ExtHostNotebook'),
|
||||||
ExtHostNotebookDocumentsAndEditors: createExtId<ExtHostNotebookDocumentsAndEditorsShape>('ExtHostNotebookDocumentsAndEditors'),
|
ExtHostNotebookDocumentsAndEditors: createExtId<ExtHostNotebookDocumentsAndEditorsShape>('ExtHostNotebookDocumentsAndEditors'),
|
||||||
ExtHostExtensionManagement: createExtId<ExtHostExtensionManagementShape>('ExtHostExtensionManagement'),
|
ExtHostExtensionManagement: createExtId<ExtHostExtensionManagementShape>('ExtHostExtensionManagement'),
|
||||||
ExtHostWorkspace: createExtId<ExtHostWorkspaceShape>('ExtHostWorkspace')
|
ExtHostWorkspace: createExtId<ExtHostWorkspaceShape>('ExtHostWorkspace'),
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface MainThreadDashboardShape extends IDisposable {
|
export interface MainThreadDashboardShape extends IDisposable {
|
||||||
|
|||||||
Reference in New Issue
Block a user