mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-01 17:23:35 -05:00
Make Create Azure Function with SQL Binding more efficient and simple (#19187)
* initial refactor * fix projectFolder cases * update create azure function with sql binding when no folder is opened * corner case exit browse file * add version since targetFramework is set to specific core tools version * update telemetry and address comments * use project folder instead
This commit is contained in:
@@ -123,11 +123,16 @@ export function timeoutPromise(errorMessage: string, ms: number = 10000): Promis
|
||||
* Gets a unique file name
|
||||
* Increment the file name by adding 1 to function name if the file already exists
|
||||
* Undefined if the filename suffix count becomes greater than 1024
|
||||
* @param folderPath selected project folder path
|
||||
* @param fileName base filename to use
|
||||
* @param folderPath selected project folder path
|
||||
* @returns a promise with the unique file name, or undefined
|
||||
*/
|
||||
export async function getUniqueFileName(folderPath: string, fileName: string): Promise<string | undefined> {
|
||||
export async function getUniqueFileName(fileName: string, folderPath?: string): Promise<string | undefined> {
|
||||
if (!folderPath) {
|
||||
// user is creating a brand new azure function project
|
||||
return undefined;
|
||||
}
|
||||
|
||||
let count: number = 0;
|
||||
const maxCount: number = 1024;
|
||||
let uniqueFileName = fileName;
|
||||
|
||||
Reference in New Issue
Block a user