cordova-plugin-ionic
Advanced tools
Comparing version 5.4.7 to 5.4.8-0
Changelog | ||
====== | ||
## 5.4.7 | ||
* fix(ng): Angular Ivy support ([#236](https://github.com/ionic-team/cordova-plugin-ionic/pull/236)) | ||
## 5.4.6 | ||
@@ -4,0 +7,0 @@ * fix(ios): create intermediate directories for downloads ([#231](https://github.com/ionic-team/cordova-plugin-ionic/pull/231)) |
@@ -85,3 +85,3 @@ "use strict"; | ||
this.MANIFEST_FILE = 'pro-manifest.json'; | ||
this.PLUGIN_VERSION = '5.4.7'; | ||
this.PLUGIN_VERSION = '5.4.8-0'; | ||
this.appInfo = appInfo; | ||
@@ -261,3 +261,3 @@ this._savedPreferences = preferences; | ||
case 3: | ||
if (!resp.ok) return [3 /*break*/, 6]; | ||
if (!resp.ok) return [3 /*break*/, 8]; | ||
checkForUpdateResp = jsonResp.data; | ||
@@ -278,15 +278,21 @@ if (!(checkForUpdateResp.available && checkForUpdateResp.url && checkForUpdateResp.snapshot && checkForUpdateResp.build)) return [3 /*break*/, 5]; | ||
_d.sent(); | ||
_d.label = 5; | ||
case 5: return [2 /*return*/, checkForUpdateResp]; | ||
return [3 /*break*/, 7]; | ||
case 5: | ||
delete prefs.availableUpdate; | ||
return [4 /*yield*/, this._savePrefs(prefs)]; | ||
case 6: | ||
_d.sent(); | ||
_d.label = 7; | ||
case 7: return [2 /*return*/, checkForUpdateResp]; | ||
case 8: | ||
_a = Error.bind; | ||
_b = "Error Status " + resp.status + ": "; | ||
if (!jsonResp) return [3 /*break*/, 7]; | ||
if (!jsonResp) return [3 /*break*/, 9]; | ||
_c = jsonResp.error.message; | ||
return [3 /*break*/, 9]; | ||
case 7: return [4 /*yield*/, resp.text()]; | ||
case 8: | ||
return [3 /*break*/, 11]; | ||
case 9: return [4 /*yield*/, resp.text()]; | ||
case 10: | ||
_c = _d.sent(); | ||
_d.label = 9; | ||
case 9: throw new (_a.apply(Error, [void 0, _b + (_c)]))(); | ||
_d.label = 11; | ||
case 11: throw new (_a.apply(Error, [void 0, _b + (_c)]))(); | ||
} | ||
@@ -491,5 +497,7 @@ }); | ||
switch (_a.label) { | ||
case 0: | ||
case 0: return [4 /*yield*/, this.checkForUpdate()]; | ||
case 1: | ||
_a.sent(); | ||
prefs = this._savedPreferences; | ||
if (!(prefs.availableUpdate && prefs.availableUpdate.state === UpdateState.Ready)) return [3 /*break*/, 2]; | ||
if (!(prefs.availableUpdate && prefs.availableUpdate.state === UpdateState.Ready)) return [3 /*break*/, 3]; | ||
prefs.currentVersionId = prefs.availableUpdate.versionId; | ||
@@ -499,13 +507,13 @@ prefs.currentBuildId = prefs.availableUpdate.buildId; | ||
return [4 /*yield*/, this._savePrefs(prefs)]; | ||
case 1: | ||
case 2: | ||
_a.sent(); | ||
_a.label = 2; | ||
case 2: | ||
if (!prefs.currentVersionId) return [3 /*break*/, 7]; | ||
_a.label = 3; | ||
case 3: | ||
if (!prefs.currentVersionId) return [3 /*break*/, 8]; | ||
return [4 /*yield*/, this._isRunningVersion(prefs.currentVersionId)]; | ||
case 3: | ||
if (!_a.sent()) return [3 /*break*/, 6]; | ||
case 4: | ||
if (!_a.sent()) return [3 /*break*/, 7]; | ||
console.log("Already running version " + prefs.currentVersionId); | ||
return [4 /*yield*/, this._savePrefs(prefs)]; | ||
case 4: | ||
case 5: | ||
_a.sent(); | ||
@@ -515,6 +523,6 @@ channel.onIonicProReady.fire(); | ||
return [4 /*yield*/, this.cleanupVersions()]; | ||
case 5: | ||
case 6: | ||
_a.sent(); | ||
return [2 /*return*/, false]; | ||
case 6: | ||
case 7: | ||
// Is the current version on the device? | ||
@@ -529,3 +537,3 @@ if (!(prefs.currentVersionId in prefs.updates)) { | ||
return [2 /*return*/, true]; | ||
case 7: | ||
case 8: | ||
channel.onIonicProReady.fire(); | ||
@@ -532,0 +540,0 @@ return [2 /*return*/, false]; |
{ | ||
"name": "cordova-plugin-ionic", | ||
"version": "5.4.7", | ||
"version": "5.4.8-0", | ||
"cordova": { | ||
@@ -90,4 +90,4 @@ "id": "cordova-plugin-ionic", | ||
"dependencies": { | ||
"typescript": "^3.5.3" | ||
"typescript": "3.8.3" | ||
} | ||
} |
@@ -1,75 +0,10 @@ | ||
Ionic Cordova SDK | ||
Ionic Live Update SDK | ||
====== | ||
Supported platforms: iOS, Android | ||
## Documentation | ||
## Setup | ||
Documentation can be found [here](https://ionicframework.com/docs/appflow/deploy/intro) | ||
```bash | ||
cordova plugin add cordova-plugin-ionic --save --variable APP_ID="abcd1234" --variable CHANNEL_NAME="Master" --variable UPDATE_METHOD="background" | ||
``` | ||
## Support | ||
The plugin will be available on `window` as `IonicCordova` | ||
**NOTE**: The plugin delays the cordova ready event until it finish checking for updates and add this preference to the app `<preference name="AutoHideSplashScreen" value="false"/>`, which makes the Splash Screen to not go away automatically. All Ionic templates run `this.splashScreen.hide();` on cordova ready event, but if it was removed it should be added back. Alternatively the app can add `<preference name="AutoHideSplashScreen" value="true"/>` to override the value added by the plugin, but that can lead to the Splash Screen going away before the download is complete. | ||
## Live Updates | ||
### Cordova Install Variables | ||
* `APP_ID` **Required** - Your Ionic Pro app ID | ||
* `CHANNEL_NAME` **Required** - The channel to check for updates from | ||
* `UPDATE_API` - The location of the Ionic Pro API (only change this for development) | ||
* `UPDATE_METHOD` - `auto`, `background`, or `none`. Dictates the behavior of the plugin. `auto` will download and apply the latest update on app start, potentially leading to long splash screen loads if the connection is slow. `background` will only download the update in the background on app start, but will allow full functionality while doing so, only redirecting users the _next_ time the app is loaded. `none` will do nothing, leaving full plugin functionality in the hands of the developer. **Default is `background`** | ||
* `MAX_STORE` - The maximum number of downloaded versions to store on the device for quick loading. More versions means less downloading, but can increase the app size greatly. **Default is 3 (Defaults is 2 in V5)** | ||
* `MIN_BACKGROUND_DURATION` - The minimum duration in seconds after which the app in background checks for an update. **Default is 30 (New in V5)** | ||
### Preferences | ||
* `DisableDeploy` - Default value is `false`. | ||
Allows to disable deploy updates by adding this preference in the config.xml | ||
``` | ||
<preference name="DisableDeploy" value="true" /> | ||
``` | ||
## API Docs | ||
* [IonicCordova](docs/interfaces/ipluginbaseapi.md) | ||
* [IonicCordova.deploy](docs/interfaces/ideploypluginapi.md) | ||
### External modules | ||
--- | ||
## Contributing to this plugin | ||
```bash | ||
npm install | ||
npm run create-dev | ||
``` | ||
This will create a blank Ionic app in a local `tmp` directory with the plugin and dependencies installed, and the iOS platform added. Native plugin code is installed with `--link` and any changes to the typescript in `www` will be copied over into the app's `platforms/ios` and `platforms/android` directories. | ||
### Some other helpful dev commands | ||
```bash | ||
npm run apply-dev | ||
``` | ||
Updates the linked plugin in the `tmp` test app with your JavaScript changes | ||
```bash | ||
npm run watch | ||
``` | ||
Watches for Typescript changes | ||
```bash | ||
npm run watch-dev | ||
``` | ||
Watches for Typescript changes, then runs the `apply-dev` script to propogate them to the testing app. | ||
If you need support please use our [customer support portal](https://ionic.zendesk.com/hc/en-us). |
@@ -73,3 +73,3 @@ /// <reference types="cordova" /> | ||
private MANIFEST_FILE = 'pro-manifest.json'; | ||
public PLUGIN_VERSION = '5.4.7'; | ||
public PLUGIN_VERSION = '5.4.8-0'; | ||
@@ -216,2 +216,5 @@ constructor(appInfo: IAppInfo, preferences: ISavedPreferences) { | ||
await this._savePrefs(prefs); | ||
} else { | ||
delete prefs.availableUpdate; | ||
await this._savePrefs(prefs); | ||
} | ||
@@ -331,2 +334,5 @@ return checkForUpdateResp; | ||
async reloadApp(): Promise<boolean> { | ||
await this.checkForUpdate(); | ||
const prefs = this._savedPreferences; | ||
@@ -344,2 +350,3 @@ | ||
if (prefs.currentVersionId) { | ||
// Are we already running the deployed version? | ||
@@ -346,0 +353,0 @@ if (await this._isRunningVersion(prefs.currentVersionId)) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
3719
5
201752
2
11
+ Addedtypescript@3.8.3(transitive)
- Removedtypescript@3.9.10(transitive)
Updatedtypescript@3.8.3