import { SiteClient } from 'vscode-azureappservice' ; import { IActionContext } from 'vscode-azureextensionui' ; import { ext } from '../extensionVariables' ; import { localize } from '../localize' ; import { ProductionSlotTreeItem } from '../tree/ProductionSlotTreeItem' ; import { SlotTreeItemBase } from '../tree/SlotTreeItemBase' ; export async function startFunctionApp ( context , node ? ) { if ( ! node ) { node = await ext . tree . showTreeItemPicker < SlotTreeItemBase > ( ProductionSlotTreeItem . contextValue , context ) ; } const client = await node . site . createClient ( context ) ; await node . runWithTemporaryDescription ( context , localize ( 'starting' , 'Starting...' ) , async ( ) => { await client . start ( ) ; } ) ; }