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:
Sakshi Sharma
2023-02-23 22:32:12 -08:00
committed by GitHub
parent 91cdd610fd
commit 41e2767880
11 changed files with 267 additions and 14 deletions

View File

@@ -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;
}