From 42db1f81b8e7bc63bc1d1cc3b7c44f2c29bdb5bc Mon Sep 17 00:00:00 2001 From: mattmcw Date: Sat, 25 Feb 2023 00:24:07 -0500 Subject: [PATCH 01/12] Server work --- app/lib/client/index.js | 6 + app/lib/client/index.js.map | 1 + app/lib/log/index.js | 2 +- app/lib/log/index.js.map | 2 +- app/lib/server/index.d.ts | 1 + app/lib/server/index.js | 145 ++--- app/lib/server/index.js.map | 1 + app/package-lock.json | 1165 ++++++++++++++++++++++++++++++++++- app/package.json | 4 +- app/server.html | 10 + app/src/lib/client/index.ts | 5 + package-lock.json | 160 +++++ package.json | 4 +- src/log/index.ts | 2 +- src/server/index.ts | 79 +++ 15 files changed, 1461 insertions(+), 126 deletions(-) create mode 100644 app/lib/client/index.js create mode 100644 app/lib/client/index.js.map create mode 100644 app/lib/server/index.d.ts create mode 100644 app/lib/server/index.js.map create mode 100644 app/server.html create mode 100644 app/src/lib/client/index.ts create mode 100644 src/server/index.ts diff --git a/app/lib/client/index.js b/app/lib/client/index.js new file mode 100644 index 0000000..a52e259 --- /dev/null +++ b/app/lib/client/index.js @@ -0,0 +1,6 @@ +const webSocket = new WebSocket('ws://localhost:{{PORT}}/'); +webSocket.onmessage = (event) => { + const data = JSON.parse(event.data); + console.log(data); +}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/app/lib/client/index.js.map b/app/lib/client/index.js.map new file mode 100644 index 0000000..47e7ab4 --- /dev/null +++ b/app/lib/client/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/client/index.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,0BAA0B,CAAC,CAAC;AAC5D,SAAS,CAAC,SAAS,GAAG,CAAC,KAAK,EAAE,EAAE;IAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/log/index.js b/app/lib/log/index.js index a7e5a3f..c272be8 100644 --- a/app/lib/log/index.js +++ b/app/lib/log/index.js @@ -50,7 +50,7 @@ async function logFile() { * * @returns {object} Logger transport **/ -module.exports = async function (arg) { +module.exports = async function Log(arg) { let consoleFormat = { colorize: true }; diff --git a/app/lib/log/index.js.map b/app/lib/log/index.js.map index 5bdb4b0..2061152 100644 --- a/app/lib/log/index.js.map +++ b/app/lib/log/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/log/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,qCAA2D;AAC3D,+BAAuC;AACvC,uCAAyC;AACzC,2BAA6B;AAE7B,MAAM,OAAO,GAAG,mBAAmB,CAAA;AACnC,IAAI,SAAe,CAAA;AAEnB;;;;;IAKI;AACJ,KAAK,UAAU,OAAO;IACrB,MAAM,OAAO,GAAY,YAAO,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAY,UAAU,CAAC;IACrC,MAAM,MAAM,GAAY,sBAAsB,CAAC;IAC/C,MAAM,MAAM,GAAY,yBAAyB,CAAC;IAClD,IAAI,OAAO,GAAY,gBAAS,CAAC,WAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC1D,IAAI,SAAmB,CAAC;IAExB,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE;QAClC,OAAO,GAAG,gBAAS,CAAC,WAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;KAC3C;SAAM,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;QACxC,OAAO,GAAG,gBAAS,CAAC,WAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;KAC3C;IAED,IAAI;QACH,SAAS,GAAG,MAAM,iBAAM,CAAC,OAAO,CAAC,CAAC;KAClC;IAAC,OAAO,GAAG,EAAE;QACb,OAA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AK,CAAC,EAAE,KAAK,EAAG,GAAG,CAAC,KAAK,IAAI,OAAO,EAAE,CAAC,EACjD,gBAAM,CAAC,SAAS,CAAC;gBAChB,MAAM,EAAE,qBAAqB;aAC7B,CAAC,EACF,gBAAM,CAAC,MAAM,CAAC,CAAC,IAAU,EAAG,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,OAAO,EAAE,GAAC,CAAC,IAAI,CAAC,KAAK,KAAG,SAAS,CAAA,CAAC,CAAA,GAAG,IAAI,CAAC,KAAK,EAAE,CAAA,CAAC,CAAA,GAAG,CAAC,CAAC,CAC7I;YACH,UAAU,EAAE;gBACX,IAAI,CAAC,oBAAU,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC;gBACvC,IAAI,CAAC,oBAAU,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC;aACjC;SACD,CAAC,CAAA;KACF;IACD,OAAO,SAAS,CAAA;AACjB,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/server/index.d.ts b/app/lib/server/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/app/lib/server/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/app/lib/server/index.js b/app/lib/server/index.js index 4541ec5..0b9623d 100644 --- a/app/lib/server/index.js +++ b/app/lib/server/index.js @@ -1,90 +1,59 @@ -'use script' - -let os -let restify -let app - -let cam -let proj -let light - -const PACKAGE = require('../../package.json') - +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const promises_1 = require("fs/promises"); +const Log = require("log"); class Server { - constructor (camera, projector, light) { - restify = require('restify') - os = require('os') - app = restify.createServer({ - name: 'mcopy-server', - version: PACKAGE.version - }) - - this.ip = this.getIp() - - /*app.get('/', function (req, res) { - mcopy.mobile.log('Device connected'); - res.send(fs.readFileSync('tmpl/mcopy_index.html', 'utf8')); - }) - app.get('/js/mcopy_mobile.js', function (req, res) { - res.send(fs.readFileSync('js/mcopy_mobile.js', 'utf8')); - }); - app.get('/js/jquery.js', function (req, res) { - res.send(fs.readFileSync('js/jquery.js', 'utf8')); - }); - app.get('/cmd/:cmd', function (req, res) { - var cmd, - success = function (res) { - var obj = { - success: true, - cmd : cmd, - cam: { - dir : cam.dir, - pos : cam.pos - }, - proj: { - dir : proj.dir, - pos : proj.pos - } - } - res.json(obj); - }; - if (typeof req.params.cmd !== 'undefined') { - mcopy.log('Receiving command from mobile: ' + req.params.cmd); - cmd = req.params.cmd; - if (cmd === 'CF'){ - mcopy.cmd.camera_forward(success); - } else if (cmd === 'CB') { - mcopy.cmd.camera_backward(success); - } else if (cmd === 'PF') { - mcopy.cmd.projector_forward(success); - } else if (cmd === 'PB') { - mcopy.cmd.projector_backward(success); - } else { - mcopy.mobile.fail(res, 'Command ' + cmd + ' not found'); - } - } else { - mcopy.mobile.fail(res, 'No command provided'); - } - }); - app.get('/state', function (req, res) { - res.json({ - cam: { - dir : cam.dir, - pos : cam.pos - }, - proj: { - dir : proj.dir, - pos : proj.pos - } - }); - });*/ - - - } - end () { - app.close() - app = null - } + constructor() { + this.id = 'server'; + this.isActive = false; + this.templates = [ + { + name: 'index', + path: 'server.html' + }, + { + name: 'script', + path: 'lib/client/index.js' + } + ]; + this.port = 9900; + this.wsPort = 9901; + this.init(); + } + async init() { + this.log = await Log({ label: this.id }); + } + async load() { + for (let tmpl of this.templates) { + tmpl.data = await promises_1.readFile(tmpl.path, 'utf8'); + } + this.log.info("Server assets loaded"); + } + template(name, data) { + let html = this.templates.find(el => el.name === name).data; + for (let key of Object.keys(data)) { + html = html.replace(`{{${key}}}`, data[key]); + } + return html; + } + start() { + this.http.listen(function () { + this.isActive = true; + this.log.inf(`Server started!`); + this.log.info(`URL [ http://localhost:${this.port} ]`); + }.bind(this)); + } + stop() { + this.http.close(); + this.isActive = false; + this.log.info(`Server stopped :(`); + } + index(req, res, next) { + const html = this.template('index', { PORT: `${this.port}` }); + return res.send(html); + } + script(req, res, next) { + const js = this.template('script', { PORT: `${this.wsPort}` }); + } } - -module.exports = Server \ No newline at end of file +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/app/lib/server/index.js.map b/app/lib/server/index.js.map new file mode 100644 index 0000000..ffea84e --- /dev/null +++ b/app/lib/server/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":";;AAGA,0CAAsC;AACtC,2BAA4B;AAa5B,MAAM,MAAM;IAiBX;QAhBQ,OAAE,GAAY,QAAQ,CAAA;QACvB,aAAQ,GAAa,KAAK,CAAA;QAEzB,cAAS,GAAsB;YACtC;gBACC,IAAI,EAAE,OAAO;gBACb,IAAI,EAAG,aAAa;aACpB;YACD;gBACC,IAAI,EAAG,QAAQ;gBACf,IAAI,EAAG,qBAAqB;aAC5B;SACD,CAAA;QAEO,SAAI,GAAY,IAAI,CAAA;QACpB,WAAM,GAAY,IAAI,CAAA;QAE7B,IAAI,CAAC,IAAI,EAAE,CAAA;IACZ,CAAC;IAED,KAAK,CAAC,IAAI;QACT,IAAI,CAAC,GAAG,GAAG,MAAM,GAAG,CAAC,EAAE,KAAK,EAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,IAAI;QACT,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,EAAE;YAChC,IAAI,CAAC,IAAI,GAAG,MAAM,mBAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;SAC7C;QACD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAA;IACtC,CAAC;IAED,QAAQ,CAAE,IAAY,EAAE,IAAiB;QACxC,IAAI,IAAI,GAAY,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,IAAI,CAAA;QACpE,KAAK,IAAI,GAAG,IAAK,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YACnC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;SAC5C;QACD,OAAO,IAAI,CAAA;IACZ,CAAC;IAED,KAAK;QACJ,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;YAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;YACpB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;YAC/B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,0BAA0B,IAAI,CAAC,IAAI,IAAI,CAAC,CAAA;QACvD,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IACd,CAAC;IAED,IAAI;QACH,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAA;QACjB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAA;QACrB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAA;IACnC,CAAC;IAED,KAAK,CAAE,GAAa,EAAE,GAAc,EAAE,IAAe;QACpD,MAAM,IAAI,GAAY,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,IAAI,EAAG,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;QACvE,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACtB,CAAC;IACD,MAAM,CAAE,GAAa,EAAE,GAAc,EAAE,IAAe;QACrD,MAAM,EAAE,GAAY,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAG,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;IACzE,CAAC;CACD"} \ No newline at end of file diff --git a/app/package-lock.json b/app/package-lock.json index cbc7127..1ec12ef 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -23,6 +23,7 @@ "display": "file:lib/display", "exec": "file:lib/exec", "exit": "file:lib/exit", + "express": "^4.18.2", "ffmpeg": "file:lib/ffmpeg", "ffmpeg-static": "^5.0.0", "ffprobe": "file:lib/ffprobe", @@ -48,7 +49,8 @@ "spawn": "file:lib/spawn", "system": "file:lib/system", "uuid": "^8.3.2", - "winston": "^3.7.2" + "winston": "^3.7.2", + "ws": "^8.12.1" }, "devDependencies": { "@types/codemirror": "^5.60.5", @@ -1167,6 +1169,18 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -1447,6 +1461,11 @@ "node": ">=0.10.0" } }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, "node_modules/array-initial": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", @@ -1843,6 +1862,75 @@ "resolved": "https://registry.npmjs.org/bmp-js/-/bmp-js-0.1.0.tgz", "integrity": "sha1-4Fpj95amwf8l9Hcex62twUjAcjM=" }, + "node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/boolean": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz", @@ -1984,6 +2072,14 @@ "node": ">=0.10.0" } }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/cacache": { "version": "15.3.0", "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", @@ -2090,6 +2186,18 @@ "node": ">=8" } }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/cam": { "resolved": "lib/cam", "link": true @@ -2600,6 +2708,44 @@ "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", "dev": true }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-disposition/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/convert-source-map": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", @@ -2609,6 +2755,19 @@ "safe-buffer": "~5.1.1" } }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, "node_modules/copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", @@ -2955,6 +3114,15 @@ "node": ">= 0.6" } }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, "node_modules/detect-file": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", @@ -3109,6 +3277,11 @@ "safer-buffer": "^2.1.0" } }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, "node_modules/electron": { "version": "19.0.1", "resolved": "https://registry.npmjs.org/electron/-/electron-19.0.1.tgz", @@ -3791,7 +3964,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "optional": true, "engines": { "node": ">= 0.8" } @@ -3915,6 +4087,11 @@ "node": ">=6" } }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -3924,6 +4101,14 @@ "node": ">=10" } }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/exec": { "resolved": "lib/exec", "link": true @@ -4042,6 +4227,101 @@ "node": ">=0.10.0" } }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/express/node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/express/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -4316,6 +4596,36 @@ "resolved": "lib/filmout", "link": true }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, "node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -4520,6 +4830,14 @@ "node": ">= 0.12" } }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -4536,6 +4854,14 @@ "resolved": "lib/frame", "link": true }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/fs-extra": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", @@ -5420,8 +5746,7 @@ "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "node_modules/galactus": { "version": "0.2.1", @@ -5548,6 +5873,19 @@ "node": "*" } }, + "node_modules/get-intrinsic": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-package-info": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-package-info/-/get-package-info-1.0.0.tgz", @@ -6330,6 +6668,17 @@ "node": ">=6" } }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -6340,12 +6689,14 @@ } }, "node_modules/has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true, + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-unicode": { @@ -6425,6 +6776,29 @@ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-errors/node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", @@ -6641,6 +7015,14 @@ "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==", "dev": true }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, "node_modules/is-absolute": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", @@ -7590,6 +7972,27 @@ "node": ">=10" } }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -7626,19 +8029,19 @@ } }, "node_modules/mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dependencies": { - "mime-db": "1.44.0" + "mime-db": "1.52.0" }, "engines": { "node": ">= 0.6" @@ -8242,7 +8645,6 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -8586,6 +8988,14 @@ "node": ">=0.10.0" } }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -8680,6 +9090,17 @@ "resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz", "integrity": "sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw==" }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -8957,6 +9378,14 @@ "node": ">=0.10.0" } }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -9027,6 +9456,11 @@ "node": ">=0.10.0" } }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, "node_modules/path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", @@ -9243,6 +9677,18 @@ "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", "optional": true }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -9333,6 +9779,39 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/raw-body/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/rcedit": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/rcedit/-/rcedit-3.0.1.tgz", @@ -9830,6 +10309,55 @@ "node": ">= 0.10" } }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/send/node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, "node_modules/sequencer": { "resolved": "lib/sequencer", "link": true @@ -9885,6 +10413,20 @@ "url": "https://opencollective.com/serialport/donate" } }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/server": { "resolved": "lib/server", "link": true @@ -9922,6 +10464,11 @@ "node": ">=0.10.0" } }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, "node_modules/settings": { "resolved": "lib/settings", "link": true @@ -9954,6 +10501,19 @@ "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==" }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -10312,6 +10872,14 @@ "node": ">=0.10.0" } }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/stream-buffers": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", @@ -10750,6 +11318,14 @@ "xtend": "~4.0.1" } }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, "node_modules/tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -10840,6 +11416,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -10957,6 +11545,14 @@ "node": ">= 0.4.0" } }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -11068,6 +11664,14 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -11107,6 +11711,14 @@ "node": ">= 0.10" } }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -11348,6 +11960,26 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "node_modules/ws": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.12.1.tgz", + "integrity": "sha512-1qo+M9Ba+xNhPB+YTWUlK6M17brTut5EXbcBaMRN5pH5dFrXz7lzz1ChFSUq3bOUl8yEvSenhHmYUNJxFzdJew==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/xhr": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", @@ -12271,6 +12903,15 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, + "accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "requires": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + } + }, "agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -12488,6 +13129,11 @@ "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", "dev": true }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, "array-initial": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", @@ -12795,6 +13441,61 @@ "resolved": "https://registry.npmjs.org/bmp-js/-/bmp-js-0.1.0.tgz", "integrity": "sha1-4Fpj95amwf8l9Hcex62twUjAcjM=" }, + "body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "requires": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "requires": { + "side-channel": "^1.0.4" + } + } + } + }, "boolean": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz", @@ -12909,6 +13610,11 @@ "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" + }, "cacache": { "version": "15.3.0", "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", @@ -12995,6 +13701,15 @@ } } }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "cam": { "version": "file:lib/cam" }, @@ -13431,6 +14146,26 @@ "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", "dev": true }, + "content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "requires": { + "safe-buffer": "5.2.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" + }, "convert-source-map": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", @@ -13440,6 +14175,16 @@ "safe-buffer": "~5.1.1" } }, + "cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", @@ -13703,6 +14448,11 @@ "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", "dev": true }, + "destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" + }, "detect-file": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", @@ -13841,6 +14591,11 @@ "safer-buffer": "^2.1.0" } }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, "electron": { "version": "19.0.1", "resolved": "https://registry.npmjs.org/electron/-/electron-19.0.1.tgz", @@ -14338,8 +15093,7 @@ "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "optional": true + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, "encoding": { "version": "0.1.13", @@ -14453,12 +15207,22 @@ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, "escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "devOptional": true }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" + }, "exec": { "version": "file:lib/exec" }, @@ -14561,6 +15325,77 @@ "homedir-polyfill": "^1.0.1" } }, + "express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "requires": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -14788,6 +15623,35 @@ "filmout": { "version": "file:lib/filmout" }, + "finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + } + } + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -14960,6 +15824,11 @@ "mime-types": "^2.1.12" } }, + "forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" + }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -14972,6 +15841,11 @@ "frame": { "version": "file:lib/frame" }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" + }, "fs-extra": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", @@ -15624,8 +16498,7 @@ "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "galactus": { "version": "0.2.1", @@ -15739,6 +16612,16 @@ "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, + "get-intrinsic": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, "get-package-info": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-package-info/-/get-package-info-1.0.0.tgz", @@ -16393,6 +17276,14 @@ "har-schema": "^2.0.0" } }, + "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" + } + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -16400,10 +17291,9 @@ "dev": true }, "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" }, "has-unicode": { "version": "2.0.1", @@ -16469,6 +17359,25 @@ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "dependencies": { + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + } + } + }, "http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", @@ -16632,6 +17541,11 @@ "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==", "dev": true }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + }, "is-absolute": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", @@ -17404,6 +18318,21 @@ "escape-string-regexp": "^4.0.0" } }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" + }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -17431,16 +18360,16 @@ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" }, "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "requires": { - "mime-db": "1.44.0" + "mime-db": "1.52.0" } }, "mimic-fn": { @@ -17886,8 +18815,7 @@ "negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" }, "next-tick": { "version": "1.0.0", @@ -18146,6 +19074,11 @@ } } }, + "object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" + }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -18221,6 +19154,14 @@ "resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz", "integrity": "sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw==" }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "requires": { + "ee-first": "1.1.1" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -18451,6 +19392,11 @@ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", "dev": true }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -18503,6 +19449,11 @@ "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", "dev": true }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, "path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", @@ -18665,6 +19616,15 @@ "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", "optional": true }, + "proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "requires": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + } + }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -18745,6 +19705,32 @@ "safe-buffer": "^5.1.0" } }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "requires": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } + } + }, "rcedit": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/rcedit/-/rcedit-3.0.1.tgz", @@ -19166,6 +20152,53 @@ "sver-compat": "^1.5.0" } }, + "send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "requires": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + } + } + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, "sequencer": { "version": "file:lib/sequencer" }, @@ -19208,6 +20241,17 @@ "debug": "^4.3.3" } }, + "serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + } + }, "server": { "version": "file:lib/server" }, @@ -19240,6 +20284,11 @@ } } }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, "settings": { "version": "file:lib/settings" }, @@ -19265,6 +20314,16 @@ "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==" }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -19560,6 +20619,11 @@ } } }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" + }, "stream-buffers": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", @@ -19929,6 +20993,11 @@ } } }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" + }, "tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -19997,6 +21066,15 @@ "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", "optional": true }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -20089,6 +21167,11 @@ "dev": true, "optional": true }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" + }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -20182,6 +21265,11 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -20212,6 +21300,11 @@ "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", "dev": true }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" + }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -20427,6 +21520,12 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "ws": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.12.1.tgz", + "integrity": "sha512-1qo+M9Ba+xNhPB+YTWUlK6M17brTut5EXbcBaMRN5pH5dFrXz7lzz1ChFSUq3bOUl8yEvSenhHmYUNJxFzdJew==", + "requires": {} + }, "xhr": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", diff --git a/app/package.json b/app/package.json index 2efc5c4..52dd2ac 100644 --- a/app/package.json +++ b/app/package.json @@ -64,6 +64,7 @@ "display": "file:lib/display", "exec": "file:lib/exec", "exit": "file:lib/exit", + "express": "^4.18.2", "ffmpeg": "file:lib/ffmpeg", "ffmpeg-static": "^5.0.0", "ffprobe": "file:lib/ffprobe", @@ -89,7 +90,8 @@ "spawn": "file:lib/spawn", "system": "file:lib/system", "uuid": "^8.3.2", - "winston": "^3.7.2" + "winston": "^3.7.2", + "ws": "^8.12.1" }, "optionalDependencies": { "electron-installer-debian": "^3.1.0" diff --git a/app/server.html b/app/server.html new file mode 100644 index 0000000..cbf9741 --- /dev/null +++ b/app/server.html @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/app/src/lib/client/index.ts b/app/src/lib/client/index.ts new file mode 100644 index 0000000..258d03b --- /dev/null +++ b/app/src/lib/client/index.ts @@ -0,0 +1,5 @@ +const webSocket = new WebSocket('ws://localhost:{{PORT}}/'); +webSocket.onmessage = (event) => { + const data = JSON.parse(event.data); + console.log(data); +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index eb218f4..64c9e7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,12 +28,14 @@ }, "devDependencies": { "@types/electron": "^1.6.10", + "@types/express": "^4.17.17", "@types/fs-extra": "^9.0.7", "@types/jimp": "^0.2.28", "@types/node": "^14.14.31", "@types/request": "^2.48.5", "@types/sharp": "^0.27.1", "@types/uuid": "^8.3.0", + "@types/ws": "^8.5.4", "jsdoc-to-markdown": "^6.0.1", "typescript": "^4.1.5" } @@ -596,12 +598,31 @@ "node": ">=6" } }, + "node_modules/@types/body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "dev": true, + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, "node_modules/@types/caseless": { "version": "0.12.2", "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==", "dev": true }, + "node_modules/@types/connect": { + "version": "3.4.35", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", + "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/electron": { "version": "1.6.10", "resolved": "https://registry.npmjs.org/@types/electron/-/electron-1.6.10.tgz", @@ -611,6 +632,29 @@ "electron": "*" } }, + "node_modules/@types/express": { + "version": "4.17.17", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", + "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", + "dev": true, + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.33", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.33.tgz", + "integrity": "sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, "node_modules/@types/fs-extra": { "version": "9.0.7", "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.7.tgz", @@ -629,12 +673,30 @@ "jimp": "*" } }, + "node_modules/@types/mime": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz", + "integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==", + "dev": true + }, "node_modules/@types/node": { "version": "14.14.31", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.31.tgz", "integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==", "dev": true }, + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true + }, + "node_modules/@types/range-parser": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", + "dev": true + }, "node_modules/@types/request": { "version": "2.48.5", "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.5.tgz", @@ -647,6 +709,16 @@ "form-data": "^2.5.0" } }, + "node_modules/@types/serve-static": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.1.tgz", + "integrity": "sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==", + "dev": true, + "dependencies": { + "@types/mime": "*", + "@types/node": "*" + } + }, "node_modules/@types/sharp": { "version": "0.27.1", "resolved": "https://registry.npmjs.org/@types/sharp/-/sharp-0.27.1.tgz", @@ -668,6 +740,15 @@ "integrity": "sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ==", "dev": true }, + "node_modules/@types/ws": { + "version": "8.5.4", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", + "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/ansi-escape-sequences": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-escape-sequences/-/ansi-escape-sequences-4.1.0.tgz", @@ -3284,12 +3365,31 @@ "defer-to-connect": "^1.0.1" } }, + "@types/body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "dev": true, + "requires": { + "@types/connect": "*", + "@types/node": "*" + } + }, "@types/caseless": { "version": "0.12.2", "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==", "dev": true }, + "@types/connect": { + "version": "3.4.35", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", + "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/electron": { "version": "1.6.10", "resolved": "https://registry.npmjs.org/@types/electron/-/electron-1.6.10.tgz", @@ -3299,6 +3399,29 @@ "electron": "*" } }, + "@types/express": { + "version": "4.17.17", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", + "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", + "dev": true, + "requires": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "@types/express-serve-static-core": { + "version": "4.17.33", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.33.tgz", + "integrity": "sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, "@types/fs-extra": { "version": "9.0.7", "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.7.tgz", @@ -3317,12 +3440,30 @@ "jimp": "*" } }, + "@types/mime": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz", + "integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==", + "dev": true + }, "@types/node": { "version": "14.14.31", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.31.tgz", "integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==", "dev": true }, + "@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true + }, + "@types/range-parser": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", + "dev": true + }, "@types/request": { "version": "2.48.5", "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.5.tgz", @@ -3335,6 +3476,16 @@ "form-data": "^2.5.0" } }, + "@types/serve-static": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.1.tgz", + "integrity": "sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==", + "dev": true, + "requires": { + "@types/mime": "*", + "@types/node": "*" + } + }, "@types/sharp": { "version": "0.27.1", "resolved": "https://registry.npmjs.org/@types/sharp/-/sharp-0.27.1.tgz", @@ -3356,6 +3507,15 @@ "integrity": "sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ==", "dev": true }, + "@types/ws": { + "version": "8.5.4", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", + "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "ansi-escape-sequences": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-escape-sequences/-/ansi-escape-sequences-4.1.0.tgz", diff --git a/package.json b/package.json index e89fc14..b617ac9 100644 --- a/package.json +++ b/package.json @@ -26,12 +26,14 @@ "homepage": "https://github.com/sixteenmillimeter/mcopy#readme", "devDependencies": { "@types/electron": "^1.6.10", + "@types/express": "^4.17.17", "@types/fs-extra": "^9.0.7", "@types/jimp": "^0.2.28", "@types/node": "^14.14.31", "@types/request": "^2.48.5", "@types/sharp": "^0.27.1", "@types/uuid": "^8.3.0", + "@types/ws": "^8.5.4", "jsdoc-to-markdown": "^6.0.1", "typescript": "^4.1.5" }, @@ -47,8 +49,8 @@ "light": "file:app/lib/light", "log": "file:app/lib/log", "mscript": "file:app/lib/mscript", - "proj": "file:app/lib/proj", "processing": "file:app/lib/processing", + "proj": "file:app/lib/proj", "sequencer": "file:app/lib/sequencer", "settings": "file:app/lib/settings", "system": "file:app/lib/system" diff --git a/src/log/index.ts b/src/log/index.ts index 09ae03c..6152563 100644 --- a/src/log/index.ts +++ b/src/log/index.ts @@ -53,7 +53,7 @@ async function logFile () { * * @returns {object} Logger transport **/ -module.exports = async function (arg : any) { +module.exports = async function Log (arg : any) { let consoleFormat : any = { colorize : true } diff --git a/src/server/index.ts b/src/server/index.ts new file mode 100644 index 0000000..0b04164 --- /dev/null +++ b/src/server/index.ts @@ -0,0 +1,79 @@ +import * as WebSocket from 'ws' +import express from 'express' +import type { Request, Response } from 'express' +import { readFile } from 'fs/promises' +import Log = require('log'); + +interface ServerData { + [key: string]: string; + PORT? : string; +} + +interface ServerTemplate { + name : string; + path : string; + data? : string +} + +class Server { + private id : string = 'server' + public isActive : boolean = false + private log : any + private templates : ServerTemplate[] = [ + { + name :'index', + path : 'server.html' + }, + { + name : 'script', + path : 'lib/client/index.js' + } + ] + private http : any + private port : number = 9900 + private wsPort : number = 9901 + constructor () { + this.init() + } + + async init () { + this.log = await Log({ label : this.id }); + } + + async load () { + for (let tmpl of this.templates) { + tmpl.data = await readFile(tmpl.path, 'utf8') + } + this.log.info("Server assets loaded") + } + + template (name: string, data : ServerData) { + let html : string = this.templates.find(el => el.name === name).data + for (let key of Object.keys(data)) { + html = html.replace(`{{${key}}}`, data[key]) + } + return html + } + + start () { + this.http.listen(function () { + this.isActive = true + this.log.inf(`Server started!`) + this.log.info(`URL [ http://localhost:${this.port} ]`) + }.bind(this)) + } + + stop() { + this.http.close() + this.isActive = false + this.log.info(`Server stopped :(`) + } + + index (req : Request, res : Response, next : Function) { + const html : string = this.template('index', { PORT : `${this.port}` }) + return res.send(html) + } + script (req : Request, res : Response, next : Function) { + const js : string = this.template('script', { PORT : `${this.wsPort}` }) + } +} \ No newline at end of file -- 2.40.1 From c9bcb74a9fa7875f596449c6815a5be3647c293f Mon Sep 17 00:00:00 2001 From: mattmcw Date: Sat, 25 Feb 2023 02:08:05 -0500 Subject: [PATCH 02/12] Progress on #20. Can start up a server and serve client.js --- app/display.html | 4 ++-- app/lib/client/index.js | 38 ++++++++++++++++++++++++++++++ app/lib/client/index.js.map | 2 +- app/lib/delay/index.d.ts | 8 +++++++ app/lib/proj/index.js.map | 2 +- app/lib/server/index.js | 38 +++++++++++++++++++++++------- app/lib/server/index.js.map | 2 +- app/main.js | 2 ++ app/package-lock.json | 2 +- app/package.json | 2 +- data/cfg.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- processing/mcopy/cfg.json | 2 +- src/proj/index.ts | 4 ++-- src/server/index.ts | 46 ++++++++++++++++++++++++++++--------- 16 files changed, 127 insertions(+), 33 deletions(-) diff --git a/app/display.html b/app/display.html index 32c8115..8446d80 100644 --- a/app/display.html +++ b/app/display.html @@ -145,7 +145,7 @@ can.style.width = `${window.innerHeight * arg.ratio}px` can.style.height = `${window.innerHeight}px` } else { - can.style.width = `${window.inneWidth}px` + can.style.width = `${window.innerWidth}px` can.style.height = `${window.innerWidth / arg.ratio}px` } } else { @@ -209,7 +209,7 @@ async function onDigital (event, arg) { if (arg.src) { try { - await setImage(arg.src) + await setImage(arg.src) } catch (err) { console.error(err) } diff --git a/app/lib/client/index.js b/app/lib/client/index.js index a52e259..719c9a0 100644 --- a/app/lib/client/index.js +++ b/app/lib/client/index.js @@ -1,6 +1,44 @@ +/*! NoSleep.min.js v0.12.0 - git.io/vfn01 - Rich Tibbett - MIT license */ +//@ts-ignore +!function (A, e) { "object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.NoSleep = e() : A.NoSleep = e(); }(this, (function () { return function (A) { var e = {}; function B(g) { if (e[g]) + return e[g].exports; var o = e[g] = { i: g, l: !1, exports: {} }; return A[g].call(o.exports, o, o.exports, B), o.l = !0, o.exports; } return B.m = A, B.c = e, B.d = function (A, e, g) { B.o(A, e) || Object.defineProperty(A, e, { enumerable: !0, get: g }); }, B.r = function (A) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(A, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(A, "__esModule", { value: !0 }); }, B.t = function (A, e) { if (1 & e && (A = B(A)), 8 & e) + return A; if (4 & e && "object" == typeof A && A && A.__esModule) + return A; var g = Object.create(null); if (B.r(g), Object.defineProperty(g, "default", { enumerable: !0, value: A }), 2 & e && "string" != typeof A) + for (var o in A) + B.d(g, o, function (e) { return A[e]; }.bind(null, o)); return g; }, B.n = function (A) { var e = A && A.__esModule ? function () { return A.default; } : function () { return A; }; return B.d(e, "a", e), e; }, B.o = function (A, e) { return Object.prototype.hasOwnProperty.call(A, e); }, B.p = "", B(B.s = 0); }([function (A, e, B) { + "use strict"; + var g = function () { function A(A, e) { for (var B = 0; B < e.length; B++) { + var g = e[B]; + g.enumerable = g.enumerable || !1, g.configurable = !0, "value" in g && (g.writable = !0), Object.defineProperty(A, g.key, g); + } } return function (e, B, g) { return B && A(e.prototype, B), g && A(e, g), e; }; }(); + var o = B(1), E = o.webm, n = o.mp4, C = function () { return "undefined" != typeof navigator && parseFloat(("" + (/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent) || [0, ""])[1]).replace("undefined", "3_2").replace("_", ".").replace("_", "")) < 10 && !window.MSStream; }, Q = function () { return "wakeLock" in navigator; }, i = function () { function A() { var e = this; if (function (A, e) { if (!(A instanceof e)) + throw new TypeError("Cannot call a class as a function"); }(this, A), this.enabled = !1, Q()) { + this._wakeLock = null; + var B = function () { null !== e._wakeLock && "visible" === document.visibilityState && e.enable(); }; + document.addEventListener("visibilitychange", B), document.addEventListener("fullscreenchange", B); + } + else + C() ? this.noSleepTimer = null : (this.noSleepVideo = document.createElement("video"), this.noSleepVideo.setAttribute("title", "No Sleep"), this.noSleepVideo.setAttribute("playsinline", ""), this._addSourceToVideo(this.noSleepVideo, "webm", E), this._addSourceToVideo(this.noSleepVideo, "mp4", n), this.noSleepVideo.addEventListener("loadedmetadata", (function () { e.noSleepVideo.duration <= 1 ? e.noSleepVideo.setAttribute("loop", "") : e.noSleepVideo.addEventListener("timeupdate", (function () { e.noSleepVideo.currentTime > .5 && (e.noSleepVideo.currentTime = Math.random()); })); }))); } return g(A, [{ key: "_addSourceToVideo", value: function (A, e, B) { var g = document.createElement("source"); g.src = B, g.type = "video/" + e, A.appendChild(g); } }, { key: "enable", value: function () { var A = this; return Q() ? navigator.wakeLock.request("screen").then((function (e) { A._wakeLock = e, A.enabled = !0, console.log("Wake Lock active."), A._wakeLock.addEventListener("release", (function () { console.log("Wake Lock released."); })); })).catch((function (e) { throw A.enabled = !1, console.error(e.name + ", " + e.message), e; })) : C() ? (this.disable(), console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n "), this.noSleepTimer = window.setInterval((function () { document.hidden || (window.location.href = window.location.href.split("#")[0], window.setTimeout(window.stop, 0)); }), 15e3), this.enabled = !0, Promise.resolve()) : this.noSleepVideo.play().then((function (e) { return A.enabled = !0, e; })).catch((function (e) { throw A.enabled = !1, e; })); } }, { key: "disable", value: function () { Q() ? (this._wakeLock && this._wakeLock.release(), this._wakeLock = null) : C() ? this.noSleepTimer && (console.warn("\n NoSleep now disabled for older iOS devices.\n "), window.clearInterval(this.noSleepTimer), this.noSleepTimer = null) : this.noSleepVideo.pause(), this.enabled = !1; } }, { key: "isEnabled", get: function () { return this.enabled; } }]), A; }(); + A.exports =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AAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw" }; + }]); })); const webSocket = new WebSocket('ws://localhost:{{PORT}}/'); webSocket.onmessage = (event) => { const data = JSON.parse(event.data); console.log(data); }; +function preventSleep() { + //@ts-ignore + var noSleep = new NoSleep(); + document.addEventListener('click', function enableNoSleep() { + document.removeEventListener('click', enableNoSleep, false); + document.getElementById('nosleep').remove(); + noSleep.enable(); + }, false); +} +(function main() { + preventSleep(); +})(); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/app/lib/client/index.js.map b/app/lib/client/index.js.map index 47e7ab4..a469822 100644 --- a/app/lib/client/index.js.map +++ b/app/lib/client/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/client/index.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,0BAA0B,CAAC,CAAC;AAC5D,SAAS,CAAC,SAAS,GAAG,CAAC,KAAK,EAAE,EAAE;IAC7B,MAAM,IAAI,GAA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AAE,CAAA"} \ No newline at end of file diff --git a/app/lib/delay/index.d.ts b/app/lib/delay/index.d.ts index e69de29..62d586e 100644 --- a/app/lib/delay/index.d.ts +++ b/app/lib/delay/index.d.ts @@ -0,0 +1,8 @@ +/** + * Delay in an async/await function + * + * @param {integer} ms Milliseconds to delay for + * + * @returns {Promise} Promise to resolve after timeout + **/ +declare function delay(ms: number): Promise; diff --git a/app/lib/proj/index.js.map b/app/lib/proj/index.js.map index d6afd21..71cc387 100644 --- a/app/lib/proj/index.js.map +++ b/app/lib/proj/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/proj/index.ts"],"names":[],"mappings":";AAAA,iDAAiD;;AAEjD,2BAA4B;AAE5B,MAAM,SAAS;IAad;;QAEI;IACJ,YAAa,OAAiB,EAAE,GAAS,EAAE,EAAQ,EAAE,OAAa,EAAE,SAAmB,KAAK;QAfpF,UAAK,GAAS;YACrB,GAAG,EAAG,CAAC;YACP,GAAG,EAAG,IAAI;SACV,CAAC;QACM,YAAO,GAAa,IAAI,CAAC;QAMzB,OAAE,GAAY,WAAW,CAAC;QAMjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,MAAM;YAAE,IAAI,CAAC,EAAE,IAAI,SAAS,CAAC;QACjC,IAAI,CAAC,IAAI,EAAE,CAAC;IACb,CAAC;IAED;;QAEI;IACI,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,GAAG,GAAG,MAAM,GAAG,CAAC,EAAE,KAAK,EAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAA;QACzC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;QACvC,IAAI,CAAC,MAAM,EAAE,CAAC;IACf,CAAC;IAED;;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AS,EAAE;YAClD,OAAO,GAAG,YAAY,CAAA;YACtB,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE;gBACnB,OAAO,IAAI,UAAU,CAAA;aACrB;iBAAM;gBACN,OAAO,IAAI,SAAS,CAAA;aACpB;YACD,OAAO,IAAI,UAAU,CAAA;SACrB;aAAM,IAAI,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE;YACzD,OAAO,GAAG,mBAAmB,CAAA;YAC7B,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE;gBACnB,OAAO,IAAI,UAAU,CAAA;aACrB;iBAAM;gBACN,OAAO,IAAI,SAAS,CAAA;aACpB;YACD,OAAO,IAAI,UAAU,CAAA;SACrB;aAAM,IAAI,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE;YACnD,OAAO,IAAI,oCAAoC,CAAA;SAC/C;QACD,OAAO,IAAI,IAAI,EAAE,IAAI,CAAA;QACrB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAA;QACnC,OAAO,MAAM,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAC,CAAC,CAAA;IAChE,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,OAAiB,EAAE,GAAS,EAAE,EAAQ,EAAE,OAAa,EAAE,MAAgB;IACjG,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;AACxD,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/server/index.js b/app/lib/server/index.js index 0b9623d..4c38267 100644 --- a/app/lib/server/index.js +++ b/app/lib/server/index.js @@ -1,5 +1,9 @@ "use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); +const express_1 = __importDefault(require("express")); const promises_1 = require("fs/promises"); const Log = require("log"); class Server { @@ -22,11 +26,16 @@ class Server { } async init() { this.log = await Log({ label: this.id }); + await this.load(); + await this.start(); } async load() { + this.http = express_1.default(); for (let tmpl of this.templates) { tmpl.data = await promises_1.readFile(tmpl.path, 'utf8'); } + this.http.get('/', this.index.bind(this)); + this.http.get('/client.js', this.script.bind(this)); this.log.info("Server assets loaded"); } template(name, data) { @@ -36,24 +45,37 @@ class Server { } return html; } - start() { - this.http.listen(function () { - this.isActive = true; - this.log.inf(`Server started!`); - this.log.info(`URL [ http://localhost:${this.port} ]`); + async start() { + return new Promise(function (resolve, reject) { + this.httpd = this.http.listen(this.port, function () { + this.isActive = true; + this.log.info(`Server started!`); + this.log.info(`URL [ http://localhost:${this.port} ]`); + return resolve(true); + }.bind(this)); }.bind(this)); } stop() { - this.http.close(); - this.isActive = false; - this.log.info(`Server stopped :(`); + return new Promise(function (resolve, reject) { + return this.httpd.close(function () { + this.isActive = false; + this.log.info(`Server stopped :(`); + }.bind(this)); + }.bind(this)); } index(req, res, next) { const html = this.template('index', { PORT: `${this.port}` }); + this.log.info('GET /'); return res.send(html); } script(req, res, next) { const js = this.template('script', { PORT: `${this.wsPort}` }); + res.contentType('text/javascript'); + this.log.info('GET /script.js'); + return res.send(js); } } +module.exports = function () { + return new Server(); +}; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/app/lib/server/index.js.map b/app/lib/server/index.js.map index ffea84e..c2fc08d 100644 --- a/app/lib/server/index.js.map +++ b/app/lib/server/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":";;AAGA,0CAAsC;AACtC,2BAA4B;AAa5B,MAAM,MAAM;IAiBX;QAhBQ,OAAE,GAAY,QAAQ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AI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;QACxE,GAAG,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAA;QAClC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;QAC/B,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACpB,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG;IAChB,OAAO,IAAI,MAAM,EAAE,CAAA;AACpB,CAAC,CAAA"} \ No newline at end of file diff --git a/app/main.js b/app/main.js index e08be3c..45726ef 100644 --- a/app/main.js +++ b/app/main.js @@ -39,6 +39,7 @@ let cmd; let seq; let capper; let alert; +let server; const cfg = require('./data/cfg.json') @@ -136,6 +137,7 @@ var init = async function () { cmd = require('cmd')(cfg, proj, cam, light, alert, cam2, proj2, capper) seq = require('sequencer')(cfg, cmd, mainWindow.webContents) + server = require('server')() } app.on('ready', init) diff --git a/app/package-lock.json b/app/package-lock.json index 1ec12ef..d18b6a6 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.7.7", + "version": "1.7.8", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/app/package.json b/app/package.json index 52dd2ac..3e2c7b6 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.7.7", + "version": "1.7.8", "description": "GUI for the mcopy small gauge film optical printer platform", "main": "main.js", "scripts": { diff --git a/data/cfg.json b/data/cfg.json index de49d0d..e19df65 100644 --- a/data/cfg.json +++ b/data/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.7.7", + "version": "1.7.8", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/package-lock.json b/package-lock.json index 64c9e7c..943fdc9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mcopy", - "version": "1.7.7", + "version": "1.7.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mcopy", - "version": "1.7.7", + "version": "1.7.8", "license": "MIT", "dependencies": { "arduino": "file:app/lib/arduino", diff --git a/package.json b/package.json index b617ac9..c396ded 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mcopy", - "version": "1.7.7", + "version": "1.7.8", "description": "Small gauge film optical printer platform", "main": "build.js", "directories": { diff --git a/processing/mcopy/cfg.json b/processing/mcopy/cfg.json index de49d0d..e19df65 100644 --- a/processing/mcopy/cfg.json +++ b/processing/mcopy/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.7.7", + "version": "1.7.8", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/src/proj/index.ts b/src/proj/index.ts index 5b29ca2..641343a 100644 --- a/src/proj/index.ts +++ b/src/proj/index.ts @@ -155,7 +155,7 @@ class Projector { } message += ' 1 frame' } else if (cmd === this.cfg.arduino.cmd.projectors) { - message += 'Projectors both MOVED 1 frame each'; + message += 'Projectors both MOVED 1 frame each' } message += ` ${ms}ms` this.log.info(message, 'PROJECTOR') @@ -164,5 +164,5 @@ class Projector { } module.exports = function (arduino : Arduino, cfg : any, ui : any, filmout : any, second : boolean) { - return new Projector(arduino, cfg, ui, filmout, second); + return new Projector(arduino, cfg, ui, filmout, second) } \ No newline at end of file diff --git a/src/server/index.ts b/src/server/index.ts index 0b04164..0e8ea4b 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -1,6 +1,5 @@ import * as WebSocket from 'ws' -import express from 'express' -import type { Request, Response } from 'express' +import express, { Express, Request, Response, Application } from 'express' import { readFile } from 'fs/promises' import Log = require('log'); @@ -29,21 +28,31 @@ class Server { path : 'lib/client/index.js' } ] - private http : any + private http : Application + private httpd : Server private port : number = 9900 private wsPort : number = 9901 + constructor () { this.init() + } async init () { this.log = await Log({ label : this.id }); + await this.load() + await this.start() } async load () { + this.http = express() for (let tmpl of this.templates) { tmpl.data = await readFile(tmpl.path, 'utf8') } + + this.http.get('/', this.index.bind(this)) + this.http.get('/client.js', this.script.bind(this)) + this.log.info("Server assets loaded") } @@ -55,25 +64,40 @@ class Server { return html } - start () { - this.http.listen(function () { - this.isActive = true - this.log.inf(`Server started!`) - this.log.info(`URL [ http://localhost:${this.port} ]`) + async start () { + return new Promise(function (resolve : Function, reject : Function) { + this.httpd = this.http.listen(this.port, function () { + this.isActive = true + this.log.info(`Server started!`) + this.log.info(`URL [ http://localhost:${this.port} ]`) + return resolve(true) + }.bind(this)) }.bind(this)) } stop() { - this.http.close() - this.isActive = false - this.log.info(`Server stopped :(`) + return new Promise(function (resolve : Function, reject : Function) { + return this.httpd.close(function () { + this.isActive = false + this.log.info(`Server stopped :(`) + }.bind(this)) + }.bind(this)) + } index (req : Request, res : Response, next : Function) { const html : string = this.template('index', { PORT : `${this.port}` }) + this.log.info('GET /') return res.send(html) } script (req : Request, res : Response, next : Function) { const js : string = this.template('script', { PORT : `${this.wsPort}` }) + res.contentType('text/javascript') + this.log.info('GET /script.js') + return res.send(js) } +} + +module.exports = function () { + return new Server() } \ No newline at end of file -- 2.40.1 From e64277e43832f0c51e84a54b9e40422a68fa1a78 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Sat, 25 Feb 2023 02:08:56 -0500 Subject: [PATCH 03/12] More work on #20. Fix typos in display code. Should re-work script into transpiled ts file. --- app/lib/delay/index.d.ts | 8 -- app/lib/server/index.js | 58 +++++++++- app/lib/server/index.js.map | 2 +- app/package-lock.json | 2 +- app/package.json | 2 +- app/server.html | 31 +++++- app/src/lib/client/index.ts | 213 +++++++++++++++++++++++++++++++++++- data/cfg.json | 2 +- package-lock.json | 4 +- package.json | 2 +- processing/mcopy/cfg.json | 2 +- src/server/index.ts | 76 +++++++++++-- 12 files changed, 372 insertions(+), 30 deletions(-) diff --git a/app/lib/delay/index.d.ts b/app/lib/delay/index.d.ts index 62d586e..e69de29 100644 --- a/app/lib/delay/index.d.ts +++ b/app/lib/delay/index.d.ts @@ -1,8 +0,0 @@ -/** - * Delay in an async/await function - * - * @param {integer} ms Milliseconds to delay for - * - * @returns {Promise} Promise to resolve after timeout - **/ -declare function delay(ms: number): Promise; diff --git a/app/lib/server/index.js b/app/lib/server/index.js index 4c38267..eeeea01 100644 --- a/app/lib/server/index.js +++ b/app/lib/server/index.js @@ -3,8 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); +const ws_1 = require("ws"); const express_1 = __importDefault(require("express")); const promises_1 = require("fs/promises"); +const mime_1 = __importDefault(require("mime")); const Log = require("log"); class Server { constructor() { @@ -22,6 +24,7 @@ class Server { ]; this.port = 9900; this.wsPort = 9901; + this.proxy = {}; this.init(); } async init() { @@ -36,6 +39,7 @@ class Server { } this.http.get('/', this.index.bind(this)); this.http.get('/client.js', this.script.bind(this)); + this.http.get('/image/:key', this.image.bind(this)); this.log.info("Server assets loaded"); } template(name, data) { @@ -45,7 +49,22 @@ class Server { } return html; } - async start() { + async startWss() { + try { + this.wss = new ws_1.WebSocketServer({ port: this.wsPort }); + } + catch (err) { + this.log.error(err); + return; + } + this.wss.on('connection', (ws) => { + this.log.info(`Client connected to WebSocketServer`); + console.dir(ws); + ws.send('mcopy'); + }); + this.log.info(`WSS [ ws://localhost:${this.wsPort} ]`); + } + async startHttp() { return new Promise(function (resolve, reject) { this.httpd = this.http.listen(this.port, function () { this.isActive = true; @@ -55,11 +74,16 @@ class Server { }.bind(this)); }.bind(this)); } - stop() { + async start() { + await this.startHttp(); + await this.startWss(); + } + async stop() { return new Promise(function (resolve, reject) { return this.httpd.close(function () { this.isActive = false; this.log.info(`Server stopped :(`); + return resolve(false); }.bind(this)); }.bind(this)); } @@ -74,6 +98,36 @@ class Server { this.log.info('GET /script.js'); return res.send(js); } + async image(req, res, next) { + let filePath; + if (req.params && req.params.key) { + if (this.proxy[req.params.key]) { + filePath = this.proxy[req.params.key].path; + } + else { + return false; + } + } + else { + return false; + } + return new Promise(function (resolve, reject) { + return res.sendFile(filePath, function (err) { + if (err) { + res.status(err.status).end(); + return reject(err); + } + return resolve(true); + }); + }.bind(this)); + } + addProxy(key, filePath) { + this.proxy[key] = { + path: filePath, + mime: mime_1.default.getType(filePath) + }; + this.log.info(`Added proxy image [${key}]`); + } } module.exports = function () { return new Server(); diff --git a/app/lib/server/index.js.map b/app/lib/server/index.js.map index c2fc08d..c17759c 100644 --- a/app/lib/server/index.js.map +++ b/app/lib/server/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":";;;;;AACA,sDAA0E;AAC1E,0CAAsC;AACtC,2BAA4B;AAa5B,MAAM,MAAM;IAmBX;QAlBQ,OAAE,GAAY,QAAQ,CAAA;QACvB,aAAQ,GAAa,KAAK,CAAA;QAEzB,cAAS,GAAsB;YACtC;gBACC,IAAI,EAAE,OAAO;gBACb,IAAI,EAAG,aAAa;aACpB;YACD;gBACC,IAAI,EAAG,QAAQ;gBACf,IAAI,EAAG,qBAAqB;aAC5B;SACD,CAAA;QAGO,SAAI,GAAY,IAAI,CAAA;QACpB,WAAM,GAAY,IAAI,CAAA;QAG7B,IAAI,CAAC,IAAI,EAAE,CAAA;IAEZ,CAAC;IAED,KAAK,CAAC,IAAI;QACT,IAAI,CAAC,GAAG,GAAG,MAAM,GAAG,CAAC,EAAE,KAAK,EAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1C,MAAM,IAAI,CAAC,IAAI,EAAE,CAAA;QACjB,MAAM,IAAI,CAAC,KAAK,EAAE,CAAA;IACnB,CAAC;IAED,KAAK,CAAC,IAAI;QACT,IAAI,CAAC,IAAI,GAAG,iBAAO,EAAE,CAAA;QACrB,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,EAAE;YAChC,IAAI,CAAC,IAAI,GAAG,MAAM,mBAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;SAC7C;QAED,IAAI,CAAC,IAAI,CAAC,GAAG,CAA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AAC,IAAI,CAAC,sBAAsB,GAAG,GAAG,CAAC,CAAA;IAC5C,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG;IAChB,OAAO,IAAI,MAAM,EAAE,CAAA;AACpB,CAAC,CAAA"} \ No newline at end of file diff --git a/app/package-lock.json b/app/package-lock.json index d18b6a6..a4b7642 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.7.8", + "version": "1.7.9", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/app/package.json b/app/package.json index 3e2c7b6..0dbd52c 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.7.8", + "version": "1.7.9", "description": "GUI for the mcopy small gauge film optical printer platform", "main": "main.js", "scripts": { diff --git a/app/server.html b/app/server.html index cbf9741..df36fa2 100644 --- a/app/server.html +++ b/app/server.html @@ -1,10 +1,37 @@ +
Click to prevent sleep
+
+
+ + \ No newline at end of file diff --git a/app/src/lib/client/index.ts b/app/src/lib/client/index.ts index 258d03b..183a559 100644 --- a/app/src/lib/client/index.ts +++ b/app/src/lib/client/index.ts @@ -1,5 +1,212 @@ +/*! NoSleep.min.js v0.12.0 - git.io/vfn01 - Rich Tibbett - MIT license */ +//@ts-ignore +!function(A,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.NoSleep=e():A.NoSleep=e()}(this,(function(){return function(A){var e={};function B(g){if(e[g])return e[g].exports;var o=e[g]={i:g,l:!1,exports:{}};return A[g].call(o.exports,o,o.exports,B),o.l=!0,o.exports}return B.m=A,B.c=e,B.d=function(A,e,g){B.o(A,e)||Object.defineProperty(A,e,{enumerable:!0,get:g})},B.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},B.t=function(A,e){if(1&e&&(A=B(A)),8&e)return A;if(4&e&&"object"==typeof A&&A&&A.__esModule)return A;var g=Object.create(null);if(B.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:A}),2&e&&"string"!=typeof A)for(var o in A)B.d(g,o,function(e){return A[e]}.bind(null,o));return g},B.n=function(A){var e=A&&A.__esModule?function(){return A.default}:function(){return A};return B.d(e,"a",e),e},B.o=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},B.p="",B(B.s=0)}([function(A,e,B){"use strict";var g=function(){function A(A,e){for(var B=0;B.5&&(e.noSleepVideo.currentTime=Math.random())}))})))}return g(A,[{key:"_addSourceToVideo",value:function(A,e,B){var g=document.createElement("source");g.src=B,g.type="video/"+e,A.appendChild(g)}},{key:"enable",value:function(){var A=this;return Q()?navigator.wakeLock.request("screen").then((function(e){A._wakeLock=e,A.enabled=!0,console.log("Wake Lock active."),A._wakeLock.addEventListener("release",(function(){console.log("Wake Lock released.")}))})).catch((function(e){throw A.enabled=!1,console.error(e.name+", "+e.message),e})):C()?(this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n "),this.noSleepTimer=window.setInterval((function(){document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3),this.enabled=!0,Promise.resolve()):this.noSleepVideo.play().then((function(e){return A.enabled=!0,e})).catch((function(e){throw A.enabled=!1,e}))}},{key:"disable",value:function(){Q()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):C()?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}},{key:"isEnabled",get:function(){return this.enabled}}]),A}();A.exports=i},function(A,e,B){"use strict";A.exports={webm:"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAA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mmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSC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AJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"}}])})); + const webSocket = new WebSocket('ws://localhost:{{PORT}}/'); -webSocket.onmessage = (event) => { +let imgTmp : Image; + +function preventSleep () { + //@ts-ignore + var noSleep = new NoSleep(); + document.addEventListener('click', function enableNoSleep() { + document.removeEventListener('click', enableNoSleep, false); + document.getElementById('nosleep').remove(); + noSleep.enable(); + }, false); +} + + +async function setImage (src : string) { + return new Promise(async (resolve : Function, reject : Function) => { + imgTmp = new Image() + let img = document.getElementById('img') + let body = document.querySelector('body') + if (body.classList.contains('meter')) { + body.classList.remove('meter') + } + imgTmp.onload = function () { + img.style.backgroundImage = `url('${src}')`; + return resolve(src); + }; + imgTmp.src = src; + }); +} +async function onMeter () { + console.log('meter') + const body = document.querySelector('body') + if (!body.classList.contains('meter')) { + body.classList.add('meter') + } +} +async function onFocus () { + console.log('focus') + const can = document.getElementById('can') + const dpr = window.devicePixelRatio || 1 + let ctx; + + if (!can.classList.contains('show')) { + can.classList.add('show') + } + + can.width = window.innerWidth * dpr + can.height = window.innerHeight * dpr + + can.style.width = `${window.innerWidth}px` + can.style.height = `${window.innerHeight}px` + + ctx = can.getContext('2d') + ctx.scale(dpr, dpr) + + try{ + await drawFocus(can, ctx) + } catch (err) { + alert(JSON.stringify(err)) + } +} +async function drawFocus (can, ctx) { + const count = 20 + const half = Math.round(count / 2) + const dpr = window.devicePixelRatio || 1 + const w = can.width / dpr + const h = can.height / dpr + const longest = w >= h ? w * 1.5 : h * 1.5 + const opp = Math.tan(360 / (count * 32)) * longest / 10 + + //console.log(`l: ${longest}`) + //console.log(`${360 / (count * 8)}deg`) + //console.log(`o: ${opp}`) + + for (let i = 0; i < count; i++) { + ctx.beginPath() + ctx.moveTo(w / 2, h / 2) + ctx.lineTo((w / 2) + opp, longest) + ctx.lineTo((w / 2) - opp, longest) + ctx.fill() + ctx.translate(w / 2, h / 2); + ctx.rotate((360 / count) * Math.PI / 180) + ctx.translate(- w / 2, -h / 2) + } +} +async function onField (arg : any) { + console.log('field guide') + const can : HTMLCanvasElement = document.getElementById('can') + const dpr = window.devicePixelRatio || 1 + const screen = window.outerWidth / window.outerHeight + let ctx : CanvasRenderingContext2D; + if (!can.classList.contains('show')) { + can.classList.add('show') + } + if (arg.ratio) { + if (arg.ratio < screen) { + can.width = (window.innerHeight * arg.ratio) * dpr + can.height = window.innerHeight * dpr + } else { + can.width =window.innerWidth * dpr + can.height = (window.innerWidth / arg.ratio) * dpr + } + } else { + can.width = window.innerWidth * dpr + can.height = window.innerHeight * dpr + } + + if (arg.ratio) { + if (arg.ratio < screen) { + can.style.width = `${window.innerHeight * arg.ratio}px` + can.style.height = `${window.innerHeight}px` + } else { + can.style.width = `${window.innerWidth}px` + can.style.height = `${window.innerWidth / arg.ratio}px` + } + } else { + can.style.width = `${window.innerWidth}px` + can.style.height = `${window.innerHeight}px` + } + + ctx = can.getContext('2d') + ctx.scale(dpr, dpr) + + try{ + await drawField(can, ctx) + } catch (err) { + alert(JSON.stringify(err)) + } +} +// draw a field guide +async function drawField (can : HTMLCanvasElement, ctx : CanvasRenderingContext2D) { + const count = 20 + const half = Math.round(count / 2) + const dpr = window.devicePixelRatio || 1 + const w = can.width / dpr + const h = can.height / dpr + const wsec = w / count + const hsec = h / count + const spacer = 12 + const fontSize = 18 + + ctx.lineWidth = 2 + + ctx.moveTo(w / 2, 0) + ctx.lineTo(w / 2, h) + ctx.stroke() + ctx.moveTo(0, h / 2) + ctx.lineTo(w, h / 2) + ctx.stroke() + + for (let i = 0; i < count; i++) { + ctx.moveTo(wsec * i, hsec * i) + ctx.lineTo(wsec * i, h - (hsec * i)) + ctx.stroke() + ctx.moveTo(wsec * i, hsec * i) + ctx.lineTo(w - (wsec * i), hsec * i) + ctx.stroke() + } + + ctx.lineWidth = 1 + + ctx.font = `${fontSize}px Arial` + for (let i = 0; i < half; i++) { + //left count + ctx.fillText(`${(half - i)}`, (wsec * i) + spacer, (h / 2) - spacer) + //right count + ctx.fillText(`${(half - i)}`, (w - (wsec * i)) - (spacer * 2), (h / 2) + (spacer * 2)) + //up count + ctx.fillText(`${(half - i)}`, (w / 2) + spacer, (hsec * i) + spacer + (fontSize / 2) ) + //down count + ctx.fillText(`${(half - i)}`, (w / 2) - (spacer * 2), (h - (hsec * i)) - spacer) + } +} + +function send (obj : any) { + if (webSocket) { + webSocket.send(JSON.stringify(obj)) + } +} + +webSocket.onmessage = async (event : any) => { const data = JSON.parse(event.data); - console.log(data); -} \ No newline at end of file + if (data.action === 'mcopy') { + console.log('Connected') + send({ action : 'mcopy' }) + } + if (data.action === 'image') { + await setImage(data.image) + send({ action : 'image' }) + } + if (data.action === 'field') { + await onField( { ratio : data.ratio }) + send({ action : 'field' }) + } + if (data.action === 'meter') { + await onMeter() + send({ action : 'meter' }) + } + if (data.action === 'focus') { + await onFocus() + send({ action : 'focus' }) + } +} + + +(function main () { + preventSleep(); +})() \ No newline at end of file diff --git a/data/cfg.json b/data/cfg.json index e19df65..b2ca107 100644 --- a/data/cfg.json +++ b/data/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.7.8", + "version": "1.7.9", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/package-lock.json b/package-lock.json index 943fdc9..2bb1c99 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mcopy", - "version": "1.7.8", + "version": "1.7.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mcopy", - "version": "1.7.8", + "version": "1.7.9", "license": "MIT", "dependencies": { "arduino": "file:app/lib/arduino", diff --git a/package.json b/package.json index c396ded..fffa9cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mcopy", - "version": "1.7.8", + "version": "1.7.9", "description": "Small gauge film optical printer platform", "main": "build.js", "directories": { diff --git a/processing/mcopy/cfg.json b/processing/mcopy/cfg.json index e19df65..b2ca107 100644 --- a/processing/mcopy/cfg.json +++ b/processing/mcopy/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.7.8", + "version": "1.7.9", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/src/server/index.ts b/src/server/index.ts index 0e8ea4b..623437f 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -1,7 +1,8 @@ -import * as WebSocket from 'ws' +import WebSocket, { WebSocketServer } from 'ws' import express, { Express, Request, Response, Application } from 'express' import { readFile } from 'fs/promises' -import Log = require('log'); +import mime from 'mime' +import Log = require('log') interface ServerData { [key: string]: string; @@ -11,7 +12,16 @@ interface ServerData { interface ServerTemplate { name : string; path : string; - data? : string + data? : string; +} + +interface ServerProxy { + path : string; + mime : string; +} + +interface ServerProxyList { + [key: string]: ServerProxy; } class Server { @@ -30,8 +40,10 @@ class Server { ] private http : Application private httpd : Server + private wss : WebSocketServer private port : number = 9900 private wsPort : number = 9901 + private proxy : ServerProxyList = {} constructor () { this.init() @@ -52,6 +64,7 @@ class Server { this.http.get('/', this.index.bind(this)) this.http.get('/client.js', this.script.bind(this)) + this.http.get('/image/:key', this.image.bind(this)) this.log.info("Server assets loaded") } @@ -64,10 +77,23 @@ class Server { return html } - async start () { + async startWss () { + try { + this.wss = new WebSocketServer({ port: this.wsPort }) + } catch (err) { + this.log.error(err) + return + } + this.wss.on('connection', (ws) => { + this.log.info(`Client connected to WebSocketServer`) + ws.send(JSON.stringify({ action : 'mcopy' }); + }) + this.log.info(`WSS [ ws://localhost:${this.wsPort} ]`) + } + + async startHttp () { return new Promise(function (resolve : Function, reject : Function) { this.httpd = this.http.listen(this.port, function () { - this.isActive = true this.log.info(`Server started!`) this.log.info(`URL [ http://localhost:${this.port} ]`) return resolve(true) @@ -75,14 +101,20 @@ class Server { }.bind(this)) } - stop() { + async start () { + await this.startHttp() + await this.startWss() + this.isActive = true + } + + async stop() { return new Promise(function (resolve : Function, reject : Function) { return this.httpd.close(function () { this.isActive = false this.log.info(`Server stopped :(`) + return resolve(false) }.bind(this)) }.bind(this)) - } index (req : Request, res : Response, next : Function) { @@ -96,6 +128,36 @@ class Server { this.log.info('GET /script.js') return res.send(js) } + + async image (req : Request, res : Response, next : Function) { + let filePath : string + if (req.params && req.params.key) { + if (this.proxy[req.params.key]) { + filePath = this.proxy[req.params.key].path + } else { + return false + } + } else { + return false + } + return new Promise(function (resolve : Function, reject: Function) { + return res.sendFile(filePath, function (err : any) { + if (err) { + res.status(err.status).end() + return reject(err) + } + return resolve(true) + }) + }.bind(this)) + } + + public addProxy (key : string, filePath : string) { + this.proxy[key] = { + path : filePath, + mime : mime.getType(filePath) + } + this.log.info(`Added proxy image [${key}]`) + } } module.exports = function () { -- 2.40.1 From 1290a8f324bbc5131c40aa1b07414c66e210b91b Mon Sep 17 00:00:00 2001 From: mattmcw Date: Sat, 25 Feb 2023 11:59:56 -0500 Subject: [PATCH 04/12] Major progress on #20. Promised-based websocket command structure is completed. All functionality needs to be placed into individual classes and any new functions get added to the server. Will create entire thin client using this method. --- app/data/cfg.json | 2 +- app/lib/client/index.js | 227 +++++++++++++++++++++++++++++++++++- app/lib/client/index.js.map | 2 +- app/lib/delay/index.d.ts | 8 ++ app/lib/server/index.js | 72 ++++++++++-- app/lib/server/index.js.map | 2 +- app/package-lock.json | 2 +- app/package.json | 2 +- app/server.html | 3 + app/src/lib/client/index.ts | 135 +++++++++++++-------- data/cfg.json | 2 +- package-lock.json | 4 +- package.json | 2 +- processing/mcopy/cfg.json | 2 +- src/server/index.ts | 85 ++++++++++++-- 15 files changed, 465 insertions(+), 85 deletions(-) diff --git a/app/data/cfg.json b/app/data/cfg.json index de49d0d..b2ca107 100644 --- a/app/data/cfg.json +++ b/app/data/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.7.7", + "version": "1.7.9", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/app/lib/client/index.js b/app/lib/client/index.js index 719c9a0..00ab183 100644 --- a/app/lib/client/index.js +++ b/app/lib/client/index.js @@ -1,3 +1,12 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; /*! NoSleep.min.js v0.12.0 - git.io/vfn01 - Rich Tibbett - MIT license */ //@ts-ignore !function (A, e) { "object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.NoSleep = e() : A.NoSleep = e(); }(this, (function () { return function (A) { var e = {}; function B(g) { if (e[g]) @@ -24,11 +33,8 @@ "use strict"; A.exports = { webm: "data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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JSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGUUkpKKaVUSgmhhBJKKSWllFJKIYQQSikFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAZAAAkKKUUiktRYIipRikGEtGFXNQWoqocgxSzalSziDmJJaIMYSUk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AO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw" }; }]); })); -const webSocket = new WebSocket('ws://localhost:{{PORT}}/'); -webSocket.onmessage = (event) => { - const data = JSON.parse(event.data); - console.log(data); -}; +const ws = new WebSocket('ws://localhost:{{PORT}}/'); +let imgTmp; function preventSleep() { //@ts-ignore var noSleep = new NoSleep(); @@ -38,6 +44,217 @@ function preventSleep() { noSleep.enable(); }, false); } +function setImage(src) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + imgTmp = new Image(); + let img = document.getElementById('img'); + let body = document.querySelector('body'); + if (body.classList.contains('meter')) { + body.classList.remove('meter'); + } + imgTmp.onload = function () { + img.style.backgroundImage = `url('${src}')`; + return resolve(src); + }; + imgTmp.src = src; + })); + }); +} +function onImage(arg) { + return __awaiter(this, void 0, void 0, function* () { + return setImage(arg.image); + }); +} +function onMeter(arg) { + return __awaiter(this, void 0, void 0, function* () { + console.log('meter'); + const body = document.querySelector('body'); + body.className = ''; + body.classList.add('meter'); + }); +} +function onBlank(arg) { + return __awaiter(this, void 0, void 0, function* () { + console.log('blank'); + const body = document.querySelector('body'); + body.className = ''; + body.classList.add('blank'); + }); +} +function onFocus(arg) { + return __awaiter(this, void 0, void 0, function* () { + console.log('focus'); + const can = document.getElementById('can'); + const dpr = window.devicePixelRatio || 1; + let ctx; + if (!can.classList.contains('show')) { + can.classList.add('show'); + } + can.width = window.innerWidth * dpr; + can.height = window.innerHeight * dpr; + can.style.width = `${window.innerWidth}px`; + can.style.height = `${window.innerHeight}px`; + ctx = can.getContext('2d'); + ctx.scale(dpr, dpr); + try { + yield drawFocus(can, ctx); + } + catch (err) { + alert(JSON.stringify(err)); + } + }); +} +function drawFocus(can, ctx) { + return __awaiter(this, void 0, void 0, function* () { + const count = 20; + const half = Math.round(count / 2); + const dpr = window.devicePixelRatio || 1; + const w = can.width / dpr; + const h = can.height / dpr; + const longest = w >= h ? w * 1.5 : h * 1.5; + const opp = Math.tan(360 / (count * 32)) * longest / 10; + for (let i = 0; i < count; i++) { + ctx.beginPath(); + ctx.moveTo(w / 2, h / 2); + ctx.lineTo((w / 2) + opp, longest); + ctx.lineTo((w / 2) - opp, longest); + ctx.fill(); + ctx.translate(w / 2, h / 2); + ctx.rotate((360 / count) * Math.PI / 180); + ctx.translate(-w / 2, -h / 2); + } + }); +} +function onField(arg) { + return __awaiter(this, void 0, void 0, function* () { + console.log('field guide'); + const can = document.getElementById('can'); + const dpr = window.devicePixelRatio || 1; + const screen = window.outerWidth / window.outerHeight; + let ctx; + if (!can.classList.contains('show')) { + can.classList.add('show'); + } + if (arg.ratio) { + if (arg.ratio < screen) { + can.width = (window.innerHeight * arg.ratio) * dpr; + can.height = window.innerHeight * dpr; + } + else { + can.width = window.innerWidth * dpr; + can.height = (window.innerWidth / arg.ratio) * dpr; + } + } + else { + can.width = window.innerWidth * dpr; + can.height = window.innerHeight * dpr; + } + if (arg.ratio) { + if (arg.ratio < screen) { + can.style.width = `${window.innerHeight * arg.ratio}px`; + can.style.height = `${window.innerHeight}px`; + } + else { + can.style.width = `${window.innerWidth}px`; + can.style.height = `${window.innerWidth / arg.ratio}px`; + } + } + else { + can.style.width = `${window.innerWidth}px`; + can.style.height = `${window.innerHeight}px`; + } + ctx = can.getContext('2d'); + ctx.scale(dpr, dpr); + try { + yield drawField(can, ctx); + } + catch (err) { + alert(JSON.stringify(err)); + } + }); +} +// draw a field guide +function drawField(can, ctx) { + return __awaiter(this, void 0, void 0, function* () { + const count = 20; + const half = Math.round(count / 2); + const dpr = window.devicePixelRatio || 1; + const w = can.width / dpr; + const h = can.height / dpr; + const wsec = w / count; + const hsec = h / count; + const spacer = 12; + const fontSize = 18; + ctx.lineWidth = 2; + ctx.moveTo(w / 2, 0); + ctx.lineTo(w / 2, h); + ctx.stroke(); + ctx.moveTo(0, h / 2); + ctx.lineTo(w, h / 2); + ctx.stroke(); + for (let i = 0; i < count; i++) { + ctx.moveTo(wsec * i, hsec * i); + ctx.lineTo(wsec * i, h - (hsec * i)); + ctx.stroke(); + ctx.moveTo(wsec * i, hsec * i); + ctx.lineTo(w - (wsec * i), hsec * i); + ctx.stroke(); + } + ctx.lineWidth = 1; + ctx.font = `${fontSize}px Arial`; + for (let i = 0; i < half; i++) { + //left count + ctx.fillText(`${(half - i)}`, (wsec * i) + spacer, (h / 2) - spacer); + //right count + ctx.fillText(`${(half - i)}`, (w - (wsec * i)) - (spacer * 2), (h / 2) + (spacer * 2)); + //up count + ctx.fillText(`${(half - i)}`, (w / 2) + spacer, (hsec * i) + spacer + (fontSize / 2)); + //down count + ctx.fillText(`${(half - i)}`, (w / 2) - (spacer * 2), (h - (hsec * i)) - spacer); + } + }); +} +//keep connection alive +function onPing(arg) { + return __awaiter(this, void 0, void 0, function* () { + //console.log('ping') + return true; + }); +} +function send(obj) { + if (ws) { + ws.send(JSON.stringify(obj)); + } +} +let actions = { + mcopy: (arg) => __awaiter(this, void 0, void 0, function* () { console.log('Connected'); return true; }), + image: onImage, + field: onField, + meter: onMeter, + focus: onFocus, + ping: onPing +}; +ws.onmessage = (event) => __awaiter(this, void 0, void 0, function* () { + const req = JSON.parse(event.data); + let res; + if (typeof actions[req.action] !== 'undefined') { + try { + yield actions[req.action](req); + } + catch (err) { + console.error(err); + } + res = { + action: req.action, + id: req.id + }; + send(res); + } +}); +ws.onclose = (event) => __awaiter(this, void 0, void 0, function* () { + console.log('Connection closed'); +}); (function main() { preventSleep(); })(); diff --git a/app/lib/client/index.js.map b/app/lib/client/index.js.map index a469822..e52b8e1 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AG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAA;SAChC;QAAC,OAAO,GAAG,EAAE;YACX,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;SACpB;QACD,GAAG,GAAG;YACH,MAAM,EAAG,GAAG,CAAC,MAAM;YACnB,EAAE,EAAG,GAAG,CAAC,EAAE;SACb,CAAA;QACD,IAAI,CAAC,GAAG,CAAC,CAAA;KACX;AACJ,CAAC,CAAA,CAAA;AAED,EAAE,CAAC,OAAO,GAAG,CAAO,KAAW,EAAE,EAAE;IACjC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;AAClC,CAAC,CAAA,CAAC;AAEF,CAAC,SAAS,IAAI;IACX,YAAY,EAAE,CAAC;AAClB,CAAC,CAAC,EAAE,CAAA"} \ No newline at end of file diff --git a/app/lib/delay/index.d.ts b/app/lib/delay/index.d.ts index e69de29..62d586e 100644 --- a/app/lib/delay/index.d.ts +++ b/app/lib/delay/index.d.ts @@ -0,0 +1,8 @@ +/** + * Delay in an async/await function + * + * @param {integer} ms Milliseconds to delay for + * + * @returns {Promise} Promise to resolve after timeout + **/ +declare function delay(ms: number): Promise; diff --git a/app/lib/server/index.js b/app/lib/server/index.js index eeeea01..5f6b1e8 100644 --- a/app/lib/server/index.js +++ b/app/lib/server/index.js @@ -7,6 +7,7 @@ const ws_1 = require("ws"); const express_1 = __importDefault(require("express")); const promises_1 = require("fs/promises"); const mime_1 = __importDefault(require("mime")); +const uuid_1 = require("uuid"); const Log = require("log"); class Server { constructor() { @@ -25,6 +26,8 @@ class Server { this.port = 9900; this.wsPort = 9901; this.proxy = {}; + this.queue = {}; + this.intervalPeriod = 10000; //10 sec this.init(); } async init() { @@ -57,18 +60,28 @@ class Server { this.log.error(err); return; } - this.wss.on('connection', (ws) => { - this.log.info(`Client connected to WebSocketServer`); - console.dir(ws); - ws.send('mcopy'); - }); + this.wss.on('connection', async function (ws) { + ws.on("message", function (data) { + let obj = JSON.parse(data); + this.log.info(data); + if (obj.id && this.queue[obj.id]) { + this.queue[obj.id](obj); + delete this.queue[obj.id]; + } + }.bind(this)); + ws.on('close', function () { + this.log.info('Client disconnected'); + }.bind(this)); + await this.cmd(ws, 'mcopy'); + this.log.info('Client connected'); + }.bind(this)); + this.log.info(`Websocket server started!`); this.log.info(`WSS [ ws://localhost:${this.wsPort} ]`); } async startHttp() { return new Promise(function (resolve, reject) { this.httpd = this.http.listen(this.port, function () { - this.isActive = true; - this.log.info(`Server started!`); + this.log.info(`HTTP server started!`); this.log.info(`URL [ http://localhost:${this.port} ]`); return resolve(true); }.bind(this)); @@ -77,16 +90,24 @@ class Server { async start() { await this.startHttp(); await this.startWss(); + this.interval = setInterval(async function () { + await this.cmdAll('ping'); + }.bind(this), this.intervalPeriod); + this.isActive = true; } - async stop() { + async stopHttp() { return new Promise(function (resolve, reject) { return this.httpd.close(function () { - this.isActive = false; - this.log.info(`Server stopped :(`); + this.log.info(`HTTP server stopped :(`); return resolve(false); }.bind(this)); }.bind(this)); } + async stop() { + await this.stopHttp(); + clearInterval(this.interval); + this.isActive = false; + } index(req, res, next) { const html = this.template('index', { PORT: `${this.port}` }); this.log.info('GET /'); @@ -122,12 +143,43 @@ class Server { }.bind(this)); } addProxy(key, filePath) { + //wipe every time + this.proxy = {}; this.proxy[key] = { path: filePath, mime: mime_1.default.getType(filePath) }; this.log.info(`Added proxy image [${key}]`); } + async cmdAll(action, options = {}) { + const cmds = []; + if (this.isActive && this.wss.clients.size > 0) { + this.wss.clients.forEach(function (ws) { + cmds.push(this.cmd(ws, action, options)); + }.bind(this)); + return await Promise.all(cmds); + } + return false; + } + /** + * WSS + **/ + async cmd(ws, action, options = {}) { + const id = uuid_1.v4(); + let obj = { + id, action + }; + let str; + obj = Object.assign(obj, options); + str = JSON.stringify(obj); + ws.send(str); + return new Promise(function (resolve, reject) { + this.queue[id] = function (obj) { + return resolve(obj); + }; + //setTimeout() ? + }.bind(this)); + } } module.exports = function () { return new Server(); diff --git a/app/lib/server/index.js.map b/app/lib/server/index.js.map index c17759c..5a2f86e 100644 --- a/app/lib/server/index.js.map +++ b/app/lib/server/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":";;;;;AAAA,2BAA+C;AAC/C,sDAA0E;AAC1E,0CAAsC;AACtC,gDAAuB;AACvB,2BAA2B;AAsB3B,MAAM,MAAM;IAqBX;QApBQ,OAAE,GAAY,QAAQ,CAAA;QACvB,aAAQ,GAAa,KAAK,CAAA;QAEzB,cAAS,GAAsB;YACtC;gBACC,IAAI,EAAE,OAAO;gBACb,IAAI,EAAG,aAAa;aACpB;YACD;gBACC,IAAI,EAAG,QAAQ;gBACf,IAAI,EAAG,qBAAqB;aAC5B;SACD,CAAA;QAIO,SAAI,GAAY,IAAI,CAAA;QACpB,WAAM,GAAY,IAAI,CAAA;QACtB,UAAK,GAAqB,EAAE,CAAA;QAGnC,IAAI,CAAC,IAAI,EAAE,CAAA;IAEZ,CAAC;IAED,KAAK,CAAC,IAAI;QACT,IAAI,CAAC,GAAG,GAAG,MAAM,GAAG,CAAC,EAAE,KAAK,EAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1C,MAAM,IAAI,CAAC,IAAI,EAAE,CAAA;QACjB,MAAM,IAAI,CAAC,KAAK,EAAE,CAAA;IACnB,CAAC;IAED,KAAK,CAAC,IAAI;QACT,IAAI,CAAC,IAAI,GAAG,iBAAO,EAAE,CAAA;QACrB,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,EAAE;YAChC,IAAI,CAAC,IAAI,GAAG,MAAM,mBAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;SAC7C;QAED,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;QACzC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,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,SAAM,EAAE,CAAA;QAC5B,IAAI,GAAG,GAAG;YACT,EAAE,EAAE,MAAM;SACV,CAAA;QACD,IAAI,GAAY,CAAA;QAEhB,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QACjC,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;QACzB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAEZ,OAAO,IAAI,OAAO,CAAC,UAAU,OAAkB,EAAE,MAAgB;YAChE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,UAAU,GAAS;gBACnC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAA;YACpB,CAAC,CAAA;YACD,gBAAgB;QACjB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IACd,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG;IAChB,OAAO,IAAI,MAAM,EAAE,CAAA;AACpB,CAAC,CAAA"} \ No newline at end of file diff --git a/app/package-lock.json b/app/package-lock.json index a4b7642..c2e6a8a 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.7.9", + "version": "1.7.10", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/app/package.json b/app/package.json index 0dbd52c..3693c34 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.7.9", + "version": "1.7.10", "description": "GUI for the mcopy small gauge film optical printer platform", "main": "main.js", "scripts": { diff --git a/app/server.html b/app/server.html index df36fa2..d89e6ca 100644 --- a/app/server.html +++ b/app/server.html @@ -3,6 +3,9 @@ -
Click to prevent sleep
+
Click to full screen and prevent sleep
diff --git a/app/src/lib/client/index.ts b/app/src/lib/client/index.ts index ae7eb54..f3dda9b 100644 --- a/app/src/lib/client/index.ts +++ b/app/src/lib/client/index.ts @@ -14,7 +14,7 @@ interface McopyResponse { id : string; } -const ws = new WebSocket('ws://localhost:{{PORT}}/'); +const ws = new WebSocket(`ws://${location.host.split(':')[0]}:{{PORT}}/`); let imgTmp : HTMLImageElement function preventSleep () { @@ -22,17 +22,41 @@ function preventSleep () { var noSleep = new NoSleep(); document.addEventListener('click', function enableNoSleep() { document.removeEventListener('click', enableNoSleep, false); - document.getElementById('nosleep').remove(); noSleep.enable(); + document.getElementById('nosleep').remove(); }, false); } +function fullScreen () { + document.addEventListener('click', function enableFullScreen() { + const elem = document.querySelector('body'); + document.removeEventListener('click', enableFullScreen, false); + if (elem.requestFullscreen) { + elem.requestFullscreen(); + //@ts-ignore + } else if (typeof elem.webkitRequestFullscreen !== 'undefined') { /* Safari */ + //@ts-ignore + elem.webkitRequestFullscreen(); + //@ts-ignore + } else if (typeof elem.msRequestFullscreen !== 'undefined') { /* IE11 */ + //@ts-ignore + elem.msRequestFullscreen(); + } + }, false); +} + +function displayMode () { + fullScreen(); + preventSleep(); +} + async function setImage (src : string) { return new Promise(async (resolve : Function, reject : Function) => { imgTmp = new Image() let img = document.getElementById('img') let body = document.querySelector('body') body.className = '' + body.classList.add('image') imgTmp.onload = function () { img.style.backgroundImage = `url('${src}')`; return resolve(src) @@ -243,5 +267,5 @@ ws.onclose = async (event : any) => { }; (function main () { - preventSleep(); + displayMode(); })() \ No newline at end of file diff --git a/data/cfg.json b/data/cfg.json index 3a8d3e1..a006433 100644 --- a/data/cfg.json +++ b/data/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.7.15", + "version": "1.7.16", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/package-lock.json b/package-lock.json index f8801b2..7f90702 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mcopy", - "version": "1.7.15", + "version": "1.7.16", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mcopy", - "version": "1.7.15", + "version": "1.7.16", "license": "MIT", "dependencies": { "arduino": "file:app/lib/arduino", diff --git a/package.json b/package.json index 6903033..7b62360 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mcopy", - "version": "1.7.15", + "version": "1.7.16", "description": "Small gauge film optical printer platform", "main": "build.js", "directories": { diff --git a/processing/mcopy/cfg.json b/processing/mcopy/cfg.json index 3a8d3e1..a006433 100644 --- a/processing/mcopy/cfg.json +++ b/processing/mcopy/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.7.15", + "version": "1.7.16", "ext_port": 1111, "profiles": { "mcopy": { -- 2.40.1 From 6e2795d3802582c53bb815f04b8485b75b9e0a92 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Sat, 25 Feb 2023 16:33:55 -0500 Subject: [PATCH 11/12] Remove ACK messages for ping, rely on --- app/data/cfg.json | 2 +- app/lib/delay/index.d.ts | 8 -------- app/lib/server/index.js | 4 +++- app/lib/server/index.js.map | 2 +- app/package-lock.json | 2 +- app/package.json | 2 +- data/cfg.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- processing/mcopy/cfg.json | 2 +- src/server/index.ts | 4 +++- 11 files changed, 15 insertions(+), 19 deletions(-) diff --git a/app/data/cfg.json b/app/data/cfg.json index a006433..5eef1a2 100644 --- a/app/data/cfg.json +++ b/app/data/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.7.16", + "version": "1.7.17", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/app/lib/delay/index.d.ts b/app/lib/delay/index.d.ts index 62d586e..e69de29 100644 --- a/app/lib/delay/index.d.ts +++ b/app/lib/delay/index.d.ts @@ -1,8 +0,0 @@ -/** - * Delay in an async/await function - * - * @param {integer} ms Milliseconds to delay for - * - * @returns {Promise} Promise to resolve after timeout - **/ -declare function delay(ms: number): Promise; diff --git a/app/lib/server/index.js b/app/lib/server/index.js index d736a19..f1d717b 100644 --- a/app/lib/server/index.js +++ b/app/lib/server/index.js @@ -66,7 +66,9 @@ class Server { if (obj.id && this.queue[obj.id]) { this.queue[obj.id](obj); delete this.queue[obj.id]; - this.log.info(`${obj.action} complete`); + if (obj.action !== 'ping') { + this.log.info(`${obj.action} ACK`); + } } }.bind(this)); ws.on('close', function () { diff --git a/app/lib/server/index.js.map b/app/lib/server/index.js.map index 02cae61..2597a3b 100644 --- a/app/lib/server/index.js.map +++ b/app/lib/server/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":";;;;;AAAA,2BAA+C;AAC/C,sDAA0E;AAC1E,0CAAsC;AACtC,+BAA+B;AAC/B,+BAAmC;AACnC,2BAA2B;AA2B3B,MAAM,MAAM;IAwBX;QAvBQ,OAAE,GAAY,QAAQ,CAAA;QACvB,aAAQ,GAAa,KAAK,CAAA;QAEzB,cAAS,GAAsB;YACtC;gBACC,IAAI,EAAE,OAAO;gBACb,IAAI,EAAG,aAAa;aACpB;YACD;gBACC,IAAI,EAAG,QAAQ;gBACf,IAAI,EAAG,qBAAqB;aAC5B;SACD,CAAA;QAIO,SAAI,GAAY,IAAI,CAAA;QACpB,WAAM,GAAY,IAAI,CAAA;QACtB,UAAK,GAAqB,EAAE,CAAA;QAC5B,UAAK,GAAiB,EAAE,CAAA;QAExB,mBAAc,GAAY,KAAK,CAAA,CAAC,QAAQ;QAG/C,IAAI,CAAC,IAAI,EAAE,CAAA;IACZ,CAAC;IAED,KAAK,CAAC,IAAI;QACT,IAAI,CAAC,GAAG,GAAG,MAAM,GAAG,CAAC,EAAE,KAAK,EAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1C,MAAM,IAAI,CAAC,IAAI,EAAE,CAAA;QACjB,MAAM,IAAI,CAAC,KAAK,EAAE,CAAA;IACnB,CAAC;IAED,KAAK,CAAC,IAAI;QACT,IAAI,CAAC,IAAI,GAAG,iBAAO,EAAE,CAAA;QACrB,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,EAAE;YAChC,IAAI,CAAC,IAAI,GAAG,MAAM,mBAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM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AS,CAAC,GAAG,CAAC,CAAA;QACzB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAEZ,OAAO,IAAI,OAAO,CAAC,UAAU,OAAkB,EAAE,MAAgB;YAChE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,UAAU,GAAS;gBACnC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAA;YACpB,CAAC,CAAA;YACD,gBAAgB;QACjB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IACd,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG;IAChB,OAAO,IAAI,MAAM,EAAE,CAAA;AACpB,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":";;;;;AAAA,2BAA+C;AAC/C,sDAA0E;AAC1E,0CAAsC;AACtC,+BAA+B;AAC/B,+BAAmC;AACnC,2BAA2B;AA2B3B,MAAM,MAAM;IAwBX;QAvBQ,OAAE,GAAY,QAAQ,CAAA;QACvB,aAAQ,GAAa,KAAK,CAAA;QAEzB,cAAS,GAAsB;YACtC;gBACC,IAAI,EAAE,OAAO;gBACb,IAAI,EAAG,aAAa;aACpB;YACD;gBACC,IAAI,EAAG,QAAQ;gBACf,IAAI,EAAG,qBAAqB;aAC5B;SACD,CAAA;QAIO,SAAI,GAAY,IAAI,CAAA;QACpB,WAAM,GAAY,IAAI,CAAA;QACtB,UAAK,GAAqB,EAAE,CAAA;QAC5B,UAAK,GAAiB,EAAE,CAAA;QAExB,mBAAc,GAAY,KAAK,CAAA,CAAC,QAAQ;QAG/C,IAAI,CAAC,IAAI,EAAE,CAAA;IACZ,CAAC;IAED,KAAK,CAAC,IAAI;QACT,IAAI,CAAC,GAAG,GAAG,MAAM,GAAG,CAAC,EAAE,KAAK,EAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1C,MAAM,IAAI,CAAC,IAAI,EAAE,CAAA;QACjB,MAA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;;QAEI;IAEG,KAAK,CAAC,GAAG,CAAE,EAAc,EAAE,MAAe,EAAE,UAAgB,EAAE;QACpE,MAAM,EAAE,GAAY,SAAM,EAAE,CAAA;QAC5B,IAAI,GAAG,GAAG;YACT,EAAE,EAAE,MAAM;SACV,CAAA;QACD,IAAI,GAAY,CAAA;QAEhB,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QACjC,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;QACzB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAEZ,OAAO,IAAI,OAAO,CAAC,UAAU,OAAkB,EAAE,MAAgB;YAChE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,UAAU,GAAS;gBACnC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAA;YACpB,CAAC,CAAA;YACD,gBAAgB;QACjB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IACd,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG;IAChB,OAAO,IAAI,MAAM,EAAE,CAAA;AACpB,CAAC,CAAA"} \ No newline at end of file diff --git a/app/package-lock.json b/app/package-lock.json index 8b1b564..c16f073 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.7.16", + "version": "1.7.17", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/app/package.json b/app/package.json index 23af46e..44e4f58 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.7.16", + "version": "1.7.17", "description": "GUI for the mcopy small gauge film optical printer platform", "main": "main.js", "scripts": { diff --git a/data/cfg.json b/data/cfg.json index a006433..5eef1a2 100644 --- a/data/cfg.json +++ b/data/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.7.16", + "version": "1.7.17", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/package-lock.json b/package-lock.json index 7f90702..9291650 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mcopy", - "version": "1.7.16", + "version": "1.7.17", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mcopy", - "version": "1.7.16", + "version": "1.7.17", "license": "MIT", "dependencies": { "arduino": "file:app/lib/arduino", diff --git a/package.json b/package.json index 7b62360..306cbc2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mcopy", - "version": "1.7.16", + "version": "1.7.17", "description": "Small gauge film optical printer platform", "main": "build.js", "directories": { diff --git a/processing/mcopy/cfg.json b/processing/mcopy/cfg.json index a006433..5eef1a2 100644 --- a/processing/mcopy/cfg.json +++ b/processing/mcopy/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.7.16", + "version": "1.7.17", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/src/server/index.ts b/src/server/index.ts index 18e917b..7ed0a01 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -98,7 +98,9 @@ class Server { if (obj.id && this.queue[obj.id]) { this.queue[obj.id](obj) delete this.queue[obj.id] - this.log.info(`${obj.action} complete`) + if (obj.action !== 'ping') { + this.log.info(`${obj.action} ACK`) + } } }.bind(this)) -- 2.40.1 From 02639466eef85a8b5b8f6cb1bfe676b7d71d2d11 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Sat, 25 Feb 2023 17:00:11 -0500 Subject: [PATCH 12/12] By doing a check for active clients during the sequencer start and stop actions, the local display is no longer used. Resolves first part of #20. --- app/data/cfg.json | 2 +- app/lib/delay/index.d.ts | 8 ++++++++ app/lib/sequencer/index.js | 4 ++-- app/lib/sequencer/index.js.map | 2 +- app/lib/server/index.js | 7 +++++-- app/lib/server/index.js.map | 2 +- app/package-lock.json | 2 +- app/package.json | 2 +- data/cfg.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- processing/mcopy/cfg.json | 2 +- src/sequencer/index.ts | 4 ++-- src/server/index.ts | 8 ++++++-- 14 files changed, 33 insertions(+), 18 deletions(-) diff --git a/app/data/cfg.json b/app/data/cfg.json index 5eef1a2..4c40dac 100644 --- a/app/data/cfg.json +++ b/app/data/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.7.17", + "version": "1.7.18", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/app/lib/delay/index.d.ts b/app/lib/delay/index.d.ts index e69de29..62d586e 100644 --- a/app/lib/delay/index.d.ts +++ b/app/lib/delay/index.d.ts @@ -0,0 +1,8 @@ +/** + * Delay in an async/await function + * + * @param {integer} ms Milliseconds to delay for + * + * @returns {Promise} Promise to resolve after timeout + **/ +declare function delay(ms: number): Promise; diff --git a/app/lib/sequencer/index.js b/app/lib/sequencer/index.js index 443f866..dbe8c0a 100644 --- a/app/lib/sequencer/index.js +++ b/app/lib/sequencer/index.js @@ -146,7 +146,7 @@ class Sequencer { //start sequence this.log.info(`Starting sequence...`); this.ui.send(this.id, { start: true }); - if (this.cmd.proj.filmout.state.enabled === true) { + if (this.cmd.proj.filmout.state.enabled === true && !this.cmd.proj.filmout.server.useServer()) { await this.cmd.proj.filmout.display.open(); } for (let x = 0; x < this.loops; x++) { @@ -179,7 +179,7 @@ class Sequencer { this.log.info(`Ended loop ${x + 1}`); this.ui.send(this.id, { loop: x, stop: true }); } - if (this.cmd.proj.filmout.state.enabled === true) { + if (this.cmd.proj.filmout.state.enabled === true && !this.cmd.proj.filmout.server.useServer()) { await this.cmd.proj.filmout.display.close(); } electron_1.powerSaveBlocker.stop(psbId); diff --git a/app/lib/sequencer/index.js.map b/app/lib/sequencer/index.js.map index d6935bb..c5f42af 100644 --- a/app/lib/sequencer/index.js.map +++ b/app/lib/sequencer/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sequencer/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,2BAA4B;AAC5B,uCAA2C;AAG3C,6BAA6B;AAE7B,IAAI,GAAe,CAAC;AAEpB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,IAAI;YACH,MAAM,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;SACrB;QAAC,OAAO,GAAG,EAAE;YACb,MAAM,GAAG,CAAC;SACV;IACF,CAAC;IAED;;;;QAII;IACI,KAAK,CAAC,OAAO,CAAE,CAAU;QAChC,MAAM,WAAW,GAAY,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC7C,MAAM,GAAG,GAAY,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC5C,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,WAAW,QAAQ,GAAG,EAAE,CAAC,CAAC;QACjD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,GAAS,EAAE,GAAS,EAAE,EAAQ;IACxD,OAAO,IAAI,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC,CAAA"} \ No newline at end of file diff --git a/app/lib/server/index.js b/app/lib/server/index.js index f1d717b..dc7a9f0 100644 --- a/app/lib/server/index.js +++ b/app/lib/server/index.js @@ -149,7 +149,7 @@ class Server { } async cmdAll(action, options = {}) { const cmds = []; - if (this.isActive && this.wss.clients.size > 0) { + if (this.useServer()) { this.wss.clients.forEach(function (ws) { cmds.push(this.cmd(ws, action, options)); }.bind(this)); @@ -160,7 +160,7 @@ class Server { } async displayImage(src) { let key; - if (this.isActive && this.wss.clients.size > 0) { + if (this.useServer()) { key = path_1.basename(src); this.addProxy(key, src); await this.cmdAll('image', { image: `/image/${key}` }); @@ -168,6 +168,9 @@ class Server { } return false; } + useServer() { + return this.isActive && this.wss.clients.size > 0; + } /** * WSS **/ diff --git a/app/lib/server/index.js.map b/app/lib/server/index.js.map index 2597a3b..38fd1bf 100644 --- a/app/lib/server/index.js.map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I,OAAO,CAAC,UAAU,OAAkB,EAAE,MAAgB;YAChE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,UAAU,GAAS;gBACnC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAA;YACpB,CAAC,CAAA;YACD,gBAAgB;QACjB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IACd,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG;IAChB,OAAO,IAAI,MAAM,EAAE,CAAA;AACpB,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":";;;;;AAAA,2BAA+C;AAC/C,sDAA0E;AAC1E,0CAAsC;AACtC,+BAA+B;AAC/B,+BAAmC;AACnC,2BAA2B;AA2B3B,MAAM,MAAM;IAwBX;QAvBQ,OAAE,GAAY,QAAQ,CAAA;QACvB,aAAQ,GAAa,KAAK,CAAA;QAEzB,cAAS,GAAsB;YACtC;gBACC,IAAI,EAAE,OAAO;gBACb,IAAI,EAAG,aAAa;aACpB;YACD;gBACC,IAAI,EAAG,QAAQ;gBACf,IAAI,EAAG,qBAAqB;aAC5B;SACD,CAAA;QAIO,SAAI,GAAY,IAAI,CAAA;QACpB,WAAM,GAAY,IAAI,CAAA;QACtB,UAAK,GAAqB,EAAE,CAAA;QAC5B,UAAK,GAAiB,EAAE,CAAA;QAExB,mBAAc,GAAY,KAAK,CAAA,CAAC,QAAQ;QAG/C,IAAI,CAAC,IAAI,EAAE,CAAA;IACZ,CAAC;IAED,KAAK,CAAC,IAAI;QACT,IAAI,CAAC,GAAG,GAAG,MAAM,GAAG,CAAC,EAAE,KAAK,EAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1C,MAAM,IAAI,CAAC,IAAI,EAAE,CAAA;QACjB,MAAM,IAAI,CAAC,KAAK,EAAE,CAAA;IACnB,CAAC;IAED,KAAK,CAAC,IAAI;QACT,IAAI,CAAC,IAAI,GA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M,EAAE,GAAY,SAAM,EAAE,CAAA;QAC5B,IAAI,GAAG,GAAG;YACT,EAAE,EAAE,MAAM;SACV,CAAA;QACD,IAAI,GAAY,CAAA;QAEhB,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QACjC,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;QACzB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAEZ,OAAO,IAAI,OAAO,CAAC,UAAU,OAAkB,EAAE,MAAgB;YAChE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,UAAU,GAAS;gBACnC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAA;YACpB,CAAC,CAAA;YACD,gBAAgB;QACjB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IACd,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG;IAChB,OAAO,IAAI,MAAM,EAAE,CAAA;AACpB,CAAC,CAAA"} \ No newline at end of file diff --git a/app/package-lock.json b/app/package-lock.json index c16f073..16b8979 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.7.17", + "version": "1.7.18", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/app/package.json b/app/package.json index 44e4f58..c93f6b5 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "mcopy-app", - "version": "1.7.17", + "version": "1.7.18", "description": "GUI for the mcopy small gauge film optical printer platform", "main": "main.js", "scripts": { diff --git a/data/cfg.json b/data/cfg.json index 5eef1a2..4c40dac 100644 --- a/data/cfg.json +++ b/data/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.7.17", + "version": "1.7.18", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/package-lock.json b/package-lock.json index 9291650..c3e3644 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mcopy", - "version": "1.7.17", + "version": "1.7.18", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mcopy", - "version": "1.7.17", + "version": "1.7.18", "license": "MIT", "dependencies": { "arduino": "file:app/lib/arduino", diff --git a/package.json b/package.json index 306cbc2..ff58382 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mcopy", - "version": "1.7.17", + "version": "1.7.18", "description": "Small gauge film optical printer platform", "main": "build.js", "directories": { diff --git a/processing/mcopy/cfg.json b/processing/mcopy/cfg.json index 5eef1a2..4c40dac 100644 --- a/processing/mcopy/cfg.json +++ b/processing/mcopy/cfg.json @@ -1,5 +1,5 @@ { - "version": "1.7.17", + "version": "1.7.18", "ext_port": 1111, "profiles": { "mcopy": { diff --git a/src/sequencer/index.ts b/src/sequencer/index.ts index c5fcf05..c42989c 100644 --- a/src/sequencer/index.ts +++ b/src/sequencer/index.ts @@ -168,7 +168,7 @@ class Sequencer { this.log.info(`Starting sequence...`); this.ui.send(this.id, { start : true }); - if (this.cmd.proj.filmout.state.enabled === true) { + if (this.cmd.proj.filmout.state.enabled === true && !this.cmd.proj.filmout.server.useServer()) { await this.cmd.proj.filmout.display.open(); } @@ -209,7 +209,7 @@ class Sequencer { this.ui.send(this.id, { loop : x, stop : true }); } - if (this.cmd.proj.filmout.state.enabled === true) { + if (this.cmd.proj.filmout.state.enabled === true && !this.cmd.proj.filmout.server.useServer()) { await this.cmd.proj.filmout.display.close(); } diff --git a/src/server/index.ts b/src/server/index.ts index 7ed0a01..e4f379e 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -190,7 +190,7 @@ class Server { public async cmdAll (action : string, options : any = {}) { const cmds : any[] = [] - if (this.isActive && this.wss.clients.size > 0) { + if (this.useServer()) { this.wss.clients.forEach(function (ws : WebSocket) { cmds.push(this.cmd(ws, action, options)) }.bind(this)) @@ -202,7 +202,7 @@ class Server { public async displayImage (src : string) { let key - if (this.isActive && this.wss.clients.size > 0) { + if (this.useServer()) { key = basename(src) this.addProxy(key, src) await this.cmdAll('image', { image : `/image/${key}` }) @@ -211,6 +211,10 @@ class Server { return false } + public useServer () : boolean { + return this.isActive && this.wss.clients.size > 0 + } + /** * WSS **/ -- 2.40.1