diff --git a/.gitignore b/.gitignore index 41de00a..4e8ee01 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,2 @@ /node_modules/ -/coverage/ -/syncd/ -*.log -/temp/ /archive/ diff --git a/.npmignore b/.npmignore index b193a5e..480e0f5 100644 --- a/.npmignore +++ b/.npmignore @@ -2,5 +2,5 @@ tests/ test/ *.test.js testing/ -test-client archive/ +example/ diff --git a/test-client/.editorconfig b/example/client/.editorconfig similarity index 100% rename from test-client/.editorconfig rename to example/client/.editorconfig diff --git a/test-client/.eslintignore b/example/client/.eslintignore similarity index 100% rename from test-client/.eslintignore rename to example/client/.eslintignore diff --git a/example/client/.eslintrc.js b/example/client/.eslintrc.js new file mode 100644 index 0000000..a789acd --- /dev/null +++ b/example/client/.eslintrc.js @@ -0,0 +1,55 @@ +module.exports = { + root: true, + + parserOptions: { + parser: 'babel-eslint', + sourceType: 'module' + }, + + env: { + browser: true + }, + + extends: [ + // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention + // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. + 'plugin:vue/essential', + '@vue/standard' + ], + + // required to lint *.vue files + plugins: [ + 'vue' + ], + + globals: { + 'ga': true, // Google Analytics + 'cordova': true, + '__statics': true, + 'process': true + }, + + // add your custom rules here + rules: { + // allow async-await + 'generator-star-spacing': 'off', + // allow paren-less arrow functions + 'arrow-parens': 'off', + 'one-var': 'off', + + 'import/first': 'off', + 'import/named': 'error', + 'import/namespace': 'error', + 'import/default': 'error', + 'import/export': 'error', + 'import/extensions': 'off', + 'import/no-unresolved': 'off', + 'import/no-extraneous-dependencies': 'off', + 'prefer-promise-reject-errors': 'off', + + // allow console.log during development only + 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', + // allow debugger during development only + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' + } +} diff --git a/test-client/.gitignore b/example/client/.gitignore similarity index 89% rename from test-client/.gitignore rename to example/client/.gitignore index 2779c18..d7c7a2d 100644 --- a/test-client/.gitignore +++ b/example/client/.gitignore @@ -3,6 +3,7 @@ .thumbs.db node_modules /dist +/src-cordova/node_modules /src-cordova/platforms /src-cordova/plugins /src-cordova/www @@ -17,4 +18,3 @@ yarn-error.log* *.ntvs* *.njsproj *.sln -*.lock diff --git a/test-client/.postcssrc.js b/example/client/.postcssrc.js similarity index 100% rename from test-client/.postcssrc.js rename to example/client/.postcssrc.js diff --git a/test-client/.stylintrc b/example/client/.stylintrc similarity index 100% rename from test-client/.stylintrc rename to example/client/.stylintrc diff --git a/example/client/README.md b/example/client/README.md new file mode 100644 index 0000000..0f7d653 --- /dev/null +++ b/example/client/README.md @@ -0,0 +1,26 @@ +# Quasar App (test-client-new) + +a test websocket client for uci websocket server + +## Install the dependencies +```bash +yarn +``` + +### Start the app in development mode (hot-code reloading, error reporting, etc.) +```bash +quasar dev +``` + +### Lint the files +```bash +yarn run lint +``` + +### Build the app for production +```bash +quasar build +``` + +### Customize the configuration +See [Configuring quasar.conf.js](https://quasar.dev/quasar-cli/quasar-conf-js). diff --git a/example/client/babel.config.js b/example/client/babel.config.js new file mode 100644 index 0000000..9408c6c --- /dev/null +++ b/example/client/babel.config.js @@ -0,0 +1,5 @@ +module.exports = { + presets: [ + '@quasar/babel-preset-app' + ] +} diff --git a/example/client/package.json b/example/client/package.json new file mode 100644 index 0000000..1630df6 --- /dev/null +++ b/example/client/package.json @@ -0,0 +1,34 @@ +{ + "name": "test-client-new", + "version": "0.0.1", + "description": "a test websocket client for uci websocket server", + "productName": "Quasar App", + "cordovaId": "org.cordova.quasar.app", + "author": "David Kebler ", + "private": true, + "scripts": { + "lint": "eslint --ext .js,.vue src", + "tc": "./node_modules/.bin/quasar dev", + "tc:nas": "WSS='ws://ws.kebler.net' npm run tc" + }, + "dependencies": { + "@quasar/extras": "^1.2.0", + "quasar": "^1.0.0" + }, + "devDependencies": { + "@quasar/app": "^1.0.0", + "@vue/eslint-config-standard": "^4.0.0", + "babel-eslint": "^10.0.1", + "eslint": "^5.10.0", + "eslint-loader": "^2.1.1", + "eslint-plugin-vue": "^5.0.0" + }, + "engines": { + "node": ">= 8.9.0", + "npm": ">= 5.6.0", + "yarn": ">= 1.6.0" + }, + "browserslist": [ + "last 1 version, not dead, ie >= 11" + ] +} diff --git a/example/client/quasar.conf.js b/example/client/quasar.conf.js new file mode 100644 index 0000000..be3bca9 --- /dev/null +++ b/example/client/quasar.conf.js @@ -0,0 +1,182 @@ +// Configuration for your app +// https://quasar.dev/quasar-cli/quasar-conf-js + +module.exports = function (ctx) { + return { + // app boot file (/src/boot) + // --> boot files are part of "main.js" + // boot used to be plugins + boot: ['socket'], // uci-consumer-client websocket + css: [ + 'app.styl' + ], + + extras: [ + // 'ionicons-v4', + // 'mdi-v3', + // 'fontawesome-v5', + // 'eva-icons', + // 'themify', + // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both! + // 'roboto-font', // optional, you are not bound to it + 'material-icons' // optional, you are not bound to it + ], + + framework: { + // iconSet: 'ionicons-v4', + // lang: 'de', // Quasar language + + // all: true, // --- includes everything; for dev only! + + components: [ + 'QLayout', + 'QHeader', + 'QDrawer', + 'QPageContainer', + 'QPage', + 'QToolbar', + 'QToolbarTitle', + 'QBtn', + 'QIcon', + 'QList', + 'QItem', + 'QItemSection', + 'QItemLabel', + 'QInput', + 'QSelect', + 'QField', + 'QFooter', + 'QTooltip' + ], + + directives: [ + 'Ripple' + ], + + // Quasar plugins + plugins: [ + 'Notify' + ] + }, + + supportIE: false, + + build: { + // added to support communication with websocket and backend database + env: ctx.dev + // pass environment variable to browser client + ? { // so on dev we'll have + DBURL: JSON.stringify(process.env.DBURL || 'ws://localhost:3030'), + WSS: JSON.stringify(process.env.WSS || 'ws://localhost:8090') + } + : { // and on build (production): + DBURL: JSON.stringify(process.env.DBURL || 'ws://switches.kebler.net:3030'), + WSS: JSON.stringify(process.env.WSS || 'ws://relays.kebler.net:8090') + }, + scopeHoisting: true, + vueRouterMode: 'history', + // vueCompiler: true, + // gzip: true, + // analyze: true, + // extractCSS: false, + extendWebpack (cfg) { + cfg.module.rules.push({ + enforce: 'pre', + test: /\.(js|vue)$/, + loader: 'eslint-loader', + exclude: /node_modules/, + options: { + formatter: require('eslint').CLIEngine.getFormatter('stylish') + } + }) + } + }, + + devServer: { + // https: true, + // port: 8080, + open: true // opens browser window automatically + }, + + // animations: 'all', // --- includes all animations + animations: [], + + ssr: { + pwa: false + }, + + pwa: { + // workboxPluginMode: 'InjectManifest', + // workboxOptions: {}, // only for NON InjectManifest + manifest: { + // name: 'Quasar App', + // short_name: 'Quasar App', + // description: 'a test websocket client for uci websocket server', + display: 'standalone', + orientation: 'portrait', + background_color: '#ffffff', + theme_color: '#027be3', + icons: [ + { + 'src': 'statics/icons/icon-128x128.png', + 'sizes': '128x128', + 'type': 'image/png' + }, + { + 'src': 'statics/icons/icon-192x192.png', + 'sizes': '192x192', + 'type': 'image/png' + }, + { + 'src': 'statics/icons/icon-256x256.png', + 'sizes': '256x256', + 'type': 'image/png' + }, + { + 'src': 'statics/icons/icon-384x384.png', + 'sizes': '384x384', + 'type': 'image/png' + }, + { + 'src': 'statics/icons/icon-512x512.png', + 'sizes': '512x512', + 'type': 'image/png' + } + ] + } + }, + + cordova: { + // id: 'org.cordova.quasar.app', + // noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing + }, + + electron: { + // bundler: 'builder', // or 'packager' + + extendWebpack (cfg) { + // do something with Electron main process Webpack cfg + // chainWebpack also available besides this extendWebpack + }, + + packager: { + // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options + + // OS X / Mac App Store + // appBundleId: '', + // appCategoryType: '', + // osxSign: '', + // protocol: 'myapp://path', + + // Windows only + // win32metadata: { ... } + }, + + builder: { + // https://www.electron.build/configuration/configuration + + // appId: 'test-client-new' + } + } + } +} diff --git a/test-client/src/App.vue b/example/client/src/App.vue similarity index 100% rename from test-client/src/App.vue rename to example/client/src/App.vue diff --git a/test-client/src/assets/quasar-logo-full.svg b/example/client/src/assets/quasar-logo-full.svg similarity index 100% rename from test-client/src/assets/quasar-logo-full.svg rename to example/client/src/assets/quasar-logo-full.svg diff --git a/test-client/src/assets/sad.svg b/example/client/src/assets/sad.svg similarity index 100% rename from test-client/src/assets/sad.svg rename to example/client/src/assets/sad.svg diff --git a/test-client/src/components/.gitkeep b/example/client/src/boot/.gitkeep similarity index 100% rename from test-client/src/components/.gitkeep rename to example/client/src/boot/.gitkeep diff --git a/test-client/src/plugins/socket.js b/example/client/src/boot/socket.js similarity index 85% rename from test-client/src/plugins/socket.js rename to example/client/src/boot/socket.js index f998a7d..fd37649 100644 --- a/test-client/src/plugins/socket.js +++ b/example/client/src/boot/socket.js @@ -1,5 +1,5 @@ // import WebSocket from '@uci/websocket-client' -import WebSocket from '../../../src' +import WebSocket from '../../../../src' const ws = new WebSocket(process.env.WSS || 'ws://0.0.0.0:8090') diff --git a/test-client/src/plugins/.gitkeep b/example/client/src/components/.gitkeep similarity index 100% rename from test-client/src/plugins/.gitkeep rename to example/client/src/components/.gitkeep diff --git a/example/client/src/css/app.styl b/example/client/src/css/app.styl new file mode 100644 index 0000000..16e5398 --- /dev/null +++ b/example/client/src/css/app.styl @@ -0,0 +1,22 @@ +// app global css +.q-page-container + background $accent + display: flex; + justify-content: center; +.q-page + width 80% +.q-field + padding 0 +.q-input +.q-select + background white + padding 0 .2em + margin .2em +.response + .q-textarea + .q-input + background $secondary + padding 0 1em +.q-item + padding 0 + margin 0 diff --git a/example/client/src/css/quasar.variables.styl b/example/client/src/css/quasar.variables.styl new file mode 100644 index 0000000..e7b9d78 --- /dev/null +++ b/example/client/src/css/quasar.variables.styl @@ -0,0 +1,21 @@ +// Quasar Stylus Variables +// -------------------------------------------------- +// To customize the look and feel of this app, you can override +// the Stylus variables found in Quasar's source Stylus files. + +// Check documentation for full list of Quasar variables + +// It's highly recommended to change the default colors +// to match your app's branding. +// Tip: Use the "Theme Builder" on Quasar's documentation website. +// https://quasar.dev/style/theme-builder + + +$primary = #006cd6 +$secondary = #26A69A +$accent = #278eb0 + +$positive = #21BA45 +$negative = #C10015 +$info = #31CCEC +$warning = #F2C037 diff --git a/test-client/src/index.template.html b/example/client/src/index.template.html similarity index 72% rename from test-client/src/index.template.html rename to example/client/src/index.template.html index be92ba0..c0e888f 100644 --- a/test-client/src/index.template.html +++ b/example/client/src/index.template.html @@ -1,25 +1,22 @@ - + + <%= htmlWebpackPlugin.options.productName %> + - <%= htmlWebpackPlugin.options.productName %> - - + + + + - - - +
- - diff --git a/example/client/src/layouts/MyLayout.vue b/example/client/src/layouts/MyLayout.vue new file mode 100644 index 0000000..10ff526 --- /dev/null +++ b/example/client/src/layouts/MyLayout.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/example/client/src/layouts/default.vue b/example/client/src/layouts/default.vue new file mode 100644 index 0000000..e5b3f77 --- /dev/null +++ b/example/client/src/layouts/default.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/test-client/src/pages/404.vue b/example/client/src/pages/Error404.vue similarity index 86% rename from test-client/src/pages/404.vue rename to example/client/src/pages/Error404.vue index 6484cb2..cfaab5f 100644 --- a/test-client/src/pages/404.vue +++ b/example/client/src/pages/Error404.vue @@ -14,3 +14,9 @@ >Go back + + diff --git a/example/client/src/pages/Index.vue b/example/client/src/pages/Index.vue new file mode 100644 index 0000000..ac083ca --- /dev/null +++ b/example/client/src/pages/Index.vue @@ -0,0 +1,148 @@ + + + + diff --git a/example/client/src/pages/Index.vue.org b/example/client/src/pages/Index.vue.org new file mode 100644 index 0000000..7125cfc --- /dev/null +++ b/example/client/src/pages/Index.vue.org @@ -0,0 +1,14 @@ + + + + + diff --git a/example/client/src/router/index.js b/example/client/src/router/index.js new file mode 100644 index 0000000..46c6d54 --- /dev/null +++ b/example/client/src/router/index.js @@ -0,0 +1,26 @@ +import Vue from 'vue' +import VueRouter from 'vue-router' + +import routes from './routes' + +Vue.use(VueRouter) + +/* + * If not building with SSR mode, you can + * directly export the Router instantiation + */ + +export default function (/* { store, ssrContext } */) { + const Router = new VueRouter({ + scrollBehavior: () => ({ x: 0, y: 0 }), + routes, + + // Leave these as is and change from quasar.conf.js instead! + // quasar.conf.js -> build -> vueRouterMode + // quasar.conf.js -> build -> publicPath + mode: process.env.VUE_ROUTER_MODE, + base: process.env.VUE_ROUTER_BASE + }) + + return Router +} diff --git a/example/client/src/router/routes.js b/example/client/src/router/routes.js new file mode 100644 index 0000000..24155d3 --- /dev/null +++ b/example/client/src/router/routes.js @@ -0,0 +1,20 @@ + +const routes = [ + { + path: '/', + component: () => import('layouts/default.vue'), + children: [ + { path: '', component: () => import('pages/Index.vue') } + ] + } +] + +// Always leave this as last one +if (process.env.MODE !== 'ssr') { + routes.push({ + path: '*', + component: () => import('pages/Error404.vue') + }) +} + +export default routes diff --git a/example/client/src/statics/app-logo-128x128.png b/example/client/src/statics/app-logo-128x128.png new file mode 100644 index 0000000..0a3012a Binary files /dev/null and b/example/client/src/statics/app-logo-128x128.png differ diff --git a/example/client/src/statics/icons/apple-icon-120x120.png b/example/client/src/statics/icons/apple-icon-120x120.png new file mode 100644 index 0000000..387499a Binary files /dev/null and b/example/client/src/statics/icons/apple-icon-120x120.png differ diff --git a/example/client/src/statics/icons/apple-icon-152x152.png b/example/client/src/statics/icons/apple-icon-152x152.png new file mode 100644 index 0000000..5b76f91 Binary files /dev/null and b/example/client/src/statics/icons/apple-icon-152x152.png differ diff --git a/example/client/src/statics/icons/apple-icon-167x167.png b/example/client/src/statics/icons/apple-icon-167x167.png new file mode 100644 index 0000000..0d743a6 Binary files /dev/null and b/example/client/src/statics/icons/apple-icon-167x167.png differ diff --git a/example/client/src/statics/icons/apple-icon-180x180.png b/example/client/src/statics/icons/apple-icon-180x180.png new file mode 100644 index 0000000..f91040d Binary files /dev/null and b/example/client/src/statics/icons/apple-icon-180x180.png differ diff --git a/example/client/src/statics/icons/favicon-16x16.png b/example/client/src/statics/icons/favicon-16x16.png new file mode 100644 index 0000000..20b3bb7 Binary files /dev/null and b/example/client/src/statics/icons/favicon-16x16.png differ diff --git a/example/client/src/statics/icons/favicon-32x32.png b/example/client/src/statics/icons/favicon-32x32.png new file mode 100644 index 0000000..ed028e2 Binary files /dev/null and b/example/client/src/statics/icons/favicon-32x32.png differ diff --git a/example/client/src/statics/icons/favicon-96x96.png b/example/client/src/statics/icons/favicon-96x96.png new file mode 100644 index 0000000..7c749e5 Binary files /dev/null and b/example/client/src/statics/icons/favicon-96x96.png differ diff --git a/example/client/src/statics/icons/favicon.ico b/example/client/src/statics/icons/favicon.ico new file mode 100644 index 0000000..b385345 Binary files /dev/null and b/example/client/src/statics/icons/favicon.ico differ diff --git a/example/client/src/statics/icons/icon-128x128.png b/example/client/src/statics/icons/icon-128x128.png new file mode 100644 index 0000000..0a3012a Binary files /dev/null and b/example/client/src/statics/icons/icon-128x128.png differ diff --git a/example/client/src/statics/icons/icon-192x192.png b/example/client/src/statics/icons/icon-192x192.png new file mode 100644 index 0000000..144d474 Binary files /dev/null and b/example/client/src/statics/icons/icon-192x192.png differ diff --git a/example/client/src/statics/icons/icon-256x256.png b/example/client/src/statics/icons/icon-256x256.png new file mode 100644 index 0000000..9ab309b Binary files /dev/null and b/example/client/src/statics/icons/icon-256x256.png differ diff --git a/example/client/src/statics/icons/icon-384x384.png b/example/client/src/statics/icons/icon-384x384.png new file mode 100644 index 0000000..8bb494e Binary files /dev/null and b/example/client/src/statics/icons/icon-384x384.png differ diff --git a/example/client/src/statics/icons/icon-512x512.png b/example/client/src/statics/icons/icon-512x512.png new file mode 100644 index 0000000..9b9ff56 Binary files /dev/null and b/example/client/src/statics/icons/icon-512x512.png differ diff --git a/example/client/src/statics/icons/ms-icon-144x144.png b/example/client/src/statics/icons/ms-icon-144x144.png new file mode 100644 index 0000000..29fd72a Binary files /dev/null and b/example/client/src/statics/icons/ms-icon-144x144.png differ diff --git a/example/client/src/statics/icons/safari-pinned-tab.svg b/example/client/src/statics/icons/safari-pinned-tab.svg new file mode 100644 index 0000000..1473927 --- /dev/null +++ b/example/client/src/statics/icons/safari-pinned-tab.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/example/server.js b/example/server.js new file mode 100644 index 0000000..a4eab28 --- /dev/null +++ b/example/server.js @@ -0,0 +1,36 @@ +import Socket from '@uci/websocket' + +// ws server to example ws client + +async function packetProcess (packet) { + return new Promise(resolve => { + let res = {} + switch (packet.cmd) { + case 'echo': + res.msg = 'Echoing Back any payload propery' + res.payload = packet.payload + this.push({msg:'pushing echo to to any clients also', res:res}) + break + case 'on': + case 'off': + res.msg = `Command turn ${packet.cmd} was sent for light id: ${packet.id ||'none!'} of brightness: ${packet.brightness || 0}` + res.payload = {switch:packet.cmd} + this.push(res) + break + default: + res.msg = `command ${packet.cmd} was unknown at server echo payload back` + res.payload = {} + } + + resolve(res) + }) +} + +// let test = new Test() +let test = new Socket({ port: 8090, clientTracking: true }) +test.registerPacketProcessor(packetProcess) +;(async () => { + console.log(await test.create()) +})().catch(err => { + console.error('FATAL: UNABLE TO START SYSTEM!\n', err) +}) diff --git a/package.json b/package.json index b5e4b05..aa60133 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,11 @@ { "name": "@uci/websocket-client", - "version": "0.1.6", + "version": "0.1.7", "description": "JSON packet browser client over web socket", "main": "src", "scripts": { - "cd": "cd test-client && quasar dev" + "example": "cd ./example/client && npm run tc", + "example:server": "node -r esm ./example/server.js" }, "author": "David Kebler", "license": "MIT", @@ -26,11 +27,14 @@ "url": "https://github.com/uCOMmandIt/websocket-client/issues" }, "homepage": "https://github.com/uCOMmandIt/websocket-client#readme", - "devDependencies": {}, + "devDependencies": { + "@uci/websocket": "^0.3.7", + "esm": "^3.2.25" + }, "dependencies": { - "auto-bind": "^2.0.0", + "auto-bind": "^2.1.0", "await-to-js": "^2.1.1", "better-try-catch": "^0.6.2", - "eventemitter3": "^3.1.0" + "eventemitter3": "^4.0.0" } } diff --git a/test-client/.babelrc b/test-client/.babelrc deleted file mode 100644 index ce118af..0000000 --- a/test-client/.babelrc +++ /dev/null @@ -1,28 +0,0 @@ -{ - "presets": [ - [ - "@babel/preset-env", { - "modules": false, - "loose": false, - "useBuiltIns": "usage" - } - ], - [ - "@babel/preset-stage-2", { - "modules": false, - "loose": false, - "useBuiltIns": true, - "decoratorsLegacy": true - } - ] - ], - "plugins": [ - [ - "@babel/transform-runtime", { - "polyfill": false, - "regenerator": false - } - ] - ], - "comments": false -} diff --git a/test-client/.eslintrc.js b/test-client/.eslintrc.js deleted file mode 100644 index 7229fd7..0000000 --- a/test-client/.eslintrc.js +++ /dev/null @@ -1,44 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - parser: 'babel-eslint', - sourceType: 'module' - }, - env: { - browser: true - }, - extends: [ - // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention - // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. - 'plugin:vue/essential', - // https://github.com/standard/standard/blob/master/docs/RULES-en.md - 'standard' - ], - // required to lint *.vue files - plugins: ['vue'], - globals: { - ga: true, // Google Analytics - cordova: true, - __statics: true - }, - // add your custom rules here - rules: { - // allow async-await - 'generator-star-spacing': 'off', - 'space-before-function-paren': ['error', 'always'], - // allow paren-less arrow functions - 'arrow-parens': 0, - 'one-var': 0, - 'import/first': 0, - 'import/named': 2, - 'import/namespace': 2, - 'import/default': 2, - 'import/export': 2, - 'import/extensions': 0, - 'import/no-unresolved': 0, - 'import/no-extraneous-dependencies': 0, - - // allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0 - } -} diff --git a/test-client/README.md b/test-client/README.md deleted file mode 100644 index 51830ce..0000000 --- a/test-client/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Quasar App - -> WIP diff --git a/test-client/package.json b/test-client/package.json deleted file mode 100644 index 4b33a6c..0000000 --- a/test-client/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "client", - "version": "1.0.0", - "description": "simple web socket client tester", - "productName": "client", - "cordovaId": "org.cordova.quasar.app", - "author": "David Kebler ", - "private": true, - "scripts": { - "lint": "eslint --ext .js,.vue src", - "tcw": "WSS='ws://pine64.kebler.net:8090' quasar dev", - "tc": "quasar dev" - }, - "dependencies": { - "@uci/websocket-client": "^0.1.4", - "axios": "^0.18.0", - "better-try-catch": "^0.6.2" - }, - "devDependencies": { - "babel-eslint": "^8.2.1", - "eslint": "^4.18.2", - "eslint-config-standard": "^11.0.0", - "eslint-friendly-formatter": "^4.0.1", - "eslint-loader": "^2.0.0", - "eslint-plugin-import": "^2.9.0", - "eslint-plugin-node": "^6.0.1", - "eslint-plugin-promise": "^3.7.0", - "eslint-plugin-standard": "^3.0.1", - "eslint-plugin-vue": "^4.3.0", - "quasar-cli": "^0.17.22", - "strip-ansi": "=3.0.1" - }, - "engines": { - "node": ">= 8.9.0", - "npm": ">= 5.6.0" - }, - "browserslist": [ - "> 1%", - "last 2 versions", - "not ie <= 10" - ] -} diff --git a/test-client/quasar.conf.js b/test-client/quasar.conf.js deleted file mode 100644 index 1b85c78..0000000 --- a/test-client/quasar.conf.js +++ /dev/null @@ -1,139 +0,0 @@ -// Configuration for your app - -module.exports = function (ctx) { - return { - // app plugins (/src/plugins) - plugins: ['socket'], - css: ['app.styl'], - extras: [ - ctx.theme.mat ? 'roboto-font' : null, - 'material-icons', - ctx.theme.ios ? 'ionicons' : null - // 'mdi', - // 'fontawesome' - ], - supportIE: false, - build: { - env: ctx.dev - // pass environment variable to browser client - ? { // so on dev we'll have - DBURL: JSON.stringify(process.env.DBURL), - // DBURL: JSON.stringify('ws://192.168.0.231:3030'), - WSS: JSON.stringify(process.env.WSS) - } - : { // and on build (production): - DBURL: JSON.stringify('ws://192.168.0.231:3030'), - WSS: JSON.stringify('ws://relays2.kebler.net:8090') - }, - scopeHoisting: true, - vueRouterMode: 'history', - // vueCompiler: true, - // gzip: true, - // analyze: true, - // extractCSS: false, - extendWebpack (cfg) { - cfg.module.rules.push({ - enforce: 'pre', - test: /\.(js|vue)$/, - loader: 'eslint-loader', - exclude: /(node_modules|quasar)/ - }) - } - }, - devServer: { - // https: true, - // port: 8080, - open: true // opens browser window automatically - }, - // framework: 'all' --- includes everything; for dev only! - framework: { - components: [ - 'QLayout', - 'QLayoutHeader', - 'QLayoutDrawer', - 'QPageContainer', - 'QPage', - 'QToolbar', - 'QToolbarTitle', - 'QBtn', - 'QIcon', - 'QList', - 'QListHeader', - 'QItem', - 'QItemMain', - 'QItemSide', - 'QInput', - 'QField' - ], - directives: ['Ripple'], - // Quasar plugins - plugins: ['Notify'], - iconSet: ctx.theme.mat ? 'material-icons' : 'ionicons' - }, - // animations: 'all' --- includes all animations - animations: [], - pwa: { - // workboxPluginMode: 'InjectManifest', - // workboxOptions: {}, - manifest: { - // name: 'Quasar App', - // short_name: 'Quasar-PWA', - // description: 'Best PWA App in town!', - display: 'standalone', - orientation: 'portrait', - background_color: '#ffffff', - theme_color: '#027be3', - icons: [ - { - src: 'statics/icons/icon-128x128.png', - sizes: '128x128', - type: 'image/png' - }, - { - src: 'statics/icons/icon-192x192.png', - sizes: '192x192', - type: 'image/png' - }, - { - src: 'statics/icons/icon-256x256.png', - sizes: '256x256', - type: 'image/png' - }, - { - src: 'statics/icons/icon-384x384.png', - sizes: '384x384', - type: 'image/png' - }, - { - src: 'statics/icons/icon-512x512.png', - sizes: '512x512', - type: 'image/png' - } - ] - } - }, - cordova: { - // id: 'org.cordova.quasar.app' - }, - electron: { - // bundler: 'builder', // or 'packager' - extendWebpack (cfg) { - // do something with Electron process Webpack cfg - }, - packager: { - // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options - // OS X / Mac App Store - // appBundleId: '', - // appCategoryType: '', - // osxSign: '', - // protocol: 'myapp://path', - // Window only - // win32metadata: { ... } - }, - builder: { - // https://www.electron.build/configuration/configuration - // appId: 'quasar-app' - } - } - } -} diff --git a/test-client/src/css/app.styl b/test-client/src/css/app.styl deleted file mode 100644 index e3e5a1e..0000000 --- a/test-client/src/css/app.styl +++ /dev/null @@ -1 +0,0 @@ -// app global css diff --git a/test-client/src/css/themes/common.variables.styl b/test-client/src/css/themes/common.variables.styl deleted file mode 100644 index 4d659aa..0000000 --- a/test-client/src/css/themes/common.variables.styl +++ /dev/null @@ -1,25 +0,0 @@ -// App Shared Variables -// -------------------------------------------------- -// To customize the look and feel of this app, you can override -// the Stylus variables found in Quasar's source Stylus files. Setting -// variables before Quasar's Stylus will use these variables rather than -// Quasar's default Stylus variable values. Stylus variables specific -// to the themes belong in either the variables.ios.styl or variables.mat.styl files. - -// Check documentation for full list of Quasar variables - - -// App Shared Color Variables -// -------------------------------------------------- -// It's highly recommended to change the default colors -// to match your app's branding. - -$primary = #027be3 -$secondary = #26A69A -$tertiary = #555 - -$neutral = #E0E1E2 -$positive = #21BA45 -$negative = #DB2828 -$info = #31CCEC -$warning = #F2C037 diff --git a/test-client/src/css/themes/variables.ios.styl b/test-client/src/css/themes/variables.ios.styl deleted file mode 100644 index 953b825..0000000 --- a/test-client/src/css/themes/variables.ios.styl +++ /dev/null @@ -1,7 +0,0 @@ -// App Shared Variables -// -------------------------------------------------- -// Shared Stylus variables go in the common.variables.styl file -@import 'common.variables' - -// iOS only Quasar variables overwrites -// ----------------------------------------- diff --git a/test-client/src/css/themes/variables.mat.styl b/test-client/src/css/themes/variables.mat.styl deleted file mode 100644 index 8169a52..0000000 --- a/test-client/src/css/themes/variables.mat.styl +++ /dev/null @@ -1,7 +0,0 @@ -// App Shared Variables -// -------------------------------------------------- -// Shared Stylus variables go in the common.variables.styl file -@import 'common.variables' - -// Material only Quasar variables overwrites -// ----------------------------------------- diff --git a/test-client/src/layouts/default.vue b/test-client/src/layouts/default.vue deleted file mode 100644 index 2a37c35..0000000 --- a/test-client/src/layouts/default.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - - diff --git a/test-client/src/pages/index.vue b/test-client/src/pages/index.vue deleted file mode 100644 index bcc5576..0000000 --- a/test-client/src/pages/index.vue +++ /dev/null @@ -1,125 +0,0 @@ - - - - diff --git a/test-client/src/router/index.js b/test-client/src/router/index.js deleted file mode 100644 index 67486b2..0000000 --- a/test-client/src/router/index.js +++ /dev/null @@ -1,24 +0,0 @@ -import Vue from 'vue' -import VueRouter from 'vue-router' - -import routes from './routes' - -Vue.use(VueRouter) - -const Router = new VueRouter({ - /* - * NOTE! Change Vue Router mode from quasar.conf.js -> build -> vueRouterMode - * - * When going with "history" mode, please also make sure "build.publicPath" - * is set to something other than an empty string. - * Example: '/' instead of '' - */ - - // Leave as is and change from quasar.conf.js instead! - mode: process.env.VUE_ROUTER_MODE, - base: process.env.VUE_ROUTER_BASE, - scrollBehavior: () => ({ y: 0 }), - routes -}) - -export default Router diff --git a/test-client/src/router/routes.js b/test-client/src/router/routes.js deleted file mode 100644 index e098954..0000000 --- a/test-client/src/router/routes.js +++ /dev/null @@ -1,15 +0,0 @@ - -export default [ - { - path: '/', - component: () => import('layouts/default'), - children: [ - { path: '', component: () => import('pages/index') } - ] - }, - - { // Always leave this as last one - path: '*', - component: () => import('pages/404') - } -] diff --git a/test-client/src/socket.js b/test-client/src/socket.js deleted file mode 100644 index 48ac4b9..0000000 --- a/test-client/src/socket.js +++ /dev/null @@ -1,6 +0,0 @@ -// import WebSocket from '@uci/websocket-client' -import WebSocket from '../../browser-client' - -const ws = new WebSocket(process.env.WSS || 'ws://0.0.0.0:8090') - -export default ws diff --git a/test-client/src/statics/icons/apple-icon-152x152.png b/test-client/src/statics/icons/apple-icon-152x152.png deleted file mode 100644 index c918acd..0000000 Binary files a/test-client/src/statics/icons/apple-icon-152x152.png and /dev/null differ diff --git a/test-client/src/statics/icons/favicon-16x16.png b/test-client/src/statics/icons/favicon-16x16.png deleted file mode 100644 index 177c86e..0000000 Binary files a/test-client/src/statics/icons/favicon-16x16.png and /dev/null differ diff --git a/test-client/src/statics/icons/favicon-32x32.png b/test-client/src/statics/icons/favicon-32x32.png deleted file mode 100644 index b8e6cdf..0000000 Binary files a/test-client/src/statics/icons/favicon-32x32.png and /dev/null differ diff --git a/test-client/src/statics/icons/icon-128x128.png b/test-client/src/statics/icons/icon-128x128.png deleted file mode 100644 index 590e8ce..0000000 Binary files a/test-client/src/statics/icons/icon-128x128.png and /dev/null differ diff --git a/test-client/src/statics/icons/icon-192x192.png b/test-client/src/statics/icons/icon-192x192.png deleted file mode 100644 index 2a9b50b..0000000 Binary files a/test-client/src/statics/icons/icon-192x192.png and /dev/null differ diff --git a/test-client/src/statics/icons/icon-256x256.png b/test-client/src/statics/icons/icon-256x256.png deleted file mode 100644 index 8450959..0000000 Binary files a/test-client/src/statics/icons/icon-256x256.png and /dev/null differ diff --git a/test-client/src/statics/icons/icon-384x384.png b/test-client/src/statics/icons/icon-384x384.png deleted file mode 100644 index 2d6dd7b..0000000 Binary files a/test-client/src/statics/icons/icon-384x384.png and /dev/null differ diff --git a/test-client/src/statics/icons/icon-512x512.png b/test-client/src/statics/icons/icon-512x512.png deleted file mode 100644 index a57354e..0000000 Binary files a/test-client/src/statics/icons/icon-512x512.png and /dev/null differ diff --git a/test-client/src/statics/icons/ms-icon-144x144.png b/test-client/src/statics/icons/ms-icon-144x144.png deleted file mode 100644 index b0880e8..0000000 Binary files a/test-client/src/statics/icons/ms-icon-144x144.png and /dev/null differ diff --git a/test-client/src/statics/quasar-logo.png b/test-client/src/statics/quasar-logo.png deleted file mode 100644 index 590e8ce..0000000 Binary files a/test-client/src/statics/quasar-logo.png and /dev/null differ