-
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add methods to decouple update
- Loading branch information
Showing
6 changed files
with
158 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,30 @@ | ||
export interface CapacitorUpdaterPlugin { | ||
/** | ||
* download new version from url | ||
* @returns {Promise<{version: string}>} an Promise with version name of the downloaded version | ||
* @param url The url where download the version, it can be S3 github tag or whatever, it should be a zip file | ||
*/ | ||
download(options: { url: string }): Promise<{ version: string }>; | ||
setVersion(options: { version: string }): Promise<void>; | ||
/** | ||
* set version as current version | ||
* @returns {Promise<void>} an empty Promise | ||
* @param version The version name to set as current version | ||
*/ | ||
set(options: { version: string }): Promise<void>; | ||
/** | ||
* delete version in storage | ||
* @returns {Promise<void>} an empty Promise | ||
* @param version The version name to delete | ||
*/ | ||
delete(options: { version: string }): Promise<void>; | ||
/** | ||
* get all avaible verisions | ||
* @returns {Promise<{version: string[]}>} an Promise witht the version list | ||
*/ | ||
list(): Promise<{ versions: string[] }>; | ||
/** | ||
* load current version | ||
* @returns {Promise<void>} an empty Promise | ||
*/ | ||
load(): Promise<void>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters