Add createAzureFunction to extension API (#19438)

This commit is contained in:
Charles Gagnon
2022-05-19 13:02:49 -07:00
committed by GitHub
parent 79875c0b95
commit 4c008059df
2 changed files with 9 additions and 1 deletions

View File

@@ -20,6 +20,9 @@ export async function activate(context: vscode.ExtensionContext): Promise<IExten
addSqlBinding: async (bindingType: BindingType, filePath: string, functionName: string, objectName: string, connectionStringSetting: string): Promise<ResultStatus> => {
return addSqlBinding(bindingType, filePath, functionName, objectName, connectionStringSetting);
},
createAzureFunction: async (): Promise<void> => {
return createAzureFunction();
},
promptForBindingType: async (funcName?: string): Promise<BindingType | undefined> => {
return promptForBindingType(funcName);
},

View File

@@ -28,6 +28,11 @@ declare module 'sql-bindings' {
*/
addSqlBinding(bindingType: BindingType, filePath: string, functionName: string, objectName: string, connectionStringSetting: string): Promise<ResultStatus>;
/**
* Prompts the user for information to create an Azure Function with SQL Binding
*/
createAzureFunction(): Promise<void>;
/**
* Prompts the user to select type of binding and returns result or undefined if the user cancelled out of the prompt
* @param funcName (Optional) Name of the function we are adding the SQL Binding to
@@ -46,7 +51,7 @@ declare module 'sql-bindings' {
/**
* Prompts the user to enter connection setting and updates it from AF project
* @param projectUri Azure Function project uri
* @param connectionInfo (optional) connection info from the user to update the connection string,
* @param connectionInfo (optional) connection info from the user to update the connection string,
* if left undefined we prompt the user for the connection info
* @returns connection string setting name to be used for the createFunction API
*/