@@ -43,7 +43,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
43
43
super ( ) ;
44
44
}
45
45
46
- public async cleanPlatforms ( platforms : string [ ] , platformTemplate : string , projectData : IProjectData , config : IAddPlatformCoreOptions , framworkPath ?: string ) : Promise < void > {
46
+ public async cleanPlatforms ( platforms : string [ ] , platformTemplate : string , projectData : IProjectData , config : IPlatformOptions , framworkPath ?: string ) : Promise < void > {
47
47
for ( let platform of platforms ) {
48
48
let version : string = this . getCurrentPlatformVersion ( platform , projectData ) ;
49
49
@@ -57,7 +57,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
57
57
}
58
58
}
59
59
60
- public async addPlatforms ( platforms : string [ ] , platformTemplate : string , projectData : IProjectData , config : IAddPlatformCoreOptions , frameworkPath ?: string ) : Promise < void > {
60
+ public async addPlatforms ( platforms : string [ ] , platformTemplate : string , projectData : IProjectData , config : IPlatformOptions , frameworkPath ?: string ) : Promise < void > {
61
61
const platformsDir = projectData . platformsDir ;
62
62
this . $fs . ensureDirectoryExists ( platformsDir ) ;
63
63
@@ -84,7 +84,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
84
84
return version ;
85
85
}
86
86
87
- private async addPlatform ( platformParam : string , platformTemplate : string , projectData : IProjectData , config : IAddPlatformCoreOptions , frameworkPath ?: string , nativePrepare ?: INativePrepare ) : Promise < void > {
87
+ private async addPlatform ( platformParam : string , platformTemplate : string , projectData : IProjectData , config : IPlatformOptions , frameworkPath ?: string , nativePrepare ?: INativePrepare ) : Promise < void > {
88
88
let data = platformParam . split ( "@" ) ,
89
89
platform = data [ 0 ] . toLowerCase ( ) ,
90
90
version = data [ 1 ] ;
@@ -137,7 +137,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
137
137
this . $logger . out ( "Project successfully created." ) ;
138
138
}
139
139
140
- private async addPlatformCore ( platformData : IPlatformData , frameworkDir : string , platformTemplate : string , projectData : IProjectData , config : IAddPlatformCoreOptions , nativePrepare ?: INativePrepare ) : Promise < string > {
140
+ private async addPlatformCore ( platformData : IPlatformData , frameworkDir : string , platformTemplate : string , projectData : IProjectData , config : IPlatformOptions , nativePrepare ?: INativePrepare ) : Promise < string > {
141
141
const coreModuleData = this . $fs . readJson ( path . join ( frameworkDir , ".." , "package.json" ) ) ;
142
142
const installedVersion = coreModuleData . version ;
143
143
const customTemplateOptions = await this . getPathToPlatformTemplate ( platformTemplate , platformData . frameworkPackageName , projectData . projectDir ) ;
@@ -159,7 +159,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
159
159
160
160
}
161
161
162
- private async addPlatformCoreNative ( platformData : IPlatformData , frameworkDir : string , installedVersion : string , projectData : IProjectData , config : IAddPlatformCoreOptions ) : Promise < void > {
162
+ private async addPlatformCoreNative ( platformData : IPlatformData , frameworkDir : string , installedVersion : string , projectData : IProjectData , config : IPlatformOptions ) : Promise < void > {
163
163
await platformData . platformProjectService . createProject ( path . resolve ( frameworkDir ) , installedVersion , projectData , config ) ;
164
164
platformData . platformProjectService . ensureConfigurationFileInAppResources ( projectData ) ;
165
165
await platformData . platformProjectService . interpolateData ( projectData , config ) ;
@@ -213,7 +213,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
213
213
public getPreparedPlatforms ( projectData : IProjectData ) : string [ ] {
214
214
return _ . filter ( this . $platformsData . platformsNames , p => { return this . isPlatformPrepared ( p , projectData ) ; } ) ;
215
215
}
216
- public async preparePlatform ( platform : string , appFilesUpdaterOptions : IAppFilesUpdaterOptions , platformTemplate : string , projectData : IProjectData , config : IAddPlatformCoreOptions , filesToSync ?: Array < String > , nativePrepare ?: INativePrepare ) : Promise < boolean > {
216
+ public async preparePlatform ( platform : string , appFilesUpdaterOptions : IAppFilesUpdaterOptions , platformTemplate : string , projectData : IProjectData , config : IPlatformOptions , filesToSync ?: Array < String > , nativePrepare ?: INativePrepare ) : Promise < boolean > {
217
217
const platformData = this . $platformsData . getPlatformData ( platform , projectData ) ;
218
218
const changesInfo = await this . initialPrepare ( platform , platformData , appFilesUpdaterOptions , platformTemplate , projectData , config , nativePrepare ) ;
219
219
const requiresNativePrepare = ( ! nativePrepare || ! nativePrepare . skipNativePrepare ) && changesInfo . nativePlatformStatus === constants . NativePlatformStatus . requiresPrepare ;
@@ -265,7 +265,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
265
265
}
266
266
}
267
267
268
- private async initialPrepare ( platform : string , platformData : IPlatformData , appFilesUpdaterOptions : IAppFilesUpdaterOptions , platformTemplate : string , projectData : IProjectData , config : IAddPlatformCoreOptions , nativePrepare ?: INativePrepare ) : Promise < IProjectChangesInfo > {
268
+ private async initialPrepare ( platform : string , platformData : IPlatformData , appFilesUpdaterOptions : IAppFilesUpdaterOptions , platformTemplate : string , projectData : IProjectData , config : IPlatformOptions , nativePrepare ?: INativePrepare ) : Promise < IProjectChangesInfo > {
269
269
this . validatePlatform ( platform , projectData ) ;
270
270
271
271
await this . trackProjectType ( projectData ) ;
@@ -532,7 +532,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
532
532
this . $logger . out ( `Successfully installed on device with identifier '${ device . deviceInfo . identifier } '.` ) ;
533
533
}
534
534
535
- public async deployPlatform ( platform : string , appFilesUpdaterOptions : IAppFilesUpdaterOptions , deployOptions : IDeployPlatformOptions , projectData : IProjectData , config : IAddPlatformCoreOptions ) : Promise < void > {
535
+ public async deployPlatform ( platform : string , appFilesUpdaterOptions : IAppFilesUpdaterOptions , deployOptions : IDeployPlatformOptions , projectData : IProjectData , config : IPlatformOptions ) : Promise < void > {
536
536
await this . preparePlatform ( platform , appFilesUpdaterOptions , deployOptions . platformTemplate , projectData , config ) ;
537
537
let options : Mobile . IDevicesServicesInitializationOptions = {
538
538
platform : platform , deviceId : deployOptions . device , emulator : deployOptions . emulator
@@ -623,7 +623,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
623
623
return null ;
624
624
}
625
625
626
- public async cleanDestinationApp ( platform : string , appFilesUpdaterOptions : IAppFilesUpdaterOptions , platformTemplate : string , projectData : IProjectData , config : IAddPlatformCoreOptions ) : Promise < void > {
626
+ public async cleanDestinationApp ( platform : string , appFilesUpdaterOptions : IAppFilesUpdaterOptions , platformTemplate : string , projectData : IProjectData , config : IPlatformOptions ) : Promise < void > {
627
627
await this . ensurePlatformInstalled ( platform , platformTemplate , projectData , config ) ;
628
628
629
629
const appSourceDirectoryPath = path . join ( projectData . projectDir , constants . APP_FOLDER_NAME ) ;
@@ -679,7 +679,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
679
679
}
680
680
}
681
681
682
- public async updatePlatforms ( platforms : string [ ] , platformTemplate : string , projectData : IProjectData , config : IAddPlatformCoreOptions ) : Promise < void > {
682
+ public async updatePlatforms ( platforms : string [ ] , platformTemplate : string , projectData : IProjectData , config : IPlatformOptions ) : Promise < void > {
683
683
for ( let platformParam of platforms ) {
684
684
let data = platformParam . split ( "@" ) ,
685
685
platform = data [ 0 ] ,
@@ -736,7 +736,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
736
736
}
737
737
}
738
738
739
- public async ensurePlatformInstalled ( platform : string , platformTemplate : string , projectData : IProjectData , config : IAddPlatformCoreOptions , nativePrepare ?: INativePrepare ) : Promise < void > {
739
+ public async ensurePlatformInstalled ( platform : string , platformTemplate : string , projectData : IProjectData , config : IPlatformOptions , nativePrepare ?: INativePrepare ) : Promise < void > {
740
740
let requiresNativePlatformAdd = false ;
741
741
742
742
if ( ! this . isPlatformInstalled ( platform , projectData ) ) {
@@ -808,7 +808,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
808
808
return this . getLatestApplicationPackage ( outputPath || platformData . emulatorBuildOutputPath || platformData . deviceBuildOutputPath , platformData . getValidPackageNames ( { isForDevice : false , isReleaseBuild : buildConfig . release } ) ) ;
809
809
}
810
810
811
- private async updatePlatform ( platform : string , version : string , platformTemplate : string , projectData : IProjectData , config : IAddPlatformCoreOptions ) : Promise < void > {
811
+ private async updatePlatform ( platform : string , version : string , platformTemplate : string , projectData : IProjectData , config : IPlatformOptions ) : Promise < void > {
812
812
let platformData = this . $platformsData . getPlatformData ( platform , projectData ) ;
813
813
814
814
let data = this . $projectDataService . getNSValue ( projectData . projectDir , platformData . frameworkPackageName ) ;
@@ -841,7 +841,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
841
841
842
842
}
843
843
844
- private async updatePlatformCore ( platformData : IPlatformData , updateOptions : IUpdatePlatformOptions , projectData : IProjectData , config : IAddPlatformCoreOptions ) : Promise < void > {
844
+ private async updatePlatformCore ( platformData : IPlatformData , updateOptions : IUpdatePlatformOptions , projectData : IProjectData , config : IPlatformOptions ) : Promise < void > {
845
845
let packageName = platformData . normalizedPlatformName . toLowerCase ( ) ;
846
846
await this . removePlatforms ( [ packageName ] , projectData ) ;
847
847
packageName = updateOptions . newVersion ? `${ packageName } @${ updateOptions . newVersion } ` : packageName ;
0 commit comments