@capgo/cordova-updater 8.1.1 → 8.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,57 @@
1
1
  # @capgo/cordova-updater
2
2
 
3
- Cordova plugin for [Capgo](https://capgo.app) live updates (OTA). Mirrors the `@capgo/capacitor-updater` API for Cordova apps.
3
+ <a href="https://capgo.app/"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/cordova-updater" alt="Capgo - Cordova Updater - Instant updates for Cordova" /></a>
4
+
5
+ [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.com/invite/VnYRvBfgA6)
6
+
7
+ [![npm](https://img.shields.io/npm/dm/@capgo/cordova-updater)](https://www.npmjs.com/package/@capgo/cordova-updater)
8
+ [![GitHub latest commit](https://badgen.net/github/last-commit/Cap-go/cordova-updater/main)](https://github.com/Cap-go/cordova-updater/commit/)
9
+ [![https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg](https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg)](https://good-labs.github.io/greater-good-affirmation)
10
+ [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_cordova-updater&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=Cap-go_cordova-updater)
11
+ [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_cordova-updater&metric=bugs)](https://sonarcloud.io/summary/new_code?id=Cap-go_cordova-updater)
12
+ [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_cordova-updater&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=Cap-go_cordova-updater)
13
+ [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_cordova-updater&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=Cap-go_cordova-updater)
14
+ [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_cordova-updater&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=Cap-go_cordova-updater)
15
+ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_cordova-updater&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Cap-go_cordova-updater)
16
+ [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_cordova-updater&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=Cap-go_cordova-updater)
17
+ [![Open Bounties](https://img.shields.io/endpoint?url=https%3A%2F%2Fconsole.algora.io%2Fapi%2Fshields%2FCapgo%2Fbounties%3Fstatus%3Dopen)](https://console.algora.io/org/Capgo/bounties?status=open)
18
+ [![Rewarded Bounties](https://img.shields.io/endpoint?url=https%3A%2F%2Fconsole.algora.io%2Fapi%2Fshields%2FCapgo%2Fbounties%3Fstatus%3Dcompleted)](https://console.algora.io/org/Capgo/bounties?status=completed)
19
+
20
+ <div align="center">
21
+ <h2><a href="https://capgo.app/?ref=plugin_cordova_updater"> ➡️ Get Instant updates for your App with Capgo</a></h2>
22
+ <h2><a href="https://capgo.app/consulting/?ref=plugin_cordova_updater"> Missing a feature? We’ll build the plugin for you 💪</a></h2>
23
+ </div>
24
+
25
+ Cordova plugin for [Capgo](https://capgo.app) live updates (OTA). Ship JavaScript, HTML, and CSS updates to Cordova Android and iOS apps without waiting on app store review.
26
+
27
+ Already using `@capgo/capacitor-updater`? This plugin mirrors the same JavaScript API and uses the same Capgo Cloud backend, channels, and bundle signing model — adapted for Cordova.
28
+
29
+ ## Why Cordova Updater?
30
+
31
+ Cordova apps still need fast web asset delivery between store releases. `@capgo/cordova-updater` brings Capgo's rollback-safe OTA model to Cordova without migrating to Capacitor first.
32
+
33
+ - **Same API** — Call `notifyAppReady()`, `download()`, `next()`, channel APIs, and stats hooks with the same surface as `@capgo/capacitor-updater`
34
+ - **Native scheme support** — Hooks Cordova's path and scheme handlers so downloaded bundles replace WebView content on modern Cordova Android and iOS
35
+ - **Capgo Cloud ready** — Upload bundles with `@capgo/cli`, roll out by channel, and monitor adoption from the same dashboard you use for Capacitor apps
36
+ - **Rollback protection** — Automatically revert broken updates to keep your app stable
37
+ - **Delta updates** — Only download changed files for faster updates
38
+ - **Open source** — Self-host or use [Capgo Cloud](https://capgo.app/), with full control over your update infrastructure
39
+
40
+ Perfect for fixing bugs immediately, A/B testing features, and maintaining control over your release schedule on legacy Cordova stacks.
41
+
42
+ ## Documentation
43
+
44
+ The most complete doc is available here: https://capgo.app/docs/plugins/cordova-updater/
45
+
46
+ ## Compatibility
47
+
48
+ | Platform | Minimum version |
49
+ | --- | --- |
50
+ | Cordova | 12+ |
51
+ | Cordova Android | 13+ |
52
+ | Cordova iOS | 7+ |
53
+
54
+ > **Note:** The JavaScript API mirrors [`@capgo/capacitor-updater`](https://github.com/Cap-go/capacitor-updater). Web is not supported — desktop/Electron apps should use [`@capgo/electron-updater`](https://github.com/Cap-go/electron-updater).
4
55
 
5
56
  ## Install
6
57
 
@@ -27,7 +27,7 @@ export declare const Updater: {
27
27
  getMissingBundleFiles: (options?: unknown) => Promise<unknown>;
28
28
  getBundleDownloadSize: (options?: unknown) => Promise<unknown>;
29
29
  setChannel: (options?: unknown) => Promise<unknown>;
30
- unsetChannel: () => Promise<unknown>;
30
+ unsetChannel: (options?: unknown) => Promise<unknown>;
31
31
  getChannel: () => Promise<unknown>;
32
32
  listChannels: (options?: unknown) => Promise<unknown>;
33
33
  setCustomId: (options?: unknown) => Promise<unknown>;
package/dist/esm/index.js CHANGED
@@ -28,7 +28,7 @@ export const Updater = {
28
28
  getMissingBundleFiles: (options) => exec('getMissingBundleFiles', [options !== null && options !== void 0 ? options : {}]),
29
29
  getBundleDownloadSize: (options) => exec('getBundleDownloadSize', [options !== null && options !== void 0 ? options : {}]),
30
30
  setChannel: (options) => exec('setChannel', [options !== null && options !== void 0 ? options : {}]),
31
- unsetChannel: () => exec('unsetChannel'),
31
+ unsetChannel: (options) => exec('unsetChannel', [options !== null && options !== void 0 ? options : {}]),
32
32
  getChannel: () => exec('getChannel'),
33
33
  listChannels: (options) => exec('listChannels', [options !== null && options !== void 0 ? options : {}]),
34
34
  setCustomId: (options) => exec('setCustomId', [options !== null && options !== void 0 ? options : {}]),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAC3D,cAAc,eAAe,CAAC;AAE9B,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC;IAC5C,YAAY,EAAE,CAAC,OAAiB,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC,CAAC;IAC1E,WAAW,EAAE,CAAC,OAAiB,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC,CAAC;IACxE,aAAa,EAAE,CAAC,OAAiB,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC,CAAC;IAC5E,QAAQ,EAAE,CAAC,OAAiB,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC,CAAC;IAClE,IAAI,EAAE,CAAC,OAAiB,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC,CAAC;IAC1D,GAAG,EAAE,CAAC,OAAiB,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC,CAAC;IACxD,mBAAmB,EAAE,CAAC,OAAiB,EAAE,EAAE,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,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC;CACrD,CAAC","sourcesContent":["import { exec, normalizeEmptyCordovaResult } from './exec';\nexport * from './definitions';\n\nexport const Updater = {\n notifyAppReady: () => exec('notifyAppReady'),\n setUpdateUrl: (options?: unknown) => exec('setUpdateUrl', [options ?? {}]),\n setStatsUrl: (options?: unknown) => exec('setStatsUrl', [options ?? {}]),\n setChannelUrl: (options?: unknown) => exec('setChannelUrl', [options ?? {}]),\n download: (options?: unknown) => exec('download', [options ?? {}]),\n next: (options?: unknown) => exec('next', [options ?? {}]),\n set: (options?: unknown) => exec('set', [options ?? {}]),\n startPreviewSession: (options?: unknown) => exec('startPreviewSession', [options ?? {}]),\n listPreviews: () => exec('listPreviews'),\n setPreview: (options?: unknown) => exec('setPreview', [options ?? {}]),\n resetPreview: () => exec('resetPreview'),\n deletePreview: (options?: unknown) => exec('deletePreview', [options ?? {}]),\n checkPreviewUpdate: (options?: unknown) => exec('checkPreviewUpdate', [options ?? {}]),\n updatePreview: (options?: unknown) => exec('updatePreview', [options ?? {}]),\n delete: (options?: unknown) => exec('delete', [options ?? {}]),\n setBundleError: (options?: unknown) => exec('setBundleError', [options ?? {}]),\n list: () => exec('list'),\n reset: (options?: unknown) => exec('reset', [options ?? {}]),\n current: () => exec('current'),\n reload: () => exec('reload'),\n setMultiDelay: (options?: unknown) => exec('setMultiDelay', [options ?? {}]),\n cancelDelay: () => exec('cancelDelay'),\n triggerUpdateCheck: () => exec('triggerUpdateCheck'),\n getLatest: (options?: unknown) => exec('getLatest', [options ?? {}]),\n getMissingBundleFiles: (options?: unknown) => exec('getMissingBundleFiles', [options ?? {}]),\n getBundleDownloadSize: (options?: unknown) => exec('getBundleDownloadSize', [options ?? {}]),\n setChannel: (options?: unknown) => exec('setChannel', [options ?? {}]),\n unsetChannel: () => exec('unsetChannel'),\n getChannel: () => exec('getChannel'),\n listChannels: (options?: unknown) => exec('listChannels', [options ?? {}]),\n setCustomId: (options?: unknown) => exec('setCustomId', [options ?? {}]),\n getBuiltinVersion: () => exec('getBuiltinVersion'),\n getDeviceId: () => exec('getDeviceId'),\n getPluginVersion: () => exec('getPluginVersion'),\n isAutoUpdateEnabled: () => exec('isAutoUpdateEnabled'),\n isAutoUpdateAvailable: () => exec('isAutoUpdateAvailable'),\n getNextBundle: async () => normalizeEmptyCordovaResult(await exec('getNextBundle')),\n getFailedUpdate: async () => normalizeEmptyCordovaResult(await exec('getFailedUpdate')),\n setShakeMenu: (options?: unknown) => exec('setShakeMenu', [options ?? {}]),\n isShakeMenuEnabled: () => exec('isShakeMenuEnabled'),\n setShakeChannelSelector: (options?: unknown) => exec('setShakeChannelSelector', [options ?? {}]),\n isShakeChannelSelectorEnabled: () => exec('isShakeChannelSelectorEnabled'),\n getAppId: () => exec('getAppId'),\n setAppId: (options?: unknown) => exec('setAppId', [options ?? {}]),\n getAppUpdateInfo: () => exec('getAppUpdateInfo'),\n openAppStore: () => exec('openAppStore'),\n performImmediateUpdate: () => exec('performImmediateUpdate'),\n startFlexibleUpdate: () => exec('startFlexibleUpdate'),\n completeFlexibleUpdate: () => exec('completeFlexibleUpdate'),\n reportWebViewError: (options?: unknown) => exec('reportWebViewError', [options ?? {}]),\n addListener: (eventName: string, listener: (event: unknown) => void) => {\n const listenerId = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 11)}`;\n void exec('addListener', [{ eventName, listenerId }]);\n const handler = (ev: Event) => listener((ev as CustomEvent).detail);\n document.addEventListener(`cordova-updater:${eventName}`, handler);\n return Promise.resolve({\n remove: async () => {\n document.removeEventListener(`cordova-updater:${eventName}`, handler);\n await exec('removeListener', [{ listenerId }]);\n },\n });\n },\n removeAllListeners: () => exec('removeAllListeners'),\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAC3D,cAAc,eAAe,CAAC;AAE9B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IACtD,sBAAsB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,wBAAwB,CAAC;IAC5D,kBAAkB,EAAE,CAAC,OAAiB,EAAE,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC,CAAC;IACtF,WAAW,EAAE,CAAC,SAAiB,EAAE,QAAkC,EAAE,EAAE;QACrE,MAAM,UAAU,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;QAC3F,KAAK,IAAI,CAAC,aAAa,EAAE,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;QACtD,MAAM,OAAO,GAAG,CAAC,EAAS,EAAE,EAAE,CAAC,QAAQ,CAAE,EAAkB,CAAC,MAAM,CAAC,CAAC;QACpE,QAAQ,CAAC,gBAAgB,CAAC,mBAAmB,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;QACnE,OAAO,OAAO,CAAC,OAAO,CAAC;YACrB,MAAM,EAAE,KAAK,IAAI,EAAE;gBACjB,QAAQ,CAAC,mBAAmB,CAAC,mBAAmB,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;gBACtE,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;YACjD,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IACD,kBAAkB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC;CACrD,CAAC","sourcesContent":["import { exec, normalizeEmptyCordovaResult } from './exec';\nexport * from './definitions';\n\nexport const Updater = {\n notifyAppReady: () => exec('notifyAppReady'),\n setUpdateUrl: (options?: unknown) => exec('setUpdateUrl', [options ?? {}]),\n setStatsUrl: (options?: unknown) => exec('setStatsUrl', [options ?? {}]),\n setChannelUrl: (options?: unknown) => exec('setChannelUrl', [options ?? {}]),\n download: (options?: unknown) => exec('download', [options ?? {}]),\n next: (options?: unknown) => exec('next', [options ?? {}]),\n set: (options?: unknown) => exec('set', [options ?? {}]),\n startPreviewSession: (options?: unknown) => exec('startPreviewSession', [options ?? {}]),\n listPreviews: () => exec('listPreviews'),\n setPreview: (options?: unknown) => exec('setPreview', [options ?? {}]),\n resetPreview: () => exec('resetPreview'),\n deletePreview: (options?: unknown) => exec('deletePreview', [options ?? {}]),\n checkPreviewUpdate: (options?: unknown) => exec('checkPreviewUpdate', [options ?? {}]),\n updatePreview: (options?: unknown) => exec('updatePreview', [options ?? {}]),\n delete: (options?: unknown) => exec('delete', [options ?? {}]),\n setBundleError: (options?: unknown) => exec('setBundleError', [options ?? {}]),\n list: () => exec('list'),\n reset: (options?: unknown) => exec('reset', [options ?? {}]),\n current: () => exec('current'),\n reload: () => exec('reload'),\n setMultiDelay: (options?: unknown) => exec('setMultiDelay', [options ?? {}]),\n cancelDelay: () => exec('cancelDelay'),\n triggerUpdateCheck: () => exec('triggerUpdateCheck'),\n getLatest: (options?: unknown) => exec('getLatest', [options ?? {}]),\n getMissingBundleFiles: (options?: unknown) => exec('getMissingBundleFiles', [options ?? {}]),\n getBundleDownloadSize: (options?: unknown) => exec('getBundleDownloadSize', [options ?? {}]),\n setChannel: (options?: unknown) => exec('setChannel', [options ?? {}]),\n unsetChannel: (options?: unknown) => exec('unsetChannel', [options ?? {}]),\n getChannel: () => exec('getChannel'),\n listChannels: (options?: unknown) => exec('listChannels', [options ?? {}]),\n setCustomId: (options?: unknown) => exec('setCustomId', [options ?? {}]),\n getBuiltinVersion: () => exec('getBuiltinVersion'),\n getDeviceId: () => exec('getDeviceId'),\n getPluginVersion: () => exec('getPluginVersion'),\n isAutoUpdateEnabled: () => exec('isAutoUpdateEnabled'),\n isAutoUpdateAvailable: () => exec('isAutoUpdateAvailable'),\n getNextBundle: async () => normalizeEmptyCordovaResult(await exec('getNextBundle')),\n getFailedUpdate: async () => normalizeEmptyCordovaResult(await exec('getFailedUpdate')),\n setShakeMenu: (options?: unknown) => exec('setShakeMenu', [options ?? {}]),\n isShakeMenuEnabled: () => exec('isShakeMenuEnabled'),\n setShakeChannelSelector: (options?: unknown) => exec('setShakeChannelSelector', [options ?? {}]),\n isShakeChannelSelectorEnabled: () => exec('isShakeChannelSelectorEnabled'),\n getAppId: () => exec('getAppId'),\n setAppId: (options?: unknown) => exec('setAppId', [options ?? {}]),\n getAppUpdateInfo: () => exec('getAppUpdateInfo'),\n openAppStore: () => exec('openAppStore'),\n performImmediateUpdate: () => exec('performImmediateUpdate'),\n startFlexibleUpdate: () => exec('startFlexibleUpdate'),\n completeFlexibleUpdate: () => exec('completeFlexibleUpdate'),\n reportWebViewError: (options?: unknown) => exec('reportWebViewError', [options ?? {}]),\n addListener: (eventName: string, listener: (event: unknown) => void) => {\n const listenerId = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 11)}`;\n void exec('addListener', [{ eventName, listenerId }]);\n const handler = (ev: Event) => listener((ev as CustomEvent).detail);\n document.addEventListener(`cordova-updater:${eventName}`, handler);\n return Promise.resolve({\n remove: async () => {\n document.removeEventListener(`cordova-updater:${eventName}`, handler);\n await exec('removeListener', [{ listenerId }]);\n },\n });\n },\n removeAllListeners: () => exec('removeAllListeners'),\n};\n"]}
@@ -26,7 +26,7 @@ declare const api: {
26
26
  getMissingBundleFiles: (options?: unknown) => Promise<unknown>;
27
27
  getBundleDownloadSize: (options?: unknown) => Promise<unknown>;
28
28
  setChannel: (options?: unknown) => Promise<unknown>;
29
- unsetChannel: () => Promise<unknown>;
29
+ unsetChannel: (options?: unknown) => Promise<unknown>;
30
30
  getChannel: () => Promise<unknown>;
31
31
  listChannels: (options?: unknown) => Promise<unknown>;
32
32
  setCustomId: (options?: unknown) => Promise<unknown>;
@@ -162,7 +162,7 @@ const Updater = {
162
162
  getMissingBundleFiles: (options) => exec('getMissingBundleFiles', [options !== null && options !== void 0 ? options : {}]),
163
163
  getBundleDownloadSize: (options) => exec('getBundleDownloadSize', [options !== null && options !== void 0 ? options : {}]),
164
164
  setChannel: (options) => exec('setChannel', [options !== null && options !== void 0 ? options : {}]),
165
- unsetChannel: () => exec('unsetChannel'),
165
+ unsetChannel: (options) => exec('unsetChannel', [options !== null && options !== void 0 ? options : {}]),
166
166
  getChannel: () => exec('getChannel'),
167
167
  listChannels: (options) => exec('listChannels', [options !== null && options !== void 0 ? options : {}]),
168
168
  setCustomId: (options) => exec('setCustomId', [options !== null && options !== void 0 ? options : {}]),
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/exec.js","esm/definitions.js","esm/index.js","esm/plugin.js"],"sourcesContent":["/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nexport const SERVICE_NAME = 'Updater';\n/** Cordova resolves no-arg native success as `''` instead of `null`/`undefined`. */\nexport function normalizeEmptyCordovaResult(result) {\n if (result == null || result === '') {\n return null;\n }\n if (typeof result === 'object' && !Array.isArray(result)) {\n const record = result;\n if (!('bundle' in record) && !('id' in record) && Object.keys(record).length === 0) {\n return null;\n }\n }\n return result;\n}\nexport function exec(action, args = []) {\n return new Promise((resolve, reject) => {\n cordova.exec((result) => resolve(result), (error) => reject(error), SERVICE_NAME, action, args);\n });\n}\n//# sourceMappingURL=exec.js.map","/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\n/**\n * Update availability status.\n *\n * @since 8.0.0\n */\nexport var AppUpdateAvailability;\n(function (AppUpdateAvailability) {\n /**\n * Update availability is unknown.\n * This typically means the check hasn't completed or failed.\n */\n AppUpdateAvailability[AppUpdateAvailability[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n /**\n * No update is available.\n * The installed version is the latest.\n */\n AppUpdateAvailability[AppUpdateAvailability[\"UPDATE_NOT_AVAILABLE\"] = 1] = \"UPDATE_NOT_AVAILABLE\";\n /**\n * An update is available for download.\n */\n AppUpdateAvailability[AppUpdateAvailability[\"UPDATE_AVAILABLE\"] = 2] = \"UPDATE_AVAILABLE\";\n /**\n * An update is currently being downloaded or installed.\n */\n AppUpdateAvailability[AppUpdateAvailability[\"UPDATE_IN_PROGRESS\"] = 3] = \"UPDATE_IN_PROGRESS\";\n})(AppUpdateAvailability || (AppUpdateAvailability = {}));\n/**\n * Installation status for flexible updates (Android only).\n *\n * @since 8.0.0\n */\nexport var FlexibleUpdateInstallStatus;\n(function (FlexibleUpdateInstallStatus) {\n /**\n * Unknown install status.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n /**\n * Download is pending and will start soon.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"PENDING\"] = 1] = \"PENDING\";\n /**\n * Download is in progress.\n * Check `bytesDownloaded` and `totalBytesToDownload` for progress.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"DOWNLOADING\"] = 2] = \"DOWNLOADING\";\n /**\n * The update is being installed.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"INSTALLING\"] = 3] = \"INSTALLING\";\n /**\n * The update has been installed.\n * The app needs to be restarted to use the new version.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"INSTALLED\"] = 4] = \"INSTALLED\";\n /**\n * The update failed to download or install.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"FAILED\"] = 5] = \"FAILED\";\n /**\n * The update was canceled by the user.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"CANCELED\"] = 6] = \"CANCELED\";\n /**\n * The update has been downloaded and is ready to install.\n * Call {@link UpdaterPlugin.completeFlexibleUpdate} to install.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"DOWNLOADED\"] = 11] = \"DOWNLOADED\";\n})(FlexibleUpdateInstallStatus || (FlexibleUpdateInstallStatus = {}));\n/**\n * Result codes for app update operations.\n *\n * @since 8.0.0\n */\nexport var AppUpdateResultCode;\n(function (AppUpdateResultCode) {\n /**\n * The update completed successfully.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"OK\"] = 0] = \"OK\";\n /**\n * The user canceled the update.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"CANCELED\"] = 1] = \"CANCELED\";\n /**\n * The update failed.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"FAILED\"] = 2] = \"FAILED\";\n /**\n * No update is available.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"NOT_AVAILABLE\"] = 3] = \"NOT_AVAILABLE\";\n /**\n * The requested update type is not allowed.\n * For example, trying to perform an immediate update when only flexible is allowed.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"NOT_ALLOWED\"] = 4] = \"NOT_ALLOWED\";\n /**\n * Required information is missing.\n * This can happen if {@link UpdaterPlugin.getAppUpdateInfo} wasn't called first.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"INFO_MISSING\"] = 5] = \"INFO_MISSING\";\n})(AppUpdateResultCode || (AppUpdateResultCode = {}));\n//# sourceMappingURL=definitions.js.map","import { exec, normalizeEmptyCordovaResult } from './exec';\nexport * from './definitions';\nexport const Updater = {\n notifyAppReady: () => exec('notifyAppReady'),\n setUpdateUrl: (options) => exec('setUpdateUrl', [options !== null && options !== void 0 ? options : {}]),\n setStatsUrl: (options) => exec('setStatsUrl', [options !== null && options !== void 0 ? options : {}]),\n setChannelUrl: (options) => exec('setChannelUrl', [options !== null && options !== void 0 ? options : {}]),\n download: (options) => exec('download', [options !== null && options !== void 0 ? options : {}]),\n next: (options) => exec('next', [options !== null && options !== void 0 ? options : {}]),\n set: (options) => exec('set', [options !== null && options !== void 0 ? options : {}]),\n startPreviewSession: (options) => exec('startPreviewSession', [options !== null && options !== void 0 ? options : {}]),\n listPreviews: () => exec('listPreviews'),\n setPreview: (options) => exec('setPreview', [options !== null && options !== void 0 ? options : {}]),\n resetPreview: () => exec('resetPreview'),\n deletePreview: (options) => exec('deletePreview', [options !== null && options !== void 0 ? options : {}]),\n checkPreviewUpdate: (options) => exec('checkPreviewUpdate', [options !== null && options !== void 0 ? options : {}]),\n updatePreview: (options) => exec('updatePreview', [options !== null && options !== void 0 ? options : {}]),\n delete: (options) => exec('delete', [options !== null && options !== void 0 ? options : {}]),\n setBundleError: (options) => exec('setBundleError', [options !== null && options !== void 0 ? options : {}]),\n list: () => exec('list'),\n reset: (options) => exec('reset', [options !== null && options !== void 0 ? options : {}]),\n current: () => exec('current'),\n reload: () => exec('reload'),\n setMultiDelay: (options) => exec('setMultiDelay', [options !== null && options !== void 0 ? options : {}]),\n cancelDelay: () => exec('cancelDelay'),\n triggerUpdateCheck: () => exec('triggerUpdateCheck'),\n getLatest: (options) => exec('getLatest', [options !== null && options !== void 0 ? options : {}]),\n getMissingBundleFiles: (options) => exec('getMissingBundleFiles', [options !== null && options !== void 0 ? options : {}]),\n getBundleDownloadSize: (options) => exec('getBundleDownloadSize', [options !== null && options !== void 0 ? options : {}]),\n setChannel: (options) => exec('setChannel', [options !== null && options !== void 0 ? options : {}]),\n unsetChannel: () => exec('unsetChannel'),\n getChannel: () => exec('getChannel'),\n listChannels: (options) => exec('listChannels', [options !== null && options !== void 0 ? options : {}]),\n setCustomId: (options) => exec('setCustomId', [options !== null && options !== void 0 ? options : {}]),\n getBuiltinVersion: () => exec('getBuiltinVersion'),\n getDeviceId: () => exec('getDeviceId'),\n getPluginVersion: () => exec('getPluginVersion'),\n isAutoUpdateEnabled: () => exec('isAutoUpdateEnabled'),\n isAutoUpdateAvailable: () => exec('isAutoUpdateAvailable'),\n getNextBundle: async () => normalizeEmptyCordovaResult(await exec('getNextBundle')),\n getFailedUpdate: async () => normalizeEmptyCordovaResult(await exec('getFailedUpdate')),\n setShakeMenu: (options) => exec('setShakeMenu', [options !== null && options !== void 0 ? options : {}]),\n isShakeMenuEnabled: () => exec('isShakeMenuEnabled'),\n setShakeChannelSelector: (options) => exec('setShakeChannelSelector', [options !== null && options !== void 0 ? options : {}]),\n isShakeChannelSelectorEnabled: () => exec('isShakeChannelSelectorEnabled'),\n getAppId: () => exec('getAppId'),\n setAppId: (options) => exec('setAppId', [options !== null && options !== void 0 ? options : {}]),\n getAppUpdateInfo: () => exec('getAppUpdateInfo'),\n openAppStore: () => exec('openAppStore'),\n performImmediateUpdate: () => exec('performImmediateUpdate'),\n startFlexibleUpdate: () => exec('startFlexibleUpdate'),\n completeFlexibleUpdate: () => exec('completeFlexibleUpdate'),\n reportWebViewError: (options) => exec('reportWebViewError', [options !== null && options !== void 0 ? options : {}]),\n addListener: (eventName, listener) => {\n const listenerId = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 11)}`;\n void exec('addListener', [{ eventName, listenerId }]);\n const handler = (ev) => listener(ev.detail);\n document.addEventListener(`cordova-updater:${eventName}`, handler);\n return Promise.resolve({\n remove: async () => {\n document.removeEventListener(`cordova-updater:${eventName}`, handler);\n await exec('removeListener', [{ listenerId }]);\n },\n });\n },\n removeAllListeners: () => exec('removeAllListeners'),\n};\n//# sourceMappingURL=index.js.map","/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nimport { Updater } from './index';\nconst api = Object.assign({}, Updater);\ndocument.addEventListener('deviceready', () => {\n const win = window;\n win.cordova = win.cordova || {};\n win.cordova.plugins = win.cordova.plugins || {};\n win.cordova.plugins.Updater = api;\n});\nexport { api as Updater };\n//# sourceMappingURL=plugin.js.map"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACO,MAAM,YAAY,GAAG,SAAS;AACrC;AACO,SAAS,2BAA2B,CAAC,MAAM,EAAE;A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source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nexport const SERVICE_NAME = 'Updater';\n/** Cordova resolves no-arg native success as `''` instead of `null`/`undefined`. */\nexport function normalizeEmptyCordovaResult(result) {\n if (result == null || result === '') {\n return null;\n }\n if (typeof result === 'object' && !Array.isArray(result)) {\n const record = result;\n if (!('bundle' in record) && !('id' in record) && Object.keys(record).length === 0) {\n return null;\n }\n }\n return result;\n}\nexport function exec(action, args = []) {\n return new Promise((resolve, reject) => {\n cordova.exec((result) => resolve(result), (error) => reject(error), SERVICE_NAME, action, args);\n });\n}\n//# sourceMappingURL=exec.js.map","/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\n/**\n * Update availability status.\n *\n * @since 8.0.0\n */\nexport var AppUpdateAvailability;\n(function (AppUpdateAvailability) {\n /**\n * Update availability is unknown.\n * This typically means the check hasn't completed or failed.\n */\n AppUpdateAvailability[AppUpdateAvailability[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n /**\n * No update is available.\n * The installed version is the latest.\n */\n AppUpdateAvailability[AppUpdateAvailability[\"UPDATE_NOT_AVAILABLE\"] = 1] = \"UPDATE_NOT_AVAILABLE\";\n /**\n * An update is available for download.\n */\n AppUpdateAvailability[AppUpdateAvailability[\"UPDATE_AVAILABLE\"] = 2] = \"UPDATE_AVAILABLE\";\n /**\n * An update is currently being downloaded or installed.\n */\n AppUpdateAvailability[AppUpdateAvailability[\"UPDATE_IN_PROGRESS\"] = 3] = \"UPDATE_IN_PROGRESS\";\n})(AppUpdateAvailability || (AppUpdateAvailability = {}));\n/**\n * Installation status for flexible updates (Android only).\n *\n * @since 8.0.0\n */\nexport var FlexibleUpdateInstallStatus;\n(function (FlexibleUpdateInstallStatus) {\n /**\n * Unknown install status.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n /**\n * Download is pending and will start soon.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"PENDING\"] = 1] = \"PENDING\";\n /**\n * Download is in progress.\n * Check `bytesDownloaded` and `totalBytesToDownload` for progress.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"DOWNLOADING\"] = 2] = \"DOWNLOADING\";\n /**\n * The update is being installed.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"INSTALLING\"] = 3] = \"INSTALLING\";\n /**\n * The update has been installed.\n * The app needs to be restarted to use the new version.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"INSTALLED\"] = 4] = \"INSTALLED\";\n /**\n * The update failed to download or install.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"FAILED\"] = 5] = \"FAILED\";\n /**\n * The update was canceled by the user.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"CANCELED\"] = 6] = \"CANCELED\";\n /**\n * The update has been downloaded and is ready to install.\n * Call {@link UpdaterPlugin.completeFlexibleUpdate} to install.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"DOWNLOADED\"] = 11] = \"DOWNLOADED\";\n})(FlexibleUpdateInstallStatus || (FlexibleUpdateInstallStatus = {}));\n/**\n * Result codes for app update operations.\n *\n * @since 8.0.0\n */\nexport var AppUpdateResultCode;\n(function (AppUpdateResultCode) {\n /**\n * The update completed successfully.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"OK\"] = 0] = \"OK\";\n /**\n * The user canceled the update.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"CANCELED\"] = 1] = \"CANCELED\";\n /**\n * The update failed.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"FAILED\"] = 2] = \"FAILED\";\n /**\n * No update is available.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"NOT_AVAILABLE\"] = 3] = \"NOT_AVAILABLE\";\n /**\n * The requested update type is not allowed.\n * For example, trying to perform an immediate update when only flexible is allowed.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"NOT_ALLOWED\"] = 4] = \"NOT_ALLOWED\";\n /**\n * Required information is missing.\n * This can happen if {@link UpdaterPlugin.getAppUpdateInfo} wasn't called first.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"INFO_MISSING\"] = 5] = \"INFO_MISSING\";\n})(AppUpdateResultCode || (AppUpdateResultCode = {}));\n//# sourceMappingURL=definitions.js.map","import { exec, normalizeEmptyCordovaResult } from './exec';\nexport * from './definitions';\nexport const Updater = {\n notifyAppReady: () => exec('notifyAppReady'),\n setUpdateUrl: (options) => exec('setUpdateUrl', [options !== null && options !== void 0 ? options : {}]),\n setStatsUrl: (options) => exec('setStatsUrl', [options !== null && options !== void 0 ? options : {}]),\n setChannelUrl: (options) => exec('setChannelUrl', [options !== null && options !== void 0 ? options : {}]),\n download: (options) => exec('download', [options !== null && options !== void 0 ? options : {}]),\n next: (options) => exec('next', [options !== null && options !== void 0 ? options : {}]),\n set: (options) => exec('set', [options !== null && options !== void 0 ? options : {}]),\n startPreviewSession: (options) => exec('startPreviewSession', [options !== null && options !== void 0 ? options : {}]),\n listPreviews: () => exec('listPreviews'),\n setPreview: (options) => exec('setPreview', [options !== null && options !== void 0 ? options : {}]),\n resetPreview: () => exec('resetPreview'),\n deletePreview: (options) => exec('deletePreview', [options !== null && options !== void 0 ? options : {}]),\n checkPreviewUpdate: (options) => exec('checkPreviewUpdate', [options !== null && options !== void 0 ? options : {}]),\n updatePreview: (options) => exec('updatePreview', [options !== null && options !== void 0 ? options : {}]),\n delete: (options) => exec('delete', [options !== null && options !== void 0 ? options : {}]),\n setBundleError: (options) => exec('setBundleError', [options !== null && options !== void 0 ? options : {}]),\n list: () => exec('list'),\n reset: (options) => exec('reset', [options !== null && options !== void 0 ? options : {}]),\n current: () => exec('current'),\n reload: () => exec('reload'),\n setMultiDelay: (options) => exec('setMultiDelay', [options !== null && options !== void 0 ? options : {}]),\n cancelDelay: () => exec('cancelDelay'),\n triggerUpdateCheck: () => exec('triggerUpdateCheck'),\n getLatest: (options) => exec('getLatest', [options !== null && options !== void 0 ? options : {}]),\n getMissingBundleFiles: (options) => exec('getMissingBundleFiles', [options !== null && options !== void 0 ? options : {}]),\n getBundleDownloadSize: (options) => exec('getBundleDownloadSize', [options !== null && options !== void 0 ? options : {}]),\n setChannel: (options) => exec('setChannel', [options !== null && options !== void 0 ? options : {}]),\n unsetChannel: (options) => exec('unsetChannel', [options !== null && options !== void 0 ? options : {}]),\n getChannel: () => exec('getChannel'),\n listChannels: (options) => exec('listChannels', [options !== null && options !== void 0 ? options : {}]),\n setCustomId: (options) => exec('setCustomId', [options !== null && options !== void 0 ? options : {}]),\n getBuiltinVersion: () => exec('getBuiltinVersion'),\n getDeviceId: () => exec('getDeviceId'),\n getPluginVersion: () => exec('getPluginVersion'),\n isAutoUpdateEnabled: () => exec('isAutoUpdateEnabled'),\n isAutoUpdateAvailable: () => exec('isAutoUpdateAvailable'),\n getNextBundle: async () => normalizeEmptyCordovaResult(await exec('getNextBundle')),\n getFailedUpdate: async () => normalizeEmptyCordovaResult(await exec('getFailedUpdate')),\n setShakeMenu: (options) => exec('setShakeMenu', [options !== null && options !== void 0 ? options : {}]),\n isShakeMenuEnabled: () => exec('isShakeMenuEnabled'),\n setShakeChannelSelector: (options) => exec('setShakeChannelSelector', [options !== null && options !== void 0 ? options : {}]),\n isShakeChannelSelectorEnabled: () => exec('isShakeChannelSelectorEnabled'),\n getAppId: () => exec('getAppId'),\n setAppId: (options) => exec('setAppId', [options !== null && options !== void 0 ? options : {}]),\n getAppUpdateInfo: () => exec('getAppUpdateInfo'),\n openAppStore: () => exec('openAppStore'),\n performImmediateUpdate: () => exec('performImmediateUpdate'),\n startFlexibleUpdate: () => exec('startFlexibleUpdate'),\n completeFlexibleUpdate: () => exec('completeFlexibleUpdate'),\n reportWebViewError: (options) => exec('reportWebViewError', [options !== null && options !== void 0 ? options : {}]),\n addListener: (eventName, listener) => {\n const listenerId = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 11)}`;\n void exec('addListener', [{ eventName, listenerId }]);\n const handler = (ev) => listener(ev.detail);\n document.addEventListener(`cordova-updater:${eventName}`, handler);\n return Promise.resolve({\n remove: async () => {\n document.removeEventListener(`cordova-updater:${eventName}`, handler);\n await exec('removeListener', [{ listenerId }]);\n },\n });\n },\n removeAllListeners: () => exec('removeAllListeners'),\n};\n//# sourceMappingURL=index.js.map","/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nimport { Updater } from './index';\nconst api = Object.assign({}, Updater);\ndocument.addEventListener('deviceready', () => {\n const win = window;\n win.cordova = win.cordova || {};\n win.cordova.plugins = win.cordova.plugins || {};\n win.cordova.plugins.Updater = api;\n});\nexport { api as Updater };\n//# sourceMappingURL=plugin.js.map"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACO,MAAM,YAAY,GAAG,SAAS;AACrC;AACO,SAAS,2BAA2B,CAAC,MAAM,EAAE;AACpD,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,KAAK,EAAE,EAAE;AACzC,QAAQ,OAAO,IAAI;AACnB,IAAI;AACJ,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;AAC9D,QAAQ,MAAM,MAAM,GAAG,MAAM;AAC7B,QAAQ,IAAI,EAAE,QAAQ,IAAI,MAAM,CAAC,IAAI,EAAE,IAAI,IAAI,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;AAC5F,YAAY,OAAO,IAAI;AACvB,QAAQ;AACR,IAAI;AACJ,IAAI,OAAO,MAAM;A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C/B,YAAY,MAAM,EAAE,YAAY;AAChC,gBAAgB,QAAQ,CAAC,mBAAmB,CAAC,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC;AACrF,gBAAgB,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;AAC9D,YAAY,CAAC;AACb,SAAS,CAAC;AACV,IAAI,CAAC;AACL,IAAI,kBAAkB,EAAE,MAAM,IAAI,CAAC,oBAAoB,CAAC;AACxD,CAAC;;AClED;AACA;AACA;AACA;AACA;AAEK,MAAC,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO;AACrC,QAAQ,CAAC,gBAAgB,CAAC,aAAa,EAAE,MAAM;AAC/C,IAAI,MAAM,GAAG,GAAG,MAAM;AACtB,IAAI,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,IAAI,EAAE;AACnC,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE;AACnD,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,GAAG,GAAG;AACrC,CAAC,CAAC;;;;"}
package/dist/plugin.js CHANGED
@@ -163,7 +163,7 @@ var capgoCordovaUpdaterBootstrap = (function (exports) {
163
163
  getMissingBundleFiles: (options) => exec('getMissingBundleFiles', [options !== null && options !== void 0 ? options : {}]),
164
164
  getBundleDownloadSize: (options) => exec('getBundleDownloadSize', [options !== null && options !== void 0 ? options : {}]),
165
165
  setChannel: (options) => exec('setChannel', [options !== null && options !== void 0 ? options : {}]),
166
- unsetChannel: () => exec('unsetChannel'),
166
+ unsetChannel: (options) => exec('unsetChannel', [options !== null && options !== void 0 ? options : {}]),
167
167
  getChannel: () => exec('getChannel'),
168
168
  listChannels: (options) => exec('listChannels', [options !== null && options !== void 0 ? options : {}]),
169
169
  setCustomId: (options) => exec('setCustomId', [options !== null && options !== void 0 ? options : {}]),
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/exec.js","esm/definitions.js","esm/index.js","esm/plugin.js"],"sourcesContent":["/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nexport const SERVICE_NAME = 'Updater';\n/** Cordova resolves no-arg native success as `''` instead of `null`/`undefined`. */\nexport function normalizeEmptyCordovaResult(result) {\n if (result == null || result === '') {\n return null;\n }\n if (typeof result === 'object' && !Array.isArray(result)) {\n const record = result;\n if (!('bundle' in record) && !('id' in record) && Object.keys(record).length === 0) {\n return null;\n }\n }\n return result;\n}\nexport function exec(action, args = []) {\n return new Promise((resolve, reject) => {\n cordova.exec((result) => resolve(result), (error) => reject(error), SERVICE_NAME, action, args);\n });\n}\n//# sourceMappingURL=exec.js.map","/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\n/**\n * Update availability status.\n *\n * @since 8.0.0\n */\nexport var AppUpdateAvailability;\n(function (AppUpdateAvailability) {\n /**\n * Update availability is unknown.\n * This typically means the check hasn't completed or failed.\n */\n AppUpdateAvailability[AppUpdateAvailability[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n /**\n * No update is available.\n * The installed version is the latest.\n */\n AppUpdateAvailability[AppUpdateAvailability[\"UPDATE_NOT_AVAILABLE\"] = 1] = \"UPDATE_NOT_AVAILABLE\";\n /**\n * An update is available for download.\n */\n AppUpdateAvailability[AppUpdateAvailability[\"UPDATE_AVAILABLE\"] = 2] = \"UPDATE_AVAILABLE\";\n /**\n * An update is currently being downloaded or installed.\n */\n AppUpdateAvailability[AppUpdateAvailability[\"UPDATE_IN_PROGRESS\"] = 3] = \"UPDATE_IN_PROGRESS\";\n})(AppUpdateAvailability || (AppUpdateAvailability = {}));\n/**\n * Installation status for flexible updates (Android only).\n *\n * @since 8.0.0\n */\nexport var FlexibleUpdateInstallStatus;\n(function (FlexibleUpdateInstallStatus) {\n /**\n * Unknown install status.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n /**\n * Download is pending and will start soon.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"PENDING\"] = 1] = \"PENDING\";\n /**\n * Download is in progress.\n * Check `bytesDownloaded` and `totalBytesToDownload` for progress.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"DOWNLOADING\"] = 2] = \"DOWNLOADING\";\n /**\n * The update is being installed.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"INSTALLING\"] = 3] = \"INSTALLING\";\n /**\n * The update has been installed.\n * The app needs to be restarted to use the new version.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"INSTALLED\"] = 4] = \"INSTALLED\";\n /**\n * The update failed to download or install.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"FAILED\"] = 5] = \"FAILED\";\n /**\n * The update was canceled by the user.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"CANCELED\"] = 6] = \"CANCELED\";\n /**\n * The update has been downloaded and is ready to install.\n * Call {@link UpdaterPlugin.completeFlexibleUpdate} to install.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"DOWNLOADED\"] = 11] = \"DOWNLOADED\";\n})(FlexibleUpdateInstallStatus || (FlexibleUpdateInstallStatus = {}));\n/**\n * Result codes for app update operations.\n *\n * @since 8.0.0\n */\nexport var AppUpdateResultCode;\n(function (AppUpdateResultCode) {\n /**\n * The update completed successfully.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"OK\"] = 0] = \"OK\";\n /**\n * The user canceled the update.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"CANCELED\"] = 1] = \"CANCELED\";\n /**\n * The update failed.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"FAILED\"] = 2] = \"FAILED\";\n /**\n * No update is available.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"NOT_AVAILABLE\"] = 3] = \"NOT_AVAILABLE\";\n /**\n * The requested update type is not allowed.\n * For example, trying to perform an immediate update when only flexible is allowed.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"NOT_ALLOWED\"] = 4] = \"NOT_ALLOWED\";\n /**\n * Required information is missing.\n * This can happen if {@link UpdaterPlugin.getAppUpdateInfo} wasn't called first.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"INFO_MISSING\"] = 5] = \"INFO_MISSING\";\n})(AppUpdateResultCode || (AppUpdateResultCode = {}));\n//# sourceMappingURL=definitions.js.map","import { exec, normalizeEmptyCordovaResult } from './exec';\nexport * from './definitions';\nexport const Updater = {\n notifyAppReady: () => exec('notifyAppReady'),\n setUpdateUrl: (options) => exec('setUpdateUrl', [options !== null && options !== void 0 ? options : {}]),\n setStatsUrl: (options) => exec('setStatsUrl', [options !== null && options !== void 0 ? options : {}]),\n setChannelUrl: (options) => exec('setChannelUrl', [options !== null && options !== void 0 ? options : {}]),\n download: (options) => exec('download', [options !== null && options !== void 0 ? options : {}]),\n next: (options) => exec('next', [options !== null && options !== void 0 ? options : {}]),\n set: (options) => exec('set', [options !== null && options !== void 0 ? options : {}]),\n startPreviewSession: (options) => exec('startPreviewSession', [options !== null && options !== void 0 ? options : {}]),\n listPreviews: () => exec('listPreviews'),\n setPreview: (options) => exec('setPreview', [options !== null && options !== void 0 ? options : {}]),\n resetPreview: () => exec('resetPreview'),\n deletePreview: (options) => exec('deletePreview', [options !== null && options !== void 0 ? options : {}]),\n checkPreviewUpdate: (options) => exec('checkPreviewUpdate', [options !== null && options !== void 0 ? options : {}]),\n updatePreview: (options) => exec('updatePreview', [options !== null && options !== void 0 ? options : {}]),\n delete: (options) => exec('delete', [options !== null && options !== void 0 ? options : {}]),\n setBundleError: (options) => exec('setBundleError', [options !== null && options !== void 0 ? options : {}]),\n list: () => exec('list'),\n reset: (options) => exec('reset', [options !== null && options !== void 0 ? options : {}]),\n current: () => exec('current'),\n reload: () => exec('reload'),\n setMultiDelay: (options) => exec('setMultiDelay', [options !== null && options !== void 0 ? options : {}]),\n cancelDelay: () => exec('cancelDelay'),\n triggerUpdateCheck: () => exec('triggerUpdateCheck'),\n getLatest: (options) => exec('getLatest', [options !== null && options !== void 0 ? options : {}]),\n getMissingBundleFiles: (options) => exec('getMissingBundleFiles', [options !== null && options !== void 0 ? options : {}]),\n getBundleDownloadSize: (options) => exec('getBundleDownloadSize', [options !== null && options !== void 0 ? options : {}]),\n setChannel: (options) => exec('setChannel', [options !== null && options !== void 0 ? options : {}]),\n unsetChannel: () => exec('unsetChannel'),\n getChannel: () => exec('getChannel'),\n listChannels: (options) => exec('listChannels', [options !== null && options !== void 0 ? options : {}]),\n setCustomId: (options) => exec('setCustomId', [options !== null && options !== void 0 ? options : {}]),\n getBuiltinVersion: () => exec('getBuiltinVersion'),\n getDeviceId: () => exec('getDeviceId'),\n getPluginVersion: () => exec('getPluginVersion'),\n isAutoUpdateEnabled: () => exec('isAutoUpdateEnabled'),\n isAutoUpdateAvailable: () => exec('isAutoUpdateAvailable'),\n getNextBundle: async () => normalizeEmptyCordovaResult(await exec('getNextBundle')),\n getFailedUpdate: async () => normalizeEmptyCordovaResult(await exec('getFailedUpdate')),\n setShakeMenu: (options) => exec('setShakeMenu', [options !== null && options !== void 0 ? options : {}]),\n isShakeMenuEnabled: () => exec('isShakeMenuEnabled'),\n setShakeChannelSelector: (options) => exec('setShakeChannelSelector', [options !== null && options !== void 0 ? options : {}]),\n isShakeChannelSelectorEnabled: () => exec('isShakeChannelSelectorEnabled'),\n getAppId: () => exec('getAppId'),\n setAppId: (options) => exec('setAppId', [options !== null && options !== void 0 ? options : {}]),\n getAppUpdateInfo: () => exec('getAppUpdateInfo'),\n openAppStore: () => exec('openAppStore'),\n performImmediateUpdate: () => exec('performImmediateUpdate'),\n startFlexibleUpdate: () => exec('startFlexibleUpdate'),\n completeFlexibleUpdate: () => exec('completeFlexibleUpdate'),\n reportWebViewError: (options) => exec('reportWebViewError', [options !== null && options !== void 0 ? options : {}]),\n addListener: (eventName, listener) => {\n const listenerId = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 11)}`;\n void exec('addListener', [{ eventName, listenerId }]);\n const handler = (ev) => listener(ev.detail);\n document.addEventListener(`cordova-updater:${eventName}`, handler);\n return Promise.resolve({\n remove: async () => {\n document.removeEventListener(`cordova-updater:${eventName}`, handler);\n await exec('removeListener', [{ listenerId }]);\n },\n });\n },\n removeAllListeners: () => exec('removeAllListeners'),\n};\n//# sourceMappingURL=index.js.map","/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nimport { Updater } from './index';\nconst api = Object.assign({}, Updater);\ndocument.addEventListener('deviceready', () => {\n const win = window;\n win.cordova = win.cordova || {};\n win.cordova.plugins = win.cordova.plugins || {};\n win.cordova.plugins.Updater = api;\n});\nexport { api as Updater };\n//# sourceMappingURL=plugin.js.map"],"names":[],"mappings":";;;IAAA;IACA;IACA;IACA;IACA;IACO,MAAM,YAAY,GAAG,SAAS;IACrC;IACO,SAAS,2BAA2B,CAAC,MAAM,EAAE;IACpD,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,KAAK,EAAE,EAAE;IACzC,QAAQ,OAAO,IAAI;IACnB,IAAI;IACJ,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;IAC9D,QAAQ,MAAM,MAAM,GAAG,MAAM;IAC7B,QAAQ,IAAI,EAAE,QAAQ,IAAI,MAAM,CAAC,IAAI,EAAE,IAAI,IAAI,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,C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MAAM,EAAE,YAAY;IAChC,gBAAgB,QAAQ,CAAC,mBAAmB,CAAC,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC;IACrF,gBAAgB,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;IAC9D,YAAY,CAAC;IACb,SAAS,CAAC;IACV,IAAI,CAAC;IACL,IAAI,kBAAkB,EAAE,MAAM,IAAI,CAAC,oBAAoB,CAAC;IACxD,CAAC;;IClED;IACA;IACA;IACA;IACA;AAEK,UAAC,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO;IACrC,QAAQ,CAAC,gBAAgB,CAAC,aAAa,EAAE,MAAM;IAC/C,IAAI,MAAM,GAAG,GAAG,MAAM;IACtB,IAAI,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,IAAI,EAAE;IACnC,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE;IACnD,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,GAAG,GAAG;IACrC,CAAC,CAAC;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/exec.js","esm/definitions.js","esm/index.js","esm/plugin.js"],"sourcesContent":["/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nexport const SERVICE_NAME = 'Updater';\n/** Cordova resolves no-arg native success as `''` instead of `null`/`undefined`. */\nexport function normalizeEmptyCordovaResult(result) {\n if (result == null || result === '') {\n return null;\n }\n if (typeof result === 'object' && !Array.isArray(result)) {\n const record = result;\n if (!('bundle' in record) && !('id' in record) && Object.keys(record).length === 0) {\n return null;\n }\n }\n return result;\n}\nexport function exec(action, args = []) {\n return new Promise((resolve, reject) => {\n cordova.exec((result) => resolve(result), (error) => reject(error), SERVICE_NAME, action, args);\n });\n}\n//# sourceMappingURL=exec.js.map","/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\n/**\n * Update availability status.\n *\n * @since 8.0.0\n */\nexport var AppUpdateAvailability;\n(function (AppUpdateAvailability) {\n /**\n * Update availability is unknown.\n * This typically means the check hasn't completed or failed.\n */\n AppUpdateAvailability[AppUpdateAvailability[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n /**\n * No update is available.\n * The installed version is the latest.\n */\n AppUpdateAvailability[AppUpdateAvailability[\"UPDATE_NOT_AVAILABLE\"] = 1] = \"UPDATE_NOT_AVAILABLE\";\n /**\n * An update is available for download.\n */\n AppUpdateAvailability[AppUpdateAvailability[\"UPDATE_AVAILABLE\"] = 2] = \"UPDATE_AVAILABLE\";\n /**\n * An update is currently being downloaded or installed.\n */\n AppUpdateAvailability[AppUpdateAvailability[\"UPDATE_IN_PROGRESS\"] = 3] = \"UPDATE_IN_PROGRESS\";\n})(AppUpdateAvailability || (AppUpdateAvailability = {}));\n/**\n * Installation status for flexible updates (Android only).\n *\n * @since 8.0.0\n */\nexport var FlexibleUpdateInstallStatus;\n(function (FlexibleUpdateInstallStatus) {\n /**\n * Unknown install status.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n /**\n * Download is pending and will start soon.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"PENDING\"] = 1] = \"PENDING\";\n /**\n * Download is in progress.\n * Check `bytesDownloaded` and `totalBytesToDownload` for progress.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"DOWNLOADING\"] = 2] = \"DOWNLOADING\";\n /**\n * The update is being installed.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"INSTALLING\"] = 3] = \"INSTALLING\";\n /**\n * The update has been installed.\n * The app needs to be restarted to use the new version.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"INSTALLED\"] = 4] = \"INSTALLED\";\n /**\n * The update failed to download or install.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"FAILED\"] = 5] = \"FAILED\";\n /**\n * The update was canceled by the user.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"CANCELED\"] = 6] = \"CANCELED\";\n /**\n * The update has been downloaded and is ready to install.\n * Call {@link UpdaterPlugin.completeFlexibleUpdate} to install.\n */\n FlexibleUpdateInstallStatus[FlexibleUpdateInstallStatus[\"DOWNLOADED\"] = 11] = \"DOWNLOADED\";\n})(FlexibleUpdateInstallStatus || (FlexibleUpdateInstallStatus = {}));\n/**\n * Result codes for app update operations.\n *\n * @since 8.0.0\n */\nexport var AppUpdateResultCode;\n(function (AppUpdateResultCode) {\n /**\n * The update completed successfully.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"OK\"] = 0] = \"OK\";\n /**\n * The user canceled the update.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"CANCELED\"] = 1] = \"CANCELED\";\n /**\n * The update failed.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"FAILED\"] = 2] = \"FAILED\";\n /**\n * No update is available.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"NOT_AVAILABLE\"] = 3] = \"NOT_AVAILABLE\";\n /**\n * The requested update type is not allowed.\n * For example, trying to perform an immediate update when only flexible is allowed.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"NOT_ALLOWED\"] = 4] = \"NOT_ALLOWED\";\n /**\n * Required information is missing.\n * This can happen if {@link UpdaterPlugin.getAppUpdateInfo} wasn't called first.\n */\n AppUpdateResultCode[AppUpdateResultCode[\"INFO_MISSING\"] = 5] = \"INFO_MISSING\";\n})(AppUpdateResultCode || (AppUpdateResultCode = {}));\n//# sourceMappingURL=definitions.js.map","import { exec, normalizeEmptyCordovaResult } from './exec';\nexport * from './definitions';\nexport const Updater = {\n notifyAppReady: () => exec('notifyAppReady'),\n setUpdateUrl: (options) => exec('setUpdateUrl', [options !== null && options !== void 0 ? options : {}]),\n setStatsUrl: (options) => exec('setStatsUrl', [options !== null && options !== void 0 ? options : {}]),\n setChannelUrl: (options) => exec('setChannelUrl', [options !== null && options !== void 0 ? options : {}]),\n download: (options) => exec('download', [options !== null && options !== void 0 ? options : {}]),\n next: (options) => exec('next', [options !== null && options !== void 0 ? options : {}]),\n set: (options) => exec('set', [options !== null && options !== void 0 ? options : {}]),\n startPreviewSession: (options) => exec('startPreviewSession', [options !== null && options !== void 0 ? options : {}]),\n listPreviews: () => exec('listPreviews'),\n setPreview: (options) => exec('setPreview', [options !== null && options !== void 0 ? options : {}]),\n resetPreview: () => exec('resetPreview'),\n deletePreview: (options) => exec('deletePreview', [options !== null && options !== void 0 ? options : {}]),\n checkPreviewUpdate: (options) => exec('checkPreviewUpdate', [options !== null && options !== void 0 ? options : {}]),\n updatePreview: (options) => exec('updatePreview', [options !== null && options !== void 0 ? options : {}]),\n delete: (options) => exec('delete', [options !== null && options !== void 0 ? options : {}]),\n setBundleError: (options) => exec('setBundleError', [options !== null && options !== void 0 ? options : {}]),\n list: () => exec('list'),\n reset: (options) => exec('reset', [options !== null && options !== void 0 ? options : {}]),\n current: () => exec('current'),\n reload: () => exec('reload'),\n setMultiDelay: (options) => exec('setMultiDelay', [options !== null && options !== void 0 ? options : {}]),\n cancelDelay: () => exec('cancelDelay'),\n triggerUpdateCheck: () => exec('triggerUpdateCheck'),\n getLatest: (options) => exec('getLatest', [options !== null && options !== void 0 ? options : {}]),\n getMissingBundleFiles: (options) => exec('getMissingBundleFiles', [options !== null && options !== void 0 ? options : {}]),\n getBundleDownloadSize: (options) => exec('getBundleDownloadSize', [options !== null && options !== void 0 ? options : {}]),\n setChannel: (options) => exec('setChannel', [options !== null && options !== void 0 ? options : {}]),\n unsetChannel: (options) => exec('unsetChannel', [options !== null && options !== void 0 ? options : {}]),\n getChannel: () => exec('getChannel'),\n listChannels: (options) => exec('listChannels', [options !== null && options !== void 0 ? options : {}]),\n setCustomId: (options) => exec('setCustomId', [options !== null && options !== void 0 ? options : {}]),\n getBuiltinVersion: () => exec('getBuiltinVersion'),\n getDeviceId: () => exec('getDeviceId'),\n getPluginVersion: () => exec('getPluginVersion'),\n isAutoUpdateEnabled: () => exec('isAutoUpdateEnabled'),\n isAutoUpdateAvailable: () => exec('isAutoUpdateAvailable'),\n getNextBundle: async () => normalizeEmptyCordovaResult(await exec('getNextBundle')),\n getFailedUpdate: async () => normalizeEmptyCordovaResult(await exec('getFailedUpdate')),\n setShakeMenu: (options) => exec('setShakeMenu', [options !== null && options !== void 0 ? options : {}]),\n isShakeMenuEnabled: () => exec('isShakeMenuEnabled'),\n setShakeChannelSelector: (options) => exec('setShakeChannelSelector', [options !== null && options !== void 0 ? options : {}]),\n isShakeChannelSelectorEnabled: () => exec('isShakeChannelSelectorEnabled'),\n getAppId: () => exec('getAppId'),\n setAppId: (options) => exec('setAppId', [options !== null && options !== void 0 ? options : {}]),\n getAppUpdateInfo: () => exec('getAppUpdateInfo'),\n openAppStore: () => exec('openAppStore'),\n performImmediateUpdate: () => exec('performImmediateUpdate'),\n startFlexibleUpdate: () => exec('startFlexibleUpdate'),\n completeFlexibleUpdate: () => exec('completeFlexibleUpdate'),\n reportWebViewError: (options) => exec('reportWebViewError', [options !== null && options !== void 0 ? options : {}]),\n addListener: (eventName, listener) => {\n const listenerId = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 11)}`;\n void exec('addListener', [{ eventName, listenerId }]);\n const handler = (ev) => listener(ev.detail);\n document.addEventListener(`cordova-updater:${eventName}`, handler);\n return Promise.resolve({\n remove: async () => {\n document.removeEventListener(`cordova-updater:${eventName}`, handler);\n await exec('removeListener', [{ listenerId }]);\n },\n });\n },\n removeAllListeners: () => exec('removeAllListeners'),\n};\n//# sourceMappingURL=index.js.map","/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nimport { Updater } from './index';\nconst api = Object.assign({}, Updater);\ndocument.addEventListener('deviceready', () => {\n const win = window;\n win.cordova = win.cordova || {};\n win.cordova.plugins = win.cordova.plugins || {};\n win.cordova.plugins.Updater = api;\n});\nexport { api as Updater };\n//# sourceMappingURL=plugin.js.map"],"names":[],"mappings":";;;IAAA;IACA;IACA;IACA;IACA;IACO,MAAM,YAAY,GAAG,SAAS;IACrC;IACO,SAAS,2BAA2B,CAAC,MAAM,EAAE;IACpD,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,KAAK,EAAE,EAAE;IACzC,QAAQ,OAAO,IAAI;IACnB,IAAI;IACJ,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;IAC9D,QAAQ,MAAM,MAAM,GAAG,MAAM;IAC7B,QAAQ,IAAI,EAAE,QAAQ,IAAI,MAAM,CAAC,IAAI,EAAE,IAAI,IAAI,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;IAC5F,YAAY,OAAO,IAAI;IACvB,QAAQ;IACR,IAAI;IACJ,IAAI,OAAO,MAAM;IACjB;IACO,SAAS,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,EAAE,EAAE;IACxC,IAAI,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK;IAC5C,QAAQ,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,CAAC;IACvG,IAAI,CAAC,CAAC;IACN;;ICvBA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAC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AAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO;IACrC,QAAQ,CAAC,gBAAgB,CAAC,aAAa,EAAE,MAAM;IAC/C,IAAI,MAAM,GAAG,GAAG,MAAM;IACtB,IAAI,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,IAAI,EAAE;IACnC,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE;IACnD,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,GAAG,GAAG;IACrC,CAAC,CAAC;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/cordova-updater",
3
- "version": "8.1.1",
3
+ "version": "8.1.3",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Live update Cordova plugin for Capgo",
6
6
  "main": "dist/plugin.cjs.js",
@@ -68,7 +68,7 @@
68
68
  "changelog:ai": "node scripts/generate-ai-changelog.mjs"
69
69
  },
70
70
  "devDependencies": {
71
- "@ionic/eslint-config": "^0.4.0",
71
+ "@ionic/eslint-config": "^0.5.0",
72
72
  "@ionic/prettier-config": "^4.0.0",
73
73
  "@types/node": "^24.3.0",
74
74
  "commit-and-tag-version": "^13.2.1",
package/plugin.xml CHANGED
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
3
3
  id="@capgo/cordova-updater"
4
- version="8.1.1">
4
+ version="8.1.3">
5
5
 
6
6
  <name>Updater</name>
7
7
  <description>Cordova plugin for Capgo live updates (OTA).</description>
@@ -171,7 +171,7 @@ public class CordovaUpdaterPlugin extends org.apache.cordova.CordovaPlugin imple
171
171
  static final int APPLICATION_EXIT_REASON_USER_REQUESTED = 10;
172
172
  static final int APPLICATION_EXIT_REASON_DEPENDENCY_DIED = 12;
173
173
 
174
- private final String pluginVersion = "8.1.1";
174
+ private final String pluginVersion = "8.1.3";
175
175
  private static final String DELAY_CONDITION_PREFERENCES = "";
176
176
 
177
177
  private SharedPreferences.Editor editor;
@@ -88,7 +88,7 @@ public class CordovaUpdaterPlugin: CDVPlugin, CDVPluginSchemeHandler {
88
88
  }()
89
89
 
90
90
  public var implementation = CapgoUpdater()
91
- private let pluginVersion: String = "8.1.1"
91
+ private let pluginVersion: String = "8.1.3"
92
92
  static let updateUrlDefault = "https://plugin.capgo.app/updates"
93
93
  static let statsUrlDefault = "https://plugin.capgo.app/stats"
94
94
  static let channelUrlDefault = "https://plugin.capgo.app/channel_self"