diff --git a/README.md b/README.md
index 874a6ff..ef81dc4 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-
+
Mind_Reader
@@ -27,21 +27,77 @@ Python programming with LEGO Mindstorms. Our goal is to:
- [JAWS](https://www.freedomscientific.com/products/software/jaws/)
- [Apple VoiceOver](https://support.apple.com/guide/voiceover-guide/welcome/web/)
-
-- Play audio alerts for syntax and runtime errors.
-
- Present a summary of the scope for an individual line of code.
- Save and load programs directly onto the LEGO Hub from within Visual Studio Code
-# For Developers
-
## Dependencies
-
-
- [Git](https://git-scm.com/)
- [Node.js](https://nodejs.org/en/)
+**NOTE**: While installing Node.js, there will be a section titled "Tools for Native Modules". Make sure that
+'Automatically install the necessary tools' is checked:
+
+
+
+
+
+If the compiled serial port version is incompatible, you may see no options presented in the Mind_Reader actions panel:
+
+
+
+
+
+In this case, you will also need to rebuild the serial port component with `electron-rebuild`. This is a one-time setup
+for each version of Visual Studio Code. You may need to repeat this process if you update your version of Visual Studio
+Code.
+
+## Installing `electron-rebuild`
+**Use Git Bash on Windows, and the terminal on MacOS/Linux. These steps will refer to this as 'the terminal'**
+
+### 1 Install the `electron-rebuild` tool
+In the terminal install electron rebuild with `npm` that is included with [Node.js](https://nodejs.org/en/):
+
+```console
+$ npm install -g electron-rebuild
+```
+
+### 2 Finding your electron version
+On MacOS, go to Code > About Visual Studio Code.
+
+On Windows and Linux, go to Help > About.
+
+The electron version should be listed, e.g.: `Electron: 13.5.2`
+
+
+
+
+
+### 3 Finding the Mind_Reader extension directory
+On MacOS and Linux this is `~/.vscode/extensions`.
+
+On Windows this is `C:\\.vscode\extensions\`. However, in Git Bash, it will appear like on MacOS and Linux
+e.g.: `~/.vscode/extensions`.
+
+---
+
+Find the Mind_Reader extension folder, this should look like `xxx.mind-reader-x.x.x`.
+
+Navigate to the found folder in the terminal.
+
+```console
+$ cd ~/.vscode/extensions/
+```
+
+### 4 Running `electron-rebuild`
+
+Then, run `electron-rebuild` with `ELECTRON_VERSION` replaced with the electron version found in step 2:
+
+```console
+$ electron-rebuild --version=ELECTRON_VERSION
+```
+
+# For Developers
## Development Quick Start
Use the following to set up the extension for development.
diff --git a/media/missing_actions.png b/media/missing_actions.png
new file mode 100644
index 0000000..6fcd5ca
Binary files /dev/null and b/media/missing_actions.png differ
diff --git a/media/nodejs_setup.png b/media/nodejs_setup.png
new file mode 100644
index 0000000..5cc9782
Binary files /dev/null and b/media/nodejs_setup.png differ
diff --git a/media/vscode_info.png b/media/vscode_info.png
new file mode 100644
index 0000000..fcd941f
Binary files /dev/null and b/media/vscode_info.png differ
diff --git a/package-lock.json b/package-lock.json
index 7a51c50..82ed2a5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -7,10 +7,14 @@
"": {
"name": "mind-reader",
"version": "0.0.1",
+ "dependencies": {
+ "serialport": "^9.2.5"
+ },
"devDependencies": {
"@types/glob": "^7.1.3",
"@types/mocha": "^8.2.2",
- "@types/node": "14.x",
+ "@types/node": "16.x",
+ "@types/serialport": "^8.0.2",
"@types/vscode": "^1.60.0",
"@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.0",
@@ -164,6 +168,149 @@
"node": ">= 8"
}
},
+ "node_modules/@serialport/binding-abstract": {
+ "version": "9.2.3",
+ "resolved": "https://registry.npmjs.org/@serialport/binding-abstract/-/binding-abstract-9.2.3.tgz",
+ "integrity": "sha512-cQs9tbIlG3P0IrOWyVirqlhWuJ7Ms2Zh9m2108z6Y5UW/iVj6wEOiW8EmK9QX9jmJXYllE7wgGgvVozP5oCj3w==",
+ "dependencies": {
+ "debug": "^4.3.2"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/serialport/donate"
+ }
+ },
+ "node_modules/@serialport/binding-mock": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-9.2.4.tgz",
+ "integrity": "sha512-dpEhACCs44oQhh6ajJfJdvQdK38Vq0N4W6iD/gdplglDCK7qXRQCMUjJIeKdS/HSEiWkC3bwumUhUufdsOyT4g==",
+ "dependencies": {
+ "@serialport/binding-abstract": "9.2.3",
+ "debug": "^4.3.2"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/serialport/donate"
+ }
+ },
+ "node_modules/@serialport/bindings": {
+ "version": "9.2.5",
+ "resolved": "https://registry.npmjs.org/@serialport/bindings/-/bindings-9.2.5.tgz",
+ "integrity": "sha512-fyabNg56gWbOMuYJc5c45z94sANC/WzTnGeML7Nr1IYVk0SJ1uksN4ETI8Nea9ZAtr4DhNiIMQ3/IOkyof6Tqg==",
+ "hasInstallScript": true,
+ "dependencies": {
+ "@serialport/binding-abstract": "9.2.3",
+ "@serialport/parser-readline": "9.2.4",
+ "bindings": "^1.5.0",
+ "debug": "^4.3.2",
+ "nan": "^2.15.0",
+ "prebuild-install": "^6.1.4"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/serialport/donate"
+ }
+ },
+ "node_modules/@serialport/parser-byte-length": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/parser-byte-length/-/parser-byte-length-9.2.4.tgz",
+ "integrity": "sha512-sQD/iw4ZMU3xW9PLi0/GlvU6Y623jGeWecbMkO7izUo/6P7gtfv1c9ikd5h0kwL8AoAOpQA1lxdHIKox+umBUg==",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/serialport/donate"
+ }
+ },
+ "node_modules/@serialport/parser-cctalk": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/parser-cctalk/-/parser-cctalk-9.2.4.tgz",
+ "integrity": "sha512-T4TU5vQMwmo9AB3gQLFDWbfJXlW5jd9guEsB/nqKjFHTv0FXPdZ7DQ2TpSp8RnHWxU3GX6kYTaDO20BKzc8GPQ==",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/serialport/donate"
+ }
+ },
+ "node_modules/@serialport/parser-delimiter": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-9.2.4.tgz",
+ "integrity": "sha512-4nvTAoYAgkxFiXrkI+3CA49Yd43CODjeszh89EK+I9c8wOZ+etZduRCzINYPiy26g7zO+GRAb9FoPCsY+sYcbQ==",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/serialport/donate"
+ }
+ },
+ "node_modules/@serialport/parser-inter-byte-timeout": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/parser-inter-byte-timeout/-/parser-inter-byte-timeout-9.2.4.tgz",
+ "integrity": "sha512-SOAdvr0oBQIOCXX198hiTlxs4JTKg9j5piapw5tNq52fwDOWdbYrFneT/wN04UTMKaDrJuEvXq6T4rv4j7nJ5A==",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/serialport/donate"
+ }
+ },
+ "node_modules/@serialport/parser-readline": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-9.2.4.tgz",
+ "integrity": "sha512-Z1/qrZTQUVhNSJP1hd9YfDvq0o7d87rNwAjjRKbVpa7Qi51tG5BnKt43IV3NFMyBlVcRe0rnIb3tJu57E0SOwg==",
+ "dependencies": {
+ "@serialport/parser-delimiter": "9.2.4"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/serialport/donate"
+ }
+ },
+ "node_modules/@serialport/parser-ready": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/parser-ready/-/parser-ready-9.2.4.tgz",
+ "integrity": "sha512-Pyi94Itjl6qAURwIZr/gmZpMAyTmKXThm6vL5DoAWGQjcRHWB0gwv2TY2v7N+mQLJYUKU3cMnvnATXxHm7xjxw==",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/serialport/donate"
+ }
+ },
+ "node_modules/@serialport/parser-regex": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/parser-regex/-/parser-regex-9.2.4.tgz",
+ "integrity": "sha512-sI/cVvPOYz+Dbv4ZdnW16qAwvXiFf/1pGASQdbveRTlgJDdz7sRNlCBifzfTN2xljwvCTZYqiudKvDdC1TepRQ==",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/serialport/donate"
+ }
+ },
+ "node_modules/@serialport/stream": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/stream/-/stream-9.2.4.tgz",
+ "integrity": "sha512-bLye8Ub4vUFQGmkh8qEqehr7SE7EJs2yDs0h9jzuL5oKi+F34CFmWkEErO8GAOQ8YNn7p6b3GxUgs+0BrHHDZQ==",
+ "dependencies": {
+ "debug": "^4.3.2"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/serialport/donate"
+ }
+ },
"node_modules/@tootallnate/once": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz",
@@ -202,11 +349,20 @@
"dev": true
},
"node_modules/@types/node": {
- "version": "14.17.19",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.19.tgz",
- "integrity": "sha512-jjYI6NkyfXykucU6ELEoT64QyKOdvaA6enOqKtP4xUsGY0X0ZUZz29fUmrTRo+7v7c6TgDu82q3GHHaCEkqZwA==",
+ "version": "16.11.7",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.7.tgz",
+ "integrity": "sha512-QB5D2sqfSjCmTuWcBWyJ+/44bcjO7VbjSbOE0ucoVbAsSNQc4Lt6QkgkVXkTDwkL4z/beecZNDvVX15D4P8Jbw==",
"dev": true
},
+ "node_modules/@types/serialport": {
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/@types/serialport/-/serialport-8.0.2.tgz",
+ "integrity": "sha512-z4b1I8/vdZE3upgCcAL9VAWlVVFUVn5uo3faAHavkVfK/Hb1LUxKwp9YCtA5AZqEUCWoSWl20SRTOvAI/5fQWQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
"node_modules/@types/vscode": {
"version": "1.60.0",
"resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.60.0.tgz",
@@ -482,6 +638,20 @@
"node": ">= 8"
}
},
+ "node_modules/aproba": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
+ "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
+ },
+ "node_modules/are-we-there-yet": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz",
+ "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==",
+ "dependencies": {
+ "delegates": "^1.0.0",
+ "readable-stream": "^2.0.6"
+ }
+ },
"node_modules/argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
@@ -515,6 +685,25 @@
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"dev": true
},
+ "node_modules/base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
"node_modules/big-integer": {
"version": "1.6.49",
"resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.49.tgz",
@@ -546,6 +735,37 @@
"node": ">=8"
}
},
+ "node_modules/bindings": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
+ "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+ "dependencies": {
+ "file-uri-to-path": "1.0.0"
+ }
+ },
+ "node_modules/bl": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
+ "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
+ "dependencies": {
+ "buffer": "^5.5.0",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0"
+ }
+ },
+ "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==",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
"node_modules/bluebird": {
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz",
@@ -580,6 +800,29 @@
"integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
"dev": true
},
+ "node_modules/buffer": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.1.13"
+ }
+ },
"node_modules/buffer-indexof-polyfill": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz",
@@ -722,6 +965,11 @@
"fsevents": "~2.3.1"
}
},
+ "node_modules/chownr": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
+ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
+ },
"node_modules/cliui": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
@@ -733,6 +981,14 @@
"wrap-ansi": "^7.0.0"
}
},
+ "node_modules/code-point-at": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@@ -754,11 +1010,15 @@
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
+ "node_modules/console-control-strings": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
+ "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
+ },
"node_modules/core-util-is": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
- "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
- "dev": true
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
},
"node_modules/cross-spawn": {
"version": "7.0.3",
@@ -778,7 +1038,6 @@
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
"integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
- "dev": true,
"dependencies": {
"ms": "2.1.2"
},
@@ -803,12 +1062,47 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/decompress-response": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz",
+ "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",
+ "dependencies": {
+ "mimic-response": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/deep-extend": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
+ "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
"node_modules/deep-is": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
"dev": true
},
+ "node_modules/delegates": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
+ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
+ },
+ "node_modules/detect-libc": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
+ "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
+ "bin": {
+ "detect-libc": "bin/detect-libc.js"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
"node_modules/diff": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz",
@@ -857,6 +1151,14 @@
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
+ "node_modules/end-of-stream": {
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
+ "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
+ "dependencies": {
+ "once": "^1.4.0"
+ }
+ },
"node_modules/enquirer": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz",
@@ -1116,6 +1418,14 @@
"node": ">=0.10.0"
}
},
+ "node_modules/expand-template": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
+ "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
@@ -1171,6 +1481,11 @@
"node": "^10.12.0 || >=12.0.0"
}
},
+ "node_modules/file-uri-to-path": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+ "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
+ },
"node_modules/fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@@ -1227,6 +1542,11 @@
"integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==",
"dev": true
},
+ "node_modules/fs-constants": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
+ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
+ },
"node_modules/fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -1280,6 +1600,64 @@
"integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
"dev": true
},
+ "node_modules/gauge": {
+ "version": "2.7.4",
+ "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
+ "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
+ "dependencies": {
+ "aproba": "^1.0.3",
+ "console-control-strings": "^1.0.0",
+ "has-unicode": "^2.0.0",
+ "object-assign": "^4.1.0",
+ "signal-exit": "^3.0.0",
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.1",
+ "wide-align": "^1.1.0"
+ }
+ },
+ "node_modules/gauge/node_modules/ansi-regex": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/gauge/node_modules/is-fullwidth-code-point": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+ "dependencies": {
+ "number-is-nan": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/gauge/node_modules/string-width": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+ "dependencies": {
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "strip-ansi": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/gauge/node_modules/strip-ansi": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "dependencies": {
+ "ansi-regex": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
@@ -1289,6 +1667,11 @@
"node": "6.* || 8.* || >= 10.*"
}
},
+ "node_modules/github-from-package": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
+ "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4="
+ },
"node_modules/glob": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
@@ -1380,6 +1763,11 @@
"node": ">=4"
}
},
+ "node_modules/has-unicode": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
+ "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
+ },
"node_modules/he": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
@@ -1416,6 +1804,25 @@
"node": ">= 6"
}
},
+ "node_modules/ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
"node_modules/ignore": {
"version": "5.1.8",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz",
@@ -1463,8 +1870,12 @@
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
- "dev": true
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "node_modules/ini": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
},
"node_modules/is-binary-path": {
"version": "2.1.0",
@@ -1529,8 +1940,7 @@
"node_modules/isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"node_modules/isexe": {
"version": "2.0.0",
@@ -1667,6 +2077,17 @@
"node": ">=8.6"
}
},
+ "node_modules/mimic-response": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz",
+ "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
@@ -1682,8 +2103,7 @@
"node_modules/minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
- "dev": true
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
},
"node_modules/mkdirp": {
"version": "0.5.5",
@@ -1697,6 +2117,11 @@
"mkdirp": "bin/cmd.js"
}
},
+ "node_modules/mkdirp-classic": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
+ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
+ },
"node_modules/mocha": {
"version": "8.4.0",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz",
@@ -1835,8 +2260,12 @@
"node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ },
+ "node_modules/nan": {
+ "version": "2.15.0",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",
+ "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ=="
},
"node_modules/nanoid": {
"version": "3.1.20",
@@ -1850,12 +2279,33 @@
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
+ "node_modules/napi-build-utils": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz",
+ "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
+ },
"node_modules/natural-compare": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
"dev": true
},
+ "node_modules/node-abi": {
+ "version": "2.30.1",
+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz",
+ "integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==",
+ "dependencies": {
+ "semver": "^5.4.1"
+ }
+ },
+ "node_modules/node-abi/node_modules/semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "bin": {
+ "semver": "bin/semver"
+ }
+ },
"node_modules/normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
@@ -1865,11 +2315,37 @@
"node": ">=0.10.0"
}
},
+ "node_modules/npmlog": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
+ "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
+ "dependencies": {
+ "are-we-there-yet": "~1.1.2",
+ "console-control-strings": "~1.1.0",
+ "gauge": "~2.7.3",
+ "set-blocking": "~2.0.0"
+ }
+ },
+ "node_modules/number-is-nan": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
- "dev": true,
"dependencies": {
"wrappy": "1"
}
@@ -1981,6 +2457,32 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
+ "node_modules/prebuild-install": {
+ "version": "6.1.4",
+ "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz",
+ "integrity": "sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==",
+ "dependencies": {
+ "detect-libc": "^1.0.3",
+ "expand-template": "^2.0.3",
+ "github-from-package": "0.0.0",
+ "minimist": "^1.2.3",
+ "mkdirp-classic": "^0.5.3",
+ "napi-build-utils": "^1.0.1",
+ "node-abi": "^2.21.0",
+ "npmlog": "^4.0.1",
+ "pump": "^3.0.0",
+ "rc": "^1.2.7",
+ "simple-get": "^3.0.3",
+ "tar-fs": "^2.0.0",
+ "tunnel-agent": "^0.6.0"
+ },
+ "bin": {
+ "prebuild-install": "bin.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/prelude-ls": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
@@ -1993,8 +2495,7 @@
"node_modules/process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
- "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
- "dev": true
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
"node_modules/progress": {
"version": "2.0.3",
@@ -2005,6 +2506,15 @@
"node": ">=0.4.0"
}
},
+ "node_modules/pump": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
+ "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ }
+ },
"node_modules/punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
@@ -2043,11 +2553,32 @@
"safe-buffer": "^5.1.0"
}
},
+ "node_modules/rc": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
+ "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
+ "dependencies": {
+ "deep-extend": "^0.6.0",
+ "ini": "~1.3.0",
+ "minimist": "^1.2.0",
+ "strip-json-comments": "~2.0.1"
+ },
+ "bin": {
+ "rc": "cli.js"
+ }
+ },
+ "node_modules/rc/node_modules/strip-json-comments": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"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==",
- "dev": true,
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
@@ -2061,8 +2592,7 @@
"node_modules/readable-stream/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
- "dev": true
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/readdirp": {
"version": "3.5.0",
@@ -2167,7 +2697,6 @@
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
- "dev": true,
"funding": [
{
"type": "github",
@@ -2207,6 +2736,35 @@
"randombytes": "^2.1.0"
}
},
+ "node_modules/serialport": {
+ "version": "9.2.5",
+ "resolved": "https://registry.npmjs.org/serialport/-/serialport-9.2.5.tgz",
+ "integrity": "sha512-nsDsD2GN/43T2a8jQYr1HH76gmDZ575Ts8FOdcBRUY8ecaI16BPbXa612cPPkQjOfg28+KL5qtQL9c0vvTaidg==",
+ "dependencies": {
+ "@serialport/binding-mock": "9.2.4",
+ "@serialport/bindings": "9.2.5",
+ "@serialport/parser-byte-length": "9.2.4",
+ "@serialport/parser-cctalk": "9.2.4",
+ "@serialport/parser-delimiter": "9.2.4",
+ "@serialport/parser-inter-byte-timeout": "9.2.4",
+ "@serialport/parser-readline": "9.2.4",
+ "@serialport/parser-ready": "9.2.4",
+ "@serialport/parser-regex": "9.2.4",
+ "@serialport/stream": "9.2.4",
+ "debug": "^4.3.2"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/serialport/donate"
+ }
+ },
+ "node_modules/set-blocking": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
+ },
"node_modules/setimmediate": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
@@ -2234,6 +2792,40 @@
"node": ">=8"
}
},
+ "node_modules/signal-exit": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz",
+ "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ=="
+ },
+ "node_modules/simple-concat": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
+ "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/simple-get": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz",
+ "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==",
+ "dependencies": {
+ "decompress-response": "^4.2.0",
+ "once": "^1.3.1",
+ "simple-concat": "^1.0.0"
+ }
+ },
"node_modules/slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
@@ -2303,7 +2895,6 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
- "dev": true,
"dependencies": {
"safe-buffer": "~5.1.0"
}
@@ -2311,8 +2902,7 @@
"node_modules/string_decoder/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
- "dev": true
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/string-width": {
"version": "4.2.3",
@@ -2403,6 +2993,45 @@
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
"dev": true
},
+ "node_modules/tar-fs": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
+ "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
+ "dependencies": {
+ "chownr": "^1.1.1",
+ "mkdirp-classic": "^0.5.2",
+ "pump": "^3.0.0",
+ "tar-stream": "^2.1.4"
+ }
+ },
+ "node_modules/tar-stream": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
+ "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
+ "dependencies": {
+ "bl": "^4.0.3",
+ "end-of-stream": "^1.4.1",
+ "fs-constants": "^1.0.0",
+ "inherits": "^2.0.3",
+ "readable-stream": "^3.1.1"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/tar-stream/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==",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
"node_modules/text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@@ -2451,6 +3080,17 @@
"typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"
}
},
+ "node_modules/tunnel-agent": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
+ "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/type-check": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
@@ -2518,8 +3158,7 @@
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
- "dev": true
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"node_modules/v8-compile-cache": {
"version": "2.3.0",
@@ -2561,7 +3200,6 @@
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
- "dev": true,
"dependencies": {
"string-width": "^1.0.2 || 2"
}
@@ -2570,7 +3208,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
- "dev": true,
"engines": {
"node": ">=4"
}
@@ -2579,7 +3216,6 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
- "dev": true,
"engines": {
"node": ">=4"
}
@@ -2588,7 +3224,6 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
- "dev": true,
"dependencies": {
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^4.0.0"
@@ -2601,7 +3236,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
- "dev": true,
"dependencies": {
"ansi-regex": "^3.0.0"
},
@@ -2677,8 +3311,7 @@
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
- "dev": true
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"node_modules/y18n": {
"version": "5.0.8",
@@ -2864,6 +3497,82 @@
"fastq": "^1.6.0"
}
},
+ "@serialport/binding-abstract": {
+ "version": "9.2.3",
+ "resolved": "https://registry.npmjs.org/@serialport/binding-abstract/-/binding-abstract-9.2.3.tgz",
+ "integrity": "sha512-cQs9tbIlG3P0IrOWyVirqlhWuJ7Ms2Zh9m2108z6Y5UW/iVj6wEOiW8EmK9QX9jmJXYllE7wgGgvVozP5oCj3w==",
+ "requires": {
+ "debug": "^4.3.2"
+ }
+ },
+ "@serialport/binding-mock": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-9.2.4.tgz",
+ "integrity": "sha512-dpEhACCs44oQhh6ajJfJdvQdK38Vq0N4W6iD/gdplglDCK7qXRQCMUjJIeKdS/HSEiWkC3bwumUhUufdsOyT4g==",
+ "requires": {
+ "@serialport/binding-abstract": "9.2.3",
+ "debug": "^4.3.2"
+ }
+ },
+ "@serialport/bindings": {
+ "version": "9.2.5",
+ "resolved": "https://registry.npmjs.org/@serialport/bindings/-/bindings-9.2.5.tgz",
+ "integrity": "sha512-fyabNg56gWbOMuYJc5c45z94sANC/WzTnGeML7Nr1IYVk0SJ1uksN4ETI8Nea9ZAtr4DhNiIMQ3/IOkyof6Tqg==",
+ "requires": {
+ "@serialport/binding-abstract": "9.2.3",
+ "@serialport/parser-readline": "9.2.4",
+ "bindings": "^1.5.0",
+ "debug": "^4.3.2",
+ "nan": "^2.15.0",
+ "prebuild-install": "^6.1.4"
+ }
+ },
+ "@serialport/parser-byte-length": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/parser-byte-length/-/parser-byte-length-9.2.4.tgz",
+ "integrity": "sha512-sQD/iw4ZMU3xW9PLi0/GlvU6Y623jGeWecbMkO7izUo/6P7gtfv1c9ikd5h0kwL8AoAOpQA1lxdHIKox+umBUg=="
+ },
+ "@serialport/parser-cctalk": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/parser-cctalk/-/parser-cctalk-9.2.4.tgz",
+ "integrity": "sha512-T4TU5vQMwmo9AB3gQLFDWbfJXlW5jd9guEsB/nqKjFHTv0FXPdZ7DQ2TpSp8RnHWxU3GX6kYTaDO20BKzc8GPQ=="
+ },
+ "@serialport/parser-delimiter": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-9.2.4.tgz",
+ "integrity": "sha512-4nvTAoYAgkxFiXrkI+3CA49Yd43CODjeszh89EK+I9c8wOZ+etZduRCzINYPiy26g7zO+GRAb9FoPCsY+sYcbQ=="
+ },
+ "@serialport/parser-inter-byte-timeout": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/parser-inter-byte-timeout/-/parser-inter-byte-timeout-9.2.4.tgz",
+ "integrity": "sha512-SOAdvr0oBQIOCXX198hiTlxs4JTKg9j5piapw5tNq52fwDOWdbYrFneT/wN04UTMKaDrJuEvXq6T4rv4j7nJ5A=="
+ },
+ "@serialport/parser-readline": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-9.2.4.tgz",
+ "integrity": "sha512-Z1/qrZTQUVhNSJP1hd9YfDvq0o7d87rNwAjjRKbVpa7Qi51tG5BnKt43IV3NFMyBlVcRe0rnIb3tJu57E0SOwg==",
+ "requires": {
+ "@serialport/parser-delimiter": "9.2.4"
+ }
+ },
+ "@serialport/parser-ready": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/parser-ready/-/parser-ready-9.2.4.tgz",
+ "integrity": "sha512-Pyi94Itjl6qAURwIZr/gmZpMAyTmKXThm6vL5DoAWGQjcRHWB0gwv2TY2v7N+mQLJYUKU3cMnvnATXxHm7xjxw=="
+ },
+ "@serialport/parser-regex": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/parser-regex/-/parser-regex-9.2.4.tgz",
+ "integrity": "sha512-sI/cVvPOYz+Dbv4ZdnW16qAwvXiFf/1pGASQdbveRTlgJDdz7sRNlCBifzfTN2xljwvCTZYqiudKvDdC1TepRQ=="
+ },
+ "@serialport/stream": {
+ "version": "9.2.4",
+ "resolved": "https://registry.npmjs.org/@serialport/stream/-/stream-9.2.4.tgz",
+ "integrity": "sha512-bLye8Ub4vUFQGmkh8qEqehr7SE7EJs2yDs0h9jzuL5oKi+F34CFmWkEErO8GAOQ8YNn7p6b3GxUgs+0BrHHDZQ==",
+ "requires": {
+ "debug": "^4.3.2"
+ }
+ },
"@tootallnate/once": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz",
@@ -2899,11 +3608,20 @@
"dev": true
},
"@types/node": {
- "version": "14.17.19",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.19.tgz",
- "integrity": "sha512-jjYI6NkyfXykucU6ELEoT64QyKOdvaA6enOqKtP4xUsGY0X0ZUZz29fUmrTRo+7v7c6TgDu82q3GHHaCEkqZwA==",
+ "version": "16.11.7",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.7.tgz",
+ "integrity": "sha512-QB5D2sqfSjCmTuWcBWyJ+/44bcjO7VbjSbOE0ucoVbAsSNQc4Lt6QkgkVXkTDwkL4z/beecZNDvVX15D4P8Jbw==",
"dev": true
},
+ "@types/serialport": {
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/@types/serialport/-/serialport-8.0.2.tgz",
+ "integrity": "sha512-z4b1I8/vdZE3upgCcAL9VAWlVVFUVn5uo3faAHavkVfK/Hb1LUxKwp9YCtA5AZqEUCWoSWl20SRTOvAI/5fQWQ==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
"@types/vscode": {
"version": "1.60.0",
"resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.60.0.tgz",
@@ -3075,6 +3793,20 @@
"picomatch": "^2.0.4"
}
},
+ "aproba": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
+ "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
+ },
+ "are-we-there-yet": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz",
+ "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==",
+ "requires": {
+ "delegates": "^1.0.0",
+ "readable-stream": "^2.0.6"
+ }
+ },
"argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
@@ -3102,6 +3834,11 @@
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"dev": true
},
+ "base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
+ },
"big-integer": {
"version": "1.6.49",
"resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.49.tgz",
@@ -3124,6 +3861,36 @@
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"dev": true
},
+ "bindings": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
+ "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+ "requires": {
+ "file-uri-to-path": "1.0.0"
+ }
+ },
+ "bl": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
+ "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
+ "requires": {
+ "buffer": "^5.5.0",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0"
+ },
+ "dependencies": {
+ "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==",
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ }
+ }
+ },
"bluebird": {
"version": "3.4.7",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz",
@@ -3155,6 +3922,15 @@
"integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
"dev": true
},
+ "buffer": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+ "requires": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.1.13"
+ }
+ },
"buffer-indexof-polyfill": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz",
@@ -3255,6 +4031,11 @@
"readdirp": "~3.5.0"
}
},
+ "chownr": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
+ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
+ },
"cliui": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
@@ -3266,6 +4047,11 @@
"wrap-ansi": "^7.0.0"
}
},
+ "code-point-at": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
+ },
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@@ -3287,11 +4073,15 @@
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
+ "console-control-strings": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
+ "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
+ },
"core-util-is": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
- "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
- "dev": true
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
},
"cross-spawn": {
"version": "7.0.3",
@@ -3308,7 +4098,6 @@
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
"integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
- "dev": true,
"requires": {
"ms": "2.1.2"
}
@@ -3319,12 +4108,35 @@
"integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==",
"dev": true
},
+ "decompress-response": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz",
+ "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",
+ "requires": {
+ "mimic-response": "^2.0.0"
+ }
+ },
+ "deep-extend": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
+ "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
+ },
"deep-is": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
"dev": true
},
+ "delegates": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
+ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
+ },
+ "detect-libc": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
+ "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups="
+ },
"diff": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz",
@@ -3364,6 +4176,14 @@
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
+ "end-of-stream": {
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
+ "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
+ "requires": {
+ "once": "^1.4.0"
+ }
+ },
"enquirer": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz",
@@ -3554,6 +4374,11 @@
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true
},
+ "expand-template": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
+ "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg=="
+ },
"fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
@@ -3603,6 +4428,11 @@
"flat-cache": "^3.0.4"
}
},
+ "file-uri-to-path": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+ "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
+ },
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@@ -3644,6 +4474,11 @@
"integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==",
"dev": true
},
+ "fs-constants": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
+ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
+ },
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -3686,12 +4521,65 @@
"integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
"dev": true
},
+ "gauge": {
+ "version": "2.7.4",
+ "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
+ "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
+ "requires": {
+ "aproba": "^1.0.3",
+ "console-control-strings": "^1.0.0",
+ "has-unicode": "^2.0.0",
+ "object-assign": "^4.1.0",
+ "signal-exit": "^3.0.0",
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.1",
+ "wide-align": "^1.1.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
+ },
+ "is-fullwidth-code-point": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+ "requires": {
+ "number-is-nan": "^1.0.0"
+ }
+ },
+ "string-width": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+ "requires": {
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "strip-ansi": "^3.0.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "requires": {
+ "ansi-regex": "^2.0.0"
+ }
+ }
+ }
+ },
"get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true
},
+ "github-from-package": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
+ "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4="
+ },
"glob": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
@@ -3756,6 +4644,11 @@
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
+ "has-unicode": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
+ "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
+ },
"he": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
@@ -3783,6 +4676,11 @@
"debug": "4"
}
},
+ "ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
+ },
"ignore": {
"version": "5.1.8",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz",
@@ -3818,8 +4716,12 @@
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
- "dev": true
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "ini": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
},
"is-binary-path": {
"version": "2.1.0",
@@ -3866,8 +4768,7 @@
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"isexe": {
"version": "2.0.0",
@@ -3980,6 +4881,11 @@
"picomatch": "^2.2.3"
}
},
+ "mimic-response": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz",
+ "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA=="
+ },
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
@@ -3992,8 +4898,7 @@
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
- "dev": true
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
},
"mkdirp": {
"version": "0.5.5",
@@ -4004,6 +4909,11 @@
"minimist": "^1.2.5"
}
},
+ "mkdirp-classic": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
+ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
+ },
"mocha": {
"version": "8.4.0",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz",
@@ -4109,8 +5019,12 @@
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ },
+ "nan": {
+ "version": "2.15.0",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",
+ "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ=="
},
"nanoid": {
"version": "3.1.20",
@@ -4118,23 +5032,63 @@
"integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==",
"dev": true
},
+ "napi-build-utils": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz",
+ "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
+ },
"natural-compare": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
"dev": true
},
+ "node-abi": {
+ "version": "2.30.1",
+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz",
+ "integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==",
+ "requires": {
+ "semver": "^5.4.1"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
+ }
+ }
+ },
"normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true
},
+ "npmlog": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
+ "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
+ "requires": {
+ "are-we-there-yet": "~1.1.2",
+ "console-control-strings": "~1.1.0",
+ "gauge": "~2.7.3",
+ "set-blocking": "~2.0.0"
+ }
+ },
+ "number-is-nan": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
+ },
+ "object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
+ },
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
- "dev": true,
"requires": {
"wrappy": "1"
}
@@ -4210,6 +5164,26 @@
"integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==",
"dev": true
},
+ "prebuild-install": {
+ "version": "6.1.4",
+ "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz",
+ "integrity": "sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==",
+ "requires": {
+ "detect-libc": "^1.0.3",
+ "expand-template": "^2.0.3",
+ "github-from-package": "0.0.0",
+ "minimist": "^1.2.3",
+ "mkdirp-classic": "^0.5.3",
+ "napi-build-utils": "^1.0.1",
+ "node-abi": "^2.21.0",
+ "npmlog": "^4.0.1",
+ "pump": "^3.0.0",
+ "rc": "^1.2.7",
+ "simple-get": "^3.0.3",
+ "tar-fs": "^2.0.0",
+ "tunnel-agent": "^0.6.0"
+ }
+ },
"prelude-ls": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
@@ -4219,8 +5193,7 @@
"process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
- "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
- "dev": true
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
"progress": {
"version": "2.0.3",
@@ -4228,6 +5201,15 @@
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
"dev": true
},
+ "pump": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
+ "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
+ "requires": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ }
+ },
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
@@ -4249,11 +5231,28 @@
"safe-buffer": "^5.1.0"
}
},
+ "rc": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
+ "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
+ "requires": {
+ "deep-extend": "^0.6.0",
+ "ini": "~1.3.0",
+ "minimist": "^1.2.0",
+ "strip-json-comments": "~2.0.1"
+ },
+ "dependencies": {
+ "strip-json-comments": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
+ }
+ }
+ },
"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==",
- "dev": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
@@ -4267,8 +5266,7 @@
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
- "dev": true
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
@@ -4332,8 +5330,7 @@
"safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
- "dev": true
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
},
"semver": {
"version": "7.3.5",
@@ -4353,6 +5350,29 @@
"randombytes": "^2.1.0"
}
},
+ "serialport": {
+ "version": "9.2.5",
+ "resolved": "https://registry.npmjs.org/serialport/-/serialport-9.2.5.tgz",
+ "integrity": "sha512-nsDsD2GN/43T2a8jQYr1HH76gmDZ575Ts8FOdcBRUY8ecaI16BPbXa612cPPkQjOfg28+KL5qtQL9c0vvTaidg==",
+ "requires": {
+ "@serialport/binding-mock": "9.2.4",
+ "@serialport/bindings": "9.2.5",
+ "@serialport/parser-byte-length": "9.2.4",
+ "@serialport/parser-cctalk": "9.2.4",
+ "@serialport/parser-delimiter": "9.2.4",
+ "@serialport/parser-inter-byte-timeout": "9.2.4",
+ "@serialport/parser-readline": "9.2.4",
+ "@serialport/parser-ready": "9.2.4",
+ "@serialport/parser-regex": "9.2.4",
+ "@serialport/stream": "9.2.4",
+ "debug": "^4.3.2"
+ }
+ },
+ "set-blocking": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
+ },
"setimmediate": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
@@ -4374,6 +5394,26 @@
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true
},
+ "signal-exit": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz",
+ "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ=="
+ },
+ "simple-concat": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
+ "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="
+ },
+ "simple-get": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz",
+ "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==",
+ "requires": {
+ "decompress-response": "^4.2.0",
+ "once": "^1.3.1",
+ "simple-concat": "^1.0.0"
+ }
+ },
"slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
@@ -4427,7 +5467,6 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
- "dev": true,
"requires": {
"safe-buffer": "~5.1.0"
},
@@ -4435,8 +5474,7 @@
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
- "dev": true
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
@@ -4509,6 +5547,41 @@
}
}
},
+ "tar-fs": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
+ "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
+ "requires": {
+ "chownr": "^1.1.1",
+ "mkdirp-classic": "^0.5.2",
+ "pump": "^3.0.0",
+ "tar-stream": "^2.1.4"
+ }
+ },
+ "tar-stream": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
+ "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
+ "requires": {
+ "bl": "^4.0.3",
+ "end-of-stream": "^1.4.1",
+ "fs-constants": "^1.0.0",
+ "inherits": "^2.0.3",
+ "readable-stream": "^3.1.1"
+ },
+ "dependencies": {
+ "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==",
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ }
+ }
+ },
"text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@@ -4545,6 +5618,14 @@
"tslib": "^1.8.1"
}
},
+ "tunnel-agent": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
+ "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
+ "requires": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
"type-check": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
@@ -4596,8 +5677,7 @@
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
- "dev": true
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"v8-compile-cache": {
"version": "2.3.0",
@@ -4630,7 +5710,6 @@
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
- "dev": true,
"requires": {
"string-width": "^1.0.2 || 2"
},
@@ -4638,20 +5717,17 @@
"ansi-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
- "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
- "dev": true
+ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
- "dev": true
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"string-width": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
- "dev": true,
"requires": {
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^4.0.0"
@@ -4661,7 +5737,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
- "dev": true,
"requires": {
"ansi-regex": "^3.0.0"
}
@@ -4720,8 +5795,7 @@
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
- "dev": true
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"y18n": {
"version": "5.0.8",
diff --git a/package.json b/package.json
index 0c54c41..5e3c59d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,7 @@
{
"name": "mind-reader",
"displayName": "Mind_Reader",
+ "repository": "https://github.com/SingleSemesterSnobs/Mind_Reader",
"description": "",
"version": "0.0.1",
"engines": {
@@ -63,7 +64,6 @@
"command": "mind-reader.runLineContext",
"title": "Run Line Context"
},
-
{
"command": "mind-reader.runCursorContext",
"title": "Run Cursor Context"
@@ -71,128 +71,134 @@
{
"command": "mind-reader.getIndent",
"title": "Get Line Indentation"
+ },
+ {
+ "command": "mind-reader.connectHub",
+ "title": "Connect LEGO Hub"
+ },
+ {
+ "command": "mind-reader.disconnectHub",
+ "title": "Disconnect LEGO Hub"
+ },
+ {
+ "command": "mind-reader.uploadCurrentFile",
+ "title": "Upload current file to LEGO Hub"
+ },
+ {
+ "command": "mind-reader.runProgram",
+ "title": "Run a program from the LEGO Hub"
+ },
+ {
+ "command": "mind-reader.stopExecution",
+ "title": "Stop running program on the LEGO Hub"
+ },
+ {
+ "command": "mind-reader.deleteProgram",
+ "title": "Delete a program from the LEGO Hub"
}
-
],
- "keybindings": [
- {
- "command": "mind-reader.decreaseFontScale",
- "key": "numpad_subtract",
- "mac": "d"
- },
-
- {
- "command": "mind-reader.increaseFontScale",
- "key": "numpad_add",
- "mac": "[NumpadAdd]"
- },
-
- {
- "command": "mind-reader.increaseEditorScale",
- "key": "shift+numpad_add",
+ "keybindings": [
+ {
+ "command": "mind-reader.decreaseFontScale",
+ "key": "numpad_subtract",
+ "mac": "d"
+ },
+ {
+ "command": "mind-reader.increaseFontScale",
+ "key": "numpad_add",
+ "mac": "[NumpadAdd]"
+ },
+ {
+ "command": "mind-reader.increaseEditorScale",
+ "key": "shift+numpad_add",
"mac": "Shift+[NumpadAdd]"
- },
-
- {
- "command": "mind-reader.decreaseEditorScale",
- "key": "shift+numpad_subtract",
- "mac": "Shift+[NumpadSubtract]"
- },
-
- {
- "command": "mind-reader.resetEditorScale",
- "key": "shift+enter",
- "mac": "Shift+[Enter]"
- },
-
+ },
+ {
+ "command": "mind-reader.decreaseEditorScale",
+ "key": "shift+numpad_subtract",
+ "mac": "Shift+[NumpadSubtract]"
+ },
+ {
+ "command": "mind-reader.resetEditorScale",
+ "key": "shift+enter",
+ "mac": "Shift+[Enter]"
+ },
{
"command": "mind-reader.showAllSymbols",
"key": "Ctrl+T",
"mac": "Cmd+[KeyT]"
},
-
{
"command": "mind-reader.gotoLine",
"key": "CTRL+G",
"mac": "Cmd+[KeyG]"
},
-
{
"command": "mind-reader.quickOpen",
"key": "CTRL+P",
"mac": "Cmd+[KeyP]"
- },
-
+ },
{
"command": "mind-reader.gotoSymbol",
"key": "Ctrl+Shift+O",
"mac": "Cmd+Shift+[KeyO]"
},
-
{
"command": "mind-reader.showProblems",
"key": "Ctrl+Shift+M",
"mac": "Cmd+Shift+[KeyM]"
},
-
{
"command": "mind-reader.nextInFiles",
"key": "F8",
"mac": "[F8]"
},
-
{
"command": "mind-reader.prevInFiles",
"key": "Shift+F8",
"mac": "Shift+[F8]"
},
-
{
"command": "mind-reader.quickOpenPreviousRecentlyUsedEditorInGroup",
"key": "Ctrl+Tab",
"mac": "Cmd+[Tab]"
},
-
{
"command": "mind-reader.navigateBack",
"key": "Ctrl+Alt+-",
"mac": "Cmd+Alt+[Minus]"
},
-
{
- "command": "mind-reader.getuickInputBack",
+ "command": "mind-reader.getQuickInputBack",
"key": "Ctrl+Alt+-",
"mac": "Cmd+Alt+[Minus]"
},
-
{
"command": "mind-reader.navigateForward",
"key": "Ctrl+Shift+-",
"mac": "Cmd+Shift+[Minus]"
},
-
{
"command": "mind-reader.selectTheme",
"key": "Ctrl+Shift+1",
"mac": "Cmd+Shift+[Digit1]"
},
-
{
"command": "mind-reader.getIndent",
"key": "Shift+Tab",
"mac": "Shift+[Tab]"
},
- {
- "command": "mind-reader.openKeyBindWin",
- "key": "Ctrl+Shift+8",
- "mac": "Cmd+Shift+8"
- },
- {
- "command": "mind-reader.openKeyBindMac",
- "key": "Ctrl+Shift+9",
- "mac": "Cmd+Shift+9"
- }
- ],
+ {
+ "command": "mind-reader.openKeyBindWin",
+ "key": "Ctrl+Shift+8",
+ "mac": "Cmd+Shift+8"
+ },
+ {
+ "command": "mind-reader.openKeyBindMac",
+ "key": "Ctrl+Shift+9",
+ "mac": "Cmd+Shift+9"
+ }
+ ],
"menus": {
"editor/context": [
{
@@ -251,7 +257,6 @@
"group": "mind-reader",
"when": "activeEditor"
}
-
]
},
"submenus": [
@@ -263,20 +268,20 @@
"configuration": {
"title": "Mind_Reader",
"properties": {
- "mindreader.productType": {
+ "mindReader.productType": {
"type": "string",
"description": "Specifies the LEGO® product.",
- "default": "MINDSTORMS® EV3",
+ "default": "MINDSTORMS EV3",
"enum": [
- "MINDSTORMS® EV3",
- "SPIKE™ Prime"
+ "MINDSTORMS EV3",
+ "SPIKE Prime"
],
"enumDescriptions": [
"LEGO® MINDSTORMS® EV3 (31313)",
"LEGO® Education SPIKE™ Prime Set (45678)"
]
},
- "mindreader.reader.screenReader": {
+ "mindReader.reader.screenReader": {
"type": "string",
"description": "Specifies which screen reader to optimize for.",
"default": "NVDA",
@@ -291,41 +296,47 @@
"Apple VoiceOver (macOS)"
]
},
- "mindreader.reader.contextWindow": {
+ "mindReader.reader.contextWindow": {
"type": "number",
"description": "The number of words around the cursor to use when reading the cursor context",
"default": 1
},
- "mindreader.connection.connectAutomatically": {
- "type": "boolean",
- "description": "Specifies whether to try to automatically detect and communicate with a connected Hub.",
- "default": "true"
- },
- "mindreader.connection.portPath": {
+ "mindReader.connection.portPath": {
"type": "string",
- "markdownDescription": "Specifies the serial port path to use if `#mindreader.connectAutomatically#` is not set."
+ "markdownDescription": "Specifies the serial port path to use if `#mindReader.connectAutomatically#` is not set."
+ },
+ "mindReader.connection.clearOutputOnRun": {
+ "type": "boolean",
+ "description": "Whether to clear the output each time the program is run",
+ "default": "true"
}
}
},
- "views": {
- "accessActions": [
- {
- "id": "accessActions",
- "name": "Access Actions",
- "icon": "media/dep.svg",
- "contextualTitle": "Accessibility Menu Actions"
- }
- ]
- },
- "viewsContainers": {
- "activitybar": [
- {
- "id": "accessActions",
- "title": "Access Actions",
- "icon": "media/dep.svg"
- }
- ]
- }
+ "views": {
+ "MindReader": [
+ {
+ "id": "accessActions",
+ "name": "Access Actions",
+ "icon": "media/dep.svg",
+ "contextualTitle": "Accessibility Menu Actions"
+ },
+ {
+ "id": "hubActions",
+ "name": "Hub Actions",
+ "icon": "media/dep.svg",
+ "contextualTitle": "Hub Connection Actions"
+ }
+ ]
+ },
+ "viewsContainers": {
+ "activitybar": [
+ {
+ "id": "MindReader",
+ "title": "MindReader Actions",
+ "icon": "media/dep.svg"
+ }
+ ]
+ }
},
"scripts": {
"vscode:prepublish": "npm run compile",
@@ -336,17 +347,21 @@
"test": "node ./out/test/runTest.js"
},
"devDependencies": {
- "@types/vscode": "^1.60.0",
"@types/glob": "^7.1.3",
"@types/mocha": "^8.2.2",
- "@types/node": "14.x",
- "eslint": "^7.27.0",
+ "@types/node": "16.x",
+ "@types/serialport": "^8.0.2",
+ "@types/vscode": "^1.60.0",
"@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.0",
+ "@vscode/test-electron": "^1.6.2",
+ "eslint": "^7.27.0",
"glob": "^7.1.7",
"mocha": "^8.4.0",
"typescript": "^4.3.2",
- "vscode-test": "^1.5.2",
- "@vscode/test-electron": "^1.6.2"
+ "vscode-test": "^1.5.2"
+ },
+ "dependencies": {
+ "serialport": "^9.2.5"
}
}
diff --git a/src/commandNodeProvider.ts b/src/commandNodeProvider.ts
new file mode 100644
index 0000000..3d90c0e
--- /dev/null
+++ b/src/commandNodeProvider.ts
@@ -0,0 +1,43 @@
+import * as vscode from 'vscode';
+
+import { CommandEntry } from './commands';
+
+export class CommandItem extends vscode.TreeItem {
+ constructor(
+ public readonly label: string,
+ public readonly command: vscode.Command
+ ) {
+ super(label, vscode.TreeItemCollapsibleState.None);
+ }
+};
+
+export default class CommandNodeProvider implements vscode.TreeDataProvider {
+ private items: CommandItem[] = [];
+
+ public constructor(commands: CommandEntry[]) {
+ // build and cache command items
+ for (const c of commands) {
+ let humanReadable = c.name.replace(/^mind-reader\./, ''); // strip extensions name
+ // Convert camelCaseText to Title Case Text
+ humanReadable = humanReadable.replace(/([A-Z])/g, ' $1');
+ humanReadable = humanReadable.charAt(0).toUpperCase() + humanReadable.slice(1);
+
+ this.items.push(new CommandItem(
+ humanReadable,
+ {
+ title: humanReadable,
+ command: c.name,
+ tooltip: humanReadable
+ }
+ ));
+ }
+ }
+
+ public getTreeItem(item: CommandItem): vscode.TreeItem {
+ return item;
+ }
+
+ public async getChildren(): Promise {
+ return Promise.resolve(this.items);
+ }
+}
diff --git a/src/commands.ts b/src/commands.ts
index 64aa0c9..4aa8b0c 100644
--- a/src/commands.ts
+++ b/src/commands.ts
@@ -1,19 +1,22 @@
import * as vscode from 'vscode';
import * as pl from './pylex';
+import * as path from 'path';
import * as fs from 'fs';
+import HubManager from './hubManager';
+
/**
* @type {Object} Command // Command to register with the VS Code Extension API
* @prop {string} command // Name of the command; e.g., 'mind-reader.selectTheme'
* @prop {callback} callback // Callback to register when `command` is invoked
*/
-type Command = {
+export type CommandEntry = {
name: string,
callback: () => void
};
-// The list of commands to register in the extension
-const commands: Command[] = [
+// Accessibility Commands
+export const accessCommands: CommandEntry[] = [
{
name: 'mind-reader.selectTheme',
@@ -51,6 +54,23 @@ const commands: Command[] = [
callback: resetEditorScale,
},
+ {
+ name: 'mind-reader.getIndent',
+ callback: getIndent,
+ },
+
+ {
+ name: 'mind-reader.runLineContext',
+ callback: runLineContext,
+ },
+
+ {
+ name: 'mind-reader.runCursorContext',
+ callback: runCursorContext
+ }
+];
+
+export const navCommands: CommandEntry[] = [
{
name: 'mind-reader.openWebview',
callback: openWebview,
@@ -117,7 +137,7 @@ const commands: Command[] = [
},
{
- name: 'mind-reader.getuickInputBack',
+ name: 'mind-reader.getQuickInputBack',
callback: () => vscode.commands.executeCommand('workbench.action.quickInputBack'),
},
@@ -125,18 +145,38 @@ const commands: Command[] = [
name: 'mind-reader.navigateForward',
callback: () => vscode.commands.executeCommand('workbench.action.navigateForward'),
},
+];
+
+export const hubCommands: CommandEntry[] = [
{
- name: 'mind-reader.runLineContext',
- callback: runLineContext,
+ name: 'mind-reader.connectHub',
+ callback: connectHub
},
+
{
- name: 'mind-reader.runCursorContext',
- callback: runCursorContext
+ name: 'mind-reader.disconnectHub',
+ callback: disconnectHub
},
+
{
- name: 'mind-reader.getIndent',
- callback: getIndent
- }
+ name: 'mind-reader.uploadCurrentFile',
+ callback: uploadCurrentFile
+ },
+
+ {
+ name: 'mind-reader.runProgram',
+ callback: runProgram
+ },
+
+ {
+ name: 'mind-reader.stopExecution',
+ callback: stopExecution
+ },
+
+ {
+ name: 'mind-reader.deleteProgram',
+ callback: deleteProgram
+ },
];
// COMMAND CALLBACK IMPLEMENTATIONS
@@ -278,17 +318,17 @@ function createContextString(context: pl.LexNode[], line: number): string {
}
// find up to `n` words around the cursor, where `n` is
-// the value of `#mindreader.reader.contextWindow`
+// the value of `#mindReader.reader.contextWindow`
function runCursorContext(): void {
let editor = vscode.window.activeTextEditor;
if (!editor) {
- vscode.window.showErrorMessage("RunCursorContext: No Active Editor");
+ vscode.window.showErrorMessage('RunCursorContext: No Active Editor');
return;
}
const cursorPos: vscode.Position = editor.selection.active;
const text: string = editor.document.lineAt(cursorPos).text;
- const windowSize: number = vscode.workspace.getConfiguration('mindreader').get('reader.contextWindow')!;
+ const windowSize: number = vscode.workspace.getConfiguration('mindReader').get('reader.contextWindow')!;
let trimmedText = text.trimStart(); // trim leading whitespace
let leadingWS = text.length - trimmedText.length; // # of characters of leading whitespace
@@ -343,4 +383,140 @@ function runCursorContext(): void {
}
}
-export default commands;
+// Current connected hub
+let hub: HubManager | null = null;
+
+// TODO: port option
+async function connectHub(): Promise {
+ if (hub) {
+ vscode.window.showWarningMessage('LEGO Hub is already connected, reconnecting...');
+ disconnectHub();
+ }
+
+ try {
+ const ports = await HubManager.queryPorts();
+
+ if (ports.length === 0) {
+ vscode.window.showErrorMessage('No ports found. Is the LEGO Hub connected?');
+ return;
+ }
+
+ let portPath: string | undefined = vscode.workspace.getConfiguration('mindReader.connection').get('portPath');
+
+ if (!portPath) {
+ let slots: vscode.QuickPickItem[] = [];
+ for (const port of ports) {
+ slots.push({ label: port.path });
+ }
+
+ let picked = await vscode.window.showQuickPick(slots);
+
+ if (!picked) {
+ return;
+ }
+
+ portPath = picked.label;
+ }
+ hub = await HubManager.create(portPath);
+ vscode.window.showInformationMessage('LEGO Hub connected');
+ } catch (err) {
+ vscode.window.showErrorMessage('Could not connect to LEGO Hub');
+ }
+}
+
+async function disconnectHub(): Promise {
+ if (!hub || !hub.isOpen()) {
+ vscode.window.showErrorMessage('LEGO Hub is not connected');
+ return;
+ }
+
+ await hub.close();
+ hub = null;
+ vscode.window.showInformationMessage('LEGO Hub disconnected');
+}
+
+async function uploadCurrentFile(): Promise {
+ if (!hub || !hub.isOpen()) {
+ vscode.window.showErrorMessage('LEGO Hub is not connected!');
+ return;
+ }
+
+ if (!vscode.window.activeTextEditor) {
+ vscode.window.showErrorMessage('No active text editor');
+ return;
+ }
+
+ const currentFilePath = vscode.window.activeTextEditor.document.fileName;
+
+ if (currentFilePath) {
+ // construct quickpick
+ const slots: vscode.QuickPickItem[] = [];
+ for (let i = 0; i < 10; i++) {
+ slots.push({ label: i.toString() });
+ }
+ const slotID = await vscode.window.showQuickPick(slots, { canPickMany: false });
+
+ if (!slotID) {
+ return;
+ }
+
+ // TODO: progress bar?
+ vscode.window.showInformationMessage('Uploading current file');
+ await hub.uploadFile(currentFilePath, parseInt(slotID.label), path.basename(currentFilePath));
+ vscode.window.showInformationMessage(path.basename(currentFilePath) + ' uploaded to slot ' + slotID.label);
+ }
+}
+
+// TODO: find empty slots
+async function runProgram(): Promise {
+ if (!hub || !hub.isOpen()) {
+ vscode.window.showErrorMessage('LEGO Hub is not connected!');
+ return;
+ }
+
+ const slots: vscode.QuickPickItem[] = [];
+ // construct quickpick
+ for (let i = 0; i < 10; i++) {
+ slots.push({ label: i.toString() });
+ }
+ const slotID = await vscode.window.showQuickPick(slots, { canPickMany: false });
+
+ if (!slotID) {
+ return;
+ }
+
+ vscode.window.showInformationMessage('Running program ' + slotID.label);
+ await hub.programExecute(parseInt(slotID.label));
+}
+
+async function stopExecution(): Promise {
+ if (!hub || !hub.isOpen()) {
+ vscode.window.showErrorMessage('LEGO Hub is not connected!');
+ return;
+ }
+
+ await hub.programTerminate();
+ vscode.window.showInformationMessage('Execution stopped');
+}
+
+// TODO: find slots from status
+async function deleteProgram(): Promise {
+ if (!hub || !hub.isOpen()) {
+ vscode.window.showErrorMessage('LEGO Hub is not connected!');
+ return;
+ }
+
+ const slots: vscode.QuickPickItem[] = [];
+ // construct quickpick
+ for (let i = 0; i < 10; i++) {
+ slots.push({ label: i.toString() });
+ }
+ const slotID = await vscode.window.showQuickPick(slots, { canPickMany: false });
+
+ if (!slotID) {
+ return;
+ }
+
+ await hub.deleteProgram(parseInt(slotID.label));
+ vscode.window.showInformationMessage('Deleted program ' + slotID.label);
+}
diff --git a/src/extension.ts b/src/extension.ts
index 1fece80..ebcdb92 100644
--- a/src/extension.ts
+++ b/src/extension.ts
@@ -1,20 +1,27 @@
import * as vscode from 'vscode';
-
import * as pl from './pylex';
-import commands from './commands';
-import AccessNodeProvider from './accessNodeProvider';
+import { accessCommands, hubCommands, navCommands } from './commands';
+
+import CommandNodeProvider from './commandNodeProvider';
+import Logger from './log';
+
+// Output Logger
+const product: string = vscode.workspace.getConfiguration('mindReader').get('productType')!;
+const outputChannel = vscode.window.createOutputChannel(product + " Output");
+export const logger = new Logger(outputChannel);
let parser: pl.Parser = new pl.Parser();
export function activate(context: vscode.ExtensionContext) {
- console.log('Congratulations, your extension "mind-reader" is now active!');
vscode.window.showInformationMessage('Mind_Reader is loaded!');
parser.parse('Beep Boop');
+ let allCommands = accessCommands.concat(hubCommands).concat(navCommands);
+
// Register Commands
- commands.forEach(command => {
+ allCommands.forEach(command => {
let disposable = vscode.commands.registerCommand(
command.name,
command.callback
@@ -22,9 +29,11 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(disposable);
});
- let provider = new AccessNodeProvider();
- vscode.window.registerTreeDataProvider('accessActions', provider);
+ let accessProvider = new CommandNodeProvider(accessCommands);
+ vscode.window.registerTreeDataProvider('accessActions', accessProvider);
+ let hubProvider = new CommandNodeProvider(hubCommands);
+ vscode.window.registerTreeDataProvider('hubActions', hubProvider);
}
export function deactivate() {}
diff --git a/src/hubManager.ts b/src/hubManager.ts
new file mode 100644
index 0000000..0bf29a1
--- /dev/null
+++ b/src/hubManager.ts
@@ -0,0 +1,391 @@
+import * as SerialPort from 'serialport';
+import * as fs from 'fs';
+
+import { logger } from './extension';
+
+/**
+ * @type RPCRequest an RPC request message
+ *
+ * @prop {string} `'m'` method to invoke.
+ * @prop {Object?} `'p'` optional parameters for method.
+ * @prop {string|null?} `'i'` optional request ID.
+ */
+type RPCRequest = {
+ 'm': string;
+ 'p'?: Object;
+ 'i'?: string;
+};
+
+/**
+ * @type RPCResponse an RPC response message
+ *
+ * @prop {any?} `'r'` RPC response body
+ * @prop {Object?} `'e'` RPC error body
+ * @prop {string|null} `'i'` required response ID.
+ */
+type RPCResponse = {
+ 'r'?: any;
+ 'e'?: Object;
+ 'i': string | null;
+};
+
+/**
+ * Manages sending and receiving of JSON Remote Procedure Call (JSON-RPC) protocol messages
+ * to the Hub.
+ */
+export default class HubManager {
+ private port: SerialPort;
+ private receiveBuffer: string = ''; // buffer for in-flight messages
+ private pendingRequests = new Map void, (error: string) => void]>(); // lists of requests that are still pending
+
+ // ======================== INSTANCE METHODS ========================
+
+ /**
+ * Private constructor, use static `create` + `init`
+ */
+ private constructor(public portPath: string) { }
+
+ public isOpen(): boolean {
+ return this.port.isOpen;
+ }
+
+ /**
+ * Handle a received data chunk from the serial port
+ *
+ * @param `data` Data received from serial port
+ */
+ private async receiveData(data: string) {
+ // add data to buffer
+ this.receiveBuffer += data;
+
+ // get full lines in buffer
+
+ let msgs = this.receiveBuffer.split(/\r/); // split by newline
+ this.receiveBuffer = msgs.pop()!; // store unhandled data
+
+ msgs = msgs.filter(x => !x.startsWith('{"m":0,"p":')); // drop sensor broadcast response spam
+
+ for (const msg of msgs) {
+ // check if this msg is a response to a pending request
+ try {
+ let json: { [key: string]: any };
+
+ json = JSON.parse(msg);
+
+ let id = json['i'];
+ if (id && this.pendingRequests.has(id)) {
+ // a request is waiting on this response
+ let [resolve, reject] = this.pendingRequests.get(id) ?? [];
+
+ if (json['e'] && reject) {
+ // error
+ reject(Buffer.from(json['e'], 'base64').toString());
+ } else if (resolve) {
+ resolve(json['r']);
+ }
+
+ this.pendingRequests.delete(id);
+ } else if (json['m']) {
+ // Print errors
+ const params = json['p'];
+ switch (json['m']) {
+ case 'user_program_error':
+ logger.error(Buffer.from(params[3], 'base64').toString());
+ logger.error(Buffer.from(params[4], 'base64').toString());
+ break;
+ case 'runtime_error':
+ logger.error(Buffer.from(params[3], 'base64').toString());
+ break;
+ }
+ }
+ } catch (err) {
+ console.log('Could not parse JSON:', msg);
+ }
+ }
+ }
+
+ /**
+ * Initializes a created HubManager with the current option settings
+ */
+ public async init(): Promise {
+ try {
+ this.port = new SerialPort(
+ this.portPath,
+ {
+ autoOpen: true,
+ baudRate: 112500,
+ }
+ );
+ } catch (err) {
+ // error during port opening
+ throw err;
+ }
+
+ this.port.setEncoding('utf-8');
+
+ // push lines received to data queue
+
+ let mgr = this;
+ this.port.on('data', data => {
+ mgr.receiveData(data);
+ });
+ }
+
+ public async close(): Promise {
+ this.port.close(console.error);
+ }
+
+ /**
+ * Send an RPC message. The corresponding Promise resolve
+ * is saved into the `pendingRequests` map. When an inbound
+ * message is found that matches an ID in `pendingRequests`,
+ * the corresponding resolve is called. So, even though
+ * the `resolve` call does not appear explicitly here, it *does*
+ * get resolved at the appropriate time.
+ *
+ * @param `proc` Procedure to execute
+ * @param `params` Optional parameters for the procedure
+ * @param `id` The ID to use for the RPC message. Use null to indicate no ID/notification message.
+ * If neither a string or `null` is passed, an ID is automatically generated.
+ */
+ public async send(request: RPCRequest): Promise {
+ return new Promise((resolve, reject) => {
+ if (request['i'] === undefined) {
+ // generate an ID
+ request['i'] = 'mind-reader-' + HubManager.randomID();
+ }
+
+ // write JSON to port
+
+ this.pendingRequests.set(request['i'], [resolve, reject]);
+ this.port.write(JSON.stringify(request));
+ this.port.write('\r');
+ this.port.drain();
+ });
+ }
+
+ public async uploadFile(file: string, slotid: number, name?: string, autoStart: boolean = false) {
+ const fileStats = fs.statSync(file);
+ name = name || file;
+
+ const ack: {[key: string]: any} = await this.startWriteProgram(
+ name,
+ fileStats.size,
+ slotid,
+ fileStats.birthtime.getTime(),
+ fileStats.mtime.getTime()
+ );
+
+ const blockSize = ack.blocksize;
+ const transferid = ack.transferid;
+
+ let dataStream = fs.createReadStream(file, { highWaterMark: blockSize });
+ for await (const data of dataStream) {
+ await this.writePackage(data, transferid);
+ }
+
+ if (autoStart) {
+ return Promise.resolve(await this.programExecute(slotid));
+ }
+ }
+
+ // ========================= Hub Methods =========================
+ //
+ // These methods each handle a single RPC method's communication.
+
+ /**
+ * Execute a program that is saved on the hub
+ *
+ * @param `slotid` Slot ID of the program to run
+ */
+ public async programExecute(slotid: number): Promise {
+ return new Promise(async (resolve) => {
+ let response = await this.send({
+ 'm': 'program_execute',
+ 'p': {
+ 'slotid': slotid
+ }
+ });
+
+
+ resolve(response);
+ });
+ }
+
+ /**
+ * Terminate a currently running program
+ */
+ public async programTerminate(): Promise {
+ return Promise.resolve(
+ await this.send({ 'm': 'program_terminate' })
+ );
+ }
+
+ /**
+ * Get the storage status of the hub
+ *
+ * TODO: fill with actual example
+ * slot
+ * decoded name
+ * size
+ * last modified
+ * project_id
+ * type
+ */
+ public async getStorageStatus(): Promise {
+ return Promise.resolve(
+ await this.send({ 'm': 'get_storage_status' })
+ );
+ }
+
+ /**
+ * Notify the Hub that a program write is about to occur.
+ *
+ * @param `name` Name of the program.
+ * @param `name` Size of the program TODO: in bytes?
+ * @param `slotID` Slot ID to write the program to
+ * @param `created` Creation timestamp
+ * @param `modified` Modified timestamp
+ */
+ public async startWriteProgram(
+ name: string,
+ size: number,
+ slotID: number,
+ created: number,
+ modified: number
+ ): Promise {
+ // file meta data
+ let stat = {
+ 'created': created,
+ 'modified': modified,
+ 'name': name,
+ 'type': 'python', // always python
+ // eslint-disable-next-line @typescript-eslint/naming-convention
+ 'project_id': HubManager.randomID(16),
+ };
+
+ return Promise.resolve(
+ await this.send({
+ 'm': 'start_write_program',
+ 'p': {
+ 'slotid': slotID,
+ 'size': size,
+ 'meta': stat
+ }
+ })
+ );
+ }
+
+ /**
+ * Write a package chunk of a file
+ *
+ * @param `data` Chunk of data to write
+ * @param `transferID` The transfer id for the current transfer
+ */
+ public async writePackage(data: string, transferID: string): Promise {
+ return Promise.resolve(
+ await this.send({
+ 'm': 'write_package',
+ 'p': {
+ 'data': Buffer.from(data, 'utf-8').toString('base64'),
+ 'transferid': transferID
+ }
+ })
+ );
+ }
+
+ /**
+ * Move a program from slot `fromSlot` to slot `toSlot`.
+ * TODO: verify
+ * If the destination already has a program stored in it, the two programs
+ * are swapped
+ *
+ * @param `fromSlot` slot to move from
+ * @param `toSlot` slot to move to
+ */
+ public async moveProgram(oldSlotID: number, newSlotID: number) {
+ return Promise.resolve(
+ await this.send({
+ 'm': 'move_project',
+ 'p': {
+ // eslint-disable-next-line @typescript-eslint/naming-convention
+ 'old_slotid': oldSlotID,
+ // eslint-disable-next-line @typescript-eslint/naming-convention
+ 'new_slotid': newSlotID
+ }
+ })
+ );
+ }
+
+ /**
+ * Delete a program from the slot on the Hub
+ *
+ * @param `slotID` the slot to delete
+ */
+ public async deleteProgram(slotID: number) {
+ return Promise.resolve(
+ await this.send({
+ 'm': 'remove_project',
+ 'p': {
+ 'slotid': slotID
+ }
+ })
+ );
+ }
+
+ /**
+ * Get firmware info for the connected device
+ */
+ public async getHubInfo() {
+ return Promise.resolve(
+ await this.send({
+ 'm': 'get_hub_info'
+ })
+ );
+ }
+
+ // ======================== INSTANCE METHODS ========================
+
+ public static async create(portPath: string): Promise {
+ return new Promise(async (resolve) => {
+ try {
+ let mgr = new HubManager(portPath);
+ await mgr.init();
+
+ return resolve(mgr);
+ } catch (err) {
+
+ // could not connect to port
+ throw err;
+ }
+
+ });
+ }
+
+ /**
+ * Returns a list of serial devices
+ */
+ public static async queryPorts() {
+ // get all ports
+ let ports = await SerialPort.list();
+
+ // filter by manufacturer
+ return Promise.resolve(ports);
+ }
+
+ /**
+ * Generate a random identifier consisting of lowercase
+ * letters, numbers, and underscores
+ *
+ * @param `len` The length of the string to generate
+ */
+ static randomID(len: number = 4): string {
+ let result = '';
+ let characters = 'abcdefghijklmnopqrstuvwxyz0123456789_';
+ for (let i = 0; i < len; i++) {
+ result += characters[Math.floor(Math.random() * characters.length)];
+ }
+
+ return result;
+ };
+}
diff --git a/src/log.ts b/src/log.ts
new file mode 100644
index 0000000..a774776
--- /dev/null
+++ b/src/log.ts
@@ -0,0 +1,23 @@
+import * as vscode from 'vscode';
+
+export default class Logger {
+ constructor(
+ public readonly outputChannel: vscode.OutputChannel
+ ) { }
+
+ public log(text: string): void {
+ this.outputChannel.appendLine(text);
+ }
+
+ public info(text: string): void {
+ this.outputChannel.appendLine('[INFO]\r' + text);
+ }
+
+ public warn(text: string): void {
+ this.outputChannel.appendLine('[WARNING]\r' + text);
+ }
+
+ public error(text: string): void {
+ this.outputChannel.appendLine('[ERROR]\r' + text);
+ }
+}