Switched from grpc to @grpc/grpc-js.

This change is required to be able to support ARM arch
in the future.

 - Fixed the download links for armv7l Linux.
 - Checked in the generated code. [grpc/grpc-node#1497]
 - Made the code generation a manual step.
 - Made the `grpc-tools` dependency optional.
 - From now on, the serial port regex is case-insensitive.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta
2020-07-08 16:09:49 +02:00
parent 68f95ae5b4
commit 0942ef6450
49 changed files with 26325 additions and 172 deletions

View File

@@ -142,7 +142,7 @@ export namespace Port {
}
if (isOSX) {
// Example: `/dev/cu.usbmodem14401`
if (/(tty|cu)\..*/.test(address.substring('/dev/'.length))) {
if (/(tty|cu)\..*/i.test(address.substring('/dev/'.length))) {
return [
'/dev/cu.MALS',
'/dev/cu.SOC',
@@ -152,7 +152,7 @@ export namespace Port {
}
// Example: `/dev/ttyACM0`
if (/(ttyS|ttyUSB|ttyACM|ttyAMA|rfcomm|ttyO)[0-9]{1,3}/.test(address.substring('/dev/'.length))) {
if (/(ttyS|ttyUSB|ttyACM|ttyAMA|rfcomm|ttyO)[0-9]{1,3}/i.test(address.substring('/dev/'.length))) {
// Default ports were `/dev/ttyS0` -> `/dev/ttyS31` on Ubuntu 16.04.2.
if (address.startsWith('/dev/ttyS')) {
const index = Number.parseInt(address.substring('/dev/ttyS'.length), 10);