1- import { INITIAL_SYNC_EVENT_NAME , FILES_CHANGE_EVENT_NAME , LiveSyncEvents } from "../constants" ;
2- import { WorkflowDataService } from "../services/workflow/workflow-data-service" ;
31import { AddPlatformService } from "../services/platform/add-platform-service" ;
42import { BuildPlatformService } from "../services/platform/build-platform-service" ;
5- import { PreparePlatformService } from "../services/platform/prepare-platform-service" ;
3+ import { DeviceInstallAppService } from "../services/device/device-install-app-service" ;
4+ import { DeviceRefreshAppService } from "../services/device/device-refresh-app-service" ;
65import { EventEmitter } from "events" ;
7- import { DeviceRefreshApplicationService } from "../services/device/device-refresh-application-service" ;
6+ import { FILES_CHANGE_EVENT_NAME , INITIAL_SYNC_EVENT_NAME , LiveSyncEvents } from "../constants" ;
7+ import { PreparePlatformService } from "../services/platform/prepare-platform-service" ;
8+ import { WorkflowDataService } from "../services/workflow/workflow-data-service" ;
89
910const deviceDescriptorPrimaryKey = "identifier" ;
1011
@@ -14,8 +15,8 @@ export class MainController extends EventEmitter {
1415 constructor (
1516 private $addPlatformService : AddPlatformService ,
1617 private $buildPlatformService : BuildPlatformService ,
17- private $deviceInstallationService : IDeviceInstallationService ,
18- private $deviceRefreshApplicationService : DeviceRefreshApplicationService ,
18+ private $deviceInstallAppService : DeviceInstallAppService ,
19+ private $deviceRefreshAppService : DeviceRefreshAppService ,
1920 private $devicesService : Mobile . IDevicesService ,
2021 private $errors : IErrors ,
2122 private $hooksService : IHooksService ,
@@ -55,7 +56,7 @@ export class MainController extends EventEmitter {
5556 const executeAction = async ( device : Mobile . IDevice ) => {
5657 const { nativePlatformData, projectData, buildPlatformData } = this . $workflowDataService . createWorkflowData ( device . deviceInfo . platform , projectDir , liveSyncInfo ) ;
5758 await this . $buildPlatformService . buildPlatformIfNeeded ( nativePlatformData , projectData , buildPlatformData ) ;
58- await this . $deviceInstallationService . installOnDeviceIfNeeded ( device , nativePlatformData , projectData , buildPlatformData ) ;
59+ await this . $deviceInstallAppService . installOnDeviceIfNeeded ( device , nativePlatformData , projectData , buildPlatformData ) ;
5960 } ;
6061
6162 await this . $devicesService . execute ( executeAction , ( device : Mobile . IDevice ) => true ) ;
@@ -110,14 +111,14 @@ export class MainController extends EventEmitter {
110111 const outputPath = deviceDescriptor . outputPath || platformData . getBuildOutputPath ( buildPlatformData ) ;
111112 const packageFilePath = await this . $buildPlatformService . buildPlatformIfNeeded ( platformData , projectData , buildPlatformData , outputPath ) ;
112113
113- await this . $deviceInstallationService . installOnDeviceIfNeeded ( device , platformData , projectData , buildPlatformData , packageFilePath , outputPath ) ;
114+ await this . $deviceInstallAppService . installOnDeviceIfNeeded ( device , platformData , projectData , buildPlatformData , packageFilePath , outputPath ) ;
114115
115116 // TODO: Consider to improve this
116117 const platformLiveSyncService = this . getLiveSyncService ( platformData . platformNameLowerCase ) ;
117118 const { force, useHotModuleReload, skipWatcher } = liveSyncInfo ;
118119 const liveSyncResultInfo = await platformLiveSyncService . fullSync ( { force, useHotModuleReload, projectData, device, watch : ! skipWatcher , liveSyncDeviceInfo : deviceDescriptor } ) ;
119120
120- await this . $deviceRefreshApplicationService . refreshApplication ( deviceDescriptor , projectData , liveSyncResultInfo , platformLiveSyncService , this ) ;
121+ await this . $deviceRefreshAppService . refreshApplication ( deviceDescriptor , projectData , liveSyncResultInfo , platformLiveSyncService , this ) ;
121122 } catch ( err ) {
122123 this . $logger . warn ( `Unable to apply changes on device: ${ device . deviceInfo . identifier } . Error is: ${ err . message } .` ) ;
123124
@@ -213,7 +214,7 @@ export class MainController extends EventEmitter {
213214 connectTimeout : 1000
214215 } ) ;
215216
216- await this . $deviceRefreshApplicationService . refreshApplication ( deviceDescriptor , projectData , liveSyncResultInfo , platformLiveSyncService , this ) ;
217+ await this . $deviceRefreshAppService . refreshApplication ( deviceDescriptor , projectData , liveSyncResultInfo , platformLiveSyncService , this ) ;
217218 }
218219
219220 public getLiveSyncDeviceDescriptors ( projectDir : string ) : ILiveSyncDeviceInfo [ ] {
0 commit comments