9
9
private $config : IConfiguration ,
10
10
private $usbLiveSyncService : ILiveSyncService ,
11
11
protected $platformService : IPlatformService ,
12
+ protected $projectData : IProjectData ,
12
13
protected $options : IOptions ,
13
- protected $platformsData : IPlatformsData ) { }
14
+ protected $platformsData : IPlatformsData ) {
15
+ this . $projectData . initializeProjectData ( ) ;
16
+ }
14
17
15
18
public async execute ( args : string [ ] ) : Promise < void > {
16
19
if ( this . $options . start ) {
17
- return this . debugService . debug ( ) ;
20
+ return this . debugService . debug ( this . $projectData ) ;
18
21
}
19
22
20
23
const appFilesUpdaterOptions : IAppFilesUpdaterOptions = { bundle : this . $options . bundle , release : this . $options . release } ;
26
29
projectDir : this . $options . path ,
27
30
release : this . $options . release
28
31
} ;
29
- await this . $platformService . deployPlatform ( this . $devicesService . platform , appFilesUpdaterOptions , deployOptions ) ;
32
+ await this . $platformService . deployPlatform ( this . $devicesService . platform , appFilesUpdaterOptions , deployOptions , this . $projectData ) ;
30
33
this . $config . debugLivesync = true ;
31
34
let applicationReloadAction = async ( deviceAppData : Mobile . IDeviceAppData ) : Promise < void > => {
32
35
let projectData : IProjectData = this . $injector . resolve ( "projectData" ) ;
40
43
41
44
await deviceAppData . device . applicationManager . stopApplication ( applicationId ) ;
42
45
43
- await this . debugService . debug ( ) ;
46
+ await this . debugService . debug ( this . $projectData ) ;
44
47
} ;
45
- return this . $usbLiveSyncService . liveSync ( this . $devicesService . platform , applicationReloadAction ) ;
48
+ return this . $usbLiveSyncService . liveSync ( this . $devicesService . platform , this . $projectData , applicationReloadAction ) ;
46
49
}
47
50
48
51
public async canExecute ( args : string [ ] ) : Promise < boolean > {
@@ -73,13 +76,14 @@ export class DebugIOSCommand extends DebugPlatformCommand {
73
76
$usbLiveSyncService : ILiveSyncService ,
74
77
$platformService : IPlatformService ,
75
78
$options : IOptions ,
79
+ $projectData : IProjectData ,
76
80
$platformsData : IPlatformsData ) {
77
81
78
- super ( $iOSDebugService , $devicesService , $injector , $logger , $devicePlatformsConstants , $config , $usbLiveSyncService , $platformService , $options , $platformsData ) ;
82
+ super ( $iOSDebugService , $devicesService , $injector , $logger , $devicePlatformsConstants , $config , $usbLiveSyncService , $platformService , $projectData , $ options, $platformsData ) ;
79
83
}
80
84
81
85
public async canExecute ( args : string [ ] ) : Promise < boolean > {
82
- return await super . canExecute ( args ) && await this . $platformService . validateOptions ( this . $platformsData . availablePlatforms . iOS ) ;
86
+ return await super . canExecute ( args ) && await this . $platformService . validateOptions ( this . $options . provision , this . $projectData , this . $ platformsData. availablePlatforms . iOS ) ;
83
87
}
84
88
}
85
89
@@ -95,13 +99,14 @@ export class DebugAndroidCommand extends DebugPlatformCommand {
95
99
$usbLiveSyncService : ILiveSyncService ,
96
100
$platformService : IPlatformService ,
97
101
$options : IOptions ,
102
+ $projectData : IProjectData ,
98
103
$platformsData : IPlatformsData ) {
99
104
100
- super ( $androidDebugService , $devicesService , $injector , $logger , $devicePlatformsConstants , $config , $usbLiveSyncService , $platformService , $options , $platformsData ) ;
105
+ super ( $androidDebugService , $devicesService , $injector , $logger , $devicePlatformsConstants , $config , $usbLiveSyncService , $platformService , $projectData , $ options, $platformsData ) ;
101
106
}
102
107
103
108
public async canExecute ( args : string [ ] ) : Promise < boolean > {
104
- return await super . canExecute ( args ) && await this . $platformService . validateOptions ( this . $platformsData . availablePlatforms . Android ) ;
109
+ return await super . canExecute ( args ) && await this . $platformService . validateOptions ( this . $options . provision , this . $projectData , this . $ platformsData. availablePlatforms . Android ) ;
105
110
}
106
111
}
107
112
0 commit comments