@@ -3,25 +3,25 @@ import CodePush from "react-native-code-push";
33// This module wraps CodePush API calls to add test message callbacks to every function for simpler test code.
44
55module . exports = {
6- checkForUpdate : function ( testApp , onSuccess , onError , deploymentKey ) {
6+ checkForUpdate : function ( testApp , onSuccess , onError , deploymentKey ) {
77 return CodePush . checkForUpdate ( deploymentKey )
88 . then ( ( remotePackage ) => {
99 return testApp . checkUpdateSuccess ( remotePackage ) . then ( ( ) => { return onSuccess && onSuccess ( remotePackage ) ; } ) ;
1010 } , ( error ) => {
1111 return testApp . checkUpdateError ( error ) . then ( ( ) => { return onError && onError ( error ) ; } ) ;
1212 } ) ;
1313 } ,
14-
15- download : function ( testApp , onSuccess , onError , remotePackage ) {
14+
15+ download : function ( testApp , onSuccess , onError , remotePackage ) {
1616 return remotePackage . download ( )
1717 . then ( ( localPackage ) => {
1818 return testApp . downloadSuccess ( localPackage ) . then ( ( ) => { return onSuccess && onSuccess ( localPackage ) ; } ) ;
1919 } , ( error ) => {
2020 return testApp . downloadError ( error ) . then ( ( ) => { return onError && onError ( error ) ; } ) ;
2121 } ) ;
2222 } ,
23-
24- install : function ( testApp , onSuccess , onError , installMode , minBackgroundDuration , localPackage ) {
23+
24+ install : function ( testApp , onSuccess , onError , installMode , minBackgroundDuration , localPackage ) {
2525 return localPackage . install ( installMode , minBackgroundDuration )
2626 . then ( ( ) => {
2727 // Since immediate installs cannot be reliably logged (due to async network calls), we only log "UPDATE_INSTALLED" if it is a resume or restart update.
@@ -31,14 +31,14 @@ module.exports = {
3131 return testApp . installError ( ) . then ( ( ) => { return onError && onError ( ) ; } ) ;
3232 } ) ;
3333 } ,
34-
35- checkAndInstall : function ( testApp , onSuccess , onError , installMode , minBackgroundDuration ) {
34+
35+ checkAndInstall : function ( testApp , onSuccess , onError , installMode , minBackgroundDuration ) {
3636 var installUpdate = this . install . bind ( this , testApp , onSuccess , onError , installMode , minBackgroundDuration ) ;
3737 var downloadUpdate = this . download . bind ( this , testApp , installUpdate , onError ) ;
3838 return this . checkForUpdate ( testApp , downloadUpdate , onError ) ;
3939 } ,
40-
41- sync : function ( testApp , onSyncStatus , onSyncError , options ) {
40+
41+ sync : function ( testApp , onSyncStatus , onSyncError , options ) {
4242 return CodePush . checkForUpdate ( )
4343 . then (
4444 ( remotePackage ) => {
@@ -48,7 +48,7 @@ module.exports = {
4848 var regularUpdateIsImmediate = options && options . installMode === CodePush . InstallMode . IMMEDIATE ;
4949 var mandatoryUpdateIsImmediate = ! options || ( options && ( ! options . mandatoryInstallMode || options . mandatoryInstallMode === CodePush . InstallMode . IMMEDIATE ) ) ;
5050 var isInstallImmediate = ( remotePackage && remotePackage . isMandatory ) ? mandatoryUpdateIsImmediate : regularUpdateIsImmediate ;
51-
51+
5252 return CodePush . sync ( options )
5353 . then ( ( status ) => {
5454 if ( ! ( isInstallImmediate && status === CodePush . SyncStatus . UPDATE_INSTALLED ) ) {
0 commit comments