import * as path from 'path' ; import { AzureWizard , IActionContext } from 'vscode-azureextensionui' ; import { localize } from '../../localize' ; import { AzureWebJobsStorageExecuteStep } from './AzureWebJobsStorageExecuteStep' ; import { AzureWebJobsStoragePromptStep } from './AzureWebJobsStoragePromptStep' ; import { getLocalSettingsFile } from './getLocalSettingsFile' ; import { IAzureWebJobsStorageWizardContext } from './IAzureWebJobsStorageWizardContext' ; export async function setAzureWebJobsStorage ( context ) { const message = localize ( 'selectLocalSettings' , 'Select your local settings file.' ) ; const localSettingsFile = await getLocalSettingsFile ( context , message ) ; const wizardContext = Object . assign ( context , { projectPath : path . dirname ( localSettingsFile ) } ) ; const wizard = new AzureWizard ( wizardContext , { promptSteps : [ new AzureWebJobsStoragePromptStep ( ) ] , executeSteps : [ new AzureWebJobsStorageExecuteStep ( ) ] } ) ; await wizard . prompt ( ) ; await wizard . execute ( ) ; }