From 650615e8831a8fee89741c6c1fcac9a81aa5f51a Mon Sep 17 00:00:00 2001 From: Alexander Vagner Date: Fri, 13 Sep 2019 15:38:23 +0300 Subject: [PATCH 1/6] Fix typings for hasPermission() (#3161) Current version of plugin has change, described in https://github.com/dpa99c/cordova-plugin-firebasex#breaking-api-changes, this commit fixed `hasPermission()` method typings --- src/@ionic-native/plugins/firebase-x/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/@ionic-native/plugins/firebase-x/index.ts b/src/@ionic-native/plugins/firebase-x/index.ts index aa9a9bd44..e2aea91c6 100644 --- a/src/@ionic-native/plugins/firebase-x/index.ts +++ b/src/@ionic-native/plugins/firebase-x/index.ts @@ -151,10 +151,10 @@ export class FirebaseX extends IonicNativePlugin { /** * Check permission to receive push notifications and return hasPermission: true. iOS only (Android will always return true). - * @return {Promise<{isEnabled: boolean}>} + * @return {Promise} */ @Cordova() - hasPermission(): Promise<{ isEnabled: boolean }> { + hasPermission(): Promise { return; } From 6bc1b932c8238c5fba26a2f75a02fd682473da21 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 13 Sep 2019 14:39:52 +0200 Subject: [PATCH 2/6] fix(screen-orientation): add window element to eventObservable (#3166) --- src/@ionic-native/plugins/screen-orientation/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/@ionic-native/plugins/screen-orientation/index.ts b/src/@ionic-native/plugins/screen-orientation/index.ts index c672682b5..129a65970 100644 --- a/src/@ionic-native/plugins/screen-orientation/index.ts +++ b/src/@ionic-native/plugins/screen-orientation/index.ts @@ -82,7 +82,8 @@ export class ScreenOrientation extends IonicNativePlugin { */ @Cordova({ eventObservable: true, - event: 'orientationchange' + event: 'orientationchange', + element: 'window' }) onChange(): Observable { return; From cfcd8d16a6014c1368b2360093956e0fbb260572 Mon Sep 17 00:00:00 2001 From: Dalton Pearson <32880838+daltonpearson@users.noreply.github.com> Date: Fri, 13 Sep 2019 08:40:28 -0400 Subject: [PATCH 3/6] feat(document-scanner): add quality and base64 (#3168) * feat(document-scanner): add quality and base64 * removed trailing whitespace --- .../plugins/document-scanner/index.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/@ionic-native/plugins/document-scanner/index.ts b/src/@ionic-native/plugins/document-scanner/index.ts index fe6279ca7..50231f897 100644 --- a/src/@ionic-native/plugins/document-scanner/index.ts +++ b/src/@ionic-native/plugins/document-scanner/index.ts @@ -27,6 +27,21 @@ export interface DocumentScannerOptions { * which is "image". */ fileName?: string; + + /** + * Quality to use when capturing the image, must be a float value + * from 1.0(default - Highest quality) to 5.0(Lowest Quality). Any value + * in between will be accepted. Any value not equal to or not between these values + * will default to the highest quality of 1.0. + */ + quality?: number; + + /** + * If the image should be returned as a base64 encoding instead of as a file URL. + * If true, the plugin will return the scanned image as base64. If false, + * the plugin will return the image URL of the image. + */ + returnBase64?: boolean; } /** From d539eb4f6238a12d7271d0921e600f20c90bedc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Andr=C3=A9s=20P=C3=A9rez=20Ar=C3=A9valo?= Date: Fri, 13 Sep 2019 07:41:24 -0500 Subject: [PATCH 4/6] feat(ssh-connect): add new plugin for ssh connection (#3169) --- .../plugins/ssh-connect/index.ts | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 src/@ionic-native/plugins/ssh-connect/index.ts diff --git a/src/@ionic-native/plugins/ssh-connect/index.ts b/src/@ionic-native/plugins/ssh-connect/index.ts new file mode 100644 index 000000000..6146da701 --- /dev/null +++ b/src/@ionic-native/plugins/ssh-connect/index.ts @@ -0,0 +1,74 @@ +import { Injectable } from '@angular/core'; +import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; + +/** + * @name SSH Connect + * @description + * Cordova plugin to make connections and execute commands through SSH + * + * @usage + * ```typescript + * import { SSHConnect } from '@ionic-native/ssh-connect/ngx'; + * + * + * constructor(private sshConnect: SSHConnect) { } + * + * ... + * + * + * this.sshConnect.connect('user', 'password', 'host', port) + * .then(resp => console.log(resp)) + * .catch(error => console.error(error)); + * + * this.sshConnect.executeCommand('command') + * .then(resp => console.log(resp)) + * .catch(error => console.error(error)); + * + * this.sshConnect.disconnect() + * .then(resp => console.log(resp)) + * .catch(error => console.error(error)); + * + * ``` + */ +@Plugin({ + pluginName: 'SSHConnect', + plugin: 'cordova-plugin-ssh-connect', + pluginRef: 'cordova.plugins.sshConnect', + repo: 'https://github.com/JosePerez27/cordova-plugin-ssh-connect', + platforms: ['Android'] +}) +@Injectable() +export class SSHConnect extends IonicNativePlugin { + + /** + * Establish a remote ssh connection + * @param {user} user The remote host user + * @param {password} password The remote host password + * @param {host} host The remote device to connect + * @param {port} port The SSH port for connection (usually port 22) + * @return {Promise} Returns an promise that resolves with the success of the connection + */ + @Cordova() + connect(user: string, password: string, host: string, port: number): Promise { + return; + } + + /** + * Execute a command on the remote host connected by ssh + * @param {command} command The command to execute + * @return {Promise} Returns an promise that resolves with the printed text on the remote console + */ + @Cordova() + executeCommand(command: string): Promise { + return; + } + + /** + * Disconnect the SSH session + * @return {Promise} Returns an promise that resolves with the success of the disconnection + */ + @Cordova() + disconnect(): Promise { + return; + } +} From 1b6506f53a532e6344871fa7baeff669fb8db81d Mon Sep 17 00:00:00 2001 From: Mostafa Mansour Date: Fri, 13 Sep 2019 16:42:08 +0400 Subject: [PATCH 5/6] =?UTF-8?q?feat(preview-any-file):=20add=20new=20plugi?= =?UTF-8?q?n=20to=20preview=20the=20=E2=80=A6=20(#3156)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(cordova-plugin-preview-any-file): add new plugin to preview the files in both ios and android * fix lint error * add missing descriptions * add the reop link --- .../plugins/preview-any-file/index.ts | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/@ionic-native/plugins/preview-any-file/index.ts diff --git a/src/@ionic-native/plugins/preview-any-file/index.ts b/src/@ionic-native/plugins/preview-any-file/index.ts new file mode 100644 index 000000000..c6e4f642a --- /dev/null +++ b/src/@ionic-native/plugins/preview-any-file/index.ts @@ -0,0 +1,46 @@ +import { Injectable } from '@angular/core'; +import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; +/** + * @name PreviewAnyFile + * @description + * Whatever the file is PDF document, Word document, Excel, office document,zip archive file, image, text, html or anything else, you can perform a preview by this cordova Plugin to preview any file in native mode by providing the local or external URL. + * + * Requires Cordova plugin: `cordova-plugin-preview-any-file`. For more info, please see the [previewAnyFile plugin docs](https://github.com/mostafa-mansour1/previewAnyFile). + * + * @usage + * ```typescript + * import { PreviewAnyFile } from '@ionic-native/preview-any-file'; + * + * + * constructor(private previewAnyFile: PreviewAnyFile) { } + * + * ... + * + * + * this.previewAnyFile.preview('file://filepath.ext') + * .then((res: any) => console.log(res)) + * .catch((error: any) => console.error(error)); + * + * ``` + */ +@Plugin({ + pluginName: 'PreviewAnyFile', + plugin: 'cordova-plugin-preview-any-file', // npm package name, example: cordova-plugin-camera + pluginRef: 'PreviewAnyFile', // the variable reference to call the plugin, example: navigator.geolocation + repo: 'https://github.com/mostafa-mansour1/previewAnyFile', // the github repository URL for the plugin + install: '', // OPTIONAL install command, in case the plugin requires variables + installVariables: [], // OPTIONAL the plugin requires variables + platforms: ['Android', 'iOS'] // Array of platforms supported, example: ['Android', 'iOS'] +}) +@Injectable() +export class PreviewAnyFile extends IonicNativePlugin { + /** + * this function return SUCCESS in success callback if the file successfully opened, if the content is base64 you have to write it into file by cordova-plugin-file + * @param url {string} full absolute URL for the file, if the path is content:// you need to resolve the native url, if the path is https:// it may not work in android + * @return {Promise} Returns a promise that resolves if the file opened reject if not; + */ + @Cordova() + preview(url: string): Promise { + return; + } +} From fb0ee819bef3f82b16e69f19fd1f2eb00523f479 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Fri, 13 Sep 2019 14:53:26 +0200 Subject: [PATCH 6/6] chore(package): bump deps --- package-lock.json | 89 +++++++++++++++++++++++------------------------ package.json | 18 +++++----- 2 files changed, 53 insertions(+), 54 deletions(-) diff --git a/package-lock.json b/package-lock.json index 57e1600e4..394da94c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,27 +5,27 @@ "requires": true, "dependencies": { "@angular/common": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-8.2.4.tgz", - "integrity": "sha512-sPeTkor3uf8T3MvpekS0ZQe9K/yzlHBSoMyT0bIPOYeDTHUph3f/0XyYhH7KSGXLo7tSw1Mx9Ua05nQ+VHtLGQ==", + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-8.2.6.tgz", + "integrity": "sha512-OlU3LCPShHJEsOHS+qczY52P0kWtjJD8N7NDHaGMB6Xp8GMgItjQIeeO6yf8DJyaCIC4qk4G7jPdnQk6IE1SbQ==", "dev": true, "requires": { "tslib": "^1.9.0" } }, "@angular/compiler": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-8.2.4.tgz", - "integrity": "sha512-LYaYhQlW3GFiXrNywJBYQtsLOWmUFcgudacF1m7QHHhlljnkG3BqkosbT0Dkcl7ayrIDYT/ZMTkVmaiGvgAhnw==", + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-8.2.6.tgz", + "integrity": "sha512-NdTY2n0XNRmKixbKDWB++9tEDLFwN0/Bp/1lXJ4qF/8V5Wju6IJ/UZZKjR5C4uiKtF17T3GzubhXgghumt5UVA==", "dev": true, "requires": { "tslib": "^1.9.0" } }, "@angular/compiler-cli": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-8.2.4.tgz", - "integrity": "sha512-tN269yWPbJsetzmO8x/Bx7wLwqCfnD8BYoJsBFPcZOZpW0cfELzVdY13R325WB1uXiMrVN0lskNtPBLe9OcMTA==", + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-8.2.6.tgz", + "integrity": "sha512-WLlBO/oGcQBKE8rYcENZQ4HgkbrmMqSNJXHLK/HnZpvbot2+mPiDXykI/p5rKdpAei/lgTU8g8GskoiDeLXsgw==", "dev": true, "requires": { "canonical-path": "1.0.0", @@ -972,9 +972,9 @@ } }, "@angular/core": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-8.2.4.tgz", - "integrity": "sha512-8FSdkUSb5S4+K2w49iLzrQF/jzcmoRnOogFZQ8CctiXQHSVHHF8AjpoFpFVUAI6/77UVL8CehlyBSKF5EE1Z8A==", + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-8.2.6.tgz", + "integrity": "sha512-l+BrvPGwtPUh/rQyB9mjtonMsFEAoRHgDYWeQu/QukIZbItNdFqrhewn2zQ8Skx75BpwFLAVIVXp9ioDyvP2eQ==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -2178,9 +2178,9 @@ "dev": true }, "@types/node": { - "version": "12.7.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.3.tgz", - "integrity": "sha512-3SiLAIBkDWDg6vFo0+5YJyHPWU9uwu40Qe+v+0MH8wRKYBimHvvAOyk3EzMrD/TrIlLYfXrqDqrg913PynrMJQ==", + "version": "12.7.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.5.tgz", + "integrity": "sha512-9fq4jZVhPNW8r+UYKnxF1e2HkDWOWKM5bC2/7c9wPV835I0aOrVbS/Hw/pWPk2uKrNXQqg9Z959Kz+IYDd5p3w==", "dev": true }, "@types/rimraf": { @@ -5059,9 +5059,9 @@ "dev": true }, "elliptic": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.0.tgz", - "integrity": "sha512-eFOJTMyCYb7xtE/caJ6JJu+bhi67WCYNbkGSknu20pmM8Ke/bqOfdnZWxyoGN26JgfxTbXrsCkEw4KheCT/KGg==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.1.tgz", + "integrity": "sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==", "dev": true, "requires": { "bn.js": "^4.4.0", @@ -11983,6 +11983,12 @@ "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=", "dev": true }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, "lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", @@ -14451,9 +14457,9 @@ } }, "rxjs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", - "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", + "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -15513,9 +15519,9 @@ } }, "terser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.2.1.tgz", - "integrity": "sha512-cGbc5utAcX4a9+2GGVX4DsenG6v0x3glnDi5hx8816X1McEAwPlPgRtXPJzSBsbpILxZ8MQMT0KvArLuE0HP5A==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.3.1.tgz", + "integrity": "sha512-pnzH6dnFEsR2aa2SJaKb1uSCl3QmIsJ8dEkj0Fky+2AwMMcC9doMqLOQIH6wVTEKaVfKVvLSk5qxPBEZT9mywg==", "dev": true, "requires": { "commander": "^2.20.0", @@ -15894,15 +15900,16 @@ "dev": true }, "ts-jest": { - "version": "24.0.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-24.0.2.tgz", - "integrity": "sha512-h6ZCZiA1EQgjczxq+uGLXQlNgeg02WWJBbeT8j6nyIBRQdglqbvzDoHahTEIiS6Eor6x8mK6PfZ7brQ9Q6tzHw==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-24.1.0.tgz", + "integrity": "sha512-HEGfrIEAZKfu1pkaxB9au17b1d9b56YZSqz5eCVE8mX68+5reOvlM93xGOzzCREIov9mdH7JBG+s0UyNAqr0tQ==", "dev": true, "requires": { "bs-logger": "0.x", "buffer-from": "1.x", "fast-json-stable-stringify": "2.x", "json5": "2.x", + "lodash.memoize": "4.x", "make-error": "1.x", "mkdirp": "0.x", "resolve": "1.x", @@ -15941,22 +15948,22 @@ } }, "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", "dev": true }, "tslint": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.19.0.tgz", - "integrity": "sha512-1LwwtBxfRJZnUvoS9c0uj8XQtAnyhWr9KlNvDIdB+oXyT+VpsOAaEhEgKi1HrZ8rq0ki/AAnbGSv4KM6/AfVZw==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.0.tgz", + "integrity": "sha512-2vqIvkMHbnx8acMogAERQ/IuINOq6DFqgF8/VDvhEkBqQh/x6SP0Y+OHnKth9/ZcHQSroOZwUQSN18v8KKF0/g==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "builtin-modules": "^1.1.1", "chalk": "^2.3.0", "commander": "^2.12.1", - "diff": "^3.2.0", + "diff": "^4.0.1", "glob": "^7.1.1", "js-yaml": "^3.13.1", "minimatch": "^3.0.4", @@ -15965,14 +15972,6 @@ "semver": "^5.3.0", "tslib": "^1.8.0", "tsutils": "^2.29.0" - }, - "dependencies": { - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - } } }, "tslint-eslint-rules": { @@ -17517,9 +17516,9 @@ "dev": true }, "webpack": { - "version": "4.39.3", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.39.3.tgz", - "integrity": "sha512-BXSI9M211JyCVc3JxHWDpze85CvjC842EvpRsVTc/d15YJGlox7GIDd38kJgWrb3ZluyvIjgenbLDMBQPDcxYQ==", + "version": "4.40.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.40.1.tgz", + "integrity": "sha512-AAP7F9X1cVNnQl0ZsG52qF89tqCKS8lqVEnFOA0g/G25/VyH4CejwTbSD9aEDGStAIuH+l6W1yOYRZNOP0VE1g==", "dev": true, "requires": { "@webassemblyjs/ast": "1.8.5", diff --git a/package.json b/package.json index f2bd67637..778ce5433 100644 --- a/package.json +++ b/package.json @@ -23,15 +23,15 @@ "shipit": "npm run build && npm run readmes && npm run npmpub" }, "devDependencies": { - "@angular/common": "^8.2.4", - "@angular/compiler": "^8.2.4", - "@angular/compiler-cli": "^8.2.4", - "@angular/core": "^8.2.4", + "@angular/common": "^8.2.6", + "@angular/compiler": "^8.2.6", + "@angular/compiler-cli": "^8.2.6", + "@angular/core": "^8.2.6", "@types/cordova": "0.0.34", "@types/fs-extra": "^8.0.0", "@types/jest": "^24.0.18", "@types/lodash": "^4.14.138", - "@types/node": "^12.7.3", + "@types/node": "^12.7.5", "@types/rimraf": "^2.0.2", "@types/webpack": "^4.39.1", "ajv": "^6.10.2", @@ -50,16 +50,16 @@ "minimist": "1.2.0", "natives": "^1.1.6", "rimraf": "^3.0.0", - "rxjs": "^6.5.2", - "ts-jest": "^24.0.2", + "rxjs": "^6.5.3", + "ts-jest": "^24.1.0", "ts-node": "^8.3.0", - "tslint": "^5.19.0", + "tslint": "^5.20.0", "tslint-ionic-rules": "0.0.21", "typedoc": "^0.15.0", "typescript": "~3.5.3", "uglifyjs-webpack-plugin": "^2.2.0", "unminified-webpack-plugin": "^2.0.0", - "webpack": "^4.39.3", + "webpack": "^4.40.1", "winston": "^3.2.1", "zone.js": "^0.9.1" },