mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add launchPublishToDockerContainerQuickpick to extension API (#19834)
* Initial * remove namespace * minor fixes
This commit is contained in:
@@ -15,7 +15,7 @@ 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';
|
||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
import { Project } from '../models/project';
|
import { ISqlProject } from 'sqldbproj';
|
||||||
|
|
||||||
export interface ValidationResult {
|
export interface ValidationResult {
|
||||||
errorMessage: string;
|
errorMessage: string;
|
||||||
@@ -322,7 +322,7 @@ export async function defaultAzureAccountServiceFactory(): Promise<vscodeMssql.I
|
|||||||
/*
|
/*
|
||||||
* Returns the default deployment options from DacFx, filtered to appropriate options for the given project.
|
* Returns the default deployment options from DacFx, filtered to appropriate options for the given project.
|
||||||
*/
|
*/
|
||||||
export async function getDefaultPublishDeploymentOptions(project: Project): Promise<mssql.DeploymentOptions | vscodeMssql.DeploymentOptions> {
|
export async function getDefaultPublishDeploymentOptions(project: ISqlProject): Promise<mssql.DeploymentOptions | vscodeMssql.DeploymentOptions> {
|
||||||
const schemaCompareService = await getSchemaCompareService();
|
const schemaCompareService = await getSchemaCompareService();
|
||||||
const result = await schemaCompareService.schemaCompareGetDefaultOptions();
|
const result = await schemaCompareService.schemaCompareGetDefaultOptions();
|
||||||
const deploymentOptions = result.defaultDeploymentOptions;
|
const deploymentOptions = result.defaultDeploymentOptions;
|
||||||
|
|||||||
@@ -16,11 +16,10 @@ import { IconPathHelper } from '../common/iconHelper';
|
|||||||
import { WorkspaceTreeItem } from 'dataworkspace';
|
import { WorkspaceTreeItem } from 'dataworkspace';
|
||||||
import * as constants from '../common/constants';
|
import * as constants from '../common/constants';
|
||||||
import { SqlDatabaseProjectProvider } from '../projectProvider/projectProvider';
|
import { SqlDatabaseProjectProvider } from '../projectProvider/projectProvider';
|
||||||
import { GenerateProjectFromOpenApiSpecOptions, ItemType } from 'sqldbproj';
|
import { EntryType, GenerateProjectFromOpenApiSpecOptions, ItemType } from 'sqldbproj';
|
||||||
import { TableFileNode } from '../models/tree/fileFolderTreeItem';
|
import { TableFileNode } from '../models/tree/fileFolderTreeItem';
|
||||||
import { ProjectRootTreeItem } from '../models/tree/projectTreeItem';
|
import { ProjectRootTreeItem } from '../models/tree/projectTreeItem';
|
||||||
import { getAzdataApi } from '../common/utils';
|
import { getAzdataApi } from '../common/utils';
|
||||||
import { EntryType } from '../models/projectEntry';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main controller class that initializes the extension
|
* The main controller class that initializes the extension
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import { PublishDatabaseDialog } from '../dialogs/publishDatabaseDialog';
|
|||||||
import { Project, reservedProjectFolders } from '../models/project';
|
import { Project, reservedProjectFolders } from '../models/project';
|
||||||
import { SqlDatabaseProjectTreeViewProvider } from './databaseProjectTreeViewProvider';
|
import { SqlDatabaseProjectTreeViewProvider } from './databaseProjectTreeViewProvider';
|
||||||
import { FolderNode, FileNode } from '../models/tree/fileFolderTreeItem';
|
import { FolderNode, FileNode } from '../models/tree/fileFolderTreeItem';
|
||||||
import { IDeploySettings } from '../models/IDeploySettings';
|
|
||||||
import { BaseProjectTreeItem } from '../models/tree/baseTreeItem';
|
import { BaseProjectTreeItem } from '../models/tree/baseTreeItem';
|
||||||
import { ProjectRootTreeItem } from '../models/tree/projectTreeItem';
|
import { ProjectRootTreeItem } from '../models/tree/projectTreeItem';
|
||||||
import { ImportDataModel } from '../models/api/import';
|
import { ImportDataModel } from '../models/api/import';
|
||||||
@@ -37,14 +36,14 @@ import { TelemetryActions, TelemetryReporter, TelemetryViews } from '../common/t
|
|||||||
import { IconPathHelper } from '../common/iconHelper';
|
import { IconPathHelper } from '../common/iconHelper';
|
||||||
import { DashboardData, PublishData, Status } from '../models/dashboardData/dashboardData';
|
import { DashboardData, PublishData, Status } from '../models/dashboardData/dashboardData';
|
||||||
import { getPublishDatabaseSettings, launchPublishTargetOption } from '../dialogs/publishDatabaseQuickpick';
|
import { getPublishDatabaseSettings, launchPublishTargetOption } from '../dialogs/publishDatabaseQuickpick';
|
||||||
import { launchCreateAzureServerQuickPick, launchPublishToDockerContainerQuickpick } from '../dialogs/deployDatabaseQuickpick';
|
import { launchCreateAzureServerQuickPick, getPublishToDockerSettings } from '../dialogs/deployDatabaseQuickpick';
|
||||||
import { DeployService } from '../models/deploy/deployService';
|
import { DeployService } from '../models/deploy/deployService';
|
||||||
import { AddItemOptions, GenerateProjectFromOpenApiSpecOptions, ISqlProject, ItemType, SqlTargetPlatform } from 'sqldbproj';
|
import { AddItemOptions, EntryType, GenerateProjectFromOpenApiSpecOptions, IDatabaseReferenceProjectEntry, IDeploySettings, IPublishToDockerSettings, ISqlProject, ItemType, SqlTargetPlatform } from 'sqldbproj';
|
||||||
import { AutorestHelper } from '../tools/autorestHelper';
|
import { AutorestHelper } from '../tools/autorestHelper';
|
||||||
import { createNewProjectFromDatabaseWithQuickpick } from '../dialogs/createProjectFromDatabaseQuickpick';
|
import { createNewProjectFromDatabaseWithQuickpick } from '../dialogs/createProjectFromDatabaseQuickpick';
|
||||||
import { addDatabaseReferenceQuickpick } from '../dialogs/addDatabaseReferenceQuickpick';
|
import { addDatabaseReferenceQuickpick } from '../dialogs/addDatabaseReferenceQuickpick';
|
||||||
import { ILocalDbDeployProfile, ISqlDbDeployProfile } from '../models/deploy/deployProfile';
|
import { ISqlDbDeployProfile } from '../models/deploy/deployProfile';
|
||||||
import { EntryType, FileProjectEntry, IDatabaseReferenceProjectEntry, SqlProjectReferenceProjectEntry } from '../models/projectEntry';
|
import { FileProjectEntry, SqlProjectReferenceProjectEntry } from '../models/projectEntry';
|
||||||
import { UpdateProjectAction, UpdateProjectDataModel } from '../models/api/updateProject';
|
import { UpdateProjectAction, UpdateProjectDataModel } from '../models/api/updateProject';
|
||||||
import { AzureSqlClient } from '../models/deploy/azureSqlClient';
|
import { AzureSqlClient } from '../models/deploy/azureSqlClient';
|
||||||
import { ConnectionService } from '../models/connections/connectionService';
|
import { ConnectionService } from '../models/connections/connectionService';
|
||||||
@@ -317,7 +316,7 @@ export class ProjectsController {
|
|||||||
* @param context a treeItem in a project's hierarchy, to be used to obtain a Project or the Project itself
|
* @param context a treeItem in a project's hierarchy, to be used to obtain a Project or the Project itself
|
||||||
* @param deployProfile
|
* @param deployProfile
|
||||||
*/
|
*/
|
||||||
public async publishToDockerContainer(context: Project | dataworkspace.WorkspaceTreeItem, deployProfile: ILocalDbDeployProfile): Promise<void> {
|
public async publishToDockerContainer(context: Project | dataworkspace.WorkspaceTreeItem, deployProfile: IPublishToDockerSettings): Promise<void> {
|
||||||
const project: Project = this.getProjectFromContext(context);
|
const project: Project = this.getProjectFromContext(context);
|
||||||
// Removing the path separator from the image base name to be able to add that in the telemetry. With the separator the name is flagged as user path which is not true
|
// Removing the path separator from the image base name to be able to add that in the telemetry. With the separator the name is flagged as user path which is not true
|
||||||
// We only need to know the image base parts so it's ok to use a different separator when adding to telemetry
|
// We only need to know the image base parts so it's ok to use a different separator when adding to telemetry
|
||||||
@@ -400,7 +399,7 @@ export class ProjectsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (publishTarget === constants.PublishTargetType.docker) {
|
if (publishTarget === constants.PublishTargetType.docker) {
|
||||||
const deployProfile = await launchPublishToDockerContainerQuickpick(project);
|
const deployProfile = await getPublishToDockerSettings(project);
|
||||||
if (deployProfile?.deploySettings && deployProfile?.localDbSetting) {
|
if (deployProfile?.deploySettings && deployProfile?.localDbSetting) {
|
||||||
await this.publishToDockerContainer(project, deployProfile);
|
await this.publishToDockerContainer(project, deployProfile);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ import * as vscode from 'vscode';
|
|||||||
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 uiUtils from './utils';
|
import * as uiUtils from './utils';
|
||||||
import { AppSettingType, DockerImageInfo, IDeployAppIntegrationProfile, ISqlDbDeployProfile, ILocalDbDeployProfile, ILocalDbSetting } from '../models/deploy/deployProfile';
|
import { AppSettingType, DockerImageInfo, IDeployAppIntegrationProfile, ISqlDbDeployProfile } from '../models/deploy/deployProfile';
|
||||||
import { Project } from '../models/project';
|
import { Project } from '../models/project';
|
||||||
import { getPublishDatabaseSettings } from './publishDatabaseQuickpick';
|
import { getPublishDatabaseSettings } from './publishDatabaseQuickpick';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as fse from 'fs-extra';
|
import * as fse from 'fs-extra';
|
||||||
import { AzureSqlClient } from '../models/deploy/azureSqlClient';
|
import { AzureSqlClient } from '../models/deploy/azureSqlClient';
|
||||||
import { IDeploySettings } from '../models/IDeploySettings';
|
|
||||||
import { IAccount } from 'vscode-mssql';
|
import { IAccount } from 'vscode-mssql';
|
||||||
|
import { IDeploySettings, ILocalDbSetting, IPublishToDockerSettings, ISqlProject } from 'sqldbproj';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create flow for Deploying a database using only VS Code-native APIs such as QuickPick
|
* Create flow for Deploying a database using only VS Code-native APIs such as QuickPick
|
||||||
@@ -256,7 +256,8 @@ export async function launchCreateAzureServerQuickPick(project: Project, azureSq
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
// TODO add tenant
|
// TODO add tenant
|
||||||
deploySettings: settings, sqlDbSetting: {
|
deploySettings: settings,
|
||||||
|
sqlDbSetting: {
|
||||||
tenantId: session.tenantId,
|
tenantId: session.tenantId,
|
||||||
accountId: session.account.key.id,
|
accountId: session.account.key.id,
|
||||||
serverName: serverName,
|
serverName: serverName,
|
||||||
@@ -272,9 +273,9 @@ export async function launchCreateAzureServerQuickPick(project: Project, azureSq
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create flow for publishing a database to docker container using only VS Code-native APIs such as QuickPick
|
* Gets the settings for publishing a database to docker container using only VS Code-native APIs such as QuickPick
|
||||||
*/
|
*/
|
||||||
export async function launchPublishToDockerContainerQuickpick(project: Project): Promise<ILocalDbDeployProfile | undefined> {
|
export async function getPublishToDockerSettings(project: ISqlProject): Promise<IPublishToDockerSettings | undefined> {
|
||||||
const target = project.getProjectTargetVersion();
|
const target = project.getProjectTargetVersion();
|
||||||
const name = uiUtils.getPublishServerName(target);
|
const name = uiUtils.getPublishServerName(target);
|
||||||
let localDbSetting: ILocalDbSetting | undefined;
|
let localDbSetting: ILocalDbSetting | undefined;
|
||||||
|
|||||||
@@ -10,15 +10,14 @@ 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 { DeploymentOptions } from '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, getPublishServerName } from './utils';
|
import { getAgreementDisplayText, getConnectionName, getDockerBaseImages, getPublishServerName } from './utils';
|
||||||
import { TelemetryActions, TelemetryReporter, TelemetryViews } from '../common/telemetry';
|
import { TelemetryActions, TelemetryReporter, TelemetryViews } from '../common/telemetry';
|
||||||
import { ILocalDbDeployProfile } from '../models/deploy/deployProfile';
|
|
||||||
import { Deferred } from '../common/promise';
|
import { Deferred } from '../common/promise';
|
||||||
import { PublishOptionsDialog } from './publishOptionsDialog';
|
import { PublishOptionsDialog } from './publishOptionsDialog';
|
||||||
|
import { IDeploySettings, IPublishToDockerSettings } from 'sqldbproj';
|
||||||
|
|
||||||
interface DataSourceDropdownValue extends azdataType.CategoryValue {
|
interface DataSourceDropdownValue extends azdataType.CategoryValue {
|
||||||
dataSource: SqlConnectionDataSource;
|
dataSource: SqlConnectionDataSource;
|
||||||
@@ -65,7 +64,7 @@ export class PublishDatabaseDialog {
|
|||||||
private toDispose: vscode.Disposable[] = [];
|
private toDispose: vscode.Disposable[] = [];
|
||||||
|
|
||||||
public publish: ((proj: Project, profile: IDeploySettings) => any) | undefined;
|
public publish: ((proj: Project, profile: IDeploySettings) => any) | undefined;
|
||||||
public publishToContainer: ((proj: Project, profile: ILocalDbDeployProfile) => any) | undefined;
|
public publishToContainer: ((proj: Project, profile: IPublishToDockerSettings) => any) | undefined;
|
||||||
public generateScript: ((proj: Project, profile: IDeploySettings) => any) | undefined;
|
public generateScript: ((proj: Project, profile: IDeploySettings) => any) | undefined;
|
||||||
public readPublishProfile: ((profileUri: vscode.Uri) => any) | undefined;
|
public readPublishProfile: ((profileUri: vscode.Uri) => any) | undefined;
|
||||||
|
|
||||||
@@ -240,7 +239,7 @@ export class PublishDatabaseDialog {
|
|||||||
const dockerBaseImage = this.getBaseDockerImageName();
|
const dockerBaseImage = this.getBaseDockerImageName();
|
||||||
const baseImages = getDockerBaseImages(this.project.getProjectTargetVersion());
|
const baseImages = getDockerBaseImages(this.project.getProjectTargetVersion());
|
||||||
const imageInfo = baseImages.find(x => x.name === dockerBaseImage);
|
const imageInfo = baseImages.find(x => x.name === dockerBaseImage);
|
||||||
const settings: ILocalDbDeployProfile = {
|
const settings: IPublishToDockerSettings = {
|
||||||
localDbSetting: {
|
localDbSetting: {
|
||||||
dbName: this.targetDatabaseName,
|
dbName: this.targetDatabaseName,
|
||||||
dockerBaseImage: dockerBaseImage,
|
dockerBaseImage: dockerBaseImage,
|
||||||
|
|||||||
@@ -10,14 +10,13 @@ import { PublishProfile, readPublishProfile } from '../models/publishProfile/pub
|
|||||||
import { promptForPublishProfile } from './publishDatabaseDialog';
|
import { promptForPublishProfile } from './publishDatabaseDialog';
|
||||||
import { getDefaultPublishDeploymentOptions, getVscodeMssqlApi } from '../common/utils';
|
import { getDefaultPublishDeploymentOptions, getVscodeMssqlApi } from '../common/utils';
|
||||||
import { IConnectionInfo, IFireWallRuleError } from 'vscode-mssql';
|
import { IConnectionInfo, IFireWallRuleError } from 'vscode-mssql';
|
||||||
import { IDeploySettings } from '../models/IDeploySettings';
|
|
||||||
import { getPublishServerName } from './utils';
|
import { getPublishServerName } from './utils';
|
||||||
import { SqlTargetPlatform } from 'sqldbproj';
|
import { IDeploySettings, ISqlProject, SqlTargetPlatform } from 'sqldbproj';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create flow for Publishing a database using only VS Code-native APIs such as QuickPick
|
* Create flow for Publishing a database using only VS Code-native APIs such as QuickPick
|
||||||
*/
|
*/
|
||||||
export async function getPublishDatabaseSettings(project: Project, promptForConnection: boolean = true): Promise<IDeploySettings | undefined> {
|
export async function getPublishDatabaseSettings(project: ISqlProject, promptForConnection: boolean = true): Promise<IDeploySettings | undefined> {
|
||||||
|
|
||||||
// 1. Select publish settings file (optional)
|
// 1. Select publish settings file (optional)
|
||||||
// Create custom quickpick so we can control stuff like displaying the loading indicator
|
// Create custom quickpick so we can control stuff like displaying the loading indicator
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------------------------
|
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
import { DeploymentOptions as mssqlDeploymentOptions } from 'mssql';
|
|
||||||
import { DeploymentOptions as vscodeMssqlDeploymentOptions } from 'vscode-mssql';
|
|
||||||
|
|
||||||
export type DeploymentOptions = mssqlDeploymentOptions | vscodeMssqlDeploymentOptions;
|
|
||||||
|
|
||||||
export interface IDeploySettings {
|
|
||||||
databaseName: string;
|
|
||||||
serverName: string;
|
|
||||||
connectionUri: string;
|
|
||||||
sqlCmdVariables?: Record<string, string>;
|
|
||||||
deploymentOptions?: DeploymentOptions;
|
|
||||||
profileUsed?: boolean;
|
|
||||||
}
|
|
||||||
@@ -8,18 +8,7 @@ import * as utils from '../../common/utils';
|
|||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import { ConnectionResult } from 'azdata';
|
import { ConnectionResult } from 'azdata';
|
||||||
import { IFireWallRuleError } from 'vscode-mssql';
|
import { IFireWallRuleError } from 'vscode-mssql';
|
||||||
|
import { ISqlConnectionProperties } from 'sqldbproj';
|
||||||
export interface ISqlConnectionProperties {
|
|
||||||
tenantId?: string,
|
|
||||||
accountId?: string
|
|
||||||
serverName: string,
|
|
||||||
userName: string,
|
|
||||||
password: string,
|
|
||||||
port: number,
|
|
||||||
dbName: string,
|
|
||||||
profileName?: string,
|
|
||||||
connectionRetryTimeout?: number
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Includes methods to open connections and interact with connection views
|
* Includes methods to open connections and interact with connection views
|
||||||
|
|||||||
@@ -3,19 +3,14 @@
|
|||||||
* 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 { IDeploySettings } from '../IDeploySettings';
|
|
||||||
import type * as azdataType from 'azdata';
|
import type * as azdataType from 'azdata';
|
||||||
|
import { IDeploySettings, ISqlConnectionProperties } from 'sqldbproj';
|
||||||
import { IAzureAccountSession } from 'vscode-mssql';
|
import { IAzureAccountSession } from 'vscode-mssql';
|
||||||
import { ISqlConnectionProperties } from '../connections/connectionService';
|
|
||||||
|
|
||||||
export enum AppSettingType {
|
export enum AppSettingType {
|
||||||
None,
|
None,
|
||||||
AzureFunction
|
AzureFunction
|
||||||
}
|
}
|
||||||
export interface ILocalDbDeployProfile {
|
|
||||||
localDbSetting?: ILocalDbSetting;
|
|
||||||
deploySettings?: IDeploySettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ISqlDbDeployProfile {
|
export interface ISqlDbDeployProfile {
|
||||||
sqlDbSetting?: ISqlDbSetting;
|
sqlDbSetting?: ISqlDbSetting;
|
||||||
@@ -34,13 +29,6 @@ export interface ISqlDbSetting extends ISqlConnectionProperties {
|
|||||||
location: string
|
location: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ILocalDbSetting extends ISqlConnectionProperties {
|
|
||||||
dockerBaseImage: string,
|
|
||||||
dockerBaseImageEula: string,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export interface DockerImageInfo {
|
export interface DockerImageInfo {
|
||||||
name: string,
|
name: string,
|
||||||
displayName: string,
|
displayName: string,
|
||||||
|
|||||||
@@ -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 { ILocalDbDeployProfile, ILocalDbSetting, ISqlDbDeployProfile } from './deployProfile';
|
import { ISqlDbDeployProfile } from './deployProfile';
|
||||||
import * as UUID from 'vscode-languageclient/lib/utils/uuid';
|
import * as UUID from 'vscode-languageclient/lib/utils/uuid';
|
||||||
import { Project } from '../project';
|
import { Project } from '../project';
|
||||||
import * as constants from '../../common/constants';
|
import * as constants from '../../common/constants';
|
||||||
@@ -12,6 +12,7 @@ import * as vscode from 'vscode';
|
|||||||
import { ShellExecutionHelper } from '../../tools/shellExecutionHelper';
|
import { ShellExecutionHelper } from '../../tools/shellExecutionHelper';
|
||||||
import { AzureSqlClient } from './azureSqlClient';
|
import { AzureSqlClient } from './azureSqlClient';
|
||||||
import { ConnectionService } from '../connections/connectionService';
|
import { ConnectionService } from '../connections/connectionService';
|
||||||
|
import { ILocalDbSetting, IPublishToDockerSettings } from 'sqldbproj';
|
||||||
|
|
||||||
interface DockerImageSpec {
|
interface DockerImageSpec {
|
||||||
label: string;
|
label: string;
|
||||||
@@ -89,7 +90,7 @@ export class DeployService {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async deployToContainer(profile: ILocalDbDeployProfile, project: Project): Promise<string | undefined> {
|
public async deployToContainer(profile: IPublishToDockerSettings, project: Project): Promise<string | undefined> {
|
||||||
return await this.executeTask(constants.deployDbTaskName, async () => {
|
return await this.executeTask(constants.deployDbTaskName, async () => {
|
||||||
if (!profile.localDbSetting) {
|
if (!profile.localDbSetting) {
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ import * as os from 'os';
|
|||||||
import * as UUID from 'vscode-languageclient/lib/utils/uuid';
|
import * as UUID from 'vscode-languageclient/lib/utils/uuid';
|
||||||
|
|
||||||
import { Uri, window } from 'vscode';
|
import { Uri, window } from 'vscode';
|
||||||
import { ISqlProject, ItemType, SqlTargetPlatform } from 'sqldbproj';
|
import { EntryType, IDatabaseReferenceProjectEntry, IProjectEntry, ISqlProject, ItemType, SqlTargetPlatform } from 'sqldbproj';
|
||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
import { DataSource } from './dataSources/dataSources';
|
import { DataSource } from './dataSources/dataSources';
|
||||||
import { ISystemDatabaseReferenceSettings, IDacpacReferenceSettings, IProjectReferenceSettings } from './IDatabaseReferenceSettings';
|
import { ISystemDatabaseReferenceSettings, IDacpacReferenceSettings, IProjectReferenceSettings } from './IDatabaseReferenceSettings';
|
||||||
import { TelemetryActions, TelemetryReporter, TelemetryViews } from '../common/telemetry';
|
import { TelemetryActions, TelemetryReporter, TelemetryViews } from '../common/telemetry';
|
||||||
import { DacpacReferenceProjectEntry, EntryType, FileProjectEntry, IDatabaseReferenceProjectEntry, ProjectEntry, SqlCmdVariableProjectEntry, SqlProjectReferenceProjectEntry, SystemDatabase, SystemDatabaseReferenceProjectEntry } from './projectEntry';
|
import { DacpacReferenceProjectEntry, FileProjectEntry, ProjectEntry, SqlCmdVariableProjectEntry, SqlProjectReferenceProjectEntry, SystemDatabase, SystemDatabaseReferenceProjectEntry } from './projectEntry';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class representing a Project, and providing functions for operating on it
|
* Class representing a Project, and providing functions for operating on it
|
||||||
@@ -1625,8 +1625,8 @@ export class Project implements ISqlProject {
|
|||||||
await this.serializeToProjFile(this.projFileXmlDoc!);
|
await this.serializeToProjFile(this.projFileXmlDoc!);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async removeFromProjFile(entries: ProjectEntry | ProjectEntry[]): Promise<void> {
|
private async removeFromProjFile(entries: IProjectEntry | IProjectEntry[]): Promise<void> {
|
||||||
if (entries instanceof ProjectEntry) {
|
if (!Array.isArray(entries)) {
|
||||||
entries = [entries];
|
entries = [entries];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,18 +6,15 @@
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as utils from '../common/utils';
|
import * as utils from '../common/utils';
|
||||||
import { IDacpacReferenceSettings, IProjectReferenceSettings } from './IDatabaseReferenceSettings';
|
import { IDacpacReferenceSettings, IProjectReferenceSettings } from './IDatabaseReferenceSettings';
|
||||||
import { IFileProjectEntry } from 'sqldbproj';
|
import { EntryType, IDatabaseReferenceProjectEntry, IFileProjectEntry, IProjectEntry } from 'sqldbproj';
|
||||||
import { Uri } from 'vscode';
|
import { Uri } from 'vscode';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents an entry in a project file
|
* Represents an entry in a project file
|
||||||
*/
|
*/
|
||||||
export abstract class ProjectEntry {
|
export abstract class ProjectEntry implements IProjectEntry {
|
||||||
type: EntryType;
|
|
||||||
|
|
||||||
constructor(type: EntryType) {
|
constructor(public type: EntryType) { }
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class FileProjectEntry extends ProjectEntry implements IFileProjectEntry {
|
export class FileProjectEntry extends ProjectEntry implements IFileProjectEntry {
|
||||||
@@ -46,16 +43,6 @@ export class FileProjectEntry extends ProjectEntry implements IFileProjectEntry
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents a database reference entry in a project file
|
|
||||||
*/
|
|
||||||
|
|
||||||
export interface IDatabaseReferenceProjectEntry extends FileProjectEntry {
|
|
||||||
databaseName: string;
|
|
||||||
databaseVariableLiteralValue?: string;
|
|
||||||
suppressMissingDependenciesErrors: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class DacpacReferenceProjectEntry extends FileProjectEntry implements IDatabaseReferenceProjectEntry {
|
export class DacpacReferenceProjectEntry extends FileProjectEntry implements IDatabaseReferenceProjectEntry {
|
||||||
databaseVariableLiteralValue?: string;
|
databaseVariableLiteralValue?: string;
|
||||||
databaseSqlCmdVariable?: string;
|
databaseSqlCmdVariable?: string;
|
||||||
@@ -144,13 +131,6 @@ export class SqlCmdVariableProjectEntry extends ProjectEntry {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum EntryType {
|
|
||||||
File,
|
|
||||||
Folder,
|
|
||||||
DatabaseReference,
|
|
||||||
SqlCmdVariable
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum DatabaseReferenceLocation {
|
export enum DatabaseReferenceLocation {
|
||||||
sameDatabase,
|
sameDatabase,
|
||||||
differentDatabaseSameServer,
|
differentDatabaseSameServer,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import * as constants from '../../common/constants';
|
|||||||
import { BaseProjectTreeItem } from './baseTreeItem';
|
import { BaseProjectTreeItem } from './baseTreeItem';
|
||||||
import { ProjectRootTreeItem } from './projectTreeItem';
|
import { ProjectRootTreeItem } from './projectTreeItem';
|
||||||
import { IconPathHelper } from '../../common/iconHelper';
|
import { IconPathHelper } from '../../common/iconHelper';
|
||||||
import { IDatabaseReferenceProjectEntry } from '../projectEntry';
|
import { IDatabaseReferenceProjectEntry } from 'sqldbproj';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Folder for containing references nodes in the tree
|
* Folder for containing references nodes in the tree
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ import * as utils from '../../common/utils';
|
|||||||
import { DatabaseReferencesTreeItem } from './databaseReferencesTreeItem';
|
import { DatabaseReferencesTreeItem } from './databaseReferencesTreeItem';
|
||||||
import { DatabaseProjectItemType, RelativeOuterPath, ExternalStreamingJob, sqlprojExtension } from '../../common/constants';
|
import { DatabaseProjectItemType, RelativeOuterPath, ExternalStreamingJob, sqlprojExtension } from '../../common/constants';
|
||||||
import { IconPathHelper } from '../../common/iconHelper';
|
import { IconPathHelper } from '../../common/iconHelper';
|
||||||
import { EntryType, FileProjectEntry } from '../projectEntry';
|
import { FileProjectEntry } from '../projectEntry';
|
||||||
|
import { EntryType } from 'sqldbproj';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TreeNode root that represents an entire project
|
* TreeNode root that represents an entire project
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import { SqlDatabaseProjectTreeViewProvider } from '../controllers/databaseProje
|
|||||||
import { ProjectsController } from '../controllers/projectController';
|
import { ProjectsController } from '../controllers/projectController';
|
||||||
import { Project } from '../models/project';
|
import { Project } from '../models/project';
|
||||||
import { BaseProjectTreeItem } from '../models/tree/baseTreeItem';
|
import { BaseProjectTreeItem } from '../models/tree/baseTreeItem';
|
||||||
|
import { getPublishToDockerSettings } from '../dialogs/deployDatabaseQuickpick';
|
||||||
|
|
||||||
export class SqlDatabaseProjectProvider implements dataworkspace.IProjectProvider, sqldbproj.IExtension {
|
export class SqlDatabaseProjectProvider implements dataworkspace.IProjectProvider, sqldbproj.IExtension {
|
||||||
constructor(private projectController: ProjectsController) {
|
constructor(private projectController: ProjectsController) {
|
||||||
@@ -211,11 +212,15 @@ export class SqlDatabaseProjectProvider implements dataworkspace.IProjectProvide
|
|||||||
/**
|
/**
|
||||||
* Gets the Database Schema Provider version for a SQL project
|
* Gets the Database Schema Provider version for a SQL project
|
||||||
*/
|
*/
|
||||||
async getProjectDatabaseSchemaProvider(projectFilePath: string): Promise<string> {
|
public async getProjectDatabaseSchemaProvider(projectFilePath: string): Promise<string> {
|
||||||
return await this.projectController.getProjectDatabaseSchemaProvider(projectFilePath);
|
return await this.projectController.getProjectDatabaseSchemaProvider(projectFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
async generateProjectFromOpenApiSpec(options?: sqldbproj.GenerateProjectFromOpenApiSpecOptions): Promise<sqldbproj.ISqlProject | undefined> {
|
public async generateProjectFromOpenApiSpec(options?: sqldbproj.GenerateProjectFromOpenApiSpecOptions): Promise<sqldbproj.ISqlProject | undefined> {
|
||||||
return await this.projectController.generateProjectFromOpenApiSpec(options);
|
return await this.projectController.generateProjectFromOpenApiSpec(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getPublishToDockerSettings(project: sqldbproj.ISqlProject): Promise<sqldbproj.IPublishToDockerSettings | undefined> {
|
||||||
|
return getPublishToDockerSettings(project);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
declare module 'sqldbproj' {
|
declare module 'sqldbproj' {
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
import { DeploymentOptions as mssqlDeploymentOptions } from 'mssql';
|
||||||
|
import { DeploymentOptions as vscodeMssqlDeploymentOptions } from 'vscode-mssql';
|
||||||
|
|
||||||
export const enum extension {
|
export const enum extension {
|
||||||
name = 'Microsoft.sql-database-projects',
|
name = 'Microsoft.sql-database-projects',
|
||||||
vsCodeName = 'ms-mssql.sql-database-projects-vscode'
|
vsCodeName = 'ms-mssql.sql-database-projects-vscode'
|
||||||
@@ -63,6 +66,8 @@ declare module 'sqldbproj' {
|
|||||||
*/
|
*/
|
||||||
addItemPrompt(project: ISqlProject, relativeFilePath: string, options?: AddItemOptions): Promise<void>;
|
addItemPrompt(project: ISqlProject, relativeFilePath: string, options?: AddItemOptions): Promise<void>;
|
||||||
|
|
||||||
|
getPublishToDockerSettings(project: ISqlProject): Promise<IPublishToDockerSettings | undefined>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AddItemOptions {
|
export interface AddItemOptions {
|
||||||
@@ -240,14 +245,37 @@ declare module 'sqldbproj' {
|
|||||||
* "None" scripts in this project (scripts ignored by the build)
|
* "None" scripts in this project (scripts ignored by the build)
|
||||||
*/
|
*/
|
||||||
readonly noneDeployScripts: IFileProjectEntry[];
|
readonly noneDeployScripts: IFileProjectEntry[];
|
||||||
|
|
||||||
|
readonly databaseReferences: IDatabaseReferenceProjectEntry[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export const enum EntryType {
|
||||||
|
File,
|
||||||
|
Folder,
|
||||||
|
DatabaseReference,
|
||||||
|
SqlCmdVariable
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IProjectEntry {
|
||||||
|
type: EntryType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents an entry in a project file
|
* Represents an entry in a project file
|
||||||
*/
|
*/
|
||||||
export interface IFileProjectEntry {
|
export interface IFileProjectEntry extends IProjectEntry {
|
||||||
fsUri: vscode.Uri;
|
fsUri: vscode.Uri;
|
||||||
relativePath: string;
|
relativePath: string;
|
||||||
|
pathForSqlProj(): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a database reference entry in a project file
|
||||||
|
*/
|
||||||
|
export interface IDatabaseReferenceProjectEntry extends IFileProjectEntry {
|
||||||
|
databaseName: string;
|
||||||
|
databaseVariableLiteralValue?: string;
|
||||||
|
suppressMissingDependenciesErrors: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -263,4 +291,37 @@ declare module 'sqldbproj' {
|
|||||||
sqlDW = 'Azure Synapse Dedicated SQL Pool',
|
sqlDW = 'Azure Synapse Dedicated SQL Pool',
|
||||||
sqlEdge = 'Azure SQL Edge'
|
sqlEdge = 'Azure SQL Edge'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ISqlConnectionProperties {
|
||||||
|
tenantId?: string,
|
||||||
|
accountId?: string
|
||||||
|
serverName: string,
|
||||||
|
userName: string,
|
||||||
|
password: string,
|
||||||
|
port: number,
|
||||||
|
dbName: string,
|
||||||
|
profileName?: string,
|
||||||
|
connectionRetryTimeout?: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ILocalDbSetting extends ISqlConnectionProperties {
|
||||||
|
dockerBaseImage: string,
|
||||||
|
dockerBaseImageEula: string,
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IPublishToDockerSettings {
|
||||||
|
localDbSetting?: ILocalDbSetting;
|
||||||
|
deploySettings?: IDeploySettings;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type DeploymentOptions = mssqlDeploymentOptions | vscodeMssqlDeploymentOptions;
|
||||||
|
|
||||||
|
export interface IDeploySettings {
|
||||||
|
databaseName: string;
|
||||||
|
serverName: string;
|
||||||
|
connectionUri: string;
|
||||||
|
sqlCmdVariables?: Record<string, string>;
|
||||||
|
deploymentOptions?: DeploymentOptions;
|
||||||
|
profileUsed?: boolean;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,13 +11,14 @@ import { DeployService } from '../../models/deploy/deployService';
|
|||||||
import { Project } from '../../models/project';
|
import { Project } from '../../models/project';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { ILocalDbDeployProfile, ISqlDbDeployProfile } from '../../models/deploy/deployProfile';
|
import { ISqlDbDeployProfile } from '../../models/deploy/deployProfile';
|
||||||
import * as UUID from 'vscode-languageclient/lib/utils/uuid';
|
import * as UUID from 'vscode-languageclient/lib/utils/uuid';
|
||||||
import * as constants from '../../common/constants';
|
import * as constants from '../../common/constants';
|
||||||
import { ShellExecutionHelper } from '../../tools/shellExecutionHelper';
|
import { ShellExecutionHelper } from '../../tools/shellExecutionHelper';
|
||||||
import * as TypeMoq from 'typemoq';
|
import * as TypeMoq from 'typemoq';
|
||||||
import { AzureSqlClient } from '../../models/deploy/azureSqlClient';
|
import { AzureSqlClient } from '../../models/deploy/azureSqlClient';
|
||||||
import { ConnectionService } from '../../models/connections/connectionService';
|
import { ConnectionService } from '../../models/connections/connectionService';
|
||||||
|
import { IPublishToDockerSettings } from 'sqldbproj';
|
||||||
|
|
||||||
export interface TestContext {
|
export interface TestContext {
|
||||||
outputChannel: vscode.OutputChannel;
|
outputChannel: vscode.OutputChannel;
|
||||||
@@ -70,7 +71,7 @@ describe('deploy service', function (): void {
|
|||||||
|
|
||||||
it('Should deploy a database to docker container successfully', async function (): Promise<void> {
|
it('Should deploy a database to docker container successfully', async function (): Promise<void> {
|
||||||
const testContext = createContext();
|
const testContext = createContext();
|
||||||
const deployProfile: ILocalDbDeployProfile = {
|
const deployProfile: IPublishToDockerSettings = {
|
||||||
localDbSetting: {
|
localDbSetting: {
|
||||||
dbName: 'test',
|
dbName: 'test',
|
||||||
password: 'PLACEHOLDER',
|
password: 'PLACEHOLDER',
|
||||||
@@ -100,7 +101,7 @@ describe('deploy service', function (): void {
|
|||||||
|
|
||||||
it('Should fail the deploy if docker is not running', async function (): Promise<void> {
|
it('Should fail the deploy if docker is not running', async function (): Promise<void> {
|
||||||
const testContext = createContext();
|
const testContext = createContext();
|
||||||
const deployProfile: ILocalDbDeployProfile = {
|
const deployProfile: IPublishToDockerSettings = {
|
||||||
localDbSetting: {
|
localDbSetting: {
|
||||||
dbName: 'test',
|
dbName: 'test',
|
||||||
password: 'PLACEHOLDER',
|
password: 'PLACEHOLDER',
|
||||||
|
|||||||
@@ -15,10 +15,9 @@ import * as TypeMoq from 'typemoq';
|
|||||||
import { PublishDatabaseDialog } from '../../dialogs/publishDatabaseDialog';
|
import { PublishDatabaseDialog } from '../../dialogs/publishDatabaseDialog';
|
||||||
import { Project } from '../../models/project';
|
import { Project } from '../../models/project';
|
||||||
import { ProjectsController } from '../../controllers/projectController';
|
import { ProjectsController } from '../../controllers/projectController';
|
||||||
import { IDeploySettings } from '../../models/IDeploySettings';
|
|
||||||
import { emptySqlDatabaseProjectTypeId } from '../../common/constants';
|
import { emptySqlDatabaseProjectTypeId } from '../../common/constants';
|
||||||
import { createContext, mockDacFxOptionsResult, TestContext } from '../testContext';
|
import { createContext, mockDacFxOptionsResult, TestContext } from '../testContext';
|
||||||
import { ILocalDbDeployProfile } from '../../models/deploy/deployProfile';
|
import { IDeploySettings, IPublishToDockerSettings } from 'sqldbproj';
|
||||||
|
|
||||||
let testContext: TestContext;
|
let testContext: TestContext;
|
||||||
describe('Publish Database Dialog', () => {
|
describe('Publish Database Dialog', () => {
|
||||||
@@ -112,7 +111,7 @@ describe('Publish Database Dialog', () => {
|
|||||||
|
|
||||||
should(profile).deepEqual(expectedGenScript);
|
should(profile).deepEqual(expectedGenScript);
|
||||||
|
|
||||||
const expectedContainerPublishProfile: ILocalDbDeployProfile = {
|
const expectedContainerPublishProfile: IPublishToDockerSettings = {
|
||||||
localDbSetting: {
|
localDbSetting: {
|
||||||
dbName: 'MockDatabaseName',
|
dbName: 'MockDatabaseName',
|
||||||
dockerBaseImage: '',
|
dockerBaseImage: '',
|
||||||
@@ -136,7 +135,7 @@ describe('Publish Database Dialog', () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
dialog.object.publishToExistingServer = false;
|
dialog.object.publishToExistingServer = false;
|
||||||
let deployProfile: ILocalDbDeployProfile | undefined;
|
let deployProfile: IPublishToDockerSettings | undefined;
|
||||||
dialog.object.publishToContainer = (_, prof) => { deployProfile = prof; };
|
dialog.object.publishToContainer = (_, prof) => { deployProfile = prof; };
|
||||||
await dialog.object.publishClick();
|
await dialog.object.publishClick();
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ import { Project } from '../models/project';
|
|||||||
import { exists, convertSlashesForSqlProj, getWellKnownDatabaseSources } from '../common/utils';
|
import { exists, convertSlashesForSqlProj, getWellKnownDatabaseSources } from '../common/utils';
|
||||||
import { Uri, window } from 'vscode';
|
import { Uri, window } from 'vscode';
|
||||||
import { IDacpacReferenceSettings, IProjectReferenceSettings, ISystemDatabaseReferenceSettings } from '../models/IDatabaseReferenceSettings';
|
import { IDacpacReferenceSettings, IProjectReferenceSettings, ISystemDatabaseReferenceSettings } from '../models/IDatabaseReferenceSettings';
|
||||||
import { ItemType, SqlTargetPlatform } from 'sqldbproj';
|
import { EntryType, ItemType, SqlTargetPlatform } from 'sqldbproj';
|
||||||
import { EntryType, SystemDatabaseReferenceProjectEntry, SqlProjectReferenceProjectEntry, SystemDatabase } from '../models/projectEntry';
|
import { SystemDatabaseReferenceProjectEntry, SqlProjectReferenceProjectEntry, SystemDatabase } from '../models/projectEntry';
|
||||||
|
|
||||||
let projFilePath: string;
|
let projFilePath: string;
|
||||||
|
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ import { AddDatabaseReferenceDialog } from '../dialogs/addDatabaseReferenceDialo
|
|||||||
import { IDacpacReferenceSettings } from '../models/IDatabaseReferenceSettings';
|
import { IDacpacReferenceSettings } from '../models/IDatabaseReferenceSettings';
|
||||||
import { CreateProjectFromDatabaseDialog } from '../dialogs/createProjectFromDatabaseDialog';
|
import { CreateProjectFromDatabaseDialog } from '../dialogs/createProjectFromDatabaseDialog';
|
||||||
import { ImportDataModel } from '../models/api/import';
|
import { ImportDataModel } from '../models/api/import';
|
||||||
import { ItemType, SqlTargetPlatform } from 'sqldbproj';
|
import { EntryType, ItemType, SqlTargetPlatform } from 'sqldbproj';
|
||||||
import { SystemDatabaseReferenceProjectEntry, SystemDatabase, EntryType, FileProjectEntry } from '../models/projectEntry';
|
import { SystemDatabaseReferenceProjectEntry, SystemDatabase, FileProjectEntry } from '../models/projectEntry';
|
||||||
|
|
||||||
let testContext: TestContext;
|
let testContext: TestContext;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { Project } from '../models/project';
|
|||||||
import { FolderNode, FileNode, sortFileFolderNodes } from '../models/tree/fileFolderTreeItem';
|
import { FolderNode, FileNode, sortFileFolderNodes } from '../models/tree/fileFolderTreeItem';
|
||||||
import { ProjectRootTreeItem } from '../models/tree/projectTreeItem';
|
import { ProjectRootTreeItem } from '../models/tree/projectTreeItem';
|
||||||
import { DatabaseProjectItemType } from '../common/constants';
|
import { DatabaseProjectItemType } from '../common/constants';
|
||||||
import { EntryType } from '../models/projectEntry';
|
import { EntryType } from 'sqldbproj';
|
||||||
|
|
||||||
describe('Project Tree tests', function (): void {
|
describe('Project Tree tests', function (): void {
|
||||||
it('Should correctly order tree nodes by type, then by name', function (): void {
|
it('Should correctly order tree nodes by type, then by name', function (): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user