mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 18:49:43 +08:00
Merge branch 'master' of github.com:ionic-team/ionic-native
This commit is contained in:
commit
ef28078815
@ -1,5 +1,5 @@
|
||||
<a name="4.3.1"></a>
|
||||
## [4.3.1](https://github.com/ionic-team/ionic-native/compare/v4.3.0...v4.3.1) (2017-10-06)
|
||||
## [4.3.2](https://github.com/ionic-team/ionic-native/compare/v4.3.0...v4.3.2) (2017-10-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
@ -11,6 +11,7 @@
|
||||
|
||||
### Features
|
||||
|
||||
* **pro:** Add support for Ionic Pro by incorporating cordova-plugin-ionic ([465d551](https://github.com/ionic-team/ionic-native/commit/465d551))
|
||||
* **regula-document-reader:** separate initialization and scanning, add android ([#2013](https://github.com/ionic-team/ionic-native/issues/2013)) ([2179699](https://github.com/ionic-team/ionic-native/commit/2179699))
|
||||
|
||||
|
||||
@ -1797,13 +1798,13 @@ The whole implementation has changed now. You must update your code.
|
||||
* **geolocation:** call correct clearFunction ([9e86a40](https://github.com/ionic-team/ionic-native/commit/9e86a40))
|
||||
* **plugin:** return originalMethod return value ([240f0f8](https://github.com/ionic-team/ionic-native/commit/240f0f8))
|
||||
* **plugin:** use call for id based clearFunction ([c2fdf39](https://github.com/ionic-team/ionic-native/commit/c2fdf39))
|
||||
* datepicker plugin, pluginref, and [@Cordova](https://github.com/Cordova) wrapper ([499ead3](https://github.com/ionic-team/ionic-native/commit/499ead3))
|
||||
* datepicker plugin, pluginref, and @Cordova wrapper ([499ead3](https://github.com/ionic-team/ionic-native/commit/499ead3))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **DatePicker:** Added DatePicker ([5afa58f](https://github.com/ionic-team/ionic-native/commit/5afa58f))
|
||||
* **plugin:** add sync option to [@Cordova](https://github.com/Cordova) for sync functions ([17e3827](https://github.com/ionic-team/ionic-native/commit/17e3827))
|
||||
* **plugin:** add sync option to @Cordova for sync functions ([17e3827](https://github.com/ionic-team/ionic-native/commit/17e3827))
|
||||
* **plugin:** call clearFunction with original fn args ([8f27fc9](https://github.com/ionic-team/ionic-native/commit/8f27fc9))
|
||||
* add app version plugin ([20cb01f](https://github.com/ionic-team/ionic-native/commit/20cb01f))
|
||||
* add app version plugin ([8b78521](https://github.com/ionic-team/ionic-native/commit/8b78521))
|
||||
|
170
src/@ionic-native/plugins/pro/index.ts
Normal file
170
src/@ionic-native/plugins/pro/index.ts
Normal file
@ -0,0 +1,170 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, CordovaInstance, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* Information about the currently running app
|
||||
*/
|
||||
export interface AppInfo {
|
||||
platform: string;
|
||||
platformVersion: string;
|
||||
version: string;
|
||||
bundleName: string;
|
||||
bundleVersion: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Information about the current live update
|
||||
*/
|
||||
export interface DeployInfo {
|
||||
deploy_uuid: string;
|
||||
channel: string;
|
||||
binary_version: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
export class ProDeploy {
|
||||
|
||||
constructor(private _objectInstance: any) { }
|
||||
|
||||
/**
|
||||
* Re-initialize Deploy plugin with a new App ID and host. Not used in most cases.
|
||||
* @param appId An Ionic Pro app ID
|
||||
* @param host An Ionic Pro live update API
|
||||
*/
|
||||
@CordovaInstance()
|
||||
init(appId: string, host: string): Promise<any> { return; }
|
||||
|
||||
@CordovaInstance()
|
||||
debug(): Promise<any> { return; }
|
||||
|
||||
@CordovaInstance()
|
||||
clearDebug(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Check a channel for an available update
|
||||
* @param appId An Ionic Pro app ID
|
||||
* @param channelName An Ionic Pro channel name
|
||||
*/
|
||||
@CordovaInstance()
|
||||
check(appId: string, channelName: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Download an available version
|
||||
* @param appId An Ionic Pro app ID
|
||||
*/
|
||||
@CordovaInstance()
|
||||
download(appId: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Unzip the latest downloaded version
|
||||
* @param appId An Ionic Pro app ID
|
||||
*/
|
||||
@CordovaInstance()
|
||||
extract(appId: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Reload app with the deployed version
|
||||
* @param appId An Ionic Pro app ID
|
||||
*/
|
||||
@CordovaInstance()
|
||||
redirect(appId: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get info about the version running on the device
|
||||
* @param appId An Ionic Pro app ID
|
||||
*/
|
||||
@CordovaInstance()
|
||||
info(appId: string): Promise<DeployInfo> { return; }
|
||||
|
||||
/**
|
||||
* List versions stored on the device
|
||||
* @param appId An Ionic Pro app ID
|
||||
*/
|
||||
@CordovaInstance()
|
||||
getVersions(appId: string): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Delete a version stored on the device by UUID
|
||||
* @param appId An Ionic Pro app ID
|
||||
* @param version A version UUID
|
||||
*/
|
||||
@CordovaInstance()
|
||||
deleteVersion(appId: string, version: string): Promise<any> { return; }
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Pro
|
||||
* @description
|
||||
* This plugin enables Ionic Pro services like live updates and error monitoring
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Pro, AppInfo, DeployInfo } from '@ionic-native/pro';
|
||||
*
|
||||
*
|
||||
* constructor(private pro: Pro) { }
|
||||
*
|
||||
* // Get app info
|
||||
* this.pro.getAppInfo().then((res: AppInfo) => {
|
||||
* console.log(res)
|
||||
* })
|
||||
*
|
||||
* // Get live update info
|
||||
* this.pro.deploy.info().then((res: DeployInfo) => {
|
||||
* console.log(res)
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Pro',
|
||||
plugin: 'cordova-plugin-ionic',
|
||||
pluginRef: 'IonicCordova',
|
||||
repo: 'https://github.com/ionic-team/cordova-plugin-ionic',
|
||||
platforms: ['Android', 'iOS'],
|
||||
install: 'ionic cordova plugin add cordova-plugin-ionic --save --variable APP_ID="XXXXXXXX" --variable CHANNEL_NAME="Channel"'
|
||||
})
|
||||
@Injectable()
|
||||
export class Pro extends IonicNativePlugin {
|
||||
/**
|
||||
* Ionic Pro Deploy .js API.
|
||||
*/
|
||||
deploy: ProDeploy = new ProDeploy(Pro.getPlugin().deploy);
|
||||
|
||||
/**
|
||||
* Not yet implemented
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
enableCrashLogging(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Not yet implemented
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
checkForPendingCrash(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Not yet implemented
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
loadPendingCrash(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Not yet implemented
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
forceCrash(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Get information about the currently running app
|
||||
* @return {Promise<any>} Returns a promise that resolves with current app info
|
||||
*/
|
||||
@Cordova()
|
||||
getAppInfo(): Promise<AppInfo> { return; }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user