diff --git a/.eslintrc.js b/.eslintrc.js index 9fe1848..a652748 100755 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -259,32 +259,6 @@ module.exports = { }], "vue/script-indent": ["error", 4, { baseIndent: 1, - // "switchCase": 0, - // "ignores": [], - }],"vue/order-in-components": ["error", { - "order": [ - "el", - "name", - "parent", - "functional", - ["delimiters", "comments"], - ["components", "directives", "filters"], - "extends", - "mixins", - "inheritAttrs", - "model", - ["props", "propsData"], - "fetch", - "asyncData", - "data", - "computed", - "watch", - "methods", - "LIFECYCLE_HOOKS", - "head", - ["template", "render"], - "renderError", - ] }], }, "overrides": [ @@ -297,7 +271,7 @@ module.exports = { ], "settings": { "import/ignore": [ - /^xdg-basedir$/u, + (/^xdg-basedir$/u), ], }, }; diff --git a/render/custom.d.ts b/@types/images.d.ts similarity index 100% rename from render/custom.d.ts rename to @types/images.d.ts diff --git a/vue-shims.d.ts b/@types/vue.d.ts similarity index 100% rename from vue-shims.d.ts rename to @types/vue.d.ts diff --git a/PLANS.md b/PLANS.md index 75e21e4..d706d10 100644 --- a/PLANS.md +++ b/PLANS.md @@ -1,14 +1,9 @@ Next milestone -- GUI to configure switches, ties, and sources. -- Debian/Raspbian package. - -2nd milestone - - Settings page with the following general options - A switch to enable power-on signal during start-up for switches/monitors. - A switch to enable or disable start-up with login session. -3rd milestone +2nd milestone - Device descriptors to allow for capability definitions of devices supported by a driver. diff --git a/README.md b/README.md index f49fad9..851245a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A/V switch and monitor controller ### BridgeCmdr -Copyright ©2019 Matthew Holder +Copyright ©2019-2020 Matthew Holder This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later @@ -27,6 +27,20 @@ To install BridgeCmdr on the Raspberry Pi, all you need do is download the [latest release](https://github.com/6XGate/bridgecmdr/releases) and install it with `sudo apt install ./bridgecmdr_-_armhf.deb -y` +### System Requirements + +I've only tested this software on a Raspberry Pi 3 Model B+. In general I would recommend at minimal a Raspberry Pi 3 +Model B or better. Which would include every configuration of the Raspberry Pi 4 Model B. It may run on other models, +but this has not been tested. + +You will also need a touchscreen, such as the official Raspberry Pi touchscreen, or a mouse and screen. You will also +need a keyboard while setting up your configuration, but it is not needed during day-to-day use. + +You may also need additional USB-to-serial adapters or a serial HAT. Some supported monitors and switches can be +controlled over ethernet. For those you will need an ethernet cable; and if you have more than one such device, an +ethernet hub or switch. See [Wiki](https://github.com/6XGate/bridgecmdr/wiki) for more information on how to connect to +supported monitors and switches. + ## Tools, Frameworks, Libraries, and Assets BridgeCmdr uses the following libraries and frameworks which are available under their respective license. @@ -43,28 +57,31 @@ BridgeCmdr uses the following libraries and frameworks which are available under | [Node UUID](https://github.com/kelektiv/node-uuid) | [MIT](https://github.com/kelektiv/node-uuid/blob/master/LICENSE.md) | | [electron-unhandled](https://github.com/sindresorhus/electron-unhandled) | [MIT](https://github.com/sindresorhus/electron-unhandled/blob/master/license) | | [xdg-basedir](https://github.com/sindresorhus/xdg-basedir) | [MIT](https://github.com/sindresorhus/xdg-basedir/blob/master/license) | +| [vue-typed-mixins](https://github.com/ktsn/vue-typed-mixins) | [MIT](https://github.com/ktsn/vue-typed-mixins/blob/master/LICENSE) | Other dependencies not listed are part of one of the above packages and share the same license. -BridgeCmdr also uses the [Material Design Icons](https://dev.materialdesignicons.com/) font and SVG graphics which is +BridgeCmdr also uses the [Material Design Icons](https://dev.materialdesignicons.com/) font and SVG graphics which are licensed under the [SIL Open Font License](https://github.com/Templarian/MaterialDesign/blob/master/LICENSE) v1.0. Finally, the following tools or libraries were used to build BridgeCmdr. +- [cross-env](https://github.com/kentcdodds/cross-env). - [moment](https://momentjs.com/). - [read-package-json](https://github.com/npm/read-package-json). -- [TypeScript](https://www.typescriptlang.org/) +- [TypeScript](https://www.typescriptlang.org/). - [ESLint](https://eslint.org/), and the following third-party plug-ins; - - [ESLint Import Plug-in](https://github.com/benmosher/eslint-plugin-import) - - [ESLint Promise Plug-in](https://github.com/xjamundx/eslint-plugin-promise) - - [ESLint Node Plug-in](https://github.com/mysticatea/eslint-plugin-node) + - [ESLint Import Plug-in](https://github.com/benmosher/eslint-plugin-import), + - [ESLint Promise Plug-in](https://github.com/xjamundx/eslint-plugin-promise), + - [ESLint Node Plug-in](https://github.com/mysticatea/eslint-plugin-node), - [WebPack](https://webpack.js.org/), and the following third-party plug-ins; - - [TypeScript Loader](https://github.com/TypeStrong/ts-loader) - - [Resolve URL Loader](https://github.com/bholloway/resolve-url-loader) - - [Node Externals](https://github.com/liady/webpack-node-externals) - - [HTML WebPack Plug-in](https://github.com/jantimon/html-webpack-plugin) + - [TypeScript Loader](https://github.com/TypeStrong/ts-loader), + - [Resolve URL Loader](https://github.com/bholloway/resolve-url-loader), + - [Node Externals](https://github.com/liady/webpack-node-externals), + - [HTML WebPack Plug-in](https://github.com/jantimon/html-webpack-plugin), - [Dart Sass](https://sass-lang.com/dart-sass), and the following third-party plug-ins; - [Node Fibers](https://github.com/laverdet/node-fibers) +- [Electron DevTools Installer](https://github.com/MarshallOfSound/electron-devtools-installer). - [Electron Installer (Debian)](https://github.com/electron-userland/electron-installer-debian). - [PHPStorm](https://www.jetbrains.com/phpstorm/), but no PHP code was harmed in the making of this software. - [VisualStudio Code](https://code.visualstudio.com/) @@ -75,39 +92,53 @@ Other tools or licenses not listed are part of one of the above packages. ### Development -If you want to help with the development of BridgeCmdr, downloading, building, and running the project on a Linux system -is easy. +If you want to help with the development of BridgeCmdr, downloading, building, then running the project on a GNU/Linux +based operating system is required. The following steps will get you setup on a Debian-base operating system. -1. Download the [source](https://github.com/6XGate/bridgecmdr/archive/master.zip) and extract it. -2. Open a terminal clone and go to the folder into which source was extracted. -3. Install the `build-essential` package. - - `sudo apt install build-essential -y` -4. Install the node packages. - - `npm ci` or `npm install` -5. Build the user interface source. - - `npm run prod` or `npm run dev` +1. Install the `build-essential` package; `sudo apt install build-essential -y` +2. Acquire the source: + - **Preferred**, Fork the [GitHub repository](https://github.com/6XGate/bridgecmdr), you may then issue pull + requests back to the official source code. Also start personal branches from `develop`. + - Download the [source](https://github.com/6XGate/bridgecmdr/archive/develop.zip) and extract it. +3. Open a terminal clone and go to the folder into which source was cloned or extracted. +4. Install the node packages; `npm ci` +5. Build the user interface source; `npm run prod` or `npm run dev` You should now be able to run the program with `npm run start`. ### Packaging the Installer -Though not optimal, the only way to currently building a package requires a Raspberry Pi with Raspbian and a desktop -computer running Debian or Ubuntu. This should change in the future. Other desktop Linux distributions may work, but - it's not tested. - - With a Raspberry Pi 4, given the larger memory configuration, it may be possible to do all of this on the Raspberry Pi - system alone. - -1. Download the [source](https://github.com/6XGate/bridgecmdr/archive/develop.zip) and extract it on both systems. -2. On both systems; open a terminal clone and go to the folder into which source was extracted. -3. On both systems; install the `build-essential` package. - - `sudo apt install build-essential -y` -4. On both systems; install the node packages. - - `npm ci` or `npm install` -5. On the desktop system, build the user interface source. - - `npm run prod` or `npm run dev` -6. Copy the `dist` folder from the desktop system to project folder on the Raspberry Pi system. -7. Package the installer on the Raspberry Pi system. - - `npm run pack` - -You should now have a Debian package in the `out` folder. This package can be installed with `apt` on the Raspberry Pi. +To package or build the install, you will need to follow the above steps you acquire the a working copy of the source +code on a Raspberry Pi running Raspbian, the only supported operating system. + +There are two ways to build the installer package depending on which model of Raspberry Pi you have. + +#### Using a 1GiB Raspberry Pi and a desktop computer. + +The following systems must use this method: + +- Raspberry Pi 3 Model B +- Raspberry Pi 3 Model B+ +- 1GiB Raspberry Pi 4 Model B, +- Any model with lesser specs than those above, though this is as untested as running BridgeCmdr on it. + +Though not optimal, the only way to build a package on a 1GiB Raspberry Pi is to use a desktop computer running a +GNU/Linux based operating system to build the user interface and the Pi to build the installer package. + +1. On both systems, install the node packages; `npm ci` +2. On the desktop system, build the user interface source; `npm run prod` +3. Copy the `dist` folder from the desktop system to project folder on the Raspberry Pi system. +4. Package the installer on the Raspberry Pi system; `npm run pack` + +#### Using Raspberry Pi with more RAM. + +If you are running a Raspberry Pi 4 with 2GiB or 4GiB, all instructions can be done without copying the user interface +files and you will only use that single system. This is a simplest process. + +1. Install the node packages; `npm ci` +2. Build the installer package; `npm run package` + +#### The Package + +You should now have a Raspbian package ending in `.deb` in the `out` folder. This package can be installed with `apt` on +the Raspberry Pi. diff --git a/bridgecmdr b/bridgecmdr index f3a72af..efbbd59 100755 --- a/bridgecmdr +++ b/bridgecmdr @@ -1,7 +1,7 @@ #!/bin/bash # BridgeCmdr - A/V switch and monitor controller -# Copyright (C) 2019 Matthew Holder +# Copyright (C) 2019-2020 Matthew Holder # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/build/build.common.js b/build/build.common.js index abac4bf..61bcdab 100644 --- a/build/build.common.js +++ b/build/build.common.js @@ -1,6 +1,6 @@ /* BridgeCmdr - A/V switch and monitor controller -Copyright (C) 2019 Matthew Holder +Copyright (C) 2019-2020 Matthew Holder This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/build/electron-packer.js b/build/electron-packer.js index 1c92569..f4784e6 100644 --- a/build/electron-packer.js +++ b/build/electron-packer.js @@ -1,6 +1,6 @@ /* BridgeCmdr - A/V switch and monitor controller -Copyright (C) 2019 Matthew Holder +Copyright (C) 2019-2020 Matthew Holder This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/build/electron.package.js b/build/electron.package.js index ff2117b..6741c83 100644 --- a/build/electron.package.js +++ b/build/electron.package.js @@ -1,6 +1,6 @@ /* BridgeCmdr - A/V switch and monitor controller -Copyright (C) 2019 Matthew Holder +Copyright (C) 2019-2020 Matthew Holder This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/build/webpack-packer.js b/build/webpack-packer.js index 4423568..9ce5256 100644 --- a/build/webpack-packer.js +++ b/build/webpack-packer.js @@ -1,6 +1,6 @@ /* BridgeCmdr - A/V switch and monitor controller -Copyright (C) 2019 Matthew Holder +Copyright (C) 2019-2020 Matthew Holder This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -31,17 +31,22 @@ const nodeExternals = require("webpack-node-externals"); * ===================================================================================================================== * Plug-ins */ -const CopyPlugin = require("copy-webpack-plugin"); -const MiniCssExtractPlugin = require("mini-css-extract-plugin"); -const HtmlWebpackPlugin = require("html-webpack-plugin"); -const VueLoaderPlugin = require("vue-loader/lib/plugin"); +const CopyPlugin = require("copy-webpack-plugin"); +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); +const FriendlyErrorsWebpackPlugin = require("friendly-errors-webpack-plugin"); +const HtmlWebpackPlugin = require("html-webpack-plugin"); +const VueLoaderPlugin = require("vue-loader/lib/plugin"); /* * ===================================================================================================================== * Specials */ -const isDev = process.env.NODE_ENV !== "development"; +const isProd = process.env.NODE_ENV === "production"; +const isDev = process.env.NODE_ENV === "development"; +if (!isProd && !isDev) { + throw new Error('NODE_ENV must be set to "production" or "development"'); +} /* * ===================================================================================================================== @@ -133,7 +138,7 @@ class Packer { sass: { loader: "sass-loader", options: { - sourceMap: isDev, + sourceMap: true, implementation: require("sass"), sassOptions: { fiber: require("fibers"), @@ -157,8 +162,9 @@ class Packer { use: [loaders.esLint], }, typeScript: { - test: (/\.ts$/u), - use: [loaders.typeScript], + test: (/\.ts$/u), + exclude: (/node_modules/u), + use: [loaders.typeScript], }, css: { test: (/\.css$/u), @@ -364,6 +370,7 @@ class Packer { */ [GeneratePlugins]() { const plugins = this[myPlugins].concat([ + new FriendlyErrorsWebpackPlugin(), new MiniCssExtractPlugin({ filename: "[name].css", chunkFilename: "[id].css", @@ -381,7 +388,7 @@ class Packer { title: productName, filename: path.resolve(packerConfigPath, outdir, "index.html"), template: path.resolve(packerConfigPath, html), - minify: isDev, + minify: isProd, // TODO: favicon, meta })); } @@ -396,25 +403,35 @@ class Packer { return plugins; } + // TODO: Set `.context` and `.stats.context` options. + /** * @param {Object.} env * @param {string} target * @return {Promise} */ - generate(env, target) { + generate(target) { return allReady.then(() => _.merge({ - mode: env.NODE_ENV, + mode: process.env.NODE_ENV, target: target, stats: { - builtAt: false, // Don't need to know when it was built. - children: false, // Don't need to see all the children. - chunks: false, // Don't really need to know the chunks. - chunkGroups: false, // Don't really need to know the chunk groups. - chunkModules: false, // Don't need to know the modules in a chunk. - chunkOrigins: false, // Don't really need to know the chunk origins. - hash: false, // Don't really need to know the hash. - modules: false, // Don't need to know the modules. - reasons: false, // Don't need to know why modules are included. + builtAt: false, // Don't need to show when it was built. + children: false, // Don't need to see all the children. + chunks: false, // Don't really need to show the chunks. + entrypoints: false, // Don't really need to show the entry-points. + errors: false, // Don't display error details, there is a plug-in for that. + errorDetails: false, // Don't display error details, there is a plug-in for that. + hash: false, // Don't really need to show the hash. + modules: false, // Don't need to show the modules. + performance: isProd, // Base performance reporting on target environment. + publicPath: false, // Don't really need to show the public path. + reasons: false, // Don't need to know why modules are included. + source: false, // Don't really need to show the source code. + timings: false, // Don't really need to show the timing information. + version: false, // Don't really need to show the version information. + }, + performance: { + hints: false, }, externals: [ nodeExternals({ @@ -445,7 +462,8 @@ class Packer { }, plugins: this[GeneratePlugins](), resolve: { - extensions: [ ".wasm", ".vue", ".ts", ".mjs", ".js" ], + extensions: [ ".wasm", ".mjs", ".js", ".ts", ".json", ".vue" ], + alias: { "vue$": "vue/dist/vue.esm.js" }, }, }, this[myExtras])); } diff --git a/build/webpack.config.js b/build/webpack.config.js index 754e517..5190f54 100644 --- a/build/webpack.config.js +++ b/build/webpack.config.js @@ -1,6 +1,6 @@ /* BridgeCmdr - A/V switch and monitor controller -Copyright (C) 2019 Matthew Holder +Copyright (C) 2019-2020 Matthew Holder This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ const packerConfigPath = ".."; require(path.join(packerConfigPath, "webpack.packer")); // Now export our functions. -module.exports = env => Promise.all([ - packer.main.generate(env, "electron-main"), - packer.render.generate(env, "electron-renderer"), +module.exports = () => Promise.all([ + packer.main.generate("electron-main"), + packer.render.generate("electron-renderer"), ]); diff --git a/copyright.template.txt b/copyright.template.txt index 6a54aa5..d940bbc 100644 --- a/copyright.template.txt +++ b/copyright.template.txt @@ -1,5 +1,5 @@ BridgeCmdr - A/V switch and monitor controller -Copyright (C) 2019 Matthew Holder +Copyright (C) 2019-2020 Matthew Holder This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/electron.packer.js b/electron.packer.js index f857679..2ed6002 100644 --- a/electron.packer.js +++ b/electron.packer.js @@ -1,6 +1,6 @@ /* BridgeCmdr - A/V switch and monitor controller -Copyright (C) 2019 Matthew Holder +Copyright (C) 2019-2020 Matthew Holder This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/main/index.ts b/main/index.ts index 4cc0196..7de8e56 100644 --- a/main/index.ts +++ b/main/index.ts @@ -1,6 +1,6 @@ /* BridgeCmdr - A/V switch and monitor controller -Copyright (C) 2019 Matthew Holder +Copyright (C) 2019-2020 Matthew Holder This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,7 @@ import unhandled from "electron-unhandled"; unhandled(); import { app, BrowserWindow } from "electron"; +import installExtension, { VUEJS_DEVTOOLS } from "electron-devtools-installer"; let window: BrowserWindow|null = null; @@ -65,10 +66,13 @@ process.on("SIGTERM", () => { app.on("ready", (): void => { if (process.env.NODE_ENV !== "production") { - require("./devtools"); + installExtension(VUEJS_DEVTOOLS). + then(name => { console.log(`Installing ${name}`); }). + then(() => { createWindow(); }). + catch(error => { console.error(error); }); + } else { + createWindow(); } - - createWindow(); }); app.on("window-all-closed", (): void => { diff --git a/package-lock.json b/package-lock.json index a01cb98..64f1218 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,9 +1,15 @@ { "name": "bridgecmdr", - "version": "0.9.0", + "version": "1.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { + "7zip": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/7zip/-/7zip-0.0.6.tgz", + "integrity": "sha1-nK+xca+CMpSQNTtIFvAzR6oVCjA=", + "dev": true + }, "@babel/code-frame": { "version": "7.5.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", @@ -145,6 +151,12 @@ "integrity": "sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ==", "dev": true }, + "@types/electron-devtools-installer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@types/electron-devtools-installer/-/electron-devtools-installer-2.2.0.tgz", + "integrity": "sha512-HJNxpaOXuykCK4rQ6FOMxAA0NLFYsf7FiPFGmab0iQmtVBHSAfxzy3MRFpLTTDDWbV0yD2YsHOQvdu8yCqtCfw==", + "dev": true + }, "@types/eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", @@ -1951,6 +1963,58 @@ "sha.js": "^2.4.8" } }, + "cross-env": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-6.0.3.tgz", + "integrity": "sha512-+KqxF6LCvfhWvADcDPqo64yVIB31gv/jQulX2NGzKS/g3GEVz6/pt4wjHFtFWsHMddebWD/sDthJemzM4MaAag==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz", + "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "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==", + "dev": true, + "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==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -2002,6 +2066,12 @@ } } }, + "cross-unzip": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/cross-unzip/-/cross-unzip-0.0.2.tgz", + "integrity": "sha1-UYO8R6CVWb78+YzEZXlkmZNZNy8=", + "dev": true + }, "cross-zip": { "version": "2.1.6", "resolved": "https://registry.npmjs.org/cross-zip/-/cross-zip-2.1.6.tgz", @@ -2432,6 +2502,18 @@ } } }, + "electron-devtools-installer": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/electron-devtools-installer/-/electron-devtools-installer-2.2.4.tgz", + "integrity": "sha512-b5kcM3hmUqn64+RUcHjjr8ZMpHS2WJ5YO0pnG9+P/RTdx46of/JrEjuciHWux6pE+On6ynWhHJF53j/EDJN0PA==", + "dev": true, + "requires": { + "7zip": "0.0.6", + "cross-unzip": "0.0.2", + "rimraf": "^2.5.2", + "semver": "^5.3.0" + } + }, "electron-installer-common": { "version": "0.7.3", "resolved": "https://registry.npmjs.org/electron-installer-common/-/electron-installer-common-0.7.3.tgz", @@ -2783,6 +2865,15 @@ "is-arrayish": "^0.2.1" } }, + "error-stack-parser": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.6.tgz", + "integrity": "sha512-d51brTeqC+BHlwF0BhPtcYgF5nlzf9ZZ0ZIUQNZpc9ZB9qw5IJ2diTrBY9jlCJkTLITYPjmiX6OWCwH+fuyNgQ==", + "dev": true, + "requires": { + "stackframe": "^1.1.1" + } + }, "es-abstract": { "version": "1.13.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", @@ -4021,6 +4112,77 @@ "map-cache": "^0.2.2" } }, + "friendly-errors-webpack-plugin": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.7.0.tgz", + "integrity": "sha512-K27M3VK30wVoOarP651zDmb93R9zF28usW4ocaK3mfQeIEI5BPht/EzZs5E8QLLwbLRJQMwscAjDxYPb1FuNiw==", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "error-stack-parser": "^2.0.0", + "string-width": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, "from2": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", @@ -4428,6 +4590,15 @@ "function-bind": "^1.1.1" } }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -5527,9 +5698,9 @@ "dev": true }, "mini-css-extract-plugin": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.8.2.tgz", - "integrity": "sha512-a3Y4of27Wz+mqK3qrcd3VhYz6cU0iW5x3Sgvqzbj+XmlrSizmvu8QQMl5oMYJjgHOC4iyt+w7l4umP+dQeW3bw==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.9.0.tgz", + "integrity": "sha512-lp3GeY7ygcgAmVIcRPBVhIkf8Us7FZjA+ILpal44qLdSu11wmjKQ3d9k15lfD7pO4esu9eUIAW7qiYIBppv40A==", "dev": true, "requires": { "loader-utils": "^1.1.0", @@ -7881,6 +8052,12 @@ "figgy-pudding": "^3.5.1" } }, + "stackframe": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.1.1.tgz", + "integrity": "sha512-0PlYhdKh6AfFxRyK/v+6/k+/mMfyiEBbTM5L94D0ZytQnJ166wuwoTYLHFWGbs2dpA8Rgq763KGWmN1EQEYHRQ==", + "dev": true + }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", @@ -8722,12 +8899,6 @@ "integrity": "sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ==", "dev": true }, - "vue-devtools": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/vue-devtools/-/vue-devtools-5.1.3.tgz", - "integrity": "sha512-5hfJ4JiPn9hL3CFjrmdx6UOqZATjqBYNSC8ZyGgwnqO2jQ4VfX/9k6KZcxPTWeyHDIX7D4BEIYP0fgrJL3RKTw==", - "dev": true - }, "vue-eslint-parser": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-6.0.5.tgz", @@ -8800,6 +8971,12 @@ "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", "dev": true }, + "vue-typed-mixins": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/vue-typed-mixins/-/vue-typed-mixins-0.2.0.tgz", + "integrity": "sha512-0OxuinandPWv3nm5k/reYkuKtX3jjPZ40Sy9roJz0ih8PUzmI7zSRiXFEJ62LsyRegw9Tqy+qMkajk7ipKP8Vg==", + "dev": true + }, "vuetify": { "version": "2.1.15", "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.1.15.tgz", diff --git a/package.json b/package.json index a671f9e..e925eb7 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { "name": "bridgecmdr", "productName": "BridgeCmdr", - "version": "1.0.1", + "version": "1.1.0", "description": "Professional Raspberry Pi A/V switch and monitor controller for retro gaming", "main": "dist/main/index.js", "scripts": { "install": "electron-rebuild", "rebuild": "electron-rebuild", "production": "npm run prod", - "prod": "webpack --env.NODE_ENV=production --env.production --progress --hide-modules --config build/webpack.config.js", + "prod": "cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.config.js", "devevlopment": "npm run dev", - "dev": "webpack --env.NODE_ENV=development --env.development --progress --hide-modules --config build/webpack.config.js", + "dev": "cross-env NODE_ENV=development webpack --progress --hide-modules --config build/webpack.config.js", "pack": "node build/electron.package.js", "start": "electron .", "test": "test.js", @@ -40,6 +40,7 @@ "devDependencies": { "@mdi/font": "^4.7.95", "@mdi/svg": "^4.7.95", + "@types/electron-devtools-installer": "^2.2.0", "@types/lodash": "^4.14.149", "@types/pouchdb": "^6.4.0", "@types/serialport": "^7.0.4", @@ -49,8 +50,10 @@ "@vue/eslint-config-typescript": "^5.0.1", "axios": "^0.19.0", "copy-webpack-plugin": "^5.1.1", + "cross-env": "^6.0.3", "css-loader": "^3.4.0", "electron": "^7.1.7", + "electron-devtools-installer": "^2.2.4", "electron-installer-debian": "^2.0.1", "electron-packager": "^14.1.1", "electron-rebuild": "^1.8.8", @@ -65,9 +68,10 @@ "eslint-plugin-vue": "^6.0.1", "fibers": "^4.0.2", "file-loader": "^5.0.2", + "friendly-errors-webpack-plugin": "^1.7.0", "html-webpack-plugin": "^3.2.0", "lodash": "^4.17.15", - "mini-css-extract-plugin": "^0.8.2", + "mini-css-extract-plugin": "^0.9.0", "moment": "^2.24.0", "pouchdb-browser": "^7.1.1", "pouchdb-find": "^7.1.1", @@ -82,10 +86,10 @@ "uuid": "^3.3.3", "vee-validate": "^3.2.0", "vue": "^2.6.11", - "vue-devtools": "^5.1.3", "vue-loader": "^15.8.3", "vue-style-loader": "^4.1.2", "vue-template-compiler": "^2.6.11", + "vue-typed-mixins": "^0.2.0", "vuetify": "^2.1.15", "vuetify-loader": "^1.4.3", "webpack": "^4.41.4", diff --git a/planned drivers.txt b/planned drivers.txt new file mode 100644 index 0000000..44e88fd --- /dev/null +++ b/planned drivers.txt @@ -0,0 +1,7 @@ +- Shinybow +- Monoprice Blackbird +- J-Tech Digital +- ASHATA +- TESmart +- No Hassle AV + diff --git a/render/app/Application.vue b/render/app/Application.vue index 05fa414..6b7e7f8 100644 --- a/render/app/Application.vue +++ b/render/app/Application.vue @@ -1,6 +1,6 @@ +