@@ -198,10 +198,27 @@ export class PlatformService extends EventEmitter implements IPlatformService {
198198 return shouldPrepareInfo . changesInfo . hasChanges || requiresNativePrepare ;
199199 }
200200
201- private async getChangesInfo ( platformInfo : IPreparePlatformInfo ) : Promise < IProjectChangesInfo > {
202- const platformData = this . $platformsData . getPlatformData ( platformInfo . platform , platformInfo . projectData ) ;
201+ private async getChangesInfo ( preparePlatformInfo : IPreparePlatformInfo ) : Promise < IProjectChangesInfo > {
202+ await this . initialPrepare ( preparePlatformInfo ) ;
203203
204- return this . initialPrepare ( platformInfo . platform , platformData , platformInfo . appFilesUpdaterOptions , platformInfo . platformTemplate , platformInfo . projectData , platformInfo . config , platformInfo . nativePrepare , platformInfo ) ;
204+ const { platform, appFilesUpdaterOptions, projectData, config, nativePrepare } = preparePlatformInfo ;
205+ const bundle = appFilesUpdaterOptions . bundle ;
206+ const nativePlatformStatus = ( nativePrepare && nativePrepare . skipNativePrepare ) ? constants . NativePlatformStatus . requiresPlatformAdd : constants . NativePlatformStatus . requiresPrepare ;
207+ const changesInfo = await this . $projectChangesService . checkForChanges ( {
208+ platform,
209+ projectData,
210+ projectChangesOptions : {
211+ bundle,
212+ release : appFilesUpdaterOptions . release ,
213+ provision : config . provision ,
214+ teamId : config . teamId ,
215+ nativePlatformStatus,
216+ skipModulesNativeCheck : preparePlatformInfo . skipModulesNativeCheck
217+ }
218+ } ) ;
219+
220+ this . $logger . trace ( "Changes info in prepare platform:" , changesInfo ) ;
221+ return changesInfo ;
205222 }
206223
207224 public async preparePlatform ( platformInfo : IPreparePlatformInfo ) : Promise < boolean > {
@@ -256,7 +273,8 @@ export class PlatformService extends EventEmitter implements IPlatformService {
256273 }
257274 }
258275
259- private async initialPrepare ( platform : string , platformData : IPlatformData , appFilesUpdaterOptions : IAppFilesUpdaterOptions , platformTemplate : string , projectData : IProjectData , config : IPlatformOptions , nativePrepare ?: INativePrepare , skipNativeCheckOptions ?: ISkipNativeCheckOptional ) : Promise < IProjectChangesInfo > {
276+ private async initialPrepare ( preparePlatformInfo : IPreparePlatformInfo ) {
277+ const { platform, appFilesUpdaterOptions, platformTemplate, projectData, config, nativePrepare } = preparePlatformInfo ;
260278 this . validatePlatform ( platform , projectData ) ;
261279
262280 await this . trackProjectType ( projectData ) ;
@@ -270,24 +288,6 @@ export class PlatformService extends EventEmitter implements IPlatformService {
270288 }
271289
272290 await this . ensurePlatformInstalled ( platform , platformTemplate , projectData , config , appFilesUpdaterOptions , nativePrepare ) ;
273-
274- const bundle = appFilesUpdaterOptions . bundle ;
275- const nativePlatformStatus = ( nativePrepare && nativePrepare . skipNativePrepare ) ? constants . NativePlatformStatus . requiresPlatformAdd : constants . NativePlatformStatus . requiresPrepare ;
276- const changesInfo = await this . $projectChangesService . checkForChanges ( {
277- platform,
278- projectData,
279- projectChangesOptions : {
280- bundle,
281- release : appFilesUpdaterOptions . release ,
282- provision : config . provision ,
283- teamId : config . teamId ,
284- nativePlatformStatus,
285- skipModulesNativeCheck : skipNativeCheckOptions . skipModulesNativeCheck
286- }
287- } ) ;
288-
289- this . $logger . trace ( "Changes info in prepare platform:" , changesInfo ) ;
290- return changesInfo ;
291291 }
292292
293293 /* Hooks are expected to use "filesToSync" parameter, as to give plugin authors additional information about the sync process.*/
0 commit comments