@bazumax/capacitor-codepush
Version:
CodePush Plugin for Capacitor
51 lines • 2.78 kB
JavaScript
/**
* Defines the possible result and intermediate statuses of the window.codePush.sync operation.
* The result statuses are final, mutually exclusive statuses of the sync operation. The operation will end with only one of the possible result statuses.
* The intermediate statuses are not final, one or more of them can happen before sync ends, based on the options you use and user interaction.
*
* NOTE: Adding new statuses or changing old statuses requires an update to CodePush.sync(), which must know which callbacks are results and which are not!
* Also, don't forget to change the TestMessage module in ServerUtils!
* AND THE codePush.d.ts (typings) file!!!
*/
export var SyncStatus;
(function (SyncStatus) {
/**
* Result status - the application is up to date.
*/
SyncStatus[SyncStatus["UP_TO_DATE"] = 0] = "UP_TO_DATE";
/**
* Result status - an update is available, it has been downloaded, unzipped and copied to the deployment folder.
* After the completion of the callback invoked with SyncStatus.UPDATE_INSTALLED, the application will be reloaded with the updated code and resources.
*/
SyncStatus[SyncStatus["UPDATE_INSTALLED"] = 1] = "UPDATE_INSTALLED";
/**
* Result status - an optional update is available, but the user declined to install it. The update was not downloaded.
*/
SyncStatus[SyncStatus["UPDATE_IGNORED"] = 2] = "UPDATE_IGNORED";
/**
* Result status - an error happened during the sync operation. This might be an error while communicating with the server, downloading or unziping the update.
* The console logs should contain more information about what happened. No update has been applied in this case.
*/
SyncStatus[SyncStatus["ERROR"] = 3] = "ERROR";
/**
* Result status - there is an ongoing sync in progress, so this attempt to sync has been aborted.
*/
SyncStatus[SyncStatus["IN_PROGRESS"] = 4] = "IN_PROGRESS";
/**
* Intermediate status - the plugin is about to check for updates.
*/
SyncStatus[SyncStatus["CHECKING_FOR_UPDATE"] = 5] = "CHECKING_FOR_UPDATE";
/**
* Intermediate status - a user dialog is about to be displayed. This status will be reported only if user interaction is enabled.
*/
SyncStatus[SyncStatus["AWAITING_USER_ACTION"] = 6] = "AWAITING_USER_ACTION";
/**
* Intermediate status - the update packages is about to be downloaded.
*/
SyncStatus[SyncStatus["DOWNLOADING_PACKAGE"] = 7] = "DOWNLOADING_PACKAGE";
/**
* Intermediate status - the update package is about to be installed.
*/
SyncStatus[SyncStatus["INSTALLING_UPDATE"] = 8] = "INSTALLING_UPDATE";
})(SyncStatus || (SyncStatus = {}));
//# sourceMappingURL=syncStatus.js.map