Revert "chore(package): bump dependencies and lint rules"

This reverts commit 21ad4734fa.
This commit is contained in:
Daniel
2018-03-16 22:04:01 +01:00
parent 21ad4734fa
commit 6c938bfdb7
178 changed files with 4221 additions and 10592 deletions
+22 -82
View File
@@ -1,18 +1,9 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
namespace Http {
export const enum Verb {
GET,
HEAD,
POST,
PUT,
DELETE,
TRACE,
OPTIONS,
CONNECT,
PATCH
GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT, PATCH
}
export interface Response {
@@ -22,12 +13,7 @@ namespace Http {
export interface Requester {
request(verb: Verb, url: string, callback: Callback<Response>): void;
request(
verb: Verb,
url: string,
requestBody: string,
callback: Callback<Response>
): void;
request(verb: Verb, url: string, requestBody: string, callback: Callback<Response>): void;
}
}
@@ -64,11 +50,7 @@ export interface IRemotePackage extends IPackage {
* @param downloadError Optional callback invoked in case of an error.
* @param downloadProgress Optional callback invoked during the download process. It is called several times with one DownloadProgress parameter.
*/
download(
downloadSuccess: SuccessCallback<ILocalPackage>,
downloadError?: ErrorCallback,
downloadProgress?: SuccessCallback<DownloadProgress>
): void;
download(downloadSuccess: SuccessCallback<ILocalPackage>, downloadError?: ErrorCallback, downloadProgress?: SuccessCallback<DownloadProgress>): void;
/**
* Aborts the current download session, previously started with download().
@@ -76,10 +58,7 @@ export interface IRemotePackage extends IPackage {
* @param abortSuccess Optional callback invoked if the abort operation succeeded.
* @param abortError Optional callback invoked in case of an error.
*/
abortDownload(
abortSuccess?: SuccessCallback<void>,
abortError?: ErrorCallback
): void;
abortDownload(abortSuccess?: SuccessCallback<void>, abortError?: ErrorCallback): void;
}
/**
@@ -107,11 +86,7 @@ export interface ILocalPackage extends IPackage {
* @param installError Optional callback inovoked in case of an error.
* @param installOptions Optional parameter used for customizing the installation behavior.
*/
install(
installSuccess: SuccessCallback<InstallMode>,
errorCallback?: ErrorCallback,
installOptions?: InstallOptions
): void;
install(installSuccess: SuccessCallback<InstallMode>, errorCallback?: ErrorCallback, installOptions?: InstallOptions): void;
}
/**
@@ -148,19 +123,13 @@ interface IPackageInfoMetadata extends ILocalPackage {
}
interface NativeUpdateNotification {
updateAppVersion: boolean; // Always true
updateAppVersion: boolean; // Always true
appVersion: string;
}
export interface Callback<T> {
(error: Error, parameter: T): void;
}
export interface SuccessCallback<T> {
(result?: T): void;
}
export interface ErrorCallback {
(error?: Error): void;
}
export interface Callback<T> { (error: Error, parameter: T): void; }
export interface SuccessCallback<T> { (result?: T): void; }
export interface ErrorCallback { (error?: Error): void; }
interface Configuration {
appVersion: string;
@@ -177,40 +146,26 @@ declare class AcquisitionStatus {
declare class AcquisitionManager {
constructor(httpRequester: Http.Requester, configuration: Configuration);
public queryUpdateWithCurrentPackage(
currentPackage: IPackage,
callback?: Callback<IRemotePackage | NativeUpdateNotification>
): void;
public reportStatusDeploy(
pkg?: IPackage,
status?: string,
previousLabelOrAppVersion?: string,
previousDeploymentKey?: string,
callback?: Callback<void>
): void;
public queryUpdateWithCurrentPackage(currentPackage: IPackage, callback?: Callback<IRemotePackage | NativeUpdateNotification>): void;
public reportStatusDeploy(pkg?: IPackage, status?: string, previousLabelOrAppVersion?: string, previousDeploymentKey?: string, callback?: Callback<void>): void;
public reportStatusDownload(pkg: IPackage, callback?: Callback<void>): void;
}
interface CodePushCordovaPlugin {
/**
* Get the current package information.
*
* @param packageSuccess Callback invoked with the currently deployed package information.
* @param packageError Optional callback invoked in case of an error.
*/
getCurrentPackage(
packageSuccess: SuccessCallback<ILocalPackage>,
packageError?: ErrorCallback
): void;
getCurrentPackage(packageSuccess: SuccessCallback<ILocalPackage>, packageError?: ErrorCallback): void;
/**
* Gets the pending package information, if any. A pending package is one that has been installed but the application still runs the old code.
* This happends only after a package has been installed using ON_NEXT_RESTART or ON_NEXT_RESUME mode, but the application was not restarted/resumed yet.
*/
getPendingPackage(
packageSuccess: SuccessCallback<ILocalPackage>,
packageError?: ErrorCallback
): void;
getPendingPackage(packageSuccess: SuccessCallback<ILocalPackage>, packageError?: ErrorCallback): void;
/**
* Checks with the CodePush server if an update package is available for download.
@@ -221,11 +176,7 @@ interface CodePushCordovaPlugin {
* @param queryError Optional callback invoked in case of an error.
* @param deploymentKey Optional deployment key that overrides the config.xml setting.
*/
checkForUpdate(
querySuccess: SuccessCallback<IRemotePackage>,
queryError?: ErrorCallback,
deploymentKey?: string
): void;
checkForUpdate(querySuccess: SuccessCallback<IRemotePackage>, queryError?: ErrorCallback, deploymentKey?: string): void;
/**
* Notifies the plugin that the update operation succeeded and that the application is ready.
@@ -235,19 +186,13 @@ interface CodePushCordovaPlugin {
* @param notifySucceeded Optional callback invoked if the plugin was successfully notified.
* @param notifyFailed Optional callback invoked in case of an error during notifying the plugin.
*/
notifyApplicationReady(
notifySucceeded?: SuccessCallback<void>,
notifyFailed?: ErrorCallback
): void;
notifyApplicationReady(notifySucceeded?: SuccessCallback<void>, notifyFailed?: ErrorCallback): void;
/**
* Reloads the application. If there is a pending update package installed using ON_NEXT_RESTART or ON_NEXT_RESUME modes, the update
* will be immediately visible to the user. Otherwise, calling this function will simply reload the current version of the application.
*/
restartApplication(
installSuccess: SuccessCallback<void>,
errorCallback?: ErrorCallback
): void;
restartApplication(installSuccess: SuccessCallback<void>, errorCallback?: ErrorCallback): void;
/**
* Convenience method for installing updates in one method call.
@@ -270,11 +215,7 @@ interface CodePushCordovaPlugin {
* @param downloadProgress Optional callback invoked during the download process. It is called several times with one DownloadProgress parameter.
*
*/
sync(
syncCallback?: SuccessCallback<SyncStatus>,
syncOptions?: SyncOptions,
downloadProgress?: SuccessCallback<DownloadProgress>
): void;
sync(syncCallback?: SuccessCallback<SyncStatus>, syncOptions?: SyncOptions, downloadProgress?: SuccessCallback<DownloadProgress>): void;
}
/**
@@ -487,6 +428,7 @@ export interface DownloadProgress {
})
@Injectable()
export class CodePush extends IonicNativePlugin {
/**
* Get the current package information.
*
@@ -576,10 +518,8 @@ export class CodePush extends IonicNativePlugin {
successIndex: 0,
errorIndex: 3 // we don't need this, so we set it to a value higher than # of args
})
sync(
syncOptions?: SyncOptions,
downloadProgress?: SuccessCallback<DownloadProgress>
): Observable<SyncStatus> {
sync(syncOptions?: SyncOptions, downloadProgress?: SuccessCallback<DownloadProgress>): Observable<SyncStatus> {
return;
}
}