@@ -12,7 +12,7 @@ import * as util from "util";
12
12
import * as _ from "lodash" ;
13
13
import { IProjectDataService , IProjectData } from "../definitions/project" ;
14
14
import { IBuildController } from "../definitions/build" ;
15
- import { IPlatformsDataService } from "../definitions/platform" ;
15
+ import { IPlatformData , IPlatformsDataService } from "../definitions/platform" ;
16
16
import { IDebugController } from "../definitions/debug" ;
17
17
import { IPluginsService } from "../definitions/plugins" ;
18
18
import {
@@ -23,6 +23,7 @@ import {
23
23
} from "../common/declarations" ;
24
24
import { IInjector } from "../common/definitions/yok" ;
25
25
import { injector } from "../common/yok" ;
26
+ import { hook } from "../common/helpers" ;
26
27
27
28
export class RunController extends EventEmitter implements IRunController {
28
29
private prepareReadyEventHandler : any = null ;
@@ -99,17 +100,23 @@ export class RunController extends EventEmitter implements IRunController {
99
100
const changesInfo = await this . $projectChangesService . checkForChanges (
100
101
platformData ,
101
102
projectData ,
102
- prepareData
103
+ prepareData ,
104
+ data
103
105
) ;
104
106
if ( changesInfo . hasChanges ) {
105
107
await this . syncChangedDataOnDevices (
106
108
data ,
107
109
projectData ,
110
+ platformData ,
108
111
liveSyncInfo
109
112
) ;
110
113
}
111
114
} else {
112
- await this . syncChangedDataOnDevices ( data , projectData , liveSyncInfo ) ;
115
+ const platformData = this . $platformsDataService . getPlatformData (
116
+ data . platform ,
117
+ projectData
118
+ ) ;
119
+ await this . syncChangedDataOnDevices ( data , projectData , platformData , liveSyncInfo ) ;
113
120
}
114
121
} ;
115
122
@@ -613,9 +620,11 @@ export class RunController extends EventEmitter implements IRunController {
613
620
) ;
614
621
}
615
622
623
+ @hook ( "syncChangedDataOnDevices" )
616
624
private async syncChangedDataOnDevices (
617
625
data : IFilesChangeEventData ,
618
626
projectData : IProjectData ,
627
+ platformData : IPlatformData ,
619
628
liveSyncInfo : ILiveSyncInfo
620
629
) : Promise < void > {
621
630
const successfullySyncedMessageFormat = `Successfully synced application %s on device %s.` ;
0 commit comments