Changes to add pre/post deploy script to sqlproj (#11864)

* Initial changes for adding pre/post deploy script in project

* Right click > Add pre/post deploy script

* Print script files in tree

* Add new pre-post deploy items with their own tags and additional ones with None

* Add tests

* Fix error due to merge conflicts

* Addressed comments and fixed tests.

* Fix code scan error

* Addressed comments
This commit is contained in:
Sakshi Sharma
2020-08-27 10:50:02 -07:00
committed by GitHub
parent fa664bc92f
commit 21c8609eb7
12 changed files with 160 additions and 17 deletions

View File

@@ -353,7 +353,7 @@ export class ProjectsController {
throw new Error(constants.fileAlreadyExists(path.parse(absoluteFilePath).name));
}
const newEntry = await project.addScriptItem(relativeFilePath, newFileText);
const newEntry = await project.addScriptItem(relativeFilePath, newFileText, itemType.type);
await vscode.commands.executeCommand(constants.vscodeOpenCommand, newEntry.fsUri);
@@ -630,7 +630,7 @@ export class ProjectsController {
private async promptForNewObjectName(itemType: templates.ProjectScriptType, _project: Project): Promise<string | undefined> {
// TODO: ask project for suggested name that doesn't conflict
const suggestedName = itemType.friendlyName.replace(new RegExp('\s', 'g'), '') + '1';
const suggestedName = itemType.friendlyName.replace(/\s+/g, '') + '1';
const itemObjectName = await vscode.window.showInputBox({
prompt: constants.newObjectNamePrompt(itemType.friendlyName),