chore(package): bump dependencies and lint rules

This commit is contained in:
Daniel
2018-03-16 22:04:01 +01:00
parent 7547a94c80
commit 21ad4734fa
178 changed files with 10565 additions and 4194 deletions
+160 -97
View File
@@ -1,5 +1,10 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
import {
Cordova,
CordovaCheck,
IonicNativePlugin,
Plugin
} from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
declare const cordova: any;
@@ -29,7 +34,11 @@ export interface Beacon {
* ProximityFar
* ProximityUnknown
*/
proximity: 'ProximityImmediate' | 'ProximityNear' | 'ProximityFar' | 'ProximityUnknown';
proximity:
| 'ProximityImmediate'
| 'ProximityNear'
| 'ProximityFar'
| 'ProximityUnknown';
/**
* Transmission Power of the beacon. A constant emitted by the beacon which indicates what's the expected RSSI at a distance of 1 meter to the beacon.
@@ -46,7 +55,6 @@ export interface Beacon {
* The accuracy of the ranging.
*/
accuracy: number;
}
export interface BeaconRegion {
@@ -104,7 +112,6 @@ export interface CircularRegion {
export type Region = BeaconRegion | CircularRegion;
export interface IBeaconPluginResult {
/**
* The name of the delegate function that produced the PluginResult object.
*/
@@ -287,7 +294,6 @@ export interface IBeaconDelegate {
})
@Injectable()
export class IBeacon extends IonicNativePlugin {
/**
* Instances of this class are delegates between the {@link LocationManager} and
* the code that consumes the messages generated on in the native layer.
@@ -298,85 +304,79 @@ export class IBeacon extends IonicNativePlugin {
Delegate(): IBeaconDelegate {
let delegate = new cordova.plugins.locationManager.Delegate();
delegate.didChangeAuthorizationStatus = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>(
(observer: any) => {
let cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.didChangeAuthorizationStatus = cb;
}
);
delegate.didChangeAuthorizationStatus = (
pluginResult?: IBeaconPluginResult
) => {
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.didChangeAuthorizationStatus = cb);
});
};
delegate.didDetermineStateForRegion = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>(
(observer: any) => {
let cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.didDetermineStateForRegion = cb;
}
);
delegate.didDetermineStateForRegion = (
pluginResult?: IBeaconPluginResult
) => {
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.didDetermineStateForRegion = cb);
});
};
delegate.didEnterRegion = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>(
(observer: any) => {
let cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.didEnterRegion = cb;
}
);
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.didEnterRegion = cb);
});
};
delegate.didExitRegion = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>(
(observer: any) => {
let cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.didExitRegion = cb;
}
);
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.didExitRegion = cb);
});
};
delegate.didRangeBeaconsInRegion = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>(
(observer: any) => {
let cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.didRangeBeaconsInRegion = cb;
}
);
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.didRangeBeaconsInRegion = cb);
});
};
delegate.didStartMonitoringForRegion = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>(
(observer: any) => {
let cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.didStartMonitoringForRegion = cb;
}
);
delegate.didStartMonitoringForRegion = (
pluginResult?: IBeaconPluginResult
) => {
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.didStartMonitoringForRegion = cb);
});
};
delegate.monitoringDidFailForRegionWithError = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>(
(observer: any) => {
let cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.monitoringDidFailForRegionWithError = cb;
}
);
delegate.monitoringDidFailForRegionWithError = (
pluginResult?: IBeaconPluginResult
) => {
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.monitoringDidFailForRegionWithError = cb);
});
};
delegate.peripheralManagerDidStartAdvertising = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>(
(observer: any) => {
let cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.peripheralManagerDidStartAdvertising = cb;
}
);
delegate.peripheralManagerDidStartAdvertising = (
pluginResult?: IBeaconPluginResult
) => {
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.peripheralManagerDidStartAdvertising = cb);
});
};
delegate.peripheralManagerDidUpdateState = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>(
(observer: any) => {
let cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.peripheralManagerDidUpdateState = cb;
}
);
delegate.peripheralManagerDidUpdateState = (
pluginResult?: IBeaconPluginResult
) => {
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.peripheralManagerDidUpdateState = cb);
});
};
cordova.plugins.locationManager.setDelegate(delegate);
@@ -396,15 +396,29 @@ export class IBeacon extends IonicNativePlugin {
* @returns {BeaconRegion} Returns the BeaconRegion that was created
*/
@CordovaCheck({ sync: true })
BeaconRegion(identifer: string, uuid: string, major?: number, minor?: number, notifyEntryStateOnDisplay?: boolean): BeaconRegion {
return new cordova.plugins.locationManager.BeaconRegion(identifer, uuid, major, minor, notifyEntryStateOnDisplay);
BeaconRegion(
identifer: string,
uuid: string,
major?: number,
minor?: number,
notifyEntryStateOnDisplay?: boolean
): BeaconRegion {
return new cordova.plugins.locationManager.BeaconRegion(
identifer,
uuid,
major,
minor,
notifyEntryStateOnDisplay
);
}
/**
* @returns {IBeaconDelegate} Returns the IBeaconDelegate
*/
@Cordova()
getDelegate(): IBeaconDelegate { return; }
getDelegate(): IBeaconDelegate {
return;
}
/**
* @param {IBeaconDelegate} delegate An instance of a delegate to register with the native layer.
@@ -412,7 +426,9 @@ export class IBeacon extends IonicNativePlugin {
* @returns {IBeaconDelegate} Returns the IBeaconDelegate
*/
@Cordova()
setDelegate(delegate: IBeaconDelegate): IBeaconDelegate { return; }
setDelegate(delegate: IBeaconDelegate): IBeaconDelegate {
return;
}
/**
* Signals the native layer that the client side is ready to consume messages.
@@ -435,7 +451,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the request and started to send events.
*/
@Cordova({ otherPromise: true })
onDomDelegateReady(): Promise<void> { return; }
onDomDelegateReady(): Promise<void> {
return;
}
/**
* Determines if bluetooth is switched on, according to the native layer.
@@ -443,7 +461,9 @@ export class IBeacon extends IonicNativePlugin {
* indicating whether bluetooth is active.
*/
@Cordova({ otherPromise: true })
isBluetoothEnabled(): Promise<boolean> { return; }
isBluetoothEnabled(): Promise<boolean> {
return;
}
/**
* Enables Bluetooth using the native Layer. (ANDROID ONLY)
@@ -452,7 +472,9 @@ export class IBeacon extends IonicNativePlugin {
* could be enabled. If not, the promise will be rejected with an error.
*/
@Cordova({ otherPromise: true })
enableBluetooth(): Promise<void> { return; }
enableBluetooth(): Promise<void> {
return;
}
/**
* Disables Bluetooth using the native Layer. (ANDROID ONLY)
@@ -461,7 +483,9 @@ export class IBeacon extends IonicNativePlugin {
* could be enabled. If not, the promise will be rejected with an error.
*/
@Cordova({ otherPromise: true })
disableBluetooth(): Promise<void> { return; }
disableBluetooth(): Promise<void> {
return;
}
/**
* Start monitoring the specified region.
@@ -481,7 +505,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the monitoring request.
*/
@Cordova({ otherPromise: true })
startMonitoringForRegion(region: BeaconRegion): Promise<string> { return; }
startMonitoringForRegion(region: BeaconRegion): Promise<string> {
return;
}
/**
* Stop monitoring the specified region. It is valid to call
@@ -498,7 +524,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the request to stop monitoring.
*/
@Cordova({ otherPromise: true })
stopMonitoringForRegion(region: BeaconRegion): Promise<void> { return; }
stopMonitoringForRegion(region: BeaconRegion): Promise<void> {
return;
}
/**
* Request state the for specified region. When result is ready
@@ -514,8 +542,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the request to stop monitoring.
*/
@Cordova({ otherPromise: true })
requestStateForRegion(region: Region): Promise<void> { return; }
requestStateForRegion(region: Region): Promise<void> {
return;
}
/**
* Start ranging the specified beacon region.
@@ -532,7 +561,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the monitoring request.
*/
@Cordova({ otherPromise: true })
startRangingBeaconsInRegion(region: BeaconRegion): Promise<void> { return; }
startRangingBeaconsInRegion(region: BeaconRegion): Promise<void> {
return;
}
/**
* Stop ranging the specified region. It is valid to call
@@ -549,7 +580,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the request to stop monitoring.
*/
@Cordova({ otherPromise: true })
stopRangingBeaconsInRegion(region: BeaconRegion): Promise<void> { return; }
stopRangingBeaconsInRegion(region: BeaconRegion): Promise<void> {
return;
}
/**
* Queries the native layer to determine the current authorization in effect.
@@ -558,7 +591,9 @@ export class IBeacon extends IonicNativePlugin {
* requested authorization status.
*/
@Cordova({ otherPromise: true })
getAuthorizationStatus(): Promise<IBeaconPluginResult> { return; }
getAuthorizationStatus(): Promise<IBeaconPluginResult> {
return;
}
/**
* For iOS 8 and above only. The permission model has changed by Apple in iOS 8, making it necessary for apps to
@@ -570,8 +605,9 @@ export class IBeacon extends IonicNativePlugin {
* @returns {Promise<void>} Returns a promise that is resolved when the request dialog is shown.
*/
@Cordova({ otherPromise: true })
requestWhenInUseAuthorization(): Promise<void> { return; }
requestWhenInUseAuthorization(): Promise<void> {
return;
}
/**
* See the documentation of {@code requestWhenInUseAuthorization} for further details.
@@ -580,7 +616,9 @@ export class IBeacon extends IonicNativePlugin {
* shows the request dialog.
*/
@Cordova({ otherPromise: true })
requestAlwaysAuthorization(): Promise<void> { return; }
requestAlwaysAuthorization(): Promise<void> {
return;
}
/**
*
@@ -588,7 +626,9 @@ export class IBeacon extends IonicNativePlugin {
* of {Region} instances that are being monitored by the native layer.
*/
@Cordova({ otherPromise: true })
getMonitoredRegions(): Promise<Region[]> { return; }
getMonitoredRegions(): Promise<Region[]> {
return;
}
/**
*
@@ -596,7 +636,9 @@ export class IBeacon extends IonicNativePlugin {
* of {Region} instances that are being ranged by the native layer.
*/
@Cordova({ otherPromise: true })
getRangedRegions(): Promise<Region[]> { return; }
getRangedRegions(): Promise<Region[]> {
return;
}
/**
* Determines if ranging is available or not, according to the native layer.
@@ -604,7 +646,9 @@ export class IBeacon extends IonicNativePlugin {
* indicating whether ranging is available or not.
*/
@Cordova({ otherPromise: true })
isRangingAvailable(): Promise<boolean> { return; }
isRangingAvailable(): Promise<boolean> {
return;
}
/**
* Determines if region type is supported or not, according to the native layer.
@@ -616,7 +660,9 @@ export class IBeacon extends IonicNativePlugin {
* indicating whether the region type is supported or not.
*/
@Cordova({ otherPromise: true })
isMonitoringAvailableForClass(region: Region): Promise<boolean> { return; }
isMonitoringAvailableForClass(region: Region): Promise<boolean> {
return;
}
/**
* Start advertising the specified region.
@@ -636,7 +682,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the advertising request.
*/
@Cordova({ otherPromise: true })
startAdvertising(region: Region, measuredPower?: number): Promise<void> { return; }
startAdvertising(region: Region, measuredPower?: number): Promise<void> {
return;
}
/**
* Stop advertising as a beacon.
@@ -647,7 +695,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the request to stop advertising.
*/
@Cordova({ otherPromise: true })
stopAdvertising(region: Region): Promise<void> { return; }
stopAdvertising(region: Region): Promise<void> {
return;
}
/**
* Determines if advertising is available or not, according to the native layer.
@@ -655,7 +705,9 @@ export class IBeacon extends IonicNativePlugin {
* indicating whether advertising is available or not.
*/
@Cordova({ otherPromise: true })
isAdvertisingAvailable(): Promise<boolean> { return; }
isAdvertisingAvailable(): Promise<boolean> {
return;
}
/**
* Determines if advertising is currently active, according to the native layer.
@@ -663,7 +715,9 @@ export class IBeacon extends IonicNativePlugin {
* indicating whether advertising is active.
*/
@Cordova({ otherPromise: true })
isAdvertising(): Promise<boolean> { return; }
isAdvertising(): Promise<boolean> {
return;
}
/**
* Disables debug logging in the native layer. Use this method if you want
@@ -673,7 +727,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer has set the logging level accordingly.
*/
@Cordova({ otherPromise: true })
disableDebugLogs(): Promise<void> { return; }
disableDebugLogs(): Promise<void> {
return;
}
/**
* Enables the posting of debug notifications in the native layer. Use this method if you want
@@ -684,7 +740,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer has set the flag to enabled.
*/
@Cordova({ otherPromise: true })
enableDebugNotifications(): Promise<void> { return; }
enableDebugNotifications(): Promise<void> {
return;
}
/**
* Disables the posting of debug notifications in the native layer. Use this method if you want
@@ -694,7 +752,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer has set the flag to disabled.
*/
@Cordova({ otherPromise: true })
disableDebugNotifications(): Promise<void> { return; }
disableDebugNotifications(): Promise<void> {
return;
}
/**
* Enables debug logging in the native layer. Use this method if you want
@@ -704,7 +764,9 @@ export class IBeacon extends IonicNativePlugin {
* native layer has set the logging level accordingly.
*/
@Cordova({ otherPromise: true })
enableDebugLogs(): Promise<void> { return; }
enableDebugLogs(): Promise<void> {
return;
}
/**
* Appends the provided [message] to the device logs.
@@ -717,6 +779,7 @@ export class IBeacon extends IonicNativePlugin {
* is expected to be equivalent to the one provided in the original call.
*/
@Cordova({ otherPromise: true })
appendToDeviceLog(message: string): Promise<void> { return; }
appendToDeviceLog(message: string): Promise<void> {
return;
}
}