import * as vscode from "vscode" ; import { TelemetryContext } from "./telemetry" ; import { constructAndLoadIoTProject } from "./utils" ; import { RemoteExtension } from "./Models/RemoteExtension" ; export class AzureOperator { async provision ( context , channel , telemetryContext ) { const iotProject = await constructAndLoadIoTProject ( context , channel , telemetryContext ) ; if ( ! iotProject ) { return ; } const status = await iotProject . provision ( ) ; if ( status ) { vscode . window . showInformationMessage ( "Azure provision succeeded." ) ; } } async deploy ( context , channel , telemetryContext ) { RemoteExtension . ensureLocalBeforeRunCommand ( "deploy azure project" , context ) ; const iotProject = await constructAndLoadIoTProject ( context , channel , telemetryContext ) ; if ( iotProject ) { await iotProject . deploy ( ) ; } } }