import type { WebSiteManagementModels } from '@azure/arm-appservice' ; import { IActionContext } from 'vscode-azureextensionui' ; import { createKuduClient } from '../createKuduClient' ; import { ParsedSite } from '../SiteClient' ; export async function delayFirstWebAppDeploy ( context , site , aspPromise ) { await new Promise < void > ( async ( resolve ) : Promise < void > => { setTimeout ( resolve , 10000 ) ; try { if ( site . isFunctionApp ) { resolve ( ) ; } const asp = await aspPromise ; if ( ! asp || ! asp . sku || ! asp . sku . tier || asp . sku . tier . toLowerCase ( ) !== 'basic' ) { resolve ( ) ; } if ( ! site . isLinux ) { resolve ( ) ; } const kuduClient = await createKuduClient ( context , site ) ; const deployments = ( await kuduClient . deployment . getDeployResults ( ) ) . length ; if ( deployments > 1 ) { resolve ( ) ; } } catch ( error ) { resolve ( ) ; } } ) ; }