@@ -197,10 +197,27 @@ export class PlatformService extends EventEmitter implements IPlatformService {
197197 return shouldPrepareInfo . changesInfo . hasChanges || requiresNativePrepare ;
198198 }
199199
200- private async getChangesInfo ( platformInfo : IPreparePlatformInfo ) : Promise < IProjectChangesInfo > {
201- const platformData = this . $platformsData . getPlatformData ( platformInfo . platform , platformInfo . projectData ) ;
200+ private async getChangesInfo ( preparePlatformInfo : IPreparePlatformInfo ) : Promise < IProjectChangesInfo > {
201+ await this . initialPrepare ( preparePlatformInfo ) ;
202202
203- return this . initialPrepare ( platformInfo . platform , platformData , platformInfo . appFilesUpdaterOptions , platformInfo . platformTemplate , platformInfo . projectData , platformInfo . config , platformInfo . nativePrepare , platformInfo ) ;
203+ const { platform, appFilesUpdaterOptions, projectData, config, nativePrepare } = preparePlatformInfo ;
204+ const bundle = appFilesUpdaterOptions . bundle ;
205+ const nativePlatformStatus = ( nativePrepare && nativePrepare . skipNativePrepare ) ? constants . NativePlatformStatus . requiresPlatformAdd : constants . NativePlatformStatus . requiresPrepare ;
206+ const changesInfo = await this . $projectChangesService . checkForChanges ( {
207+ platform,
208+ projectData,
209+ projectChangesOptions : {
210+ bundle,
211+ release : appFilesUpdaterOptions . release ,
212+ provision : config . provision ,
213+ teamId : config . teamId ,
214+ nativePlatformStatus,
215+ skipModulesNativeCheck : preparePlatformInfo . skipModulesNativeCheck
216+ }
217+ } ) ;
218+
219+ this . $logger . trace ( "Changes info in prepare platform:" , changesInfo ) ;
220+ return changesInfo ;
204221 }
205222
206223 public async preparePlatform ( platformInfo : IPreparePlatformInfo ) : Promise < boolean > {
@@ -252,7 +269,8 @@ export class PlatformService extends EventEmitter implements IPlatformService {
252269 }
253270 }
254271
255- private async initialPrepare ( platform : string , platformData : IPlatformData , appFilesUpdaterOptions : IAppFilesUpdaterOptions , platformTemplate : string , projectData : IProjectData , config : IPlatformOptions , nativePrepare ?: INativePrepare , skipNativeCheckOptions ?: ISkipNativeCheckOptional ) : Promise < IProjectChangesInfo > {
272+ private async initialPrepare ( preparePlatformInfo : IPreparePlatformInfo ) {
273+ const { platform, appFilesUpdaterOptions, platformTemplate, projectData, config, nativePrepare } = preparePlatformInfo ;
256274 this . validatePlatform ( platform , projectData ) ;
257275
258276 await this . trackProjectType ( projectData ) ;
@@ -266,24 +284,6 @@ export class PlatformService extends EventEmitter implements IPlatformService {
266284 }
267285
268286 await this . ensurePlatformInstalled ( platform , platformTemplate , projectData , config , appFilesUpdaterOptions , nativePrepare ) ;
269-
270- const bundle = appFilesUpdaterOptions . bundle ;
271- const nativePlatformStatus = ( nativePrepare && nativePrepare . skipNativePrepare ) ? constants . NativePlatformStatus . requiresPlatformAdd : constants . NativePlatformStatus . requiresPrepare ;
272- const changesInfo = await this . $projectChangesService . checkForChanges ( {
273- platform,
274- projectData,
275- projectChangesOptions : {
276- bundle,
277- release : appFilesUpdaterOptions . release ,
278- provision : config . provision ,
279- teamId : config . teamId ,
280- nativePlatformStatus,
281- skipModulesNativeCheck : skipNativeCheckOptions . skipModulesNativeCheck
282- }
283- } ) ;
284-
285- this . $logger . trace ( "Changes info in prepare platform:" , changesInfo ) ;
286- return changesInfo ;
287287 }
288288
289289 /* Hooks are expected to use "filesToSync" parameter, as to give plugin authors additional information about the sync process.*/
0 commit comments