Remove Cordova from Main UI (#2432)

This removes Cordova from Main UI.

Cordova was used to build Main UI as an iOS or Android app (a webview
with pre-packed assets), but the Cordova component of Main UI is
currently unmaintained due to requiring lots of maintenance.
Both the iOS and the Android app have an integrated webview (without
pre-packed assets though), so Cordova is unlikely to be required in the
future.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
pull/2433/head
Florian Hotze 2024-02-29 11:26:12 +01:00 committed by GitHub
parent d6097a6346
commit ea28f32140
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
62 changed files with 12 additions and 1619 deletions

View File

@ -16,7 +16,6 @@ Change to the `web` directory, gather the necessary dependencies with `npm insta
* `npm start` - run the development server (see below)
* `npm run build-prod` - build web app for production (note: no need to prepare a production version when submitting a PR, the build server will do it)
* `npm run build-cordova-prod` - build cordova's `www` folder from source and build a Cordova app
* `npm run dev` - run the development server (same as above)
* `npm run dev:blockly` - run the development server with Blockly source-maps (allows Blockly debugging)
* `npm run test:unit` - start the Jest test runner and run the unit tests
@ -87,10 +86,6 @@ The "How do I..." and "Quick Start" sections are created from JSON definitions l
This is a PWA. Don't forget to check what is inside your `service-worker.js`. It is also recommended that you disable the service worker (or enable "Update on reload") in your browser's dev tools during development.
## Cordova
The Cordova project is located in the `cordova` folder. You shouldn't modify content of the `cordova/www` folder. Its content will be correctly generated when you call `npm run build-cordova-prod` (see [NPM Scripts](#npm-scripts)).
## Documentation & Resources
The openHAB docs provide a [Component Reference](https://www.openhab.org/docs/ui/components/) as well as docs for each component.

View File

@ -30,7 +30,6 @@ module.exports = {
globals: {
'ga': true, // Google Analytics
'cordova': true,
'__statics': true,
'process': true
},

View File

@ -4,4 +4,3 @@ stats
node
report.html
stats.json
# cordova

View File

@ -6,12 +6,11 @@ const config = require('./webpack.config.js');
const env = process.env.NODE_ENV || 'development';
const target = process.env.TARGET || 'web';
const isCordova = target === 'cordova'
const spinner = ora(env === 'production' ? 'building for production...' : 'building development version...');
spinner.start();
rm(isCordova ? './cordova/www' : './www/', (removeErr) => {
rm('./www/', (removeErr) => {
if (removeErr) throw removeErr;
webpack(config, (err, stats) => {

View File

@ -19,7 +19,6 @@ function resolvePath(dir) {
const env = process.env.NODE_ENV || 'development'
const target = process.env.TARGET || 'web'
const buildSourceMaps = process.env.SOURCE_MAPS || false
const isCordova = target === 'cordova'
const apiBaseUrl = process.env.OH_APIBASE || 'http://localhost:8080'
@ -32,7 +31,7 @@ module.exports = {
'./src/js/app.js'
],
output: {
path: resolvePath(isCordova ? 'cordova/www' : 'www'),
path: resolvePath('www'),
filename: 'js/app.[contenthash].js',
publicPath: '/',
hotUpdateChunkFilename: 'hot/[id].[fullhash].hot-update.js',
@ -253,7 +252,7 @@ module.exports = {
patterns: [
{
from: resolvePath('src/res'),
to: resolvePath(isCordova ? 'cordova/www/res' : 'www/res')
to: resolvePath('www/res')
},
{
from: resolvePath('src/manifest.json'),
@ -265,7 +264,7 @@ module.exports = {
}
]
}),
...(!isCordova && env === 'production' ? [
...(env === 'production' ? [
new WorkboxPlugin.InjectManifest({
swSrc: resolvePath('src/service-worker.js'),
maximumFileSizeToCacheInBytes: 100000000,

View File

@ -1,13 +0,0 @@
# Mac
.DS_Store
# Node
npm-debug.log
/node_modules
# Cordova
/platforms
/plugins
# res
resources/signing

View File

@ -1,2 +0,0 @@
# OS X
.DS_Store

View File

@ -1,94 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="org.openhab.ui" version="3.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>openHAB</name>
<description>
This is a version of the openHAB user interface packaged as an app.
The open Home Automation Bus (openHAB) project aims at providing a universal integration platform for all things around home automation.
It is designed to be absolutely vendor-neutral as well as hardware/protocol-agnostic.
</description>
<author email="info@openhab.org" href="https://openhab.org">
Contributors to the openHAB project
</author>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
<plugin name="cordova-plugin-keyboard" spec="^1.2.0" />
<plugin name="cordova-plugin-wkwebview-engine" spec="^1.1.4" />
<plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
<allow-navigation href="*" />
<platform name="android">
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="android-minSdkVersion" value="21" />
<preference name="SplashMaintainAspectRatio" value="true" />
<splash density="land-hdpi" src="res/screen/android/drawable-hdpi/screen.png" />
<splash density="land-mdpi" src="res/screen/android/drawable-mdpi/screen.png" />
<splash density="land-xhdpi" src="res/screen/android/drawable-xhdpi/screen.png" />
<splash density="land-xxhdpi" src="res/screen/android/drawable-xxhdpi/screen.png" />
<splash density="land-xxxhdpi" src="res/screen/android/drawable-xxxhdpi/screen.png" />
<splash density="port-hdpi" src="res/screen/android/drawable-hdpi/screen.png" />
<splash density="port-mdpi" src="res/screen/android/drawable-mdpi/screen.png" />
<splash density="port-xhdpi" src="res/screen/android/drawable-xhdpi/screen.png" />
<splash density="port-xxhdpi" src="res/screen/android/drawable-xxhdpi/screen.png" />
<splash density="port-xxxhdpi" src="res/screen/android/drawable-xxxhdpi/screen.png" />
<icon density="ldpi" src="res/icon/android/mipmap-ldpi/ic_launcher.png" />
<icon density="mdpi" src="res/icon/android/mipmap-mdpi/ic_launcher.png" />
<icon density="hdpi" src="res/icon/android/mipmap-hdpi/ic_launcher.png" />
<icon density="xhdpi" src="res/icon/android/mipmap-xhdpi/ic_launcher.png" />
<icon density="xxhdpi" src="res/icon/android/mipmap-xxhdpi/ic_launcher.png" />
<icon density="xxxhdpi" src="res/icon/android/mipmap-xxxhdpi/ic_launcher.png" />
</platform>
<platform name="ios">
<config-file parent="CFBundleAllowMixedLocalizations" platform="ios" target="*-Info.plist">
<true />
</config-file>
<preference name="StatusBarOverlaysWebView" value="true" />
<splash src="res/screen/ios/Default@2x~universal~anyany.png" />
<icon height="180" src="res/icon/ios/icon-60x60@3x.png" width="180" />
<icon height="60" src="res/icon/ios/icon-60x60@1x.png" width="60" />
<icon height="120" src="res/icon/ios/icon-60x60@2x.png" width="120" />
<icon height="76" src="res/icon/ios/icon-76x76@1x.png" width="76" />
<icon height="152" src="res/icon/ios/icon-76x76@2x.png" width="152" />
<icon height="228" src="res/icon/ios/icon-76x76@3x.png" width="228" />
<icon height="40" src="res/icon/ios/icon-40x40@1x.png" width="40" />
<icon height="80" src="res/icon/ios/icon-40x40@2x.png" width="80" />
<icon height="87" src="res/icon/ios/icon-29x29@3x.png" width="87" />
<icon height="57" src="res/icon/ios/icon-57x57@1x.png" width="57" />
<icon height="114" src="res/icon/ios/icon-57x57@2x.png" width="114" />
<icon height="72" src="res/icon/ios/icon-72x72@1x.png" width="72" />
<icon height="144" src="res/icon/ios/icon-72x72@2x.png" width="144" />
<icon height="167" src="res/icon/ios/icon-83.5x83.5@2x.png" width="167" />
<icon height="29" src="res/icon/ios/icon-29x29@1x.png" width="29" />
<icon height="58" src="res/icon/ios/icon-29x29@2x.png" width="58" />
<icon height="50" src="res/icon/ios/icon-50x50@1x.png" width="50" />
<icon height="100" src="res/icon/ios/icon-50x50@2x.png" width="100" />
<icon height="167" src="res/icon/ios/icon-83.5x83.5@2x.png" width="167" />
<icon height="1024" src="res/icon/ios/icon-512x512@2x.png" width="1024" />
</platform>
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="BackupWebStorage" value="local" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="SplashScreenDelay" value="0" />
<preference name="Suppresses3DTouchGesture" value="true" />
<preference name="Allow3DTouchLinkPreview" value="false" />
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
<plugin name="cordova-plugin-advanced-http" spec="^2.0.5" />
<plugin name="cordova-plugin-chrome-apps-sockets-tcp" spec="^1.3.7" />
<engine name="ios" spec="^4.5.5" />
<engine name="android" spec="^7.1.4" />
</widget>

View File

@ -1,23 +0,0 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
-->
# Cordova Hooks
Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. See Hooks Guide for more details: https://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide.

View File

@ -1,933 +0,0 @@
{
"name": "org.openhab.ui",
"version": "3.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@netflix/nerror": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@netflix/nerror/-/nerror-1.1.3.tgz",
"integrity": "sha512-b+MGNyP9/LXkapreJzNUzcvuzZslj/RGgdVVJ16P2wSlYatfLycPObImqVJSmNAdyeShvNeM/pl3sVZsObFueg==",
"requires": {
"assert-plus": "^1.0.0",
"extsprintf": "^1.4.0",
"lodash": "^4.17.15"
}
},
"@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
"integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
"requires": {
"@nodelib/fs.stat": "2.0.5",
"run-parallel": "^1.1.9"
}
},
"@nodelib/fs.stat": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
"integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A=="
},
"@nodelib/fs.walk": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
"integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
"requires": {
"@nodelib/fs.scandir": "2.1.5",
"fastq": "^1.6.0"
}
},
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"ansi": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz",
"integrity": "sha512-iFY7JCgHbepc0b82yLaw4IMortylNb6wG4kL+4R0C3iv6i+RHGHux/yUX5BTiRvSX/shMnngjR1YyNMnXEFh5A=="
},
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw=="
},
"at-least-node": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
"integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg=="
},
"balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
},
"big-integer": {
"version": "1.6.51",
"resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz",
"integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg=="
},
"bplist-creator": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.1.0.tgz",
"integrity": "sha512-sXaHZicyEEmY86WyueLTQesbeoH/mquvarJaQNbjuOQO+7gbFcDEWqKmcWA4cOTLzFlfgvkiVxolk1k5bBIpmg==",
"requires": {
"stream-buffers": "2.2.x"
}
},
"bplist-parser": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz",
"integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==",
"requires": {
"big-integer": "^1.6.44"
}
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"requires": {
"fill-range": "^7.0.1"
}
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
},
"cordova-android": {
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-7.1.4.tgz",
"integrity": "sha512-Rtvu002I83uzfVyCsE6p2krFKVHt9TSAqZUATes+zH+o9cdxYGrLHY+PKCQo4SLCdSMdrkIHCDnQPTYTp/d7+g==",
"requires": {
"abbrev": "1.1.1",
"android-versions": "1.4.0",
"ansi": "0.3.1",
"balanced-match": "1.0.0",
"base64-js": "1.2.0",
"big-integer": "1.6.32",
"bplist-parser": "0.1.1",
"brace-expansion": "1.1.11",
"concat-map": "0.0.1",
"cordova-common": "2.2.5",
"cordova-registry-mapper": "1.1.15",
"elementtree": "0.1.6",
"glob": "5.0.15",
"inflight": "1.0.6",
"inherits": "2.0.3",
"minimatch": "3.0.4",
"nopt": "3.0.1",
"once": "1.4.0",
"path-is-absolute": "1.0.1",
"plist": "2.1.0",
"properties-parser": "0.2.3",
"q": "1.4.1",
"sax": "0.3.5",
"semver": "5.5.0",
"shelljs": "0.5.3",
"underscore": "1.9.1",
"unorm": "1.4.1",
"wrappy": "1.0.2",
"xmlbuilder": "8.2.2",
"xmldom": "0.1.27"
},
"dependencies": {
"abbrev": {
"version": "1.1.1",
"bundled": true
},
"android-versions": {
"version": "1.4.0",
"bundled": true,
"requires": {
"semver": "5.5.0"
}
},
"ansi": {
"version": "0.3.1",
"bundled": true
},
"balanced-match": {
"version": "1.0.0",
"bundled": true
},
"base64-js": {
"version": "1.2.0",
"bundled": true
},
"big-integer": {
"version": "1.6.32",
"bundled": true
},
"bplist-parser": {
"version": "0.1.1",
"bundled": true,
"requires": {
"big-integer": "1.6.32"
}
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"requires": {
"balanced-match": "1.0.0",
"concat-map": "0.0.1"
}
},
"concat-map": {
"version": "0.0.1",
"bundled": true
},
"cordova-common": {
"version": "2.2.5",
"bundled": true,
"requires": {
"ansi": "0.3.1",
"bplist-parser": "0.1.1",
"cordova-registry-mapper": "1.1.15",
"elementtree": "0.1.6",
"glob": "5.0.15",
"minimatch": "3.0.4",
"plist": "2.1.0",
"q": "1.4.1",
"shelljs": "0.5.3",
"underscore": "1.9.1",
"unorm": "1.4.1"
}
},
"cordova-registry-mapper": {
"version": "1.1.15",
"bundled": true
},
"elementtree": {
"version": "0.1.6",
"bundled": true,
"requires": {
"sax": "0.3.5"
}
},
"glob": {
"version": "5.0.15",
"bundled": true,
"requires": {
"inflight": "1.0.6",
"inherits": "2.0.3",
"minimatch": "3.0.4",
"once": "1.4.0",
"path-is-absolute": "1.0.1"
}
},
"inflight": {
"version": "1.0.6",
"bundled": true,
"requires": {
"once": "1.4.0",
"wrappy": "1.0.2"
}
},
"inherits": {
"version": "2.0.3",
"bundled": true
},
"minimatch": {
"version": "3.0.4",
"bundled": true,
"requires": {
"brace-expansion": "1.1.11"
}
},
"nopt": {
"version": "3.0.1",
"bundled": true,
"requires": {
"abbrev": "1.1.1"
}
},
"once": {
"version": "1.4.0",
"bundled": true,
"requires": {
"wrappy": "1.0.2"
}
},
"path-is-absolute": {
"version": "1.0.1",
"bundled": true
},
"plist": {
"version": "2.1.0",
"bundled": true,
"requires": {
"base64-js": "1.2.0",
"xmlbuilder": "8.2.2",
"xmldom": "0.1.27"
}
},
"properties-parser": {
"version": "0.2.3",
"bundled": true
},
"q": {
"version": "1.4.1",
"bundled": true
},
"sax": {
"version": "0.3.5",
"bundled": true
},
"semver": {
"version": "5.5.0",
"bundled": true
},
"shelljs": {
"version": "0.5.3",
"bundled": true
},
"underscore": {
"version": "1.9.1",
"bundled": true
},
"unorm": {
"version": "1.4.1",
"bundled": true
},
"wrappy": {
"version": "1.0.2",
"bundled": true
},
"xmlbuilder": {
"version": "8.2.2",
"bundled": true
},
"xmldom": {
"version": "0.1.27",
"bundled": true
}
}
},
"cordova-common": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-4.0.2.tgz",
"integrity": "sha512-od7aNShyuBajzPY83mUEO8tERwwWdFklXETHiXP5Ft87CWeo/tSuwNPFztyTy8XYc74yXdogXKPTJeUHuVzB8Q==",
"requires": {
"@netflix/nerror": "^1.1.3",
"ansi": "^0.3.1",
"bplist-parser": "^0.2.0",
"cross-spawn": "^7.0.1",
"elementtree": "^0.1.7",
"endent": "^1.4.1",
"fast-glob": "^3.2.2",
"fs-extra": "^9.0.0",
"glob": "^7.1.6",
"plist": "^3.0.1",
"q": "^1.5.1",
"read-chunk": "^3.2.0",
"strip-bom": "^4.0.0",
"underscore": "^1.9.2"
}
},
"cordova-ios": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/cordova-ios/-/cordova-ios-6.2.0.tgz",
"integrity": "sha512-sLjZg2QBI1SpQVwfe0MSn89YNVkBGLW9Q1vcFJBsqKBrhvoEOJ5Ytq0gwqdhgTOGzlwJUfxC6OHM3jcsRjtYrw==",
"requires": {
"cordova-common": "^4.0.2",
"fs-extra": "^9.1.0",
"ios-sim": "^8.0.2",
"nopt": "^5.0.0",
"plist": "^3.0.1",
"semver": "^7.3.4",
"unorm": "^1.6.0",
"which": "^2.0.2",
"xcode": "^3.0.1",
"xml-escape": "^1.1.0"
}
},
"cordova-plugin-advanced-http": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/cordova-plugin-advanced-http/-/cordova-plugin-advanced-http-2.0.6.tgz",
"integrity": "sha512-MWPnl0P1z0Bv7O1s9di78tLXq8i3V8TwKqDB7H+583yOnnByTHLd9Fq5senpt37Ifs3c6x3NIgTTR+XBbYGiFg=="
},
"cordova-plugin-chrome-apps-common": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/cordova-plugin-chrome-apps-common/-/cordova-plugin-chrome-apps-common-1.0.7.tgz",
"integrity": "sha1-MAMZtZx53FUik/g6IzLPKDsQkIo="
},
"cordova-plugin-chrome-apps-iossocketscommon": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/cordova-plugin-chrome-apps-iossocketscommon/-/cordova-plugin-chrome-apps-iossocketscommon-1.0.2.tgz",
"integrity": "sha1-fWtzkIBL2y84MQH0cafCcxkYwR4="
},
"cordova-plugin-chrome-apps-sockets-tcp": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/cordova-plugin-chrome-apps-sockets-tcp/-/cordova-plugin-chrome-apps-sockets-tcp-1.3.7.tgz",
"integrity": "sha1-H6Mjs2LgOVKzycaN2Lj2z17uVaw="
},
"cordova-plugin-file": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/cordova-plugin-file/-/cordova-plugin-file-6.0.1.tgz",
"integrity": "sha1-SWBrjBWlaI1HKPkuSnMloGHeB/U="
},
"cordova-plugin-keyboard": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/cordova-plugin-keyboard/-/cordova-plugin-keyboard-1.2.0.tgz",
"integrity": "sha512-Zng4SgDQQ2BCqeDOvrsgNlM9tcjnxmJoh0Qhex0KltMsoR0g/ONbMTpaVvI8EhNKVO8HJPnhFxxzHxrCPLQ7sQ=="
},
"cordova-plugin-splashscreen": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/cordova-plugin-splashscreen/-/cordova-plugin-splashscreen-5.0.2.tgz",
"integrity": "sha1-dH509W4gHNWFvGLRS8oZ9oZ/8e0="
},
"cordova-plugin-statusbar": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/cordova-plugin-statusbar/-/cordova-plugin-statusbar-2.4.2.tgz",
"integrity": "sha1-/B+9wNjXAzp+jh8ff/FnrJvU+vY="
},
"cordova-plugin-whitelist": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.3.tgz",
"integrity": "sha1-tehezbv+Wu3tQKG/TuI3LmfZb7Q="
},
"cordova-plugin-wkwebview-engine": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/cordova-plugin-wkwebview-engine/-/cordova-plugin-wkwebview-engine-1.1.4.tgz",
"integrity": "sha1-EbnPoRTsBSXFxj5nok6rQVcDQGA="
},
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"requires": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
}
},
"dedent": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz",
"integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA=="
},
"elementtree": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.7.tgz",
"integrity": "sha512-wkgGT6kugeQk/P6VZ/f4T+4HB41BVgNBq5CDIZVbQ02nvTVqAiVTbskxxu3eA/X96lMlfYOwnLQpN2v5E1zDEg==",
"requires": {
"sax": "1.1.4"
}
},
"endent": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/endent/-/endent-1.4.1.tgz",
"integrity": "sha512-buHTb5c8AC9NshtP6dgmNLYkiT+olskbq1z6cEGvfGCF3Qphbu/1zz5Xu+yjTDln8RbxNhPoUyJ5H8MSrp1olQ==",
"requires": {
"dedent": "^0.7.0",
"fast-json-parse": "^1.0.3",
"objectorarray": "^1.0.4"
}
},
"extsprintf": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz",
"integrity": "sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA=="
},
"fast-glob": {
"version": "3.2.12",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
"integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
"requires": {
"@nodelib/fs.stat": "^2.0.2",
"@nodelib/fs.walk": "^1.2.3",
"glob-parent": "^5.1.2",
"merge2": "^1.3.0",
"micromatch": "^4.0.4"
}
},
"fast-json-parse": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/fast-json-parse/-/fast-json-parse-1.0.3.tgz",
"integrity": "sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw=="
},
"fastq": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz",
"integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==",
"requires": {
"reusify": "^1.0.4"
}
},
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"requires": {
"to-regex-range": "^5.0.1"
}
},
"fs-extra": {
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
"integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
"requires": {
"at-least-node": "^1.0.0",
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
},
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"glob": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.1.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"requires": {
"is-glob": "^4.0.1"
}
},
"graceful-fs": {
"version": "4.2.10",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
"integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA=="
},
"has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"requires": {
"function-bind": "^1.1.1"
}
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"interpret": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
"integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA=="
},
"ios-sim": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/ios-sim/-/ios-sim-8.0.2.tgz",
"integrity": "sha512-P7nEG771bfd+JoMRjnis1gpZOkjTUUxu+4Ek1Z+eoaEEoT9byllU9pxfQ8Df7hL3gSkIQxNwTSLhos2I8tWUQA==",
"requires": {
"bplist-parser": "^0.0.6",
"nopt": "1.0.9",
"plist": "^3.0.1",
"simctl": "^2"
},
"dependencies": {
"bplist-parser": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz",
"integrity": "sha512-fGeghPEH4Eytvf+Mi446aKcDqvkA/+eh6r7QGiZWMQG6TzqrnsToLP379XFfqRSZ41+676hhGIm++maNST1Apw=="
},
"nopt": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz",
"integrity": "sha512-CmUZ3rzN0/4kRHum5pGRiGkhmBMzgtEDxrZVHqRJDSv8qK6s+wzaig/xeyB22Due5aZQeTiEZg/nrmMH2tapDQ==",
"requires": {
"abbrev": "1"
}
}
}
},
"is-core-module": {
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz",
"integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==",
"requires": {
"has": "^1.0.3"
}
},
"is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="
},
"is-glob": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"requires": {
"is-extglob": "^2.1.1"
}
},
"is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
},
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="
},
"jsonfile": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
"requires": {
"graceful-fs": "^4.1.6",
"universalify": "^2.0.0"
}
},
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"requires": {
"yallist": "^4.0.0"
}
},
"merge2": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="
},
"micromatch": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
"requires": {
"braces": "^3.0.2",
"picomatch": "^2.3.1"
}
},
"minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"requires": {
"brace-expansion": "^1.1.7"
}
},
"nopt": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz",
"integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",
"requires": {
"abbrev": "1"
}
},
"objectorarray": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/objectorarray/-/objectorarray-1.0.5.tgz",
"integrity": "sha512-eJJDYkhJFFbBBAxeh8xW+weHlkI28n2ZdQV/J/DNfWfSKlGEf2xcfAbZTv3riEXHAhL9SVOTs2pRmXiSTf78xg=="
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"requires": {
"wrappy": "1"
}
},
"p-finally": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
"integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow=="
},
"p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="
},
"path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="
},
"path-parse": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
},
"picomatch": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="
},
"pify": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g=="
},
"plist": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/plist/-/plist-3.0.6.tgz",
"integrity": "sha512-WiIVYyrp8TD4w8yCvyeIr+lkmrGRd5u0VbRnU+tP/aRLxP/YadJUYOMZJ/6hIa3oUyVCsycXvtNRgd5XBJIbiA==",
"requires": {
"base64-js": "^1.5.1",
"xmlbuilder": "^15.1.1"
}
},
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw=="
},
"queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="
},
"read-chunk": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-3.2.0.tgz",
"integrity": "sha512-CEjy9LCzhmD7nUpJ1oVOE6s/hBkejlcJEgLQHVnQznOSilOPb+kpKktlLfFDK3/WP43+F80xkUTM2VOkYoSYvQ==",
"requires": {
"pify": "^4.0.1",
"with-open-file": "^0.1.6"
}
},
"rechoir": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
"integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==",
"requires": {
"resolve": "^1.1.6"
}
},
"resolve": {
"version": "1.22.1",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
"integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
"requires": {
"is-core-module": "^2.9.0",
"path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0"
}
},
"reusify": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
"integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw=="
},
"run-parallel": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
"integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
"requires": {
"queue-microtask": "^1.2.2"
}
},
"sax": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.1.4.tgz",
"integrity": "sha512-5f3k2PbGGp+YtKJjOItpg3P99IMD84E4HOvcfleTb5joCHNXYLsR9yWFPOYGgaeMPDubQILTCMdsFb2OMeOjtg=="
},
"semver": {
"version": "7.3.8",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
"requires": {
"lru-cache": "^6.0.0"
}
},
"shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"requires": {
"shebang-regex": "^3.0.0"
}
},
"shebang-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="
},
"shelljs": {
"version": "0.8.5",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz",
"integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==",
"requires": {
"glob": "^7.0.0",
"interpret": "^1.0.0",
"rechoir": "^0.6.2"
}
},
"simctl": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/simctl/-/simctl-2.0.3.tgz",
"integrity": "sha512-kKCak0yszxHae5eVWcmrjV3ouUGac3sjlhjdLWpyPu4eiQcWoHsCrqS34kkgzHN8Ystqkh/LFjzrldk/g3BYJg==",
"requires": {
"shelljs": "^0.8.5",
"tail": "^0.4.0"
}
},
"simple-plist": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/simple-plist/-/simple-plist-1.3.1.tgz",
"integrity": "sha512-iMSw5i0XseMnrhtIzRb7XpQEXepa9xhWxGUojHBL43SIpQuDQkh3Wpy67ZbDzZVr6EKxvwVChnVpdl8hEVLDiw==",
"requires": {
"bplist-creator": "0.1.0",
"bplist-parser": "0.3.1",
"plist": "^3.0.5"
},
"dependencies": {
"bplist-parser": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.3.1.tgz",
"integrity": "sha512-PyJxiNtA5T2PlLIeBot4lbp7rj4OadzjnMZD/G5zuBNt8ei/yCU7+wW0h2bag9vr8c+/WuRWmSxbqAl9hL1rBA==",
"requires": {
"big-integer": "1.6.x"
}
}
}
},
"stream-buffers": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz",
"integrity": "sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg=="
},
"strip-bom": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",
"integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w=="
},
"supports-preserve-symlinks-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="
},
"tail": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz",
"integrity": "sha512-i5rOhX0PwkFSbjID14mmuoqrLUIqpJeBwg0esugSbb+6Y+dzgN/O3YZXzzPL7dnQJGbQLs8cwM8Zsak5kFJGcA=="
},
"to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"requires": {
"is-number": "^7.0.0"
}
},
"underscore": {
"version": "1.13.6",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz",
"integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A=="
},
"universalify": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ=="
},
"unorm": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz",
"integrity": "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA=="
},
"uuid": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz",
"integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg=="
},
"which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"requires": {
"isexe": "^2.0.0"
}
},
"with-open-file": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/with-open-file/-/with-open-file-0.1.7.tgz",
"integrity": "sha512-ecJS2/oHtESJ1t3ZfMI3B7KIDKyfN0O16miWxdn30zdh66Yd3LsRFebXZXq6GU4xfxLf6nVxp9kIqElb5fqczA==",
"requires": {
"p-finally": "^1.0.0",
"p-try": "^2.1.0",
"pify": "^4.0.1"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
},
"xcode": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/xcode/-/xcode-3.0.1.tgz",
"integrity": "sha512-kCz5k7J7XbJtjABOvkc5lJmkiDh8VhjVCGNiqdKCscmVpdVUpEAyXv1xmCLkQJ5dsHqx3IPO4XW+NTDhU/fatA==",
"requires": {
"simple-plist": "^1.1.0",
"uuid": "^7.0.3"
}
},
"xml-escape": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.1.0.tgz",
"integrity": "sha512-B/T4sDK8Z6aUh/qNr7mjKAwwncIljFuUP+DO/D5hloYFj+90O88z8Wf7oSucZTHxBAsC1/CTP4rtx/x1Uf72Mg=="
},
"xmlbuilder": {
"version": "15.1.1",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz",
"integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="
},
"yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
}
}
}

View File

@ -1,41 +0,0 @@
{
"name": "org.openhab.ui",
"displayName": "openHAB",
"version": "4.0.0",
"description": "A sample Apache Cordova application that responds to the deviceready event.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Apache Cordova Team",
"license": "Apache-2.0",
"dependencies": {
"cordova-android": "^7.1.4",
"cordova-ios": "^6.2.0",
"cordova-plugin-advanced-http": "^2.0.6",
"cordova-plugin-chrome-apps-common": "^1.0.7",
"cordova-plugin-chrome-apps-iossocketscommon": "^1.0.2",
"cordova-plugin-chrome-apps-sockets-tcp": "^1.3.7",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-keyboard": "^1.2.0",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-wkwebview-engine": "^1.1.4"
},
"cordova": {
"plugins": {
"cordova-plugin-statusbar": {},
"cordova-plugin-keyboard": {},
"cordova-plugin-wkwebview-engine": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-advanced-http": {},
"cordova-plugin-chrome-apps-sockets-tcp": {}
},
"platforms": [
"ios",
"android"
]
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 805 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

View File

@ -6,5 +6,5 @@
"@/*": ["src/*"],
}
},
"exclude": ["node_modules", "cordova", "node", "build", "assets-src", "www", "test"]
"exclude": ["node_modules", "node", "build", "assets-src", "www", "test"]
}

View File

@ -6,7 +6,6 @@
"license": "EPL-2.0",
"framework7": {
"type": [
"cordova",
"web",
"pwa"
],
@ -21,24 +20,10 @@
"cssPreProcessor": "stylus",
"customColor": true,
"color": "ff7700",
"bundler": "webpack",
"cordova": {
"folder": "cordova",
"platforms": [
"ios",
"android"
],
"plugins": [
"cordova-plugin-statusbar",
"cordova-plugin-keyboard",
"cordova-plugin-splashscreen",
"cordova-plugin-wkwebview-engine"
]
}
"bundler": "webpack"
},
"scripts": {
"build-prod": "cross-env NODE_ENV=production node ./build/build.js",
"build-cordova-prod": "cross-env TARGET=cordova cross-env NODE_ENV=production node ./build/build.js && cd cordova && cordova build",
"webpack-analyzer": "cross-env NODE_ENV=production cross-env WEBPACK_ANALYZER=1 node ./build/build.js",
"webpack-analyzer-report": "cross-env NODE_ENV=production cross-env WEBPACK_ANALYZER=1 WEBPACK_ANALYZER_REPORT=1 node ./build/build.js",
"webpack-analyzer-report-stats": "cross-env NODE_ENV=production cross-env WEBPACK_ANALYZER=1 WEBPACK_ANALYZER_REPORT=1 WEBPACK_ANALYZER_REPORT_STATS=1 node ./build/build.js",

View File

@ -254,7 +254,6 @@
<script>
import Framework7 from 'framework7/framework7-lite.esm.bundle.js'
import cordovaApp from '@/js/cordova-app.js'
import routes from '@/js/routes.js'
import PanelRight from '@/pages/panel-right.vue'
import EmptyStatePlaceholder from '@/components/empty-state-placeholder.vue'
@ -313,10 +312,10 @@ export default {
// App routes
routes: routes,
view: {
// disable f7 swipeback on iOS (if not in cordova) because it's handled natively by Safari
iosSwipeBack: !this.$device.ios || this.$device.cordova,
auroraSwipeBack: !this.$device.ios || this.$device.cordova,
pushState: true, // !this.$device.cordova
// disable f7 swipeback on iOS because it's handled natively by Safari
iosSwipeBack: !this.$device.ios,
auroraSwipeBack: !this.$device.ios,
pushState: true,
pushStateSeparator: ''
},
// Enable panel left visibility breakpoint
@ -326,20 +325,14 @@ export default {
},
// Register service worker
serviceWorker: (this.$device.cordova || location.hostname === 'localhost') ? {} : {
serviceWorker: (location.hostname === 'localhost') ? {} : {
path: '/service-worker.js'
},
// Input settings
input: {
scrollIntoViewOnFocus: !!this.$device.cordova,
scrollIntoViewCentered: !!this.$device.cordova
},
card: {
swipeToClose: true
},
// Cordova Statusbar settings
statusbar: {
overlay: (this.$device.cordova && this.$device.ios) || 'auto',
overlay: 'auto',
iosOverlaysWebView: true,
androidOverlaysWebView: false
},
@ -575,8 +568,6 @@ export default {
this.loggedIn = false
this.$f7.views.main.router.navigate('/', { animate: false, clearPreviousHistory: true })
window.location = window.location.origin
if (this.$device.cordova) {
}
}).catch((err) => {
this.$f7.preloader.hide()
this.$f7.dialog.alert('Error while signing out: ' + err)
@ -668,18 +659,6 @@ export default {
this.updateThemeOptions()
this.$f7.data.themeOptions = this.themeOptions
// Init cordova APIs (see cordova-app.js)
if (f7.device.cordova) {
cordovaApp.init(f7)
if (!localStorage.getItem('openhab.ui:serverUrl')) {
this.loginScreenOpened = true
return
}
this.loggedIn = true
}
if (!this.user) {
this.tryExchangeAuthorizationCode().then((user) => {
this.loggedIn = true

View File

@ -1,7 +1,3 @@
/* iOS Cordova Tweak */
.device-cordova.device-ios
height 100vh
/* Disable Android Chrome pull-to-refresh */
html
overscroll-behavior-y contain

View File

@ -30,9 +30,6 @@
</head>
<body>
<div id="app"></div>
<% if (process.env.TARGET === 'cordova') { %>
<script src="cordova.js"></script>
<% } %>
<!-- built script files will be auto injected -->
</body>
</html>

View File

@ -1,98 +0,0 @@
import Vue from 'vue'
import openhab from './openhab/cordova/index'
const cordovaApp = {
f7: null,
/*
This method hides splashscreen after 2 seconds
*/
handleSplashscreen: function () {
if (!window.navigator.splashscreen) return
setTimeout(() => {
window.navigator.splashscreen.hide()
}, 2000)
},
/*
This method prevents back button tap to exit from app on android.
And allows to exit app on backbutton double tap
*/
handleAndroidBackButton: function () {
cordovaApp.backButtonTimestamp = new Date().getTime()
document.addEventListener('backbutton', function (e) {
if (new Date().getTime() - cordovaApp.backButtonTimestamp < 250) {
cordovaApp.backButtonTimestamp = new Date().getTime()
if (window.navigator.app && window.navigator.app.exitApp) {
window.navigator.app.exitApp()
}
return true
}
cordovaApp.backButtonTimestamp = new Date().getTime()
e.preventDefault()
return false
}, false)
},
/*
This method does the following:
- provides cross-platform view "shrinking" on keyboard open/close
- hides keyboard accessory bar for all inputs except where it required
*/
handleKeyboard: function () {
if (!window.Keyboard || !window.Keyboard.shrinkView) return
let f7 = cordovaApp.f7
let $ = f7.$
window.Keyboard.shrinkView(false)
window.Keyboard.disableScrollingInShrinkView(true)
window.Keyboard.hideFormAccessoryBar(true)
window.addEventListener('keyboardWillShow', () => {
f7.input.scrollIntoView(document.activeElement, 0, true, true)
})
window.addEventListener('keyboardDidShow', () => {
f7.input.scrollIntoView(document.activeElement, 0, true, true)
})
window.addEventListener('keyboardDidHide', () => {
if (document.activeElement && $(document.activeElement).parents('.messagebar').length) {
return
}
window.Keyboard.hideFormAccessoryBar(false)
})
window.addEventListener('keyboardHeightWillChange', (event) => {
let keyboardHeight = event.keyboardHeight
if (keyboardHeight > 0) {
// Keyboard is going to be opened
document.body.style.height = `calc(100% - ${keyboardHeight}px)`
$('html').addClass('device-with-keyboard')
} else {
// Keyboard is going to be closed
document.body.style.height = ''
$('html').removeClass('device-with-keyboard')
}
})
$(document).on('touchstart', 'input, textarea, select', function (e) {
let nodeName = e.target.nodeName.toLowerCase()
let type = e.target.type
let showForTypes = ['datetime-local', 'time', 'date', 'datetime']
if (nodeName === 'select' || showForTypes.indexOf(type) >= 0) {
window.Keyboard.hideFormAccessoryBar(false)
} else {
window.Keyboard.hideFormAccessoryBar(true)
}
}, true)
},
init: function (f7) {
// Save f7 instance
cordovaApp.f7 = f7
// Handle Android back button
// cordovaApp.handleAndroidBackButton()
// Handle Statusbar
cordovaApp.handleSplashscreen()
// Handle Keyboard
cordovaApp.handleKeyboard()
// register Cordova-compatible API interface
Vue.prototype.$oh = openhab
}
}
export default cordovaApp

View File

@ -1,113 +0,0 @@
function prepareRequest (uri) {
// prepend uri with base if applicable (Cordova)
const serverUrl = localStorage.getItem('openhab.ui:serverUrl')
const username = localStorage.getItem('openhab.ui:username')
const password = localStorage.getItem('openhab.ui:password')
if (!serverUrl) {
return null
}
uri = serverUrl + uri
if (cordova && cordova.plugin.http) {
cordova.plugin.http.setDataSerializer('json')
if (username && password) {
cordova.plugin.http.useBasicAuth(username, password)
}
}
return uri
}
export default {
setAccessToken () {
console.warn('Not supported in Cordova yet')
},
get (uri, data) {
const fullUri = prepareRequest(uri)
if (fullUri) {
return new Promise((resolve, reject) => {
cordova.plugin.http.get(fullUri, null, {},
function (response) {
resolve(JSON.parse(response.data))
}, function (response) {
reject(response.error)
})
})
}
},
post (uri, data) {
const fullUri = prepareRequest(uri)
if (fullUri) {
return new Promise((resolve, reject) => {
cordova.plugin.http.post(fullUri, data, {},
function (response) {
resolve(JSON.parse(response.data))
}, function (response) {
reject(response.error)
})
})
}
},
postPlain (uri, data, dataType, contentType) {
const fullUri = prepareRequest(uri)
const headers = { 'Content-Type': contentType || 'text/plain' }
if (fullUri) {
cordova.plugin.http.setDataSerializer('utf8')
return new Promise((resolve, reject) => {
cordova.plugin.http.setDataSerializer('json')
cordova.plugin.http.post(fullUri, data, headers,
function (response) {
resolve(JSON.parse(response.data))
}, function (response) {
reject(response.error)
})
})
}
},
put (uri, data) {
const fullUri = prepareRequest(uri)
if (fullUri) {
return new Promise((resolve, reject) => {
cordova.plugin.http.put(fullUri, data, {},
function (response) {
resolve(JSON.parse(response.data))
}, function (response) {
reject(response.error)
})
})
}
},
putPlain (uri, data, dataType, contentType) {
const fullUri = prepareRequest(uri)
const headers = { 'Content-Type': contentType || 'text/plain' }
if (fullUri) {
cordova.plugin.http.setDataSerializer('utf8')
return new Promise((resolve, reject) => {
cordova.plugin.http.setDataSerializer('json')
cordova.plugin.http.put(fullUri, data, headers,
function (response) {
resolve(JSON.parse(response.data))
}, function (response) {
reject(response.error)
})
})
}
},
head (uri) {
// Not implemented
return Promise.resolve()
},
delete (uri, data) {
const fullUri = prepareRequest(uri)
if (fullUri) {
return new Promise((resolve, reject) => {
cordova.plugin.http.delete(fullUri, null, {},
function (response) {
resolve(JSON.parse(response.data))
}, function (response) {
reject(response.error)
})
})
}
}
}

View File

@ -1,13 +0,0 @@
import api from './api'
import auth from '../auth'
import sse from './sse'
import media from './media'
import speech from './speech'
export default {
api,
auth,
sse,
media,
speech
}

View File

@ -1,39 +0,0 @@
import Framework7 from 'framework7/framework7-lite.esm.bundle.js'
export default {
getIcon: (icon, format) => {
if (!format) format = 'svg'
// prepend uri with base if applicable (Cordova)
const serverUrl = localStorage.getItem('openhab.ui:serverUrl')
const username = localStorage.getItem('openhab.ui:username')
const password = localStorage.getItem('openhab.ui:password')
if (serverUrl) {
if (cordova && cordova.plugin.http) {
if (username && password) {
cordova.plugin.http.useBasicAuth(username, password)
}
return new Promise((resolve, reject) => {
const directory = (Framework7.device.android) ? cordova.file.cacheDirectory : cordova.file.tempDirectory
window.resolveLocalFileSystemURL(`${directory}/icon_${icon}.${format}`, (entry) => {
// icon found in cache
resolve(entry.toURL())
}, () => {
// download icon to cache
cordova.plugin.http.downloadFile(`${serverUrl}/icon/${icon}`, { format: format, anyFormat: true },
{}, `${directory}/icon_${icon}.${format}`, (entry) => {
resolve(entry.toURL())
}, (response) => {
reject(response.error)
})
})
})
}
}
},
getImage (url) {
return Promise.resolve(url)
}
}

View File

@ -1,5 +0,0 @@
export default {
isRecognitionSupported () {
return false
}
}

View File

@ -1,160 +0,0 @@
/* eslint-disable no-undef */
export default {
/* This is a buggy and probably unreliable SSE client implementation
using native sockets, to cope with CORS and iOS's WKWebView.
*/
connect (path, topics, callback, errorCallback) {
let clientSockets = []
let buffer = ''
const serverUrl = localStorage.getItem('openhab.ui:serverUrl')
// const username = localStorage.getItem('openhab.ui:username')
// const password = localStorage.getItem('openhab.ui:password')
const server = new URL(serverUrl)
const hostname = server.hostname
const tls = server.protocol === 'https:'
const port = parseInt(server.port) || (tls ? 443 : 80)
const requestString = `GET ${path} HTTP/1.1\r\nHost: ${hostname}\r\n\r\n`
const request = new ArrayBuffer(requestString.length)
const reqView = new Uint8Array(request)
for (let i = 0, strLen = requestString.length; i < strLen; i++) {
reqView[i] = requestString.charCodeAt(i)
}
const decoder = new TextDecoder('utf-8')
const recvListener = (info) => {
let decoded = decoder.decode(info.data)
if (decoded.substring(0, 4) === 'HTTP') {
return // ignore headers
}
if (buffer.length) {
console.info('Buffer present, prepending!')
console.info('BUFFER: ' + buffer)
console.info('DECODED: ' + decoded)
}
let original = buffer + decoded
decoded = original
buffer = ''
let final = ''
let chunkSizes = []
let chunks = []
let payload = {}
decoded = decoded.trimLeft()
while (decoded.trim().length) {
let chunk
while (decoded.length && (decoded[0] === '\r' || decoded[0] === '\n')) {
decoded = decoded.substring(1)
}
let chunkSizeHexa = decoded.substring(0, decoded.indexOf('\r\n'))
let chunkSize = parseInt('0x' + chunkSizeHexa)
chunkSizes.push(chunkSize)
console.trace('chunk size: ' + chunkSize + ' (0x' + chunkSizeHexa + ')')
if (chunkSize > 0) {
decoded = decoded.substring(decoded.indexOf('\r\n') + 2)
chunk = decoded.substring(0, chunkSize)
chunks.push(chunk)
final += chunk
decoded = decoded.substring(chunkSize)
while (decoded.length && (decoded[0] === '\r' || decoded[0] === '\n')) {
decoded = decoded.substring(1)
}
} else {
console.error('Error while decoding chunk (size=' + chunkSize + ')')
console.trace('ORIGINAL: ' + original)
console.trace('CHUNKED: ' + decoded)
// debugger
console.log('dismissing data')
return
}
}
// console.log('FINAL: ' + final)
if (final[final.length - 1] !== '\n') {
console.trace('data not ending w/ newline, continuing the buffering: ' + final)
buffer = original
return
}
for (let sseLine of final.split('\n')) {
if (sseLine.trim().length === 0) payload = {}
if (sseLine.trim().indexOf('event') === 0) {
payload.event = sseLine.substring(6)
}
if (sseLine.trim().indexOf('data') === 0) {
try {
payload.data = JSON.parse(sseLine.substring(5).replace('\r', '').trim())
} catch (e) {
console.warn(e)
console.warn(original)
// buffer = original;
break
}
console.log(payload.data)
callback(payload.data)
payload = {}
}
}
}
chrome.sockets.tcp.onReceive.addListener(recvListener)
const errorListener = (info) => {
console.log('SSE error')
console.log(info)
if (errorCallback) {
errorCallback(info)
}
}
chrome.sockets.tcp.onReceiveError.addListener(errorListener)
let clientInfo = {
socketId: null,
path: path,
topics: topics
}
chrome.sockets.tcp.create({}, function (clientCreateInfo) {
clientSockets.push(clientCreateInfo)
console.log('socket created')
clientInfo.socketId = clientSockets[0].socketId
chrome.sockets.tcp.setPaused(clientSockets[0].socketId, true, function () {
chrome.sockets.tcp.connect(clientSockets[0].socketId, hostname, port, function (connectResult) {
console.log('connected')
if (tls) {
// expect(connectResult).toEqual(0);
chrome.sockets.tcp.secure(clientSockets[0].socketId, { tlsVersion: { min: 'tls1.2', max: 'tls1.3' } }, function (secureResult) {
console.log('TLS established')
// expect(secureResult).toEqual(0);
chrome.sockets.tcp.send(clientSockets[0].socketId, request, function (sendResult) {
console.log('request sent')
// expect(sendResult.resultCode).toEqual(0);
// expect(sendResult.bytesSent).toEqual(requestString.length);
chrome.sockets.tcp.setPaused(clientSockets[0].socketId, false)
})
})
} else {
chrome.sockets.tcp.send(clientSockets[0].socketId, request, function (sendResult) {
console.log('request sent')
// expect(sendResult.resultCode).toEqual(0);
// expect(sendResult.bytesSent).toEqual(requestString.length);
chrome.sockets.tcp.setPaused(clientSockets[0].socketId, false)
})
}
})
})
return clientSockets[0]
})
return clientInfo
},
close (clientInfo, callback) {
if (clientInfo && clientInfo.socketId) {
chrome.sockets.tcp.close(clientInfo.socketId, callback)
}
}
}

View File

@ -446,24 +446,6 @@ export default [
component: AnalyzerPopup
}
},
/* For Cordova */
{
path: '/res/(.*)',
redirect: '/'
},
{
path: '/home/',
redirect: '/'
},
// temp disable
// {
// path: '/android_asset/(.*)',
// redirect: '/'
// },
// {
// path: '/var/containers/(.*)',
// redirect: '/'
// },
{
path: '(.*)',
component: NotFoundPage

View File

@ -229,9 +229,6 @@ export default {
this.loggedIn = false
this.$f7.views.main.router.navigate('/', { animate: false, clearPreviousHistory: true })
window.location = window.location.origin
if (this.$device.cordova) {
this.loginScreenOpened = true
}
}).catch((err) => {
this.$f7.preloader.hide()
this.$f7.dialog.alert(this.$t('profile.sessions.signOut.error') + err)