@@ -14,7 +14,7 @@ export class PreviewAppPluginsService implements IPreviewAppPluginsService {
14
14
private $logger : ILogger ,
15
15
private $pluginsService : IPluginsService ) { }
16
16
17
- public getDeviceWarnings ( device : Device ) : string [ ] {
17
+ public getPluginsUsageWarnings ( data : IPreviewAppLiveSyncData , device : Device ) : string [ ] {
18
18
if ( ! device ) {
19
19
this . $errors . failWithoutHelp ( "No device provided." ) ;
20
20
}
@@ -23,10 +23,6 @@ export class PreviewAppPluginsService implements IPreviewAppPluginsService {
23
23
this . $errors . failWithoutHelp ( "No version of preview app provided." ) ;
24
24
}
25
25
26
- return this . previewAppVersionWarnings [ device . previewAppVersion ] ;
27
- }
28
-
29
- public async comparePluginsOnDevice ( data : IPreviewAppLiveSyncData , device : Device ) : Promise < void > {
30
26
if ( ! this . previewAppVersionWarnings [ device . previewAppVersion ] ) {
31
27
const devicePlugins = this . getDevicePlugins ( device ) ;
32
28
const localPlugins = this . getLocalPlugins ( data . projectDir ) ;
@@ -40,7 +36,12 @@ export class PreviewAppPluginsService implements IPreviewAppPluginsService {
40
36
this . previewAppVersionWarnings [ device . previewAppVersion ] = warnings ;
41
37
}
42
38
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 ) ) ;
44
45
}
45
46
46
47
public getExternalPlugins ( device : Device ) : string [ ] {
0 commit comments