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
@@ -7,7 +7,7 @@ import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import * as path from 'path';
|
||||
import * as sqldbproj from 'sqldbproj';
|
||||
import * as mssql from '../../../mssql';
|
||||
import * as mssql from 'mssql';
|
||||
import * as loc from '../localizedConstants';
|
||||
import { SchemaCompareMainWindow } from '../schemaCompareMainWindow';
|
||||
import { TelemetryReporter, TelemetryViews } from '../telemetry';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import * as mssql from '../../../mssql';
|
||||
import * as mssql from 'mssql';
|
||||
import * as loc from '../localizedConstants';
|
||||
import { SchemaCompareMainWindow } from '../schemaCompareMainWindow';
|
||||
import { isNullOrUndefined } from 'util';
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import * as mssql from '../../mssql/src/mssql';
|
||||
import * as mssql from 'mssql';
|
||||
import { SchemaCompareMainWindow } from './schemaCompareMainWindow';
|
||||
|
||||
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.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as loc from '../localizedConstants';
|
||||
import * as mssql from '../../../mssql/src/mssql';
|
||||
import * as mssql from 'mssql';
|
||||
import { isNullOrUndefined } from 'util';
|
||||
|
||||
export class SchemaCompareOptionsModel {
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as vscode from 'vscode';
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import * as sqldbproj from 'sqldbproj';
|
||||
import * as mssql from '../../mssql';
|
||||
import * as mssql from 'mssql';
|
||||
import * as loc from './localizedConstants';
|
||||
import { SchemaCompareOptionsDialog } from './dialogs/schemaCompareOptionsDialog';
|
||||
import { TelemetryReporter, TelemetryViews } from './telemetry';
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as should from 'should';
|
||||
import * as mssql from '../../../../mssql/src/mssql';
|
||||
import {SchemaCompareOptionsModel} from '../../models/schemaCompareOptionsModel';
|
||||
import * as mssql from 'mssql';
|
||||
import { SchemaCompareOptionsModel } from '../../models/schemaCompareOptionsModel';
|
||||
|
||||
describe('Schema Compare Options Model', () => {
|
||||
it('Should create model and set options successfully', function (): void {
|
||||
@@ -39,7 +39,7 @@ describe('Schema Compare Options Model', () => {
|
||||
});
|
||||
});
|
||||
|
||||
const defaultOptions: mssql.DeploymentOptions = {
|
||||
const defaultOptions: mssql.DeploymentOptions = {
|
||||
ignoreTableOptions: false,
|
||||
ignoreSemicolonBetweenStatements: false,
|
||||
ignoreRouteLifetime: false,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as should from 'should';
|
||||
import * as vscode from 'vscode';
|
||||
import * as mssql from '../../../mssql';
|
||||
import * as mssql from 'mssql';
|
||||
import * as TypeMoq from 'typemoq';
|
||||
import * as loc from '../localizedConstants';
|
||||
import 'mocha';
|
||||
@@ -67,7 +67,7 @@ describe('SchemaCompareMainWindow.start @DacFx@', function (): void {
|
||||
let sc = new SchemaCompareTestService();
|
||||
|
||||
let result = new SchemaCompareMainWindowTest(sc, mockExtensionContext.object, null);
|
||||
await result.start({connectionProfile: mockIConnectionProfile});
|
||||
await result.start({ connectionProfile: mockIConnectionProfile });
|
||||
|
||||
should.notEqual(result.sourceEndpointInfo, undefined);
|
||||
should.equal(result.sourceEndpointInfo.endpointType, mssql.SchemaCompareEndpointType.Database);
|
||||
@@ -502,7 +502,8 @@ describe('SchemaCompareMainWindow.execute @DacFx@', function (): void {
|
||||
selectSourceButtonState: true,
|
||||
selectTargetButtonState: true,
|
||||
generateScriptButtonState: true,
|
||||
applyButtonState: true} );
|
||||
applyButtonState: true
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import * as mssql from '../../../mssql';
|
||||
import * as mssql from 'mssql';
|
||||
import * as should from 'should';
|
||||
import { SchemaCompareMainWindow } from '../schemaCompareMainWindow';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as mssql from '../../../mssql';
|
||||
import * as mssql from 'mssql';
|
||||
|
||||
export class SchemaCompareTestService implements mssql.ISchemaCompareService {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as mssql from '../../../mssql';
|
||||
import * as mssql from 'mssql';
|
||||
import should = require('should');
|
||||
import { AssertionError } from 'assert';
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import * as should from 'should';
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import * as mssql from '../../../mssql';
|
||||
import * as mssql from 'mssql';
|
||||
import * as loc from '../localizedConstants';
|
||||
import * as TypeMoq from 'typemoq';
|
||||
import * as path from 'path';
|
||||
|
||||
@@ -8,4 +8,5 @@
|
||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||
/// <reference path='../../../data-workspace/src/dataworkspace.d.ts'/>
|
||||
/// <reference path='../../../sql-database-projects/src/sqldbproj.d.ts'/>
|
||||
/// <reference path='../../../mssql/src/mssql.d.ts'/>
|
||||
/// <reference types='@types/node'/>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import * as azdata from 'azdata';
|
||||
import type * as azdataType from 'azdata'; // eslint-disable-line no-duplicate-imports
|
||||
import * as vscode from 'vscode';
|
||||
import * as mssql from '../../mssql';
|
||||
import * as mssql from 'mssql';
|
||||
import * as os from 'os';
|
||||
import * as loc from './localizedConstants';
|
||||
import * as dataworkspace from 'dataworkspace';
|
||||
|
||||
Reference in New Issue
Block a user