mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 09:35:37 -05:00
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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user