@@ -14,7 +14,7 @@ export class PreviewAppPluginsService implements IPreviewAppPluginsService {
1414 private $logger : ILogger ,
1515 private $pluginsService : IPluginsService ) { }
1616
17- public getDeviceWarnings ( device : Device ) : string [ ] {
17+ public getPluginsUsageWarnings ( data : IPreviewAppLiveSyncData , device : Device ) : string [ ] {
1818 if ( ! device ) {
1919 this . $errors . failWithoutHelp ( "No device provided." ) ;
2020 }
@@ -23,10 +23,6 @@ export class PreviewAppPluginsService implements IPreviewAppPluginsService {
2323 this . $errors . failWithoutHelp ( "No version of preview app provided." ) ;
2424 }
2525
26- return this . previewAppVersionWarnings [ device . previewAppVersion ] ;
27- }
28-
29- public async comparePluginsOnDevice ( data : IPreviewAppLiveSyncData , device : Device ) : Promise < void > {
3026 if ( ! this . previewAppVersionWarnings [ device . previewAppVersion ] ) {
3127 const devicePlugins = this . getDevicePlugins ( device ) ;
3228 const localPlugins = this . getLocalPlugins ( data . projectDir ) ;
@@ -40,7 +36,12 @@ export class PreviewAppPluginsService implements IPreviewAppPluginsService {
4036 this . previewAppVersionWarnings [ device . previewAppVersion ] = warnings ;
4137 }
4238
43- this . previewAppVersionWarnings [ device . previewAppVersion ] . map ( warning => this . $logger . warn ( warning ) ) ;
39+ return this . previewAppVersionWarnings [ device . previewAppVersion ] ;
40+ }
41+
42+ public async comparePluginsOnDevice ( data : IPreviewAppLiveSyncData , device : Device ) : Promise < void > {
43+ const warnings = this . getPluginsUsageWarnings ( data , device ) ;
44+ _ . map ( warnings , warning => this . $logger . warn ( warning ) ) ;
4445 }
4546
4647 public getExternalPlugins ( device : Device ) : string [ ] {
0 commit comments