diff --git a/README.md b/README.md index e52a251..a4e436f 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ This project is sponsored by Arduino, based on original work by Murilo Polese. T Arduino Lab for MicroPython is an [Electron](https://www.electronjs.org/) app that has its main purpose to communicate over serial with a microprocessor running [MicroPython](https://micropython.org/). All Electron code is at `/index.js`. -All operations over serial are abstracted and packaged on `/micropython.js` which is an attempt of porting `pyboard.py`. The port has its [own repository](https://github.com/murilopolese/micropython.js) but for the sake of simplicity and transparency, `micropython.js` is committed as source code. +All operations over serial are abstracted and packaged on `/micropython.js` which is an attempt of porting `pyboard.py`. The port has its [own repository](https://github.com/arduino/micropython.js) but for the sake of simplicity and transparency, `micropython.js` is committed as source code. The User Interface (UI) source code stays inside `/ui` folder and is completely independent of the Electron code. @@ -39,7 +39,6 @@ At the root of the repository you will find: - `/scripts`: Scripts executed during the build process. - `/ui`: Available user interfaces. - `/index.js`: Main Electron code. -- `/micropython.js`: Serial connection abstraction. - `/preload.js`: Creates Disk and Serial APIs on Electron's main process and exposes it to Electron's renderer process (context bridge). ## Arduino UI @@ -82,4 +81,3 @@ Some changes on the Electron code will require reopening the app but all UI chan ## Disclaimer This software is provided “as is” and we make no express or implied warranties whatsoever with respect to its functionality, operability, or use, including, without limitation, any implied warranties of merchantability, fitness for a particular purpose, or infringement. We expressly disclaim any liability whatsoever for any direct, indirect, consequential, incidental or special damages, including, without limitation, lost revenues, lost profits, losses resulting from business interruption or loss of data, regardless of the form of action or legal theory under which the liability may be asserted, even if advised of the possibility or likelihood of such damages. - diff --git a/index.js b/index.js index 63e103f..23868c7 100644 --- a/index.js +++ b/index.js @@ -22,6 +22,25 @@ function listFolder(folder) { return files } +function ilistFolder(folder, filesOnly) { + let files = fs.readdirSync(path.resolve(folder)) + files = files.map(f => { + let filePath = path.resolve(folder, f) + return { + path: f, + type: fs.lstatSync(filePath).isDirectory() ? 'folder' : 'file' + } + }) + // Filter out directories + if (filesOnly) { + files = files.filter(f => f.type === 'file') + } + // Filter out dot files + files = files.filter(f => f.path.indexOf('.') !== 0) + return files +} + + // LOCAL FILE SYSTEM ACCESS ipcMain.handle('open-folder', async (event) => { console.log('ipcMain', 'open-folder') @@ -39,6 +58,12 @@ ipcMain.handle('list-files', async (event, folder) => { return listFolder(folder) }) +ipcMain.handle('ilist-files', async (event, folder) => { + console.log('ipcMain', 'ilist-files', folder) + if (!folder) return [] + return ilistFolder(folder) +}) + ipcMain.handle('load-file', (event, folder, filename) => { console.log('ipcMain', 'load-file', folder, filename ) let filePath = path.resolve(folder, filename) diff --git a/package-lock.json b/package-lock.json index 5cb6cdb..7a8356c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,17 @@ { "name": "arduino-lab-micropython-ide", - "version": "0.6.0", + "version": "0.8.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "arduino-lab-micropython-ide", - "version": "0.6.0", + "version": "0.8.0", "hasInstallScript": true, "license": "MIT", "dependencies": { "about-window": "^1.15.2", - "micropython.js": "github:murilopolese/micropython.js#v1.2.2", - "mkdirp": "^1.0.3", - "serialport": "^10.4.0" + "micropython.js": "github:arduino/micropython.js#v1.4.0" }, "devDependencies": { "electron": "^19.0.10", @@ -65,15 +63,6 @@ "global-tunnel-ng": "^2.7.1" } }, - "node_modules/@electron/get/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@electron/universal": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@electron/universal/-/universal-1.2.1.tgz", @@ -128,12 +117,102 @@ "node": ">= 10.0.0" } }, - "node_modules/@gar/promisify": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", - "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@malept/cross-spawn-promise": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz", @@ -208,30 +287,40 @@ } }, "node_modules/@npmcli/fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.1.tgz", - "integrity": "sha512-1Q0uzx6c/NVNGszePbr5Gc2riSU1zLpNlo/1YWntH+eaPmMgBssAW0qXofCVkpdj3ce4swZtlDYQu+NKiYcptg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", "dev": true, "dependencies": { - "@gar/promisify": "^1.1.3", "semver": "^7.3.5" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@npmcli/move-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.0.tgz", - "integrity": "sha512-UR6D5f4KEGWJV6BGPH3Qb2EtgH+t+1XQ1Tt85c7qicN6cezzuHPdZwwAxqZr4JLtnQu0LZsTza/5gmNmSl8XLg==", - "deprecated": "This functionality has been moved to @npmcli/fs", + "node_modules/@npmcli/fs/node_modules/semver": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", "dev": true, "dependencies": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=10" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" } }, "node_modules/@serialport/binding-mock": { @@ -247,15 +336,15 @@ } }, "node_modules/@serialport/bindings-cpp": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.7.0.tgz", - "integrity": "sha512-Xx1wA2UCG2loS32hxNvWJI4smCzGKhWqE85//fLRzHoGgE1lSLe3Nk7W40/ebrlGFHWRbQZmeaIF4chb2XLliA==", + "version": "10.8.0", + "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.8.0.tgz", + "integrity": "sha512-OMQNJz5kJblbmZN5UgJXLwi2XNtVLxSKmq5VyWuXQVsUIJD4l9UGHnLPqM5LD9u3HPZgDI5w7iYN7gxkQNZJUw==", "hasInstallScript": true, "dependencies": { - "@serialport/bindings-interface": "1.2.1", + "@serialport/bindings-interface": "1.2.2", "@serialport/parser-readline": "^10.2.1", "debug": "^4.3.2", - "node-addon-api": "^4.3.0", + "node-addon-api": "^5.0.0", "node-gyp-build": "^4.3.0" }, "engines": { @@ -265,18 +354,10 @@ "url": "https://opencollective.com/serialport/donate" } }, - "node_modules/@serialport/bindings-cpp/node_modules/@serialport/bindings-interface": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.1.tgz", - "integrity": "sha512-63Dyqz2gtryRDDckFusOYqLYhR3Hq/M4sEdbF9i/VsvDb6T+tNVgoAKUZ+FMrXXKnCSu+hYbk+MTc0XQANszxw==", - "engines": { - "node": "^12.22 || ^14.13 || >=16" - } - }, "node_modules/@serialport/bindings-cpp/node_modules/node-addon-api": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", - "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==" + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" }, "node_modules/@serialport/bindings-interface": { "version": "1.2.2", @@ -287,9 +368,9 @@ } }, "node_modules/@serialport/parser-byte-length": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@serialport/parser-byte-length/-/parser-byte-length-10.3.0.tgz", - "integrity": "sha512-pJ/VoFemzKRRNDHLhFfPThwP40QrGaEnm9TtwL7o2GihEPwzBg3T0bN13ew5TpbbUYZdMpUtpm3CGfl6av9rUQ==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@serialport/parser-byte-length/-/parser-byte-length-10.5.0.tgz", + "integrity": "sha512-eHhr4lHKboq1OagyaXAqkemQ1XyoqbLQC8XJbvccm95o476TmEdW5d7AElwZV28kWprPW68ZXdGF2VXCkJgS2w==", "engines": { "node": ">=12.0.0" }, @@ -298,9 +379,9 @@ } }, "node_modules/@serialport/parser-cctalk": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@serialport/parser-cctalk/-/parser-cctalk-10.3.0.tgz", - "integrity": "sha512-8ujmk8EvVbDPrNF4mM33bWvUYJOZ0wXbY3WCRazHRWvyCdL0VO0DQvW81ZqgoTpiDQZm5r8wQu9rmuemahF6vQ==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@serialport/parser-cctalk/-/parser-cctalk-10.5.0.tgz", + "integrity": "sha512-Iwsdr03xmCKAiibLSr7b3w6ZUTBNiS+PwbDQXdKU/clutXjuoex83XvsOtYVcNZmwJlVNhAUbkG+FJzWwIa4DA==", "engines": { "node": ">=12.0.0" }, @@ -309,9 +390,9 @@ } }, "node_modules/@serialport/parser-delimiter": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.3.0.tgz", - "integrity": "sha512-9E4Vj6s0UbbcCCTclwegHGPYjJhdm9qLCS0lowXQDEQC5naZnbsELemMHs93nD9jHPcyx1B4oXkMnVZLxX5TYw==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.5.0.tgz", + "integrity": "sha512-/uR/yT3jmrcwnl2FJU/2ySvwgo5+XpksDUR4NF/nwTS5i3CcuKS+FKi/tLzy1k8F+rCx5JzpiK+koqPqOUWArA==", "engines": { "node": ">=12.0.0" }, @@ -320,9 +401,9 @@ } }, "node_modules/@serialport/parser-inter-byte-timeout": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@serialport/parser-inter-byte-timeout/-/parser-inter-byte-timeout-10.3.0.tgz", - "integrity": "sha512-wKP0QK85NHgvT6BBB1qBfKBBU4pf8kespNXAZBUYmFT+P4n8r8IZE2mqigCD+AiZcfWNQoAizwOsT/Jx/qeVig==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@serialport/parser-inter-byte-timeout/-/parser-inter-byte-timeout-10.5.0.tgz", + "integrity": "sha512-WPvVlSx98HmmUF9jjK6y9mMp3Wnv6JQA0cUxLeZBgS74TibOuYG3fuUxUWGJALgAXotOYMxfXSezJ/vSnQrkhQ==", "engines": { "node": ">=12.0.0" }, @@ -331,19 +412,19 @@ } }, "node_modules/@serialport/parser-packet-length": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@serialport/parser-packet-length/-/parser-packet-length-10.3.0.tgz", - "integrity": "sha512-bj0cWzt8YSQj/E5fRQVYdi4TsfTlZQrXlXrUwjyTsCONv8IPOHzsz+yY0fw5SEMiJtaLyqvPkCHLsttOd/zFsg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@serialport/parser-packet-length/-/parser-packet-length-10.5.0.tgz", + "integrity": "sha512-jkpC/8w4/gUBRa2Teyn7URv1D7T//0lGj27/4u9AojpDVXsR6dtdcTG7b7dNirXDlOrSLvvN7aS5/GNaRlEByw==", "engines": { "node": ">=8.6.0" } }, "node_modules/@serialport/parser-readline": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.3.0.tgz", - "integrity": "sha512-ki3ATZ3/RAqnqGROBKE7k+OeZ0DZXZ53GTca4q71OU5RazbbNhTOBQLKLXD3v9QZXCMJdg4hGW/2Y0DuMUqMQg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.5.0.tgz", + "integrity": "sha512-0aXJknodcl94W9zSjvU+sLdXiyEG2rqjQmvBWZCr8wJZjWEtv3RgrnYiWq4i2OTOyC8C/oPK8ZjpBjQptRsoJQ==", "dependencies": { - "@serialport/parser-delimiter": "10.3.0" + "@serialport/parser-delimiter": "10.5.0" }, "engines": { "node": ">=12.0.0" @@ -353,9 +434,9 @@ } }, "node_modules/@serialport/parser-ready": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@serialport/parser-ready/-/parser-ready-10.3.0.tgz", - "integrity": "sha512-1owywJ4p592dJyVrEJZPIh6pUZ3/y/LN6kGTDH2wxdewRUITo/sGvDy0er5i2+dJD3yuowiAz0dOHSdz8tevJA==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@serialport/parser-ready/-/parser-ready-10.5.0.tgz", + "integrity": "sha512-QIf65LTvUoxqWWHBpgYOL+soldLIIyD1bwuWelukem2yDZVWwEjR288cLQ558BgYxH4U+jLAQahhqoyN1I7BaA==", "engines": { "node": ">=12.0.0" }, @@ -364,9 +445,9 @@ } }, "node_modules/@serialport/parser-regex": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@serialport/parser-regex/-/parser-regex-10.3.0.tgz", - "integrity": "sha512-tIogTs7CvTH+UUFnsvE7i33MSISyTPTGPWlglWYH2/5coipXY503jlaYS1YGe818wWNcSx6YAjMZRdhTWwM39w==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@serialport/parser-regex/-/parser-regex-10.5.0.tgz", + "integrity": "sha512-9jnr9+PCxRoLjtGs7uxwsFqvho+rxuJlW6ZWSB7oqfzshEZWXtTJgJRgac/RuLft4hRlrmRz5XU40i3uoL4HKw==", "engines": { "node": ">=12.0.0" }, @@ -375,9 +456,9 @@ } }, "node_modules/@serialport/parser-slip-encoder": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@serialport/parser-slip-encoder/-/parser-slip-encoder-10.3.0.tgz", - "integrity": "sha512-JI0ILF5sylWn8f0MuMzHFBix/iMUTa79/Z95KaPZYnVaEdA7h7hh/o21Jmon/26P3RJwL1SNJCjZ81zfan+LtQ==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@serialport/parser-slip-encoder/-/parser-slip-encoder-10.5.0.tgz", + "integrity": "sha512-wP8m+uXQdkWSa//3n+VvfjLthlabwd9NiG6kegf0fYweLWio8j4pJRL7t9eTh2Lbc7zdxuO0r8ducFzO0m8CQw==", "engines": { "node": ">=12.0.0" }, @@ -386,9 +467,9 @@ } }, "node_modules/@serialport/parser-spacepacket": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@serialport/parser-spacepacket/-/parser-spacepacket-10.3.0.tgz", - "integrity": "sha512-PDF73ClEPsClD1FEJZHNuBevDKsJCkqy/XD5+S5eA6+tY5D4HLrVgSWsg+3qqB6+dlpwf2CzHe+uO8D3teuKHA==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@serialport/parser-spacepacket/-/parser-spacepacket-10.5.0.tgz", + "integrity": "sha512-BEZ/HAEMwOd8xfuJSeI/823IR/jtnThovh7ils90rXD4DPL1ZmrP4abAIEktwe42RobZjIPfA4PaVfyO0Fjfhg==", "engines": { "node": ">=12.0.0" }, @@ -397,11 +478,11 @@ } }, "node_modules/@serialport/stream": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@serialport/stream/-/stream-10.3.0.tgz", - "integrity": "sha512-7sooi5fHogYNVEJwxVdg872xO6TuMgQd2E9iRmv+o8pk/1dbBnPkmH6Ka3st1mVE+0KnIJqVlgei+ncSsqXIGw==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@serialport/stream/-/stream-10.5.0.tgz", + "integrity": "sha512-gbcUdvq9Kyv2HsnywS7QjnEB28g+6OGB5Z8TLP7X+UPpoMIWoUsoQIq5Kt0ZTgMoWn3JGM2lqwTsSHF+1qhniA==", "dependencies": { - "@serialport/bindings-interface": "1.2.1", + "@serialport/bindings-interface": "1.2.2", "debug": "^4.3.2" }, "engines": { @@ -411,14 +492,6 @@ "url": "https://opencollective.com/serialport/donate" } }, - "node_modules/@serialport/stream/node_modules/@serialport/bindings-interface": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.1.tgz", - "integrity": "sha512-63Dyqz2gtryRDDckFusOYqLYhR3Hq/M4sEdbF9i/VsvDb6T+tNVgoAKUZ+FMrXXKnCSu+hYbk+MTc0XQANszxw==", - "engines": { - "node": "^12.22 || ^14.13 || >=16" - } - }, "node_modules/@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", @@ -450,21 +523,21 @@ } }, "node_modules/@types/cacheable-request": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", - "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", "dev": true, "dependencies": { "@types/http-cache-semantics": "*", - "@types/keyv": "*", + "@types/keyv": "^3.1.4", "@types/node": "*", - "@types/responselike": "*" + "@types/responselike": "^1.0.0" } }, "node_modules/@types/debug": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", - "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.8.tgz", + "integrity": "sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==", "dev": true, "dependencies": { "@types/ms": "*" @@ -496,12 +569,6 @@ "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", "dev": true }, - "node_modules/@types/json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha512-3YP80IxxFJB4b5tYC2SUPwkg0XQLiu0nWvhRgEatgjf+29IcWO9X1k8xRv5DGssJ/lCrjYTjQPcobJr2yWIVuQ==", - "dev": true - }, "node_modules/@types/keyv": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", @@ -525,9 +592,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "16.11.46", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.46.tgz", - "integrity": "sha512-x+sfpb2dMrhCQPL4NAGs64Z9hh0t72aP0dg+PuZidmPr/0Gj5ELQTjD/t46dq3DF/8ZvSHOaIyDIbAsdPshyVQ==", + "version": "16.18.36", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.36.tgz", + "integrity": "sha512-8egDX8dE50XyXWH6C6PRCNkTP106DuUrvdrednFouDSmCi7IOvrqr0frznfZaHifHH/3aq/7a7v9N4wdXMqhBQ==", "dev": true }, "node_modules/@types/plist": { @@ -558,9 +625,9 @@ "optional": true }, "node_modules/@types/yargs": { - "version": "17.0.11", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.11.tgz", - "integrity": "sha512-aB4y9UDUXTSMxmM4MH+YnuR0g5Cph3FLQBoWoMB21DSvFVAxRVEHEMx3TLh+zUZYMCQtKiqazz0Q4Rre31f/OA==", + "version": "17.0.24", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", + "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", "dev": true, "dependencies": { "@types/yargs-parser": "*" @@ -602,13 +669,13 @@ } }, "node_modules/agentkeepalive": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", - "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.3.0.tgz", + "integrity": "sha512-7Epl1Blf4Sy37j4v9f9FjICCh4+KAQOyXgHEwlyBiAQLbhKdq/i2QQU3amQalS/wPhdPzDXPL5DMR5bkn+YeWg==", "dev": true, "dependencies": { "debug": "^4.1.0", - "depd": "^1.1.2", + "depd": "^2.0.0", "humanize-ms": "^1.2.1" }, "engines": { @@ -746,6 +813,21 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/app-builder-lib/node_modules/semver": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/app-builder-lib/node_modules/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -775,9 +857,9 @@ } }, "node_modules/are-we-there-yet/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "dependencies": { "inherits": "^2.0.3", @@ -904,9 +986,9 @@ } }, "node_modules/bl/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "dependencies": { "inherits": "^2.0.3", @@ -1093,32 +1175,26 @@ } }, "node_modules/cacache": { - "version": "16.1.1", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.1.tgz", - "integrity": "sha512-VDKN+LHyCQXaaYZ7rA/qtkURU+/yYhviUdvqEv2LT6QPZU8jpyzEkEVAcKlKLt5dJ5BRp11ym8lo3NKLluEPLg==", + "version": "17.1.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.3.tgz", + "integrity": "sha512-jAdjGxmPxZh0IipMdR7fK/4sDSrHMLUV0+GvVUsjwyGNKHsh79kW/otg+GkbXwl6Uzvy9wsvHOX4nUoWldeZMg==", "dev": true, "dependencies": { - "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^2.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "glob": "^8.0.1", - "infer-owner": "^1.0.4", + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", "lru-cache": "^7.7.1", - "minipass": "^3.1.6", + "minipass": "^5.0.0", "minipass-collect": "^1.0.2", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", + "ssri": "^10.0.0", "tar": "^6.1.11", - "unique-filename": "^1.1.1" + "unique-filename": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/cacache/node_modules/brace-expansion": { @@ -1131,43 +1207,49 @@ } }, "node_modules/cacache/node_modules/glob": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", - "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.0.tgz", + "integrity": "sha512-AQ1/SB9HH0yCx1jXAT4vmCbTOPe5RQ+kCurjbel5xSCGhebumUv+GJZfa1rEqor3XIViqwSEmlkZCQD43RWrBg==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "foreground-child": "^3.1.0", + "jackspeak": "^2.0.3", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2", + "path-scurry": "^1.7.0" + }, + "bin": { + "glob": "dist/cjs/src/bin.js" }, "engines": { - "node": ">=12" + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/cacache/node_modules/lru-cache": { - "version": "7.13.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.13.2.tgz", - "integrity": "sha512-VJL3nIpA79TodY/ctmZEfhASgqekbT574/c4j3jn4bKXbSCnTTCH/KltZyvL2GlV+tGSMtsWyem8DCX7qKTMBA==", + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, "engines": { "node": ">=12" } }, "node_modules/cacache/node_modules/minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz", + "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/cacheable-lookup": { @@ -1253,10 +1335,19 @@ "dev": true }, "node_modules/ci-info": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", - "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==", - "dev": true + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } }, "node_modules/clean-stack": { "version": "2.2.0", @@ -1280,9 +1371,9 @@ } }, "node_modules/cli-spinners": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz", - "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.0.tgz", + "integrity": "sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==", "dev": true, "engines": { "node": ">=6" @@ -1309,14 +1400,17 @@ } }, "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/clone": { @@ -1406,25 +1500,6 @@ "node": ">=0.10.0" } }, - "node_modules/compress-brotli": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/compress-brotli/-/compress-brotli-1.3.8.tgz", - "integrity": "sha512-lVcQsjhxhIXsuupfy9fmZUFtAIdBmXA7EGY6GBdgZ++qkM9zG4YFT8iU7FoBxzryNDMOpD1HIFHUSX4D87oqhQ==", - "dev": true, - "dependencies": { - "@types/json-buffer": "~3.0.0", - "json-buffer": "~3.0.1" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/compress-brotli/node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1522,12 +1597,15 @@ } }, "node_modules/defaults": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha512-s82itHOnYrN0Ib8r+z7laQz3sdE+4FP3d9Q7VLO7U+KRT+CR0GsWuyHxzdAY82I7cXv0G/twrqomTJLOssO5HA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", "dev": true, "dependencies": { "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/defer-to-connect": { @@ -1537,9 +1615,9 @@ "dev": true }, "node_modules/define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", "dev": true, "optional": true, "dependencies": { @@ -1569,12 +1647,12 @@ "dev": true }, "node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "dev": true, "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, "node_modules/detect-libc": { @@ -1731,10 +1809,16 @@ "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==", "dev": true }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/ejs": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.8.tgz", - "integrity": "sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", + "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", "dev": true, "dependencies": { "jake": "^10.8.5" @@ -1827,9 +1911,9 @@ } }, "node_modules/electron-notarize": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/electron-notarize/-/electron-notarize-1.2.1.tgz", - "integrity": "sha512-u/ECWhIrhkSQpZM4cJzVZ5TsmkaqrRo5LDC/KMbGF0sPkm53Ng59+M0zp8QVaql0obfJy9vlVT+4iOkAi2UDlA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/electron-notarize/-/electron-notarize-1.2.2.tgz", + "integrity": "sha512-ZStVWYcWI7g87/PgjPJSIIhwQXOaw4/XeXU+pWqMMktSLHaGMLHdyPPN7Cmao7+Cr7fYufA16npdtMndYciHNw==", "deprecated": "Please use @electron/notarize moving forward. There is no API change, just a package name change", "dev": true, "dependencies": { @@ -2051,9 +2135,9 @@ } }, "node_modules/electron-rebuild/node_modules/cacheable-request": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", - "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", + "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", "dev": true, "dependencies": { "clone-response": "^1.0.2", @@ -2122,9 +2206,9 @@ } }, "node_modules/electron-rebuild/node_modules/got": { - "version": "11.8.5", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.5.tgz", - "integrity": "sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ==", + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", "dev": true, "dependencies": { "@sindresorhus/is": "^4.0.0", @@ -2165,12 +2249,11 @@ } }, "node_modules/electron-rebuild/node_modules/keyv": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.3.3.tgz", - "integrity": "sha512-AcysI17RvakTh8ir03+a3zJr5r0ovnAH/XTXei/4HIv3bL2K/jzvgivLK9UuI/JbU1aJjM3NSAnVvVVd3n+4DQ==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", + "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==", "dev": true, "dependencies": { - "compress-brotli": "^1.3.8", "json-buffer": "3.0.1" } }, @@ -2228,6 +2311,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/electron-rebuild/node_modules/semver": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/electron-rebuild/node_modules/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -2316,6 +2414,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/exponential-backoff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", + "dev": true + }, "node_modules/extract-zip": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz", @@ -2340,18 +2444,6 @@ "ms": "2.0.0" } }, - "node_modules/extract-zip/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/extract-zip/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -2419,6 +2511,34 @@ "node": ">=10" } }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz", + "integrity": "sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -2448,15 +2568,15 @@ } }, "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.2.tgz", + "integrity": "sha512-2GAfyfoaCDRrM6jaOS3UsBts8yJ55VioXdWcOL7dK9zdAuKT71+WBA4ifnNYqVjYv+4SsPxjK0JT4yIIn4cA/g==", "dev": true, "dependencies": { - "minipass": "^3.0.0" + "minipass": "^5.0.0" }, "engines": { - "node": ">= 8" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/fs.realpath": { @@ -2501,14 +2621,15 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "optional": true, "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", + "has-proto": "^1.0.1", "has-symbols": "^1.0.3" }, "funding": { @@ -2565,6 +2686,22 @@ "node": ">=10.0" } }, + "node_modules/global-agent/node_modules/semver": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "dev": true, + "optional": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/global-tunnel-ng": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz", @@ -2620,9 +2757,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "node_modules/graceful-readlink": { @@ -2666,6 +2803,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "optional": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -2769,13 +2919,6 @@ "node": "^8.11.2 || >=10" } }, - "node_modules/iconv-corefoundation/node_modules/node-addon-api": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz", - "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==", - "dev": true, - "optional": true - }, "node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", @@ -2826,12 +2969,6 @@ "node": ">=8" } }, - "node_modules/infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", - "dev": true - }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -2933,16 +3070,34 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, + "node_modules/jackspeak": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz", + "integrity": "sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/jake": { - "version": "10.8.5", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.5.tgz", - "integrity": "sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw==", + "version": "10.8.7", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", + "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", "dev": true, "dependencies": { "async": "^3.2.3", "chalk": "^4.0.2", - "filelist": "^1.0.1", - "minimatch": "^3.0.4" + "filelist": "^1.0.4", + "minimatch": "^3.1.2" }, "bin": { "jake": "bin/cli.js" @@ -3079,10 +3234,16 @@ "node": ">=10.0.0" } }, + "node_modules/lzma-native/node_modules/node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "dev": true + }, "node_modules/lzma-native/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "dependencies": { "inherits": "^2.0.3", @@ -3094,36 +3255,35 @@ } }, "node_modules/make-fetch-happen": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.0.tgz", - "integrity": "sha512-OnEfCLofQVJ5zgKwGk55GaqosqKjaR6khQlJY3dBAA+hM25Bc5CmX5rKUfVut+rYA3uidA7zb7AvcglU87rPRg==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", "dev": true, "dependencies": { "agentkeepalive": "^4.2.1", - "cacache": "^16.1.0", - "http-cache-semantics": "^4.1.0", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.1", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.3", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^0.6.3", "promise-retry": "^2.0.1", "socks-proxy-agent": "^7.0.0", - "ssri": "^9.0.0" + "ssri": "^10.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/make-fetch-happen/node_modules/lru-cache": { - "version": "7.13.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.13.2.tgz", - "integrity": "sha512-VJL3nIpA79TodY/ctmZEfhASgqekbT574/c4j3jn4bKXbSCnTTCH/KltZyvL2GlV+tGSMtsWyem8DCX7qKTMBA==", + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, "engines": { "node": ">=12" @@ -3143,8 +3303,8 @@ } }, "node_modules/micropython.js": { - "version": "1.2.2", - "resolved": "git+ssh://git@github.com/murilopolese/micropython.js.git#1f630d21f6ee18a901dc5a1ebe4ce5b92f05943a", + "version": "1.4.0", + "resolved": "git+ssh://git@github.com/arduino/micropython.js.git#6bada690cd0709d3195a59af6b1a79fbf1b1af45", "dependencies": { "serialport": "^10.4.0" }, @@ -3216,19 +3376,19 @@ } }, "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/minipass": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.4.tgz", - "integrity": "sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, "engines": { "node": ">=8" } @@ -3245,18 +3405,30 @@ "node": ">= 8" } }, + "node_modules/minipass-collect/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minipass-fetch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.0.tgz", - "integrity": "sha512-H9U4UVBGXEyyWJnqYDCLp1PwD8XIkJ4akNHp1aGVI+2Ym7wQMlxDKi4IB4JbmyU+pl9pEs/cVrK6cOuvmbK4Sg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.3.tgz", + "integrity": "sha512-n5ITsTkDqYkYJZjcRWzZt9qnZKCT7nKCosJhHoj7S7zD+BP4jVbWs+odsniw5TA3E0sLomhTKOKjF86wf11PuQ==", "dev": true, "dependencies": { - "minipass": "^3.1.6", + "minipass": "^5.0.0", "minipass-sized": "^1.0.3", "minizlib": "^2.1.2" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "optionalDependencies": { "encoding": "^0.1.13" @@ -3274,6 +3446,18 @@ "node": ">= 8" } }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minipass-pipeline": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", @@ -3286,6 +3470,18 @@ "node": ">=8" } }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minipass-sized": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", @@ -3298,6 +3494,18 @@ "node": ">=8" } }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minizlib": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", @@ -3311,15 +3519,28 @@ "node": ">= 8" } }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "dependencies": { + "minimist": "^1.2.6" + }, "bin": { "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" } }, "node_modules/ms": { @@ -3337,9 +3558,9 @@ } }, "node_modules/node-abi": { - "version": "3.24.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.24.0.tgz", - "integrity": "sha512-YPG3Co0luSu6GwOBsmIdGW6Wx0NyNDLg/hriIyDllVsNwnI6UeqaWShxC3lbH4LtEQUgoLP3XR1ndXiDAWvmRw==", + "version": "3.45.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.45.0.tgz", + "integrity": "sha512-iwXuFrMAcFVi/ZoZiqq8BzAdsLw9kxDfTC0HMyjXfSL/6CSDAGD5UmR7azrAgWV1zKYq7dUUMj4owusBWKLsiQ==", "dev": true, "dependencies": { "semver": "^7.3.5" @@ -3348,11 +3569,27 @@ "node": ">=10" } }, + "node_modules/node-abi/node_modules/semver": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/node-addon-api": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", - "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", - "dev": true + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz", + "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==", + "dev": true, + "optional": true }, "node_modules/node-api-version": { "version": "0.1.4", @@ -3363,17 +3600,33 @@ "semver": "^7.3.5" } }, + "node_modules/node-api-version/node_modules/semver": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/node-gyp": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.1.0.tgz", - "integrity": "sha512-HkmN0ZpQJU7FLbJauJTHkHlSVAXlNGDAzH/VYFZGDOnFyn/Na3GlNJfkudmufOdS6/jNFhy88ObzL7ERz9es1g==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.4.0.tgz", + "integrity": "sha512-dMXsYP6gc9rRbejLXmTbVRYjAHw7ppswsKyMxuxJxxOHzluIO1rGp9TOQgjFJ+2MCqcOcQTOPB/8Xwhr+7s4Eg==", "dev": true, "dependencies": { "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", "glob": "^7.1.4", "graceful-fs": "^4.2.6", - "make-fetch-happen": "^10.0.3", - "nopt": "^5.0.0", + "make-fetch-happen": "^11.0.3", + "nopt": "^6.0.0", "npmlog": "^6.0.0", "rimraf": "^3.0.2", "semver": "^7.3.5", @@ -3384,32 +3637,47 @@ "node-gyp": "bin/node-gyp.js" }, "engines": { - "node": "^12.22 || ^14.13 || >=16" + "node": "^12.13 || ^14.13 || >=16" } }, "node_modules/node-gyp-build": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", - "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", + "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", "node-gyp-build-test": "build-test.js" } }, + "node_modules/node-gyp/node_modules/semver": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", "dev": true, "dependencies": { - "abbrev": "1" + "abbrev": "^1.0.0" }, "bin": { "nopt": "bin/nopt.js" }, "engines": { - "node": ">=6" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/normalize-url": { @@ -3549,6 +3817,31 @@ "node": ">=8" } }, + "node_modules/path-scurry": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.9.2.tgz", + "integrity": "sha512-qSDLy2aGFPm8i4rsbHd4MNyTcrzHFsLQykrtbuGRknZZCBBVXSv2tSCDN2Cg6Rt/GFRw8GoW9y9Ecw5rIPG1sg==", + "dev": true, + "dependencies": { + "lru-cache": "^9.1.1", + "minipass": "^5.0.0 || ^6.0.2" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.1.2.tgz", + "integrity": "sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, "node_modules/pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", @@ -3602,12 +3895,6 @@ "node": ">=0.4.0" } }, - "node_modules/promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", - "dev": true - }, "node_modules/promise-retry": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", @@ -3676,9 +3963,9 @@ } }, "node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "dependencies": { "core-util-is": "~1.0.0", @@ -3797,18 +4084,12 @@ "dev": true }, "node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" } }, "node_modules/semver-compare": { @@ -3835,23 +4116,23 @@ } }, "node_modules/serialport": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/serialport/-/serialport-10.4.0.tgz", - "integrity": "sha512-PszPM5SnFMgSXom60PkKS2A9nMlNbHkuoyRBlzdSWw9rmgOn258+V0dYbWMrETJMM+TJV32vqBzjg5MmmUMwMw==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/serialport/-/serialport-10.5.0.tgz", + "integrity": "sha512-7OYLDsu5i6bbv3lU81pGy076xe0JwpK6b49G6RjNvGibstUqQkI+I3/X491yBGtf4gaqUdOgoU1/5KZ/XxL4dw==", "dependencies": { "@serialport/binding-mock": "10.2.2", - "@serialport/bindings-cpp": "10.7.0", - "@serialport/parser-byte-length": "10.3.0", - "@serialport/parser-cctalk": "10.3.0", - "@serialport/parser-delimiter": "10.3.0", - "@serialport/parser-inter-byte-timeout": "10.3.0", - "@serialport/parser-packet-length": "10.3.0", - "@serialport/parser-readline": "10.3.0", - "@serialport/parser-ready": "10.3.0", - "@serialport/parser-regex": "10.3.0", - "@serialport/parser-slip-encoder": "10.3.0", - "@serialport/parser-spacepacket": "10.3.0", - "@serialport/stream": "10.3.0", + "@serialport/bindings-cpp": "10.8.0", + "@serialport/parser-byte-length": "10.5.0", + "@serialport/parser-cctalk": "10.5.0", + "@serialport/parser-delimiter": "10.5.0", + "@serialport/parser-inter-byte-timeout": "10.5.0", + "@serialport/parser-packet-length": "10.5.0", + "@serialport/parser-readline": "10.5.0", + "@serialport/parser-ready": "10.5.0", + "@serialport/parser-regex": "10.5.0", + "@serialport/parser-slip-encoder": "10.5.0", + "@serialport/parser-spacepacket": "10.5.0", + "@serialport/stream": "10.5.0", "debug": "^4.3.3" }, "engines": { @@ -3941,9 +4222,9 @@ } }, "node_modules/socks": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz", - "integrity": "sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", "dev": true, "dependencies": { "ip": "^2.0.0", @@ -3995,15 +4276,15 @@ "optional": true }, "node_modules/ssri": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", - "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.4.tgz", + "integrity": "sha512-12+IR2CB2C28MMAw0Ncqwj5QbTcs0nGIhgJzYWzDkb21vWmfNI83KS4f3Ci6GI98WreIfG7o9UXp3C0qbpA8nQ==", "dev": true, "dependencies": { - "minipass": "^3.1.1" + "minipass": "^5.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/stat-mode": { @@ -4038,6 +4319,21 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -4050,6 +4346,19 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/sumchecker": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz", @@ -4075,20 +4384,56 @@ } }, "node_modules/tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "version": "6.1.15", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.15.tgz", + "integrity": "sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==", "dev": true, "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", + "minipass": "^5.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" }, "engines": { - "node": ">= 10" + "node": ">=10" + } + }, + "node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/temp-file": { @@ -4205,21 +4550,27 @@ "dev": true }, "node_modules/unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", "dev": true, "dependencies": { - "unique-slug": "^2.0.0" + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", "dev": true, "dependencies": { "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/universalify": { @@ -4336,6 +4687,24 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -4367,18 +4736,18 @@ "dev": true }, "node_modules/yargs": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", - "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^21.1.1" }, "engines": { "node": ">=12" diff --git a/package.json b/package.json index 670bcc5..673e584 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "arduino-lab-micropython-ide", "productName": "Arduino Lab for Micropython", - "version": "0.6.0", + "version": "0.8.0", "description": "Arduino Lab for MicroPython is a project sponsored by Arduino, based on original work by Murilo Polese.\nThis is an experimental pre-release software, please direct any questions exclusively to Github issues.", "main": "index.js", "scripts": { @@ -38,9 +38,7 @@ "license": "MIT", "dependencies": { "about-window": "^1.15.2", - "micropython.js": "github:murilopolese/micropython.js#v1.2.2", - "mkdirp": "^1.0.3", - "serialport": "^10.4.0" + "micropython.js": "github:arduino/micropython.js#v1.4.0" }, "engines": { "node": "18" diff --git a/preload.js b/preload.js index b1ef2fd..acd4242 100644 --- a/preload.js +++ b/preload.js @@ -3,10 +3,12 @@ const { contextBridge, ipcRenderer } = require('electron') const Micropython = require('micropython.js') const board = new Micropython() +board.chunk_size = 192 +board.chunk_sleep = 200 const Serial = { loadPorts: async () => { - let ports = await board.listPorts() + let ports = await board.list_ports() return ports.filter(p => p.vendorId && p.productId) }, connect: async (path) => { @@ -16,30 +18,18 @@ const Serial = { return await board.close() }, run: async (code) => { - if (board.in_raw_repl) { - await board.exit_raw_repl() - } - await board.enter_raw_repl() - let result = await board.exec_raw({ command: code }) - await board.exit_raw_repl() - return Promise.resolve(result) + return board.run(code) }, stop: async () => { - if (board.in_raw_repl) { - await board.stop() - return board.exit_raw_repl() - } else { - return board.stop() - } + await board.stop() + await board.exit_raw_repl() + return Promise.resolve() }, reset: async () => { - if (board.in_raw_repl) { - await board.stop() - await board.exit_raw_repl() - return board.reset() - } else { - return board.reset() - } + await board.stop() + await board.exit_raw_repl() + await board.reset() + return Promise.resolve() }, eval: (d) => { return board.eval(d) @@ -47,9 +37,11 @@ const Serial = { onData: (fn) => { board.serial.on('data', fn) }, - listFiles: async () => { - const output = await board.fs_ls() - return output + listFiles: async (folder) => { + return board.fs_ls(folder) + }, + ilistFiles: async (folder) => { + return board.fs_ils(folder) }, loadFile: async (file) => { const output = await board.fs_cat(file) @@ -58,23 +50,29 @@ const Serial = { removeFile: async (file) => { return board.fs_rm(file) }, - saveFileContent: async (filename, content) => { - return board.fs_save(content || ' ', filename) + saveFileContent: async (filename, content, dataConsumer) => { + return board.fs_save(content || ' ', filename, dataConsumer) }, - uploadFile: async (folder, filename) => { - let src = `${folder}/${filename}` - let dest = filename - return board.fs_put(src, dest) + uploadFile: async (diskFolder, serialFolder, filename, dataConsumer) => { + let src = `${diskFolder}/${filename}` + let dest = `${serialFolder}/${filename}` + return board.fs_put(src, dest, dataConsumer) }, - downloadFile: async (folder, filename) => { - let contents = await Serial.loadFile(filename) - return ipcRenderer.invoke('save-file', folder, filename, contents) + downloadFile: async (serialFolder, diskFolder, filename) => { + let contents = await Serial.loadFile(`${serialFolder}/${filename}`) + return ipcRenderer.invoke('save-file', diskFolder, filename, contents) }, renameFile: async (oldName, newName) => { return board.fs_rename(oldName, newName) }, onDisconnect: async (fn) => { board.serial.on('close', fn) + }, + createFolder: async (folder) => { + return await board.fs_mkdir(folder) + }, + exit_raw_repl: async () => { + return board.exit_raw_repl() } } @@ -85,6 +83,9 @@ const Disk = { listFiles: async (folder) => { return ipcRenderer.invoke('list-files', folder) }, + ilistFiles: async (folder) => { + return ipcRenderer.invoke('ilist-files', folder) + }, loadFile: async (folder, file) => { let content = await ipcRenderer.invoke('load-file', folder, file) return new TextDecoder().decode(content) diff --git a/ui/arduino/app.js b/ui/arduino/app.js index 1b784bb..943137c 100644 --- a/ui/arduino/app.js +++ b/ui/arduino/app.js @@ -1,4 +1,5 @@ function App(state, emit) { + return html`
${Toolbar(state, emit)} @@ -7,9 +8,9 @@ function App(state, emit) { ${Editor(state, emit)} ${Panel(state, emit)}
- ${NewFileDialog(state, emit)} ${PortDialog(state, emit)} ${Message(state, emit)} + ${Blocking(state, emit)} ` } diff --git a/ui/arduino/components/blocking.js b/ui/arduino/components/blocking.js new file mode 100644 index 0000000..5b11872 --- /dev/null +++ b/ui/arduino/components/blocking.js @@ -0,0 +1,7 @@ +function Blocking(state, emit) { + let blocking = html`
` + if (state.blocking) { + blocking.classList.add('active') + } + return blocking +} diff --git a/ui/arduino/components/button.js b/ui/arduino/components/button.js index 0ec523e..f91d7d3 100644 --- a/ui/arduino/components/button.js +++ b/ui/arduino/components/button.js @@ -4,16 +4,16 @@ function Button(param) { disabled = false, label = '', icon = '', - color = 'default', + className = '', selected = false } = param || {} return html`
- - + ${copy} + ${paste} + ${cleanTerminal} ` return html`
emit('start-resizing-panel')}> diff --git a/ui/arduino/components/panel_files.js b/ui/arduino/components/panel_files.js index 8b2cc7b..0cbf7bc 100644 --- a/ui/arduino/components/panel_files.js +++ b/ui/arduino/components/panel_files.js @@ -1,15 +1,23 @@ function PanelFiles(state, emit) { function ListItem(device, file) { let selectedClass = '' - if (device === state.selectedDevice && file === state.selectedFile) { + if (device === state.selectedDevice && file.path === state.selectedFile) { selectedClass = 'selected' } + function onClick() { + if (file.type === 'folder') { + emit('navigate-to', device, file.path) + } else { + emit('select-file', device, file.path) + } + } return html`
  • emit('select-file', device, file)} + onclick=${onClick} class=${selectedClass} > - ${file} + ${file.type === 'folder' ? Icon('icons/Folder.svg') : Icon('icons/File.svg')} + ${file.path}
  • ` } @@ -22,41 +30,90 @@ function PanelFiles(state, emit) { && state.diskPath && state.selectedDevice === 'serial' && state.selectedFile !== null + let canRemoveSerial = state.isConnected + && state.selectedDevice === 'serial' + && state.selectedFile !== null + && state.serialFiles.find(f => f.path === state.selectedFile) + let canRemoveDisk = state.selectedDevice === 'disk' + && state.selectedFile !== null + && state.diskFiles.find(f => f.path === state.selectedFile) + let upload = Button({ - label: 'Upload', icon: 'icons/Copy-Left.svg', onclick: () => emit('upload'), - disabled: !uploadEnabled + disabled: !uploadEnabled, + className: 'primary' }) let download = Button({ - label: 'Download', icon: 'icons/Copy-Right.svg', onclick: () => emit('download'), - disabled: !downloadEnabled + disabled: !downloadEnabled, + className: 'primary' + }) + let refresh = Button({ + icon: 'icons/Reboot.svg', + onclick: () => emit('update-files'), + disabled: !(state.isConnected || state.diskPath) }) - let remove = Button({ - label: 'Remove', + + let removeSerial = Button({ icon: 'icons/Delete.svg', onclick: () => emit('remove'), - disabled: state.selectedFile === null + disabled: !canRemoveSerial + }) + let newSerial = Button({ + icon: 'icons/New.svg', + onclick: () => emit('new-file', 'serial'), + disabled: !state.isConnected + }) + + let removeDisk = Button({ + icon: 'icons/Delete.svg', + onclick: () => emit('remove'), + disabled: !canRemoveDisk + }) + let newDisk = Button({ + icon: 'icons/New.svg', + onclick: () => emit('new-file', 'disk'), + disabled: !state.diskPath }) return html`
    - Board: ${state.serialPath} +
    + ${state.isConnected ? Icon('icons/Connect.svg') : Icon('icons/Disconnect.svg')} + emit('open-port-dialog')}> + ${state.isConnected ? state.serialPath : 'Connect'} + + ${removeSerial} + ${newSerial} +
      +
    • emit('navigate-to-parent', 'serial')}> + .. +
    • ${state.serialFiles.map((file) => ListItem('serial', file))}
    ${upload} ${download} - ${remove} + ${refresh}
    - Disk: ${state.diskPath} +
    + ${Icon('icons/Computer.svg')} + emit('open-folder')}> + ${state.diskPath ? state.diskPath : 'Select Folder'} + + ${removeDisk} + ${newDisk} +
      +
    • emit('navigate-to-parent', 'disk')}> + .. +
    • ${state.diskFiles.map((file) => ListItem('disk', file))}
    diff --git a/ui/arduino/components/toolbar.js b/ui/arduino/components/toolbar.js index c94a301..95b18e5 100644 --- a/ui/arduino/components/toolbar.js +++ b/ui/arduino/components/toolbar.js @@ -95,8 +95,6 @@ function Toolbar(state, emit) { ${stop} ${reset}
    - ${newFile} - ${openFolder} ${save}
    ${terminal} diff --git a/ui/arduino/icons/Computer.svg b/ui/arduino/icons/Computer.svg new file mode 100644 index 0000000..27159b0 --- /dev/null +++ b/ui/arduino/icons/Computer.svg @@ -0,0 +1,3 @@ + + + diff --git a/ui/arduino/icons/File-Explorer.svg b/ui/arduino/icons/File-Explorer.svg index 5786c76..36d0d19 100644 --- a/ui/arduino/icons/File-Explorer.svg +++ b/ui/arduino/icons/File-Explorer.svg @@ -1,4 +1,44 @@ - - - + + + + + + diff --git a/ui/arduino/icons/File.svg b/ui/arduino/icons/File.svg new file mode 100644 index 0000000..1d7f59e --- /dev/null +++ b/ui/arduino/icons/File.svg @@ -0,0 +1,3 @@ + + + diff --git a/ui/arduino/icons/Folder.svg b/ui/arduino/icons/Folder.svg new file mode 100644 index 0000000..4590ea7 --- /dev/null +++ b/ui/arduino/icons/Folder.svg @@ -0,0 +1,3 @@ + + + diff --git a/ui/arduino/icons/New.svg b/ui/arduino/icons/New.svg index 7503bdd..ef18e1b 100644 --- a/ui/arduino/icons/New.svg +++ b/ui/arduino/icons/New.svg @@ -1,4 +1,46 @@ - - - + + + + + + diff --git a/ui/arduino/icons/Output.svg b/ui/arduino/icons/Output.svg index 280acfa..9590eac 100644 --- a/ui/arduino/icons/Output.svg +++ b/ui/arduino/icons/Output.svg @@ -1,4 +1,44 @@ - - - + + + + + + diff --git a/ui/arduino/index.html b/ui/arduino/index.html index c4bc6a9..f7b5a86 100644 --- a/ui/arduino/index.html +++ b/ui/arduino/index.html @@ -25,8 +25,8 @@ - + diff --git a/ui/arduino/store.js b/ui/arduino/store.js index aad473b..f14754c 100644 --- a/ui/arduino/store.js +++ b/ui/arduino/store.js @@ -1,14 +1,6 @@ const log = console.log const DEFAULT_PANEL_HEIGHT = '15rem' -function resizeEditor(state) { - const el = state.cache(AceEditor, 'editor').element - if (state.isTerminalOpen || state.isFilesOpen) { - el.style.height = `calc(100% - ${state.panelHeight || DEFAULT_PANEL_HEIGHT})` - } else { - el.style.height = '100%' - } -} function store(state, emitter) { const serial = window.BridgeSerial @@ -26,9 +18,11 @@ function store(state, emitter) { state.diskPath = localStorage.getItem('diskPath') state.serialPath = null + state.diskNavigation = '/' + state.serialNavigation = '/' + state.isConnected = false state.isPortDialogOpen = false - state.isNewFileDialogOpen = false state.isTerminalOpen = false state.isFilesOpen = false state.isEditingFilename = false @@ -40,6 +34,9 @@ function store(state, emitter) { state.isTerminalBound = false // XXX state.panelHeight = null + state.blocking = false + state.unsavedChanges = false + // SERIAL CONNECTION emitter.on('load-ports', async () => { log('load-ports') @@ -49,9 +46,10 @@ function store(state, emitter) { emitter.on('open-port-dialog', async () => { log('open-port-dialog') emitter.emit('disconnect') - state.ports = await serial.loadPorts() state.isPortDialogOpen = true emitter.emit('render') + state.ports = await serial.loadPorts() + emitter.emit('render') }) emitter.on('close-port-dialog', async () => { log('close-port-dialog') @@ -59,25 +57,60 @@ function store(state, emitter) { emitter.emit('render') }) - emitter.on('disconnect', () => { + emitter.on('disconnect', async () => { log('disconnect') if (state.isConnected) { emitter.emit('message', 'Disconnected') } state.isConnected = false + state.serialNavigation = '/' state.serialPath = null state.isTerminalOpen = false state.serialFiles = [] + + // When you disconnect with a serial file selected, keep the editor content + if (state.selectedDevice === 'serial') { + state.selectedDevice = 'disk' + state.selectedFile = null + } + + await serial.disconnect() + emitter.emit('render') resizeEditor(state) }) emitter.on('connect', async (path) => { - log('connect') - state.serialPath = path + log('connect', path) + + state.blocking = true + emitter.emit('message', 'Connecting') + await serial.connect(path) - emitter.emit('message', 'Connected', 150) + + // Stop whatever is going on await serial.stop() + // Recover from getting stuck in raw repl + await serial.exit_raw_repl() + + state.isConnected = true + emitter.emit('close-port-dialog') + + // Make sure there is a lib folder + log('creating lib folder') + await serial.createFolder('lib') + + state.serialPath = path + state.serialNavigation = '/' + emitter.emit('update-files') + + emitter.emit('message', 'Connected', 1000) + if (!state.isFilesOpen) { + emitter.emit('show-terminal') + } + emitter.emit('render') + + // Bind terminal let term = state.cache(XTerm, 'terminal').term if (!state.isTerminalBound) { state.isTerminalBound = true @@ -91,11 +124,6 @@ function store(state, emitter) { term.scrollToBottom() }) serial.onDisconnect(() => emitter.emit('disconnect')) - state.isConnected = true - emitter.emit('update-files') - emitter.emit('close-port-dialog') - emitter.emit('show-terminal') - emitter.emit('render') }) // CODE EXECUTION @@ -120,21 +148,12 @@ function store(state, emitter) { }) // FILE MANAGEMENT - emitter.on('open-new-file-dialog', () => { - log('open-new-file-dialog') - state.isNewFileDialogOpen = true - emitter.emit('render') - }) - emitter.on('close-new-file-dialog', () => { - log('close-new-file-dialog') - state.isNewFileDialogOpen = false - emitter.emit('render') - }) emitter.on('new-file', (dev) => { - log('select-device', dev) + log('new-file', dev) state.selectedDevice = dev - let editor = state.cache(AceEditor, 'editor').editor state.selectedFile = null + state.unsavedChanges = false + let editor = state.cache(AceEditor, 'editor').editor editor.setValue('') emitter.emit('close-new-file-dialog') emitter.emit('render') @@ -142,38 +161,70 @@ function store(state, emitter) { emitter.on('save', async () => { log('save') let editor = state.cache(AceEditor, 'editor').editor - let contents = editor.getValue() + let contents = cleanCharacters(editor.getValue()) + editor.setValue(contents) let filename = state.selectedFile || 'undefined' - let deviceName = state.selectedDevice === 'serial' ? 'board' : 'disk' + let deviceName = getDeviceName(state.selectedDevice) + + state.blocking = true + emitter.emit('message', `Saving ${filename} on ${deviceName}.`) if (state.selectedDevice === 'serial') { - await serial.saveFileContent(filename, contents) + await serial.saveFileContent( + cleanPath(state.serialNavigation + '/' + filename), + contents, + (e) => emitter.emit('message', `Saving ${filename} on ${deviceName}. ${e}`) + ) + setTimeout(() => emitter.emit('update-files'), 1000) + state.unsavedChanges = false + emitter.emit('message', `Saved`, 1000) } if (state.selectedDevice === 'disk' && state.diskPath) { - await disk.saveFileContent(state.diskPath, filename, contents) + await disk.saveFileContent( + cleanPath(state.diskPath + '/' + state.diskNavigation), + filename, + contents + ) + setTimeout(() => emitter.emit('update-files'), 100) + state.unsavedChanges = false + emitter.emit('message', `Saved`, 500) } - emitter.emit('update-files') - emitter.emit('message', `${filename} is saved on ${deviceName}.`, 1000) + }) emitter.on('remove', async () => { log('remove') - let deviceName = state.selectedDevice === 'serial' ? 'board' : 'disk' + let deviceName = getDeviceName(state.selectedDevice) + + state.blocking = true + emitter.emit('render') + if (confirm(`Do you want to remove ${state.selectedFile} from ${deviceName}?`)) { if (state.selectedDevice === 'serial') { - await serial.removeFile(state.selectedFile) + await serial.removeFile(state.serialNavigation + '/' + state.selectedFile) + emitter.emit('new-file', 'serial') } if (state.selectedDevice === 'disk') { - await disk.removeFile(state.diskPath, state.selectedFile) + await disk.removeFile( + state.diskPath + '/' + state.diskNavigation, + state.selectedFile + ) + emitter.emit('new-file', 'disk') } emitter.emit('update-files') emitter.emit('render') + } else { + state.blocking = false + emitter.emit('render') } }) emitter.on('select-file', async (device, filename) => { - log('select-file') - + log('select-file', device, filename) + if (state.unsavedChanges) { + let response = confirm(`Loading a new file will discard any unsaved changes.\nPress OK to accept or Cancel to abort.`) + if (!response) return + } state.selectedDevice = device /* @@ -183,102 +234,173 @@ function store(state, emitter) { */ if (state.selectedDevice === 'serial' && state.isEditingFilename) return - state.selectedFile = filename + state.blocking = true + emitter.emit('render') let content = '' if (state.selectedDevice === 'serial') { - content = await serial.loadFile(filename) + content = await serial.loadFile( + cleanPath(state.serialNavigation + '/' + filename) + ) } if (state.selectedDevice === 'disk') { - content = await disk.loadFile(state.diskPath, filename) + content = await disk.loadFile( + cleanPath(state.diskPath + '/' + state.diskNavigation), + filename + ) } let editor = state.cache(AceEditor, 'editor').editor - editor.setValue(content) + editor.setValue(cleanCharacters(content)) + state.selectedFile = filename + state.unsavedChanges = false + state.blocking = false emitter.emit('render') }) emitter.on('open-folder', async () => { log('open-folder') let { folder, files } = await disk.openFolder() + state.diskNavigation = '/' if (folder !== 'null' && folder !== null) { localStorage.setItem('diskPath', folder) state.diskPath = folder state.diskFiles = files } if (!state.isFilesOpen) emitter.emit('show-files') - emitter.emit('render') + emitter.emit('update-files') }) emitter.on('update-files', async () => { log('update-files') + // state.blocking = true + // emitter.emit('render') + function sortFoldersFirst(allFiles) { + let folders = allFiles.filter(f => f.type === 'folder') + let files = allFiles.filter(f => f.type === 'file') + folders = folders.sort((a, b) => a.path.localeCompare(b.path)) + files = files.sort((a, b) => a.path.localeCompare(b.path)) + return folders.concat(files) + } if (state.isConnected) { await serial.stop() try { - state.serialFiles = await serial.listFiles() - state.serialFiles = state.serialFiles.filter( - f => f.indexOf('.') !== -1 // Only files with extensions + const files = await serial.ilistFiles( + cleanPath(state.serialNavigation) ) + state.serialFiles = files.map(f => ({ + path: f[0], + type: f[1] === 0x4000 ? 'folder' : 'file' + })) // Filter out dot files state.serialFiles = state.serialFiles.filter( - f => f.indexOf('.') !== 0 + f => f.path.indexOf('.') !== 0 ) // Sort alphabetically in case-insensitive fashion state.serialFiles = state.serialFiles.sort( - (a, b) => a.localeCompare(b) + (a, b) => a.path.localeCompare(b.path) ) + // Sort folders first + state.serialFiles = sortFoldersFirst(state.serialFiles) } catch (e) { + state.serialNavigation = '/' + state.serialPath = null + state.serialFiles = [] console.log('error', e) } + } if (state.diskPath) { try { - state.diskFiles = await disk.listFiles(state.diskPath) + state.diskFiles = await disk.ilistFiles( + cleanPath(state.diskPath + '/' + state.diskNavigation) + ) // Filter out dot files - state.diskFiles = state.diskFiles.filter(f => f.indexOf('.') !== 0) + state.diskFiles = state.diskFiles.filter(f => f.path.indexOf('.') !== 0) // Sort alphabetically in case-insensitive fashion state.diskFiles = state.diskFiles.sort( - (a, b) => a.localeCompare(b) + (a, b) => a.path.localeCompare(b.path) ) + // Sort folders first + state.diskFiles = sortFoldersFirst(state.diskFiles) } catch (e) { + state.diskNavigation = '/' state.diskPath = null + state.diskFiles = [] + localStorage.setItem('diskPath', null) console.log('error', e) } } + state.blocking = false emitter.emit('render') }) emitter.on('upload', async () => { log('upload') + state.blocking = true + emitter.emit('render') let confirmation = true - if (state.serialFiles.indexOf(state.selectedFile) !== -1) { + if (state.serialFiles.find(f => f.path === state.selectedFile)) { confirmation = confirm(`Do you want to overwrite ${state.selectedFile} on board?`) } if (confirmation) { - emitter.emit('message', 'Uploading file... Please wait') + emitter.emit('message', 'Uploading file...') let editor = state.cache(AceEditor, 'editor').editor - let contents = editor.getValue() - await disk.saveFileContent(state.diskPath, state.selectedFile, contents) - await serial.uploadFile(state.diskPath, state.selectedFile) + let contents = cleanCharacters(editor.getValue()) + editor.setValue(contents) + await disk.saveFileContent( + cleanPath(state.diskPath + '/' + state.diskNavigation), + state.selectedFile, + contents + ) + await serial.uploadFile( + cleanPath(state.diskPath + '/' + state.diskNavigation), + cleanPath(state.serialNavigation), + state.selectedFile, + (e) => emitter.emit('message', `Uploading file... ${e}`) + ) emitter.emit('message', 'File uploaded!', 500) - emitter.emit('update-files') + setTimeout(() => emitter.emit('update-files'), 500) + emitter.emit('render') + } else { + state.blocking = false emitter.emit('render') } }) emitter.on('download', async () => { log('download') + state.blocking = true + emitter.emit('render') let confirmation = true - if (state.diskFiles.indexOf(state.selectedFile) !== -1) { + if (state.diskFiles.find(f => f.path === state.selectedFile)) { confirmation = confirm(`Do you want to overwrite ${state.selectedFile} on disk?`) } if (confirmation) { emitter.emit('message', 'Downloading file... Please wait') let editor = state.cache(AceEditor, 'editor').editor - let contents = editor.getValue() - await serial.saveFileContent(state.selectedFile, contents) - await serial.downloadFile(state.diskPath, state.selectedFile) + let contents = cleanCharacters(editor.getValue()) + editor.setValue(contents) + await serial.saveFileContent( + cleanPath(state.serialNavigation + '/' + state.selectedFile), + contents + ) + await serial.downloadFile( + cleanPath(state.serialNavigation), + cleanPath(state.diskPath + '/' + state.diskNavigation), + state.selectedFile + ) emitter.emit('message', 'File downloaded!', 500) - emitter.emit('update-files') + setTimeout(() => emitter.emit('update-files'), 500) emitter.emit('render') + } else { + state.blocking = false + emitter.emit('render') + } + }) + + emitter.on('code-change', () => { + log('code-changed') + if (!state.blocking) { + state.unsavedChanges = true } }) @@ -310,14 +432,18 @@ function store(state, emitter) { emitter.on('start-resizing-panel', () => { log('start-resizing-panel') function handleMouseMove(e) { - let height = window.innerHeight - e.clientY + let height = Math.max(window.innerHeight - e.clientY, 200) + height = Math.min(height, window.innerHeight - 200) state.panelHeight = `${height}px` emitter.emit('render') resizeEditor(state) } + function stopMouseListener() { + window.removeEventListener('mousemove', handleMouseMove) + } window.addEventListener('mousemove', handleMouseMove) window.addEventListener('mouseup', (e) => { - window.removeEventListener('mousemove', handleMouseMove) + stopMouseListener() }, { once: true }) }) @@ -332,67 +458,135 @@ function store(state, emitter) { }) emitter.on('save-filename', async (filename) => { log('save-filename', filename) + + // no changes + if (state.selectedFile === filename) { + state.isEditingFilename = false + emitter.emit('render') + return + } + + state.blocking = true + emitter.emit('render') + let oldFilename = state.selectedFile state.selectedFile = filename - let deviceName = state.selectedDevice === 'serial' ? 'board' : 'disk' + let deviceName = getDeviceName(state.selectedDevice) let editor = state.cache(AceEditor, 'editor').editor - let contents = editor.getValue() + let contents = cleanCharacters(editor.getValue()) + editor.setValue(contents) if (state.selectedDevice === 'serial') { // Ask for confirmation to overwrite existing file let confirmation = true - if (state.serialFiles.indexOf(filename) !== -1) { + if (state.serialFiles.find(f => f.path === filename)) { confirmation = confirm(`Do you want to overwrite ${filename} on ${deviceName}?`) } if (confirmation) { - if (state.serialFiles.indexOf(oldFilename) !== -1) { + emitter.emit('message', `Saving ${filename} on ${deviceName}.`) + if (state.serialFiles.find(f => f.path === oldFilename)) { + const oldPath = cleanPath(state.serialNavigation + '/' + oldFilename) // If old name exists, save old file and rename - await serial.saveFileContent(oldFilename, contents) - await serial.renameFile(oldFilename, filename) + await serial.saveFileContent( + oldPath, + contents, + (e) => emitter.emit('message', `Saving ${filename} on ${deviceName}. ${e}`) + ) + await serial.renameFile(oldPath, cleanPath(state.serialNavigation + '/' + filename)) } else { + const newPath = cleanPath(state.serialNavigation + '/' + filename) // If old name doesn't exist create new file - await serial.saveFileContent(filename, contents) + await serial.saveFileContent( + newPath, + contents, + (e) => emitter.emit('message', `Saving ${filename} on ${deviceName}. ${e}`) + ) } state.isEditingFilename = false - emitter.emit('update-files') - emitter.emit('render') - - emitter.emit('message', `${filename} is saved on ${deviceName}.`, 1000) + emitter.emit('message', `Saved`, 500) } else { + state.selectedFile = oldFilename state.isEditingFilename = false + state.blocking = false + state.unsavedChanges = false emitter.emit('render') } } if (state.diskPath !== null && state.selectedDevice === 'disk') { + const diskPath = cleanPath(state.diskPath + '/' + state.diskNavigation) // Ask for confirmation to overwrite existing file let confirmation = true - if (state.diskFiles.indexOf(filename) !== -1) { + if (state.diskFiles.find((f) => f.path === filename)) { confirmation = confirm(`Do you want to overwrite ${filename} on ${deviceName}?`) } if (confirmation) { - if (state.diskFiles.indexOf(oldFilename) !== -1) { + emitter.emit('message', `Renaming`) + if (state.diskFiles.find((f) => f.path === oldFilename)) { // If old name exists, save old file and rename - await disk.saveFileContent(state.diskPath, oldFilename, contents) - await disk.renameFile(state.diskPath, oldFilename, filename) + await disk.saveFileContent(diskPath, oldFilename, contents) + await disk.renameFile(diskPath, oldFilename, filename) } else { // If old name doesn't exist create new file - await disk.saveFileContent(state.diskPath, filename, contents) + await disk.saveFileContent(diskPath, filename, contents) } state.isEditingFilename = false - emitter.emit('update-files') - emitter.emit('render') - - emitter.emit('message', `${filename} is saved on ${deviceName}.`, 1000) + emitter.emit('message', `Saved`, 500) } else { + state.selectedFile = oldFilename state.isEditingFilename = false emitter.emit('render') } } + emitter.emit('update-files') + }) + // NAVIGATION + emitter.on('navigate-to', (device, fullPath) => { + log('navigate-to', device, fullPath) + state.blocking = true + emitter.emit('render') + fullPath = fullPath || '/' + if (device === 'serial') { + state.serialNavigation += '/' + fullPath + state.serialNavigation = cleanPath(state.serialNavigation) + } + if (device === 'disk') { + state.diskNavigation += '/' + fullPath + state.diskNavigation = cleanPath(state.diskNavigation) + } + if (state.selectedDevice === device) { + state.selectedFile = null + state.unsavedChanges = false + } + emitter.emit('update-files') + }) + emitter.on('navigate-to-parent', (device) => { + log('navigate-to-parent', device) + state.blocking = true + emitter.emit('render') + if (device === 'serial') { + const navArray = state.serialNavigation.split('/') + navArray.pop() + state.serialNavigation = cleanPath( + '/' + navArray.join('/') + ) + } + if (device === 'disk') { + const navArray = state.diskNavigation.split('/') + navArray.pop() + state.diskNavigation = cleanPath( + '/' + navArray.join('/') + ) + } + if (state.selectedDevice === device) { + state.selectedFile = null + state.unsavedChanges = false + } + emitter.emit('update-files') }) emitter.on('message', (text, timeout) => { @@ -415,3 +609,24 @@ function store(state, emitter) { }) } + +function resizeEditor(state) { + const el = state.cache(AceEditor, 'editor').element + if (state.isTerminalOpen || state.isFilesOpen) { + el.style.height = `calc(100% - ${state.panelHeight || DEFAULT_PANEL_HEIGHT})` + } else { + el.style.height = '100%' + } +} + +function cleanPath(path) { + return '/' + path.split('/').filter(f => f).join('/') +} + +function cleanCharacters(str) { + return str.replace(/[\u{0080}-\u{FFFF}]/gu,"") +} + +function getDeviceName(dev) { + return dev === 'serial' ? 'board' : 'disk' +} diff --git a/ui/arduino/theme.css b/ui/arduino/theme.css index aaef7c4..84d93c6 100644 --- a/ui/arduino/theme.css +++ b/ui/arduino/theme.css @@ -2,6 +2,7 @@ :root { --teal: #008184; + --light-teal: #ecf1f1; --white: rgb(255, 255, 255); --white-faded: rgba(255, 255, 255, 0.8); --black: #000; @@ -19,7 +20,7 @@ body { height: 100vh; overflow: hidden; position: relative; - font-family: monospace; + font-family: 'Roboto Mono', monospace; box-sizing: border-box; margin: 0; padding: 0; @@ -53,7 +54,7 @@ img { padding: 0.5rem 0.5rem 0.75rem 0.5rem; } -.toolbar-button-wrapper { +.button-wrapper { display: flex; flex-direction: column; justify-content: center; @@ -62,22 +63,22 @@ img { cursor: pointer; } -.toolbar-button-wrapper.selected .toolbar-button { +.button-wrapper.selected .button { background: none; box-shadow: 0 0 0 0.15rem var(--white); } -.toolbar-button-wrapper.selected .toolbar-button img { +.button-wrapper.selected .button img { filter: invert(1); } -.toolbar-button-wrapper.selected .toolbar-label { +.button-wrapper.selected .toolbar-label { font-weight: bold; } -.toolbar-button-wrapper.disabled { +.button-wrapper.disabled { opacity: 0.5; pointer-events: none; } -.toolbar-button { +.button { border: none; cursor: pointer !important; align-items: center; @@ -94,16 +95,16 @@ img { background: var(--white-faded); } -.toolbar-button[disabled] { +.button[disabled] { pointer-events: none; background: var(--white-faded); } -.toolbar-button:hover, -.toolbar-button:active { +.button:hover, +.button:active { background: var(--white); } -.toolbar-button img { +.button img { width: 90%; height: 90%; margin-top: 0.1rem; @@ -151,7 +152,8 @@ img { /* EDITOR */ #editor { height: 100%; - font-family: monospace; + font-family: 'Roboto Mono', monospace; + line-height: 1.5em; } .editor-filename { @@ -194,7 +196,7 @@ img { align-items: center; } -#panel #handle .panel-button { +#panel #handle .button { border: none; cursor: pointer !important; align-items: center; @@ -231,47 +233,75 @@ img { } #files .file-list { - width: 100%; + width: 47.5%; display: flex; flex-direction: column; + align-items: center; + justify-content: center; padding: 0 1rem 1rem 1rem; - width: 45%; } #files .file-list .path { - /* height: 2.5rem; */ color: var(--black); + display: flex; + flex-direction: row; + align-items: center; + width: 100%; + font-size: 1rem; + padding: 0.5rem 0; +} +#files .file-list .path img { + height: 1.25rem; +} +#files .file-list .path a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; - font-size: 0.5rem; - padding: 0.25rem 0; } - -#files .toolbar-label { +#files .file-list .path a:link, +#files .file-list .path a:visited, +#files .file-list .path a:active, +#files .file-list .path a:hover { + text-decoration: none; color: var(--black); } +#files .file-list .path .full { + width: 100%; + padding: 0 0.5rem; +} +#files .file-list .path .button { + height: 1.5rem; + width: 1.5rem; + padding: 0; + margin: 0; +} #files .file-list ul { - border: solid 0.1rem var(--teal); + background: var(--light-teal); width: 100%; height: 100%; padding: 0.5rem; - background: var(--white); overflow-x: none; overflow-y: scroll; } #files .file-list ul li { - padding: 0.5rem 1rem; + padding: 0.25rem 0.5rem; cursor: pointer; + display: flex; + align-items: center; + overflow: hidden; + text-overflow: ellipsis; } #files .file-list ul li.selected { - background: var(--teal); - color: var(--white); + background: var(--white); + color: var(--black); } #files .file-list ul li:hover { - background: var(--teal); - color: var(--white); + background: var(--white); + color: var(--black); +} +#files .file-list ul li img { + padding-right: 0.5rem; } #files .file-controls { @@ -280,14 +310,21 @@ img { flex-direction: column; align-items: center; justify-content: center; - width: 10%; + width: 5%; } -#files .file-controls .toolbar-button { - width: 1.25rem; - height: 1.25rem; +#files .file-controls .button { + width: 1.5rem; + height: 1.5rem; padding: 0; } +#files .file-controls .button.primary { + background: var(--teal); +} + +#files .file-controls .button.primary img { + filter: invert(1); +} #message { position: fixed; @@ -307,3 +344,21 @@ img { opacity: 1; transform: translate(-50%, 0%); } + +/* BLOCKING */ +#blocking { + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + pointer-events: none; + cursor: auto; + z-index: -1; +} +#blocking.active { + /* background: rgba(255, 255, 255, 0.1); */ + z-index: 999; + cursor: wait !important; + pointer-events: all; /* this will capture all clicks */ +}