@@ -197,10 +197,27 @@ export class PlatformService extends EventEmitter implements IPlatformService {
197
197
return shouldPrepareInfo . changesInfo . hasChanges || requiresNativePrepare ;
198
198
}
199
199
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 ) ;
202
202
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 ;
204
221
}
205
222
206
223
public async preparePlatform ( platformInfo : IPreparePlatformInfo ) : Promise < boolean > {
@@ -252,7 +269,8 @@ export class PlatformService extends EventEmitter implements IPlatformService {
252
269
}
253
270
}
254
271
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 ;
256
274
this . validatePlatform ( platform , projectData ) ;
257
275
258
276
await this . trackProjectType ( projectData ) ;
@@ -266,24 +284,6 @@ export class PlatformService extends EventEmitter implements IPlatformService {
266
284
}
267
285
268
286
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 ;
287
287
}
288
288
289
289
/* Hooks are expected to use "filesToSync" parameter, as to give plugin authors additional information about the sync process.*/
0 commit comments