mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 01:25:36 -05:00
Add publish profile to sql proj and tree (#22008)
* Read publish profiles stored in sqlproj file and present it in the projects tree * Save publish profile and add it to sqlproj file, and present it in the tree * Fix context menu operations * Add tests * Address comments
This commit is contained in:
@@ -14,6 +14,7 @@ const localize = nls.loadMessageBundle();
|
||||
export const dataSourcesFileName = 'datasources.json';
|
||||
export const sqlprojExtension = '.sqlproj';
|
||||
export const sqlFileExtension = '.sql';
|
||||
export const publishProfileExtension = '.publish.xml';
|
||||
export const openApiSpecFileExtensions = ['yaml', 'yml', 'json'];
|
||||
export const schemaCompareExtensionId = 'microsoft.schema-compare';
|
||||
export const master = 'master';
|
||||
@@ -485,6 +486,7 @@ export const ImportElements = localize('importElements', "Import Elements");
|
||||
export const ProjectReferenceNameElement = localize('projectReferenceNameElement', "Project reference name element");
|
||||
export const ProjectReferenceElement = localize('projectReferenceElement', "Project reference");
|
||||
export const DacpacReferenceElement = localize('dacpacReferenceElement', "Dacpac reference");
|
||||
export const PublishProfileElements = localize('publishProfileElements', "Publish profile elements");
|
||||
|
||||
/** Name of the property item in the project file that defines default database collation. */
|
||||
export const DefaultCollationProperty = 'DefaultCollation';
|
||||
|
||||
@@ -771,3 +771,13 @@ export function isValidBasename(name?: string): boolean {
|
||||
export function isValidBasenameErrorMessage(name?: string): string {
|
||||
return getDataWorkspaceExtensionApi().isValidBasenameErrorMessage(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the provided file is a publish profile
|
||||
* @param fileName filename to check
|
||||
* @returns True if it is a publish profile, otherwise false
|
||||
*/
|
||||
export function isPublishProfile(fileName: string): boolean {
|
||||
const hasPublishExtension = fileName.trim().toLowerCase().endsWith(constants.publishProfileExtension);
|
||||
return hasPublishExtension;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user