cordova-plugin-liveupdate
Advanced tools
Comparing version 4.1.6 to 5.2.10
Changelog | ||
====== | ||
## 5.2.9 | ||
* Get dataDirectory from getAppInfo function ([#197](https://github.com/ionic-team/cordova-plugin-ionic/pull/197)) | ||
* Add proxy for browser platform to support it ([#199](https://github.com/ionic-team/cordova-plugin-ionic/pull/199)) | ||
## 5.2.8 | ||
* Fix Type Error in IDeployConfig ([#196](https://github.com/ionic-team/cordova-plugin-ionic/pull/196)) | ||
## 5.2.7 | ||
* Change hook to run before_prepare and make it async ([#178](https://github.com/ionic-team/cordova-plugin-ionic/pull/178)) | ||
* Fixed bug where the a new binary update would load an older cached version of the app ([#179)](https://github.com/ionic-team/cordova-plugin-ionic/issues/179)) | ||
## 5.2.6 | ||
* Check for Capacitor and switch folder ([#164](https://github.com/ionic-team/cordova-plugin-ionic/pull/164)) | ||
* Remove unused import ([#163](https://github.com/ionic-team/cordova-plugin-ionic/pull/163)) | ||
* Delay device ready until pro checks are done ([#161](https://github.com/ionic-team/cordova-plugin-ionic/pull/161)) | ||
## 5.2.5 | ||
* Fix bug where binaryVersionName and binaryVersionCode are not returned from getConfiguation call | ||
* Fix bug where downloadUpdate progress call back would go from 0 to 50 rather than 100 ([#156](https://github.com/ionic-team/cordova-plugin-ionic/pull/156])) | ||
* Check if the device is online before checking for updates ([#154](https://github.com/ionic-team/cordova-plugin-ionic/pull/154)) | ||
## 5.2.4 | ||
* update check device resp to be accurate ([#148](https://github.com/ionic-team/cordova-plugin-ionic/pull/148)) | ||
## 5.2.3 | ||
* Fixed bug with AndroidManifest.xml syntax for real since our release script kept breaking it | ||
## 5.2.2 | ||
* Fixed bug with AndroidManifest.xml syntax | ||
## 5.2.1 | ||
* Add ACCESS_NETWORK_STATE permission to make navigator.onLine work on android | ||
## 5.2.0 | ||
* Added `DisableDeploy` Cordova preference allowing disabling of the plugin | ||
* Requires `cordova-plugin-ionic-webview@^2.1.4` for `DisableDeploy` support to work correctly | ||
## 5.1.6 | ||
* Fixed a bug with none update method strategy that could cause background updates upon resume of the app from background | ||
## 5.0.6 | ||
* Fixed a bug with version rebulds that could make some initial redirects take up to 15 seconds. | ||
## 5.0.5 | ||
* Rebuild a deploy directory in the case where the binary version has changed since the update was downloaded. | ||
# 5.0.0 | ||
* Release! | ||
* Misc. bugfixes from rc3 | ||
## 5.0.0-rc.3 | ||
* Improved dev tools | ||
## 5.0.0-rc.2 | ||
* Disable certain features if browser `fetch` is unavailable | ||
* Update some API methods for coherent returns | ||
## 5.0.0-rc.1 | ||
* Removed the switch statement in Android Native code to support older Java platforms | ||
## 5.0.0-rc.0 | ||
* Removed the deprecated API, to be added to version 4.2.0 | ||
## 5.0.0-alpha.0 | ||
* Rewrote the plugin in Typescript. | ||
* Added support for application file manifests. | ||
* Added full support for partial update downloads, greatly decreasing network bandwidth. | ||
* **Deprecated old plugin API** in favor of modern promise-based API using async/await. Existing methods are still available, but may be removed in the future. | ||
## 4.1.7 | ||
* Fix a redirect bug in iOS that would give the `background` update method inconsistent behavior | ||
## 4.1.6 | ||
@@ -5,0 +90,0 @@ |
{ | ||
"name": "cordova-plugin-liveupdate", | ||
"version": "4.1.6", | ||
"version": "5.2.10", | ||
"cordova": { | ||
@@ -11,13 +11,44 @@ "id": "cordova-plugin-liveupdate", | ||
}, | ||
"types": "types/IonicCordova.d.ts", | ||
"description": "Ionic Cordova Live Update SDK", | ||
"engines": { | ||
"cordovaDependencies": { | ||
"4.1.6": { "cordova-plugin-splashscreen": ">=5.0.1" } | ||
">5.0.0": { | ||
"cordova-plugin-splashscreen": ">=5.0.1", | ||
"cordova-plugin-file": ">=6.0.1", | ||
"cordova-plugin-webview": ">=2.1.0", | ||
"cordova-plugin-zip": ">=3.1.0" | ||
}, | ||
"4.1.7": { | ||
"cordova-plugin-splashscreen": ">=5.0.1" | ||
}, | ||
"3.1.3": { | ||
"cordova-plugin-splashscreen": ">=5.0.1" | ||
}, | ||
"2.0.4": { | ||
"cordova-plugin-splashscreen": ">=4.0.0" | ||
} | ||
} | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git@fieldflex.git.beanstalkapp.com:/fieldflex/forks-cordova-plugin-ionic.git" | ||
"scripts": { | ||
"apply-dev": "npm run build && ./apply-changes.sh", | ||
"create-dev": "./create-local-app.sh", | ||
"clean": "rimraf dist", | ||
"lint": "tslint --config tslint.json --project tsconfig.json", | ||
"precommit": "npm run lint", | ||
"watch": "tsc -w", | ||
"watch-dev": "watch 'npm run apply-dev' ./www", | ||
"build": "npm run clean && tsc", | ||
"sync-plugin-xml": "sync-cordova-xml2 package.json plugin.xml --output=plugin.xml", | ||
"version": "npm run sync-plugin-xml && git add plugin.xml && ./update-plugin-version-code.sh", | ||
"prepublishOnly": "npm run build", | ||
"test": "echo 'We should really get unit tests running'", | ||
"release": "npm run build && np", | ||
"docs": "./scripts/docs.sh" | ||
}, | ||
"repository": "https://github.com/ionic-team/cordova-plugin-ionic.git", | ||
"issue": "https://github.com/ionic-team/cordova-plugin-ionic/issues", | ||
"bugs": { | ||
"url": "https://github.com/ionic-team/cordova-plugin-ionic/issues" | ||
}, | ||
"keywords": [ | ||
@@ -32,14 +63,53 @@ "ionic", | ||
"cordova-android", | ||
"cordova-ios", | ||
"fieldflex", | ||
"eleven" | ||
"cordova-ios" | ||
], | ||
"dependencies": { | ||
"@types/cordova-plugin-file-transfer": "^1.6.2", | ||
"mkpath": ">=1.0.0", | ||
"xml2js": ">=0.4", | ||
"node-version-compare": ">=1.0.1", | ||
"plist": ">=1.2.0" | ||
"plist": ">=1.2.0", | ||
"xml2js": ">=0.4" | ||
}, | ||
"author": "FieldFLEX Team", | ||
"license": "UNLICENSED" | ||
"author": "Ionic", | ||
"contributors": [ | ||
{ | ||
"name": "Max Lynch", | ||
"email": "max@ionic.io" | ||
}, | ||
{ | ||
"name": "William Pelrine", | ||
"email": "rudy@ionic.io" | ||
} | ||
], | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/cordova": "0.0.34", | ||
"cordova-plugin-file": "^6.0.1", | ||
"jest": "^22.4.3", | ||
"np": "^3.0.4", | ||
"rimraf": "^2.6.2", | ||
"sync-cordova-xml2": "0.0.2", | ||
"ts-jest": "^22.4.2", | ||
"tslint": "^5.9.1", | ||
"tslint-ionic-rules": "0.0.14", | ||
"typedoc": "^0.11.1", | ||
"typedoc-plugin-markdown": "^1.1.6", | ||
"typescript": "^2.6.2", | ||
"watch": "^1.0.2" | ||
}, | ||
"jest": { | ||
"globals": { | ||
"ts-jest": { | ||
"tsConfigFile": "tsconfig.json" | ||
} | ||
}, | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"js" | ||
], | ||
"transform": { | ||
".(ts)": "./node_modules/ts-jest/preprocessor.js" | ||
}, | ||
"testRegex": "tests/.*\\.(ts|js)$" | ||
} | ||
} |
112
README.md
@@ -1,17 +0,10 @@ | ||
cordova-plugin-liveupdate | ||
Ionic Cordova SDK | ||
====== | ||
A fork of cordova-plugin-ionic(original repo: https://github.com/ionic-team/cordova-plugin-ionic). | ||
(※ cordova-plugin-ionic has been built for a legacy function of ionic cloud in the past, and it is being used for a new features of Ionic Pro with auto-testing/deployment, etc ) | ||
Now we use it in the `UpdateManager` of FieldFLEX 11, and it uses minimum features of the plugin: 3 methods (initialize, download, install and restart). | ||
Supported platforms: iOS, Android | ||
## Setup | ||
## Installation | ||
```bash | ||
cordova plugin add cordova-plugin-liveupdate | ||
cordova plugin add cordova-plugin-ionic --save --variable APP_ID="abcd1234" --variable CHANNEL_NAME="Master" --variable UPDATE_METHOD="background" | ||
``` | ||
@@ -21,74 +14,61 @@ | ||
## How To Use | ||
## Live Updates | ||
### Before you proceed | ||
### Cordova Install Variables | ||
A new updates should be exist in the *HOST_URL*(ex: https://sever-url/updates.ffx), it should be named to `www.zip`, so that you should be available to download `www.zip` file when you link *HOST_URL*. | ||
* `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)** | ||
> How to generate `www.zip`? Compress `www` directory (`build files`) from the latest codebase, can use any `Zip tools`. | ||
### Preferences | ||
* `DisableDeploy` - Default value is `false`. | ||
### Cordova API | ||
Allows to disable deploy updates by adding this preference in the config.xml | ||
``` | ||
<preference name="DisableDeploy" value="true" /> | ||
``` | ||
| API | DESCRIPTION | | ||
| ------ | ------ | | ||
| `IonicCordova.deploy.init(config, success, failure)` | **Required** - Initializes the plugin with an app ID and API host specified in js-land. Can be used to change these variables at runtime. | | ||
| `IonicCordova.deploy.check(success, failure)` | - Check for updates from a specified channel, will change the saved channel from the install step. | | ||
| `IonicCordova.deploy.download(success, failure)` | - If an update is present, download it. | | ||
| `IonicCordova.deploy.extract(success, failure)` | - If an update has been downloaded, extract it and set the default redirect location for next app start. | | ||
| `IonicCordova.deploy.redirect(success, failure)` | - Redirect to the latest version of the app on this device. | | ||
| `IonicCordova.deploy.info(success, failure)` | **Archived** - (*ignore it for now.*) Get info on current version for this device. | | ||
| `IonicCordova.deploy.getVersions(success, failure)` | **Archived** (*ignore it for now.*) - List downloaded versions on this device. | | ||
| `IonicCordova.deploy.deleteVersion(uuid, success, failure)` | **Archived** (*ignore it for now.*) - Delete a downloaded version by UUID from this device. | | ||
## API Docs | ||
* [IonicCordova](docs/interfaces/_ioniccordova_d_.ipluginbaseapi.md) | ||
* [IonicCordova.deploy](docs/interfaces/_ioniccordova_d_.ideploypluginapi.md) | ||
## Sample | ||
- initialize(): | ||
### External modules | ||
``` | ||
const deployConf = { | ||
appId: 'fieldflex-eleven', | ||
host: `${FieldFLEX.serverUrl}/updates.ffx` | ||
}; | ||
const deploy = window.IonicCordova.deploy; | ||
if (deploy) { | ||
deploy.init(deployConf, callback, error); | ||
} | ||
... | ||
``` | ||
--- | ||
- download(): | ||
``` | ||
const deploy = window.IonicCordova.deploy; | ||
if (deploy) { | ||
deploy.download(callback, error); | ||
} | ||
... | ||
## Contributing to this plugin | ||
``` | ||
```bash | ||
npm install | ||
npm run create-dev | ||
``` | ||
- extract(): | ||
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. | ||
``` | ||
const deploy = window.IonicCordova.deploy; | ||
if (deploy) { | ||
deploy.extract(callback, error); | ||
} | ||
... | ||
``` | ||
- redirect(): | ||
### Some other helpful dev commands | ||
``` | ||
const deploy = window.IonicCordova.deploy; | ||
if (deploy) { | ||
deploy.redirect(callback, error); | ||
} | ||
... | ||
``` | ||
```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. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
Explicitly Unlicensed Item
License(Experimental) Something was found which is explicitly marked as unlicensed.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
0
0
100
1564
1
106821
5
13
14
74
1
4
+ Added@types/cordova-plugin-file-transfer@1.6.5(transitive)
+ Addedcordova-plugin-file-transfer@2.0.0(transitive)