@@ -14,7 +14,7 @@ import {
1414import { IAnalyticsService , IFileSystem } from "../../common/declarations" ;
1515import { injector } from "../../common/yok" ;
1616
17- export class DeviceInstallAppService {
17+ export class DeviceInstallAppService implements IDeviceInstallAppService {
1818 constructor (
1919 private $analyticsService : IAnalyticsService ,
2020 private $buildArtifactsService : IBuildArtifactsService ,
@@ -23,25 +23,25 @@ export class DeviceInstallAppService {
2323 private $logger : ILogger ,
2424 private $mobileHelper : Mobile . IMobileHelper ,
2525 private $projectDataService : IProjectDataService ,
26- private $platformsDataService : IPlatformsDataService
26+ private $platformsDataService : IPlatformsDataService ,
2727 ) { }
2828
2929 public async installOnDevice (
3030 device : Mobile . IDevice ,
3131 buildData : IBuildData ,
32- packageFile ?: string
32+ packageFile ?: string ,
3333 ) : Promise < void > {
3434 this . $logger . info (
35- `Installing on device ${ device . deviceInfo . identifier } ...`
35+ `Installing on device ${ device . deviceInfo . identifier } ...` ,
3636 ) ;
3737
3838 const platform = device . deviceInfo . platform . toLowerCase ( ) ;
3939 const projectData = this . $projectDataService . getProjectData (
40- buildData . projectDir
40+ buildData . projectDir ,
4141 ) ;
4242 const platformData = this . $platformsDataService . getPlatformData (
4343 platform ,
44- projectData
44+ projectData ,
4545 ) ;
4646
4747 await this . $analyticsService . trackEventActionInGoogleAnalytics ( {
@@ -53,13 +53,13 @@ export class DeviceInstallAppService {
5353 if ( ! packageFile ) {
5454 packageFile = await this . $buildArtifactsService . getLatestAppPackagePath (
5555 platformData ,
56- buildData
56+ buildData ,
5757 ) ;
5858 }
5959
6060 await platformData . platformProjectService . cleanDeviceTempFolder (
6161 device . deviceInfo . identifier ,
62- projectData
62+ projectData ,
6363 ) ;
6464
6565 const appIdentifier = projectData . projectIdentifiers [ platform ] ;
@@ -69,7 +69,7 @@ export class DeviceInstallAppService {
6969 await device . applicationManager . reinstallApplication (
7070 appIdentifier ,
7171 packageFile ,
72- buildData
72+ buildData ,
7373 ) ;
7474
7575 await this . updateHashesOnDevice ( {
@@ -83,19 +83,19 @@ export class DeviceInstallAppService {
8383 await this . $buildInfoFileService . saveDeviceBuildInfo (
8484 device ,
8585 projectData ,
86- outputFilePath
86+ outputFilePath ,
8787 ) ;
8888 }
8989
9090 this . $logger . info (
91- `Successfully installed on device with identifier '${ device . deviceInfo . identifier } '.`
91+ `Successfully installed on device with identifier '${ device . deviceInfo . identifier } '.` ,
9292 ) ;
9393 }
9494
9595 public async installOnDeviceIfNeeded (
9696 device : Mobile . IDevice ,
9797 buildData : IBuildData ,
98- packageFile ?: string
98+ packageFile ?: string ,
9999 ) : Promise < void > {
100100 const shouldInstall = await this . shouldInstall ( device , buildData ) ;
101101 if ( shouldInstall ) {
@@ -105,31 +105,29 @@ export class DeviceInstallAppService {
105105
106106 public async shouldInstall (
107107 device : Mobile . IDevice ,
108- buildData : IBuildData
108+ buildData : IBuildData ,
109109 ) : Promise < boolean > {
110110 const projectData = this . $projectDataService . getProjectData (
111- buildData . projectDir
111+ buildData . projectDir ,
112112 ) ;
113113 const platformData = this . $platformsDataService . getPlatformData (
114114 device . deviceInfo . platform ,
115- projectData
115+ projectData ,
116116 ) ;
117117 const platform = device . deviceInfo . platform ;
118118 if (
119119 ! ( await device . applicationManager . isApplicationInstalled (
120- projectData . projectIdentifiers [ platform . toLowerCase ( ) ]
120+ projectData . projectIdentifiers [ platform . toLowerCase ( ) ] ,
121121 ) )
122122 ) {
123123 return true ;
124124 }
125125
126- const deviceBuildInfo : IBuildInfo = await this . $buildInfoFileService . getDeviceBuildInfo (
127- device ,
128- projectData
129- ) ;
126+ const deviceBuildInfo : IBuildInfo =
127+ await this . $buildInfoFileService . getDeviceBuildInfo ( device , projectData ) ;
130128 const localBuildInfo = this . $buildInfoFileService . getLocalBuildInfo (
131129 platformData ,
132- { ...buildData , buildForDevice : ! device . isEmulator }
130+ { ...buildData , buildForDevice : ! device . isEmulator } ,
133131 ) ;
134132
135133 return (
0 commit comments