@@ -198,10 +198,27 @@ export class PlatformService extends EventEmitter implements IPlatformService {
198
198
return shouldPrepareInfo . changesInfo . hasChanges || requiresNativePrepare ;
199
199
}
200
200
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 ) ;
203
203
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 ;
205
222
}
206
223
207
224
public async preparePlatform ( platformInfo : IPreparePlatformInfo ) : Promise < boolean > {
@@ -256,7 +273,8 @@ export class PlatformService extends EventEmitter implements IPlatformService {
256
273
}
257
274
}
258
275
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 ;
260
278
this . validatePlatform ( platform , projectData ) ;
261
279
262
280
await this . trackProjectType ( projectData ) ;
@@ -270,24 +288,6 @@ export class PlatformService extends EventEmitter implements IPlatformService {
270
288
}
271
289
272
290
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 ;
291
291
}
292
292
293
293
/* Hooks are expected to use "filesToSync" parameter, as to give plugin authors additional information about the sync process.*/
0 commit comments