File tree 3 files changed +7
-5
lines changed
3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ export class PreviewCommand implements ICommand {
4
4
public allowedParameters : ICommandParameter [ ] = [ ] ;
5
5
6
6
constructor ( private $analyticsService : IAnalyticsService ,
7
+ private $bundleValidatorHelper : IBundleValidatorHelper ,
7
8
private $errors : IErrors ,
8
9
private $logger : ILogger ,
9
10
private $previewAppController : IPreviewAppController ,
@@ -41,6 +42,7 @@ export class PreviewCommand implements ICommand {
41
42
}
42
43
43
44
await this . $networkConnectivityValidator . validate ( ) ;
45
+ this . $bundleValidatorHelper . validate ( this . $projectData , "1.0.0" ) ;
44
46
return true ;
45
47
}
46
48
}
Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ export class CommandsService implements ICommandsService {
28
28
private $helpService : IHelpService ,
29
29
private $extensibilityService : IExtensibilityService ,
30
30
private $optionsTracker : IOptionsTracker ,
31
- private $projectDataService : IProjectDataService ,
32
- private $bundleValidatorHelper : IBundleValidatorHelper ) {
31
+ private $projectDataService : IProjectDataService ) {
33
32
}
34
33
35
34
public allCommands ( opts : { includeDevCommands : boolean } ) : string [ ] {
@@ -116,8 +115,6 @@ export class CommandsService implements ICommandsService {
116
115
117
116
const dashedOptions = command ? command . dashedOptions : null ;
118
117
this . $options . validateOptions ( dashedOptions , projectData ) ;
119
-
120
- this . $bundleValidatorHelper . validate ( projectData , "1.0.0" ) ;
121
118
}
122
119
123
120
return this . canExecuteCommand ( commandName , commandArguments ) ;
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export class PrepareController extends EventEmitter {
17
17
private persistedData : IFilesChangeEventData [ ] = [ ] ;
18
18
19
19
constructor (
20
+ private $bundleValidatorHelper : IBundleValidatorHelper ,
20
21
private $platformController : IPlatformController ,
21
22
public $hooksService : IHooksService ,
22
23
private $logger : ILogger ,
@@ -32,12 +33,14 @@ export class PrepareController extends EventEmitter {
32
33
@performanceLog ( )
33
34
@hook ( "prepare" )
34
35
public async prepare ( prepareData : IPrepareData ) : Promise < IPrepareResultData > {
36
+ const projectData = this . $projectDataService . getProjectData ( prepareData . projectDir ) ;
37
+ this . $bundleValidatorHelper . validate ( projectData , "1.0.0" ) ;
38
+
35
39
await this . $platformController . addPlatformIfNeeded ( prepareData ) ;
36
40
37
41
this . $logger . info ( "Preparing project..." ) ;
38
42
let result = null ;
39
43
40
- const projectData = this . $projectDataService . getProjectData ( prepareData . projectDir ) ;
41
44
const platformData = this . $platformsDataService . getPlatformData ( prepareData . platform , projectData ) ;
42
45
43
46
if ( prepareData . watch ) {
You can’t perform that action at this time.
0 commit comments