diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..b58b603fea78041071d125a30db58d79b3d49217
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,5 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
diff --git a/.idea/Arduino-Iot.iml b/.idea/Arduino-Iot.iml
new file mode 100644
index 0000000000000000000000000000000000000000..0c8867d7e175f46d4bcd66698ac13f4ca00cf592
--- /dev/null
+++ b/.idea/Arduino-Iot.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000000000000000000000000000000000000..4f6b5b292535c8d06151873909fc4c45dab18198
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000000000000000000000000000000000000..94a25f7f4cb416c083d265558da75d457237d671
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/chute.ino b/chute/chute.ino
similarity index 75%
rename from chute.ino
rename to chute/chute.ino
index 88e7abcaa402b4c8fe8398f4c27426fcd652162a..87ec5c0cd5d15e57f247d8d49c0f5c6def32150f 100644
--- a/chute.ino
+++ b/chute/chute.ino
@@ -1,3 +1,5 @@
+#define LED_PIN 9
+
const int xInput = A0;
const int yInput = A1;
const int zInput = A2;
@@ -12,11 +14,16 @@ const int sampleSize = 10;
void setup()
{
analogReference(EXTERNAL);
+ pinMode( LED_PIN, OUTPUT );
Serial.begin(9600);
}
void loop()
{
+
+
+
+
//Read raw values
int xRaw = ReadAxis(xInput);
int yRaw = ReadAxis(yInput);
@@ -32,26 +39,16 @@ void loop()
float yAccel = yScaled / 1000.0;
float zAccel = zScaled / 1000.0;
- Serial.print("X, Y, Z :: ");
- Serial.print(xRaw);
- Serial.print(", ");
- Serial.print(yRaw);
- Serial.print(", ");
- Serial.print(zRaw);
- Serial.print(" :: ");
- Serial.print(xAccel);
- Serial.print("G, ");
- Serial.print(yAccel);
- Serial.print("G, ");
- Serial.print(zAccel);
- Serial.println("G");
-
-
if (detectChute(xAccel, yAccel, zAccel)) {
- enregistrementData();
+ Serial.println("Down");
+ delay(200);
+ digitalWrite( LED_PIN, HIGH );
+ delay(2000);
+ digitalWrite( LED_PIN, LOW );
+
}
+
- delay(200);
}
// Take samples and return the average
@@ -72,11 +69,3 @@ int ReadAxis(int axisPin)
bool detectChute(float x,float y,float z){
return abs(x) < 0.3 && abs(y) < 0.3 && abs(z) <0.3;
}
-
-void enregistrementData() {
-
-}
-
-
-A
-
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000000000000000000000000000000000000..e31cc7ce2feace9354a6ccd9392de0bde1890c05
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,40 @@
+version: "3"
+services:
+ server:
+ build: ./server
+ devices:
+ - "/dev/ttyACM0:/dev/ttyACM0"
+ ports:
+ - "8080:8080"
+ depends_on:
+ - mongodb
+ interface_web:
+ build: ./interface_web
+ ports:
+ - "3000:3000"
+ mongodb:
+ image: mongo
+ ports:
+ - '27017:27017'
+ environment:
+ - MONGO_INITDB_ROOT_USERNAME=admin
+ - MONGO_INITDB_ROOT_PASSWORD=password
+ volumes:
+ - mongo-data:/data/db
+
+ mongo-express:
+ image: mongo-express
+ restart: always
+ ports:
+ - '8082:8081'
+ environment:
+ - ME_CONFIG_MONGODB_ADMINUSERNAME=admin
+ - ME_CONFIG_MONGODB_ADMINPASSWORD=password
+ - ME_CONFIG_MONGODB_SERVER=mongodb
+ volumes:
+ - mongo-data
+ depends_on:
+ - mongodb
+
+volumes:
+ mongo-data:
diff --git a/interface_web/.dockerignore b/interface_web/.dockerignore
new file mode 100644
index 0000000000000000000000000000000000000000..30bc1627986aa5d1e6aebc1718de71eaee6021c5
--- /dev/null
+++ b/interface_web/.dockerignore
@@ -0,0 +1 @@
+/node_modules
\ No newline at end of file
diff --git a/interface_web/Dockerfile b/interface_web/Dockerfile
new file mode 100644
index 0000000000000000000000000000000000000000..f28f5cf3039f6cffe9fd77c8c7baeabd22f9d35c
--- /dev/null
+++ b/interface_web/Dockerfile
@@ -0,0 +1,11 @@
+FROM node:17-alpine3.14
+
+WORKDIR /app
+COPY package.json ./
+COPY package-lock.json ./
+RUN npm install
+COPY . ./
+
+EXPOSE 3000
+
+CMD ["npm","start"]
diff --git a/interface_web/src/App.js b/interface_web/src/App.js
index bbc7456c41d1752c1da2e1b0ddc2a33d788d8fae..8c1628a2e4482357fcd6c80feccc71cfd4ae6b02 100644
--- a/interface_web/src/App.js
+++ b/interface_web/src/App.js
@@ -1,8 +1,7 @@
-import React, {useState, useRef, useEffect} from 'react';
+import React, {useState, useRef, useEffect, useMemo} from 'react';
import {Button, Stack} from "react-bootstrap";
import 'bootstrap/dist/css/bootstrap.min.css';
import './App.css';
-import client from './client_websocket';
import * as d3 from 'd3'
function App() {
@@ -13,11 +12,22 @@ function App() {
const donneesRef = useRef(donnees);
donneesRef.current = donnees;
+ let ws = useMemo(() => {
+ if(enregistre)
+ return new WebSocket('ws://127.0.0.1:8080')
+ },[enregistre]);
// Équivalent à componentDidMount plus componentDidUpdate :
useEffect(async () => {
if (enregistre) {
setText("Enregistrement en cours")
+ ws.onmessage = (event) => {
+ if (!isNaN(new Date(JSON.parse(e.data).date).getTime())) {
+ var object = {date : new Date(JSON.parse(e.data).date), valeur: 1};
+ donnees.push(object);
+ setDonnees([...donnees]);
+ }
+ }
} else {
setText("Les données ne sont pas enregistrées")
}
@@ -44,17 +54,6 @@ function App() {
svg.append(() => lineChart);
}
- // console.log(chart);
- // var svg = d3.select('#chart');
- // svg.append(chart);
- // svg.
- client.onmessage = function(e) {
- if (!isNaN(new Date(JSON.parse(e.data).date).getTime())) {
- var object = {date : new Date(JSON.parse(e.data).date), valeur: 1};
- donnees.push(object);
- setDonnees([...donnees]);
- }
- };
const timer = setTimeout(() => {
var object = {date : new Date(), valeur: 0};
donneesRef.current.push(object);
@@ -63,7 +62,14 @@ function App() {
window.addEventListener('resize', resizeLinearChart);
}, [donnees, svgRef]);
-
+ const handleClick= ()=> {
+ if(!enregistre)
+ setEnregistre(true);
+ else {
+ setEnregistre(false);
+ ws.close();
+ }
+ }
return (
<>
@@ -80,7 +86,7 @@ function App() {
{text}
{' '}
diff --git a/server/ .gitignore b/server/ .gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..30bc1627986aa5d1e6aebc1718de71eaee6021c5
--- /dev/null
+++ b/server/ .gitignore
@@ -0,0 +1 @@
+/node_modules
\ No newline at end of file
diff --git a/server/.dockerignore b/server/.dockerignore
new file mode 100644
index 0000000000000000000000000000000000000000..30bc1627986aa5d1e6aebc1718de71eaee6021c5
--- /dev/null
+++ b/server/.dockerignore
@@ -0,0 +1 @@
+/node_modules
\ No newline at end of file
diff --git a/server/ChuteModel.js b/server/ChuteModel.js
new file mode 100644
index 0000000000000000000000000000000000000000..9829e73f311378a5bdcf83c21c3dfef9c37fac72
--- /dev/null
+++ b/server/ChuteModel.js
@@ -0,0 +1,8 @@
+const mongoose = require('mongoose')
+const Schema = mongoose.Schema
+
+const ChuteModel = new Schema({
+ when : Date,
+ nb_chute : Number
+})
+module.exports = mongoose.model('ChuteModel', ChuteModel);
diff --git a/server/Dockerfile b/server/Dockerfile
new file mode 100644
index 0000000000000000000000000000000000000000..963fe4228bcc975f22c65520ace6e43bcd25c086
--- /dev/null
+++ b/server/Dockerfile
@@ -0,0 +1,10 @@
+FROM node:16
+
+WORKDIR /app
+COPY package.json ./
+COPY package-lock.json ./
+RUN npm install
+COPY . ./
+CMD ["node","index"]
+
+
diff --git a/server/SmsSender.js b/server/SmsSender.js
new file mode 100644
index 0000000000000000000000000000000000000000..27e973e113a6d15e040263b5a6310b6f009cc100
--- /dev/null
+++ b/server/SmsSender.js
@@ -0,0 +1,23 @@
+const Vonage = require('@vonage/server-sdk')
+
+const smsSender = new Vonage({
+ apiKey: "b0216415",
+ apiSecret: "Cp9wQAHA2DhxUVHi"
+})
+
+const smsError = (err, responseData) => {
+ if (err) {
+ console.log(err);
+ } else {
+ if(responseData.messages[0]['status'] === "0") {
+ console.log("Message sent successfully.");
+ } else {
+ console.log(`Message failed with error: ${responseData.messages[0]['error-text']}`);
+ }
+ }
+}
+
+module.exports = {
+ smsSender,
+ smsError
+}
diff --git a/server/index.js b/server/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..5af7c9d2b8b1a73ee95160683ed6f5920405501e
--- /dev/null
+++ b/server/index.js
@@ -0,0 +1,77 @@
+const SerialPortLib = require("serialport");
+const Readline = require("@serialport/parser-readline");
+const http = require("http"),
+ WebSocketServer = require("ws").Server,
+ port = 8080;
+const portArduino = new SerialPortLib("/dev/ttyACM0", {baudRate: 9600});
+const parser = portArduino.pipe(new Readline({delimiter: "\n"}));
+const mongoose = require('mongoose')
+const mongoClientOptions = {useNewUrlParser: true, useUnifiedTopology: true, dbName: 'my-app'};
+const ChuteModel = require('./ChuteModel');
+const {smsSender,smsError} = require('./SmsSender.js')
+const clients = [];
+mongoose.connect('mongodb://admin:password@localhost:27017', mongoClientOptions)
+ .then(res => console.log('connection Succesful'))
+ .catch(err => console.log(err))
+
+
+portArduino.on("open", async () => {
+ console.log("Serial port ouvert");
+
+});
+
+const from = "LI7WAAAAK"
+const to = "33766776336"
+const text = 'Test sms'
+
+
+const server = http.createServer();
+// create a WebSocket Server on top of the HTTP server to deal with the WebSocket protocol
+const wss = new WebSocketServer({
+ server,
+});
+
+wss.on("connection", (client) => {
+ console.log("Client connected");
+ clients.push(client);
+ // Register a listener on each message of each connection
+ client.on("message", (message) => {
+ console.log(message.toString());
+ console.log("message from");
+ });
+});
+
+const broadcast = (data) => {
+ clients.forEach(client => {
+ client.send(data);
+ })
+}
+
+parser.on("data", async (data) => {
+ try {
+
+ broadcast(JSON.stringify({data:new Date()}))
+ //smsSender.message.sendSms(from, to, text, smsError)
+ let now = new Date();
+ const response = await ChuteModel.findOne({when: now.toISOString().slice(0, 10)});
+ if (response) {
+ await ChuteModel.updateOne(
+ {_id: response.id},
+ {$set: {nb_chute : response.nb_chute+1}});
+ } else {
+ const response = new ChuteModel({
+ when: now.toISOString().slice(0, 10),
+ nb_chute: 1
+ }).save();
+ }
+ } catch (err) {
+ console.log('cannot add to the database')
+ }
+});
+
+// http sever starts listening on given host and port.
+server.listen(port, () => {
+ console.log(
+ "Listening on " + server.address().address + ":" + server.address().port
+ );
+});
\ No newline at end of file
diff --git a/server/node_modules/.bin/detect-libc b/server/node_modules/.bin/detect-libc
new file mode 120000
index 0000000000000000000000000000000000000000..b4c4b767414a7d0f63ba613d14bdbde5f38f4a75
--- /dev/null
+++ b/server/node_modules/.bin/detect-libc
@@ -0,0 +1 @@
+../detect-libc/bin/detect-libc.js
\ No newline at end of file
diff --git a/server/node_modules/.bin/is-ci b/server/node_modules/.bin/is-ci
new file mode 120000
index 0000000000000000000000000000000000000000..fe6aca6f50eb724e38ceb7c57313dd4d3c4162bf
--- /dev/null
+++ b/server/node_modules/.bin/is-ci
@@ -0,0 +1 @@
+../is-ci/bin.js
\ No newline at end of file
diff --git a/server/node_modules/.bin/mime b/server/node_modules/.bin/mime
new file mode 120000
index 0000000000000000000000000000000000000000..fbb7ee0eed8d1dd0fe3b5a9d6ff41d1c4f044675
--- /dev/null
+++ b/server/node_modules/.bin/mime
@@ -0,0 +1 @@
+../mime/cli.js
\ No newline at end of file
diff --git a/server/node_modules/.bin/nodemon b/server/node_modules/.bin/nodemon
new file mode 120000
index 0000000000000000000000000000000000000000..1056ddc18d199cd49957d382182a1a6400de3635
--- /dev/null
+++ b/server/node_modules/.bin/nodemon
@@ -0,0 +1 @@
+../nodemon/bin/nodemon.js
\ No newline at end of file
diff --git a/server/node_modules/.bin/nodetouch b/server/node_modules/.bin/nodetouch
new file mode 120000
index 0000000000000000000000000000000000000000..3409fdb788e9512fd8f04929e66d77f04f375ba8
--- /dev/null
+++ b/server/node_modules/.bin/nodetouch
@@ -0,0 +1 @@
+../touch/bin/nodetouch.js
\ No newline at end of file
diff --git a/server/node_modules/.bin/nopt b/server/node_modules/.bin/nopt
new file mode 120000
index 0000000000000000000000000000000000000000..6b6566ea7febba5ef6355fb774abeeba134ca1cb
--- /dev/null
+++ b/server/node_modules/.bin/nopt
@@ -0,0 +1 @@
+../nopt/bin/nopt.js
\ No newline at end of file
diff --git a/server/node_modules/.bin/prebuild-install b/server/node_modules/.bin/prebuild-install
new file mode 120000
index 0000000000000000000000000000000000000000..12a458dddebaf2269786fbe704ed7535fda71a3f
--- /dev/null
+++ b/server/node_modules/.bin/prebuild-install
@@ -0,0 +1 @@
+../prebuild-install/bin.js
\ No newline at end of file
diff --git a/server/node_modules/.bin/rc b/server/node_modules/.bin/rc
new file mode 120000
index 0000000000000000000000000000000000000000..48b3cda7431661e242957057dcaf9a119d3c5a5a
--- /dev/null
+++ b/server/node_modules/.bin/rc
@@ -0,0 +1 @@
+../rc/cli.js
\ No newline at end of file
diff --git a/server/node_modules/.bin/semver b/server/node_modules/.bin/semver
new file mode 120000
index 0000000000000000000000000000000000000000..317eb293d8e125968256d4819f26caf2343475c4
--- /dev/null
+++ b/server/node_modules/.bin/semver
@@ -0,0 +1 @@
+../semver/bin/semver
\ No newline at end of file
diff --git a/server/node_modules/.bin/sshpk-conv b/server/node_modules/.bin/sshpk-conv
new file mode 120000
index 0000000000000000000000000000000000000000..a2a295c8014c8c4fb4d0a35adf4567bd52cd82e4
--- /dev/null
+++ b/server/node_modules/.bin/sshpk-conv
@@ -0,0 +1 @@
+../sshpk/bin/sshpk-conv
\ No newline at end of file
diff --git a/server/node_modules/.bin/sshpk-sign b/server/node_modules/.bin/sshpk-sign
new file mode 120000
index 0000000000000000000000000000000000000000..766b9b3a75891df77d3ee028f436f3655fc1391b
--- /dev/null
+++ b/server/node_modules/.bin/sshpk-sign
@@ -0,0 +1 @@
+../sshpk/bin/sshpk-sign
\ No newline at end of file
diff --git a/server/node_modules/.bin/sshpk-verify b/server/node_modules/.bin/sshpk-verify
new file mode 120000
index 0000000000000000000000000000000000000000..bfd7e3ade14c1f05f166aa4fbabb258a1bec7fe3
--- /dev/null
+++ b/server/node_modules/.bin/sshpk-verify
@@ -0,0 +1 @@
+../sshpk/bin/sshpk-verify
\ No newline at end of file
diff --git a/server/node_modules/.bin/uuid b/server/node_modules/.bin/uuid
new file mode 120000
index 0000000000000000000000000000000000000000..588f70ecc5fc9a9d7c80d009fd555d2ec8cd9ba7
--- /dev/null
+++ b/server/node_modules/.bin/uuid
@@ -0,0 +1 @@
+../uuid/dist/bin/uuid
\ No newline at end of file
diff --git a/server/node_modules/.package-lock.json b/server/node_modules/.package-lock.json
new file mode 100644
index 0000000000000000000000000000000000000000..97746f149d03852fb7d1b9ad2ae1a68861df2eba
--- /dev/null
+++ b/server/node_modules/.package-lock.json
@@ -0,0 +1,3140 @@
+{
+ "name": "arduino-iot",
+ "version": "1.0.0",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "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-abstract/node_modules/debug": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
+ "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@serialport/binding-abstract/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=="
+ },
+ "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/binding-mock/node_modules/debug": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
+ "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@serialport/binding-mock/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=="
+ },
+ "node_modules/@serialport/bindings": {
+ "version": "9.2.8",
+ "resolved": "https://registry.npmjs.org/@serialport/bindings/-/bindings-9.2.8.tgz",
+ "integrity": "sha512-hSLxTe0tADZ3LMMGwvEJWOC/TaFQTyPeFalUCsJ1lSQ0k6bPF04JwrtB/C81GetmDBTNRY0GlD0SNtKCc7Dr5g==",
+ "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": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/serialport/donate"
+ }
+ },
+ "node_modules/@serialport/bindings/node_modules/debug": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
+ "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@serialport/bindings/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=="
+ },
+ "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/@serialport/stream/node_modules/debug": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
+ "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@serialport/stream/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=="
+ },
+ "node_modules/@sindresorhus/is": {
+ "version": "0.14.0",
+ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz",
+ "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/@szmarczak/http-timer": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz",
+ "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==",
+ "dependencies": {
+ "defer-to-connect": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "17.0.17",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.17.tgz",
+ "integrity": "sha512-e8PUNQy1HgJGV3iU/Bp2+D/DXh3PYeyli8LgIwsQcs1Ar1LoaWHSIT6Rw+H2rNJmiq6SNWiDytfx8+gYj7wDHw=="
+ },
+ "node_modules/@types/webidl-conversions": {
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz",
+ "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q=="
+ },
+ "node_modules/@types/whatwg-url": {
+ "version": "8.2.1",
+ "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz",
+ "integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==",
+ "dependencies": {
+ "@types/node": "*",
+ "@types/webidl-conversions": "*"
+ }
+ },
+ "node_modules/@vonage/server-sdk": {
+ "version": "2.10.10",
+ "resolved": "https://registry.npmjs.org/@vonage/server-sdk/-/server-sdk-2.10.10.tgz",
+ "integrity": "sha512-rqYmwVMnmvJUwjq8sgUrfA7Ynw4NMdQ+UUY+aoMTpNDRmWr/UZ6uP/G5p+CuAukO58EvmOfCMD5kuRHjHObvMw==",
+ "dependencies": {
+ "jsonwebtoken": "^8.4.0",
+ "request": "^2.88.2",
+ "uuid": "^8.3.0"
+ }
+ },
+ "node_modules/abbrev": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
+ },
+ "node_modules/accepts": {
+ "version": "1.3.7",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
+ "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
+ "dependencies": {
+ "mime-types": "~2.1.24",
+ "negotiator": "0.6.2"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/ansi-align": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz",
+ "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==",
+ "dependencies": {
+ "string-width": "^4.1.0"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
+ "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "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/array-flatten": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
+ },
+ "node_modules/asn1": {
+ "version": "0.2.6",
+ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
+ "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==",
+ "dependencies": {
+ "safer-buffer": "~2.1.0"
+ }
+ },
+ "node_modules/assert-plus": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
+ },
+ "node_modules/aws-sign2": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
+ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/aws4": {
+ "version": "1.11.0",
+ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz",
+ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA=="
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
+ },
+ "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/bcrypt-pbkdf": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
+ "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
+ "dependencies": {
+ "tweetnacl": "^0.14.3"
+ }
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "engines": {
+ "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/body-parser": {
+ "version": "1.19.1",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.1.tgz",
+ "integrity": "sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==",
+ "dependencies": {
+ "bytes": "3.1.1",
+ "content-type": "~1.0.4",
+ "debug": "2.6.9",
+ "depd": "~1.1.2",
+ "http-errors": "1.8.1",
+ "iconv-lite": "0.4.24",
+ "on-finished": "~2.3.0",
+ "qs": "6.9.6",
+ "raw-body": "2.4.2",
+ "type-is": "~1.6.18"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/boxen": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz",
+ "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==",
+ "dependencies": {
+ "ansi-align": "^3.0.0",
+ "camelcase": "^6.2.0",
+ "chalk": "^4.1.0",
+ "cli-boxes": "^2.2.1",
+ "string-width": "^4.2.2",
+ "type-fest": "^0.20.2",
+ "widest-line": "^3.1.0",
+ "wrap-ansi": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dependencies": {
+ "fill-range": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/bson": {
+ "version": "4.6.1",
+ "resolved": "https://registry.npmjs.org/bson/-/bson-4.6.1.tgz",
+ "integrity": "sha512-I1LQ7Hz5zgwR4QquilLNZwbhPw0Apx7i7X9kGMBTsqPdml/03Q9NBtD9nt/19ahjlphktQImrnderxqpzeVDjw==",
+ "dependencies": {
+ "buffer": "^5.6.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "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-equal-constant-time": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
+ "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk="
+ },
+ "node_modules/bytes": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz",
+ "integrity": "sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/cacheable-request": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz",
+ "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==",
+ "dependencies": {
+ "clone-response": "^1.0.2",
+ "get-stream": "^5.1.0",
+ "http-cache-semantics": "^4.0.0",
+ "keyv": "^3.0.0",
+ "lowercase-keys": "^2.0.0",
+ "normalize-url": "^4.1.0",
+ "responselike": "^1.0.2"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/cacheable-request/node_modules/get-stream": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
+ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
+ "dependencies": {
+ "pump": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/cacheable-request/node_modules/lowercase-keys": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
+ "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/camelcase": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
+ "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/caseless": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
+ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/chalk/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/chalk/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ],
+ "dependencies": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "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/ci-info": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
+ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ=="
+ },
+ "node_modules/cli-boxes": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz",
+ "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==",
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/clone-response": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz",
+ "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=",
+ "dependencies": {
+ "mimic-response": "^1.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": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ },
+ "node_modules/combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+ },
+ "node_modules/configstore": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz",
+ "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==",
+ "dependencies": {
+ "dot-prop": "^5.2.0",
+ "graceful-fs": "^4.1.2",
+ "make-dir": "^3.0.0",
+ "unique-string": "^2.0.0",
+ "write-file-atomic": "^3.0.0",
+ "xdg-basedir": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "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/content-disposition": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+ "dependencies": {
+ "safe-buffer": "5.2.1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
+ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz",
+ "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie-signature": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
+ "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
+ },
+ "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=="
+ },
+ "node_modules/crypto-random-string": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz",
+ "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/dashdash": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
+ "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
+ "dependencies": {
+ "assert-plus": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/decompress-response": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz",
+ "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=",
+ "dependencies": {
+ "mimic-response": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "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/defer-to-connect": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz",
+ "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ=="
+ },
+ "node_modules/delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/delegates": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
+ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
+ },
+ "node_modules/denque": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
+ "integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==",
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/depd": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
+ "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/destroy": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
+ "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
+ },
+ "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/dot-prop": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
+ "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
+ "dependencies": {
+ "is-obj": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/duplexer3": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
+ "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI="
+ },
+ "node_modules/ecc-jsbn": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
+ "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
+ "dependencies": {
+ "jsbn": "~0.1.0",
+ "safer-buffer": "^2.1.0"
+ }
+ },
+ "node_modules/ecdsa-sig-formatter": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
+ "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
+ },
+ "node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
+ },
+ "node_modules/encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "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/escape-goat": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz",
+ "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
+ },
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "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/express": {
+ "version": "4.17.2",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.17.2.tgz",
+ "integrity": "sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg==",
+ "dependencies": {
+ "accepts": "~1.3.7",
+ "array-flatten": "1.1.1",
+ "body-parser": "1.19.1",
+ "content-disposition": "0.5.4",
+ "content-type": "~1.0.4",
+ "cookie": "0.4.1",
+ "cookie-signature": "1.0.6",
+ "debug": "2.6.9",
+ "depd": "~1.1.2",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "finalhandler": "~1.1.2",
+ "fresh": "0.5.2",
+ "merge-descriptors": "1.0.1",
+ "methods": "~1.1.2",
+ "on-finished": "~2.3.0",
+ "parseurl": "~1.3.3",
+ "path-to-regexp": "0.1.7",
+ "proxy-addr": "~2.0.7",
+ "qs": "6.9.6",
+ "range-parser": "~1.2.1",
+ "safe-buffer": "5.2.1",
+ "send": "0.17.2",
+ "serve-static": "1.14.2",
+ "setprototypeof": "1.2.0",
+ "statuses": "~1.5.0",
+ "type-is": "~1.6.18",
+ "utils-merge": "1.0.1",
+ "vary": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.10.0"
+ }
+ },
+ "node_modules/extend": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
+ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
+ },
+ "node_modules/extsprintf": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
+ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
+ "engines": [
+ "node >=0.6.0"
+ ]
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
+ },
+ "node_modules/fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
+ },
+ "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",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/finalhandler": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
+ "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
+ "dependencies": {
+ "debug": "2.6.9",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "on-finished": "~2.3.0",
+ "parseurl": "~1.3.3",
+ "statuses": "~1.5.0",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/forever-agent": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
+ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/form-data": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
+ "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.6",
+ "mime-types": "^2.1.12"
+ },
+ "engines": {
+ "node": ">= 0.12"
+ }
+ },
+ "node_modules/forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fresh": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "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/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-stream": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
+ "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
+ "dependencies": {
+ "pump": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/getpass": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
+ "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
+ "dependencies": {
+ "assert-plus": "^1.0.0"
+ }
+ },
+ "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-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/global-dirs": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz",
+ "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==",
+ "dependencies": {
+ "ini": "2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/got": {
+ "version": "9.6.0",
+ "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz",
+ "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==",
+ "dependencies": {
+ "@sindresorhus/is": "^0.14.0",
+ "@szmarczak/http-timer": "^1.1.2",
+ "cacheable-request": "^6.0.0",
+ "decompress-response": "^3.3.0",
+ "duplexer3": "^0.1.4",
+ "get-stream": "^4.1.0",
+ "lowercase-keys": "^1.0.1",
+ "mimic-response": "^1.0.1",
+ "p-cancelable": "^1.0.0",
+ "to-readable-stream": "^1.0.0",
+ "url-parse-lax": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.9",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
+ "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ=="
+ },
+ "node_modules/har-schema": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
+ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/har-validator": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
+ "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
+ "deprecated": "this library is no longer supported",
+ "dependencies": {
+ "ajv": "^6.12.3",
+ "har-schema": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "engines": {
+ "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/has-yarn": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz",
+ "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/http-cache-semantics": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz",
+ "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ=="
+ },
+ "node_modules/http-errors": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz",
+ "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==",
+ "dependencies": {
+ "depd": "~1.1.2",
+ "inherits": "2.0.4",
+ "setprototypeof": "1.2.0",
+ "statuses": ">= 1.5.0 < 2",
+ "toidentifier": "1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/http-signature": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
+ "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
+ "dependencies": {
+ "assert-plus": "^1.0.0",
+ "jsprim": "^1.2.2",
+ "sshpk": "^1.7.0"
+ },
+ "engines": {
+ "node": ">=0.8",
+ "npm": ">=1.3.7"
+ }
+ },
+ "node_modules/iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/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-by-default": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
+ "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk="
+ },
+ "node_modules/import-lazy": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz",
+ "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
+ "engines": {
+ "node": ">=0.8.19"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "node_modules/ini": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz",
+ "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/ip": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz",
+ "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo="
+ },
+ "node_modules/ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dependencies": {
+ "binary-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-ci": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz",
+ "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==",
+ "dependencies": {
+ "ci-info": "^2.0.0"
+ },
+ "bin": {
+ "is-ci": "bin.js"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-installed-globally": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz",
+ "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==",
+ "dependencies": {
+ "global-dirs": "^3.0.0",
+ "is-path-inside": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-npm": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz",
+ "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/is-obj": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
+ "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-path-inside": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
+ "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-typedarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
+ },
+ "node_modules/is-yarn-global": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz",
+ "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw=="
+ },
+ "node_modules/isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
+ },
+ "node_modules/isstream": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
+ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
+ },
+ "node_modules/jsbn": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
+ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
+ },
+ "node_modules/json-buffer": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",
+ "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg="
+ },
+ "node_modules/json-schema": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",
+ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA=="
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
+ },
+ "node_modules/json-stringify-safe": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
+ },
+ "node_modules/jsonwebtoken": {
+ "version": "8.5.1",
+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",
+ "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
+ "dependencies": {
+ "jws": "^3.2.2",
+ "lodash.includes": "^4.3.0",
+ "lodash.isboolean": "^3.0.3",
+ "lodash.isinteger": "^4.0.4",
+ "lodash.isnumber": "^3.0.3",
+ "lodash.isplainobject": "^4.0.6",
+ "lodash.isstring": "^4.0.1",
+ "lodash.once": "^4.0.0",
+ "ms": "^2.1.1",
+ "semver": "^5.6.0"
+ },
+ "engines": {
+ "node": ">=4",
+ "npm": ">=1.4.28"
+ }
+ },
+ "node_modules/jsonwebtoken/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
+ },
+ "node_modules/jsprim": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz",
+ "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==",
+ "dependencies": {
+ "assert-plus": "1.0.0",
+ "extsprintf": "1.3.0",
+ "json-schema": "0.4.0",
+ "verror": "1.10.0"
+ },
+ "engines": {
+ "node": ">=0.6.0"
+ }
+ },
+ "node_modules/jwa": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
+ "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
+ "dependencies": {
+ "buffer-equal-constant-time": "1.0.1",
+ "ecdsa-sig-formatter": "1.0.11",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/jws": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
+ "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
+ "dependencies": {
+ "jwa": "^1.4.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/kareem": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.3.tgz",
+ "integrity": "sha512-uESCXM2KdtOQ8LOvKyTUXEeg0MkYp4wGglTIpGcYHvjJcS5sn2Wkfrfit8m4xSbaNDAw2KdI9elgkOxZbrFYbg=="
+ },
+ "node_modules/keyv": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz",
+ "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==",
+ "dependencies": {
+ "json-buffer": "3.0.0"
+ }
+ },
+ "node_modules/latest-version": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz",
+ "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==",
+ "dependencies": {
+ "package-json": "^6.3.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/lodash.includes": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
+ "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8="
+ },
+ "node_modules/lodash.isboolean": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
+ "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY="
+ },
+ "node_modules/lodash.isinteger": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
+ "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M="
+ },
+ "node_modules/lodash.isnumber": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
+ "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w="
+ },
+ "node_modules/lodash.isplainobject": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+ "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs="
+ },
+ "node_modules/lodash.isstring": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
+ "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE="
+ },
+ "node_modules/lodash.once": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
+ "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w="
+ },
+ "node_modules/lowercase-keys": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
+ "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/make-dir": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+ "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
+ "dependencies": {
+ "semver": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/make-dir/node_modules/semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/media-typer": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/memory-pager": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
+ "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
+ "optional": true
+ },
+ "node_modules/merge-descriptors": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
+ "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
+ },
+ "node_modules/methods": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+ "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.51.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz",
+ "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.34",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz",
+ "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==",
+ "dependencies": {
+ "mime-db": "1.51.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mimic-response": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
+ "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
+ },
+ "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/mongodb": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.3.1.tgz",
+ "integrity": "sha512-sNa8APSIk+r4x31ZwctKjuPSaeKuvUeNb/fu/3B6dRM02HpEgig7hTHM8A/PJQTlxuC/KFWlDlQjhsk/S43tBg==",
+ "dependencies": {
+ "bson": "^4.6.1",
+ "denque": "^2.0.1",
+ "mongodb-connection-string-url": "^2.4.1",
+ "socks": "^2.6.1"
+ },
+ "engines": {
+ "node": ">=12.9.0"
+ },
+ "optionalDependencies": {
+ "saslprep": "^1.0.3"
+ }
+ },
+ "node_modules/mongodb-connection-string-url": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.4.2.tgz",
+ "integrity": "sha512-mZUXF6nUzRWk5J3h41MsPv13ukWlH4jOMSk6astVeoZ1EbdTJyF5I3wxKkvqBAOoVtzLgyEYUvDjrGdcPlKjAw==",
+ "dependencies": {
+ "@types/whatwg-url": "^8.2.1",
+ "whatwg-url": "^11.0.0"
+ }
+ },
+ "node_modules/mongoose": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.2.1.tgz",
+ "integrity": "sha512-VxY1wvlc4uBQKyKNVDoEkTU3/ayFOD//qVXYP+sFyvTRbAj9/M53UWTERd84pWogs2TqAC6DTvZbxCs2LoOd3Q==",
+ "dependencies": {
+ "bson": "^4.2.2",
+ "kareem": "2.3.3",
+ "mongodb": "4.3.1",
+ "mpath": "0.8.4",
+ "mquery": "4.0.2",
+ "ms": "2.1.2",
+ "sift": "13.5.2"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/mongoose"
+ }
+ },
+ "node_modules/mongoose/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=="
+ },
+ "node_modules/mpath": {
+ "version": "0.8.4",
+ "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.4.tgz",
+ "integrity": "sha512-DTxNZomBcTWlrMW76jy1wvV37X/cNNxPW1y2Jzd4DZkAaC5ZGsm8bfGfNOthcDuRJujXLqiuS6o3Tpy0JEoh7g==",
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/mquery": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.2.tgz",
+ "integrity": "sha512-oAVF0Nil1mT3rxty6Zln4YiD6x6QsUWYz927jZzjMxOK2aqmhEz5JQ7xmrKK7xRFA2dwV+YaOpKU/S+vfNqKxA==",
+ "dependencies": {
+ "debug": "4.x"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/mquery/node_modules/debug": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
+ "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/mquery/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=="
+ },
+ "node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ },
+ "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/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/negotiator": {
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
+ "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/node-abi": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.5.0.tgz",
+ "integrity": "sha512-LtHvNIBgOy5mO8mPEUtkCW/YCRWYEKshIvqhe1GHHyXEHEB5mgICyYnAcl4qan3uFeRROErKGzatFHPf6kDxWw==",
+ "dependencies": {
+ "semver": "^7.3.5"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/node-abi/node_modules/semver": {
+ "version": "7.3.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+ "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/nodemon": {
+ "version": "2.0.15",
+ "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.15.tgz",
+ "integrity": "sha512-gdHMNx47Gw7b3kWxJV64NI+Q5nfl0y5DgDbiVtShiwa7Z0IZ07Ll4RLFo6AjrhzMtoEZn5PDE3/c2AbVsiCkpA==",
+ "hasInstallScript": true,
+ "dependencies": {
+ "chokidar": "^3.5.2",
+ "debug": "^3.2.7",
+ "ignore-by-default": "^1.0.1",
+ "minimatch": "^3.0.4",
+ "pstree.remy": "^1.1.8",
+ "semver": "^5.7.1",
+ "supports-color": "^5.5.0",
+ "touch": "^3.1.0",
+ "undefsafe": "^2.0.5",
+ "update-notifier": "^5.1.0"
+ },
+ "bin": {
+ "nodemon": "bin/nodemon.js"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/nodemon"
+ }
+ },
+ "node_modules/nodemon/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/nodemon/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
+ },
+ "node_modules/nopt": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
+ "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",
+ "dependencies": {
+ "abbrev": "1"
+ },
+ "bin": {
+ "nopt": "bin/nopt.js"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/normalize-url": {
+ "version": "4.5.1",
+ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz",
+ "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "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/oauth-sign": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
+ "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "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/on-finished": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
+ "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/p-cancelable": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz",
+ "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/package-json": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz",
+ "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==",
+ "dependencies": {
+ "got": "^9.6.0",
+ "registry-auth-token": "^4.0.0",
+ "registry-url": "^5.0.0",
+ "semver": "^6.2.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/package-json/node_modules/semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/path-to-regexp": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
+ "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
+ },
+ "node_modules/performance-now": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
+ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/prebuild-install": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.0.0.tgz",
+ "integrity": "sha512-IvSenf33K7JcgddNz2D5w521EgO+4aMMjFt73Uk9FRzQ7P+QZPKrp7qPsDydsSwjGt3T5xRNnM1bj1zMTD5fTA==",
+ "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": "^3.3.0",
+ "npmlog": "^4.0.1",
+ "pump": "^3.0.0",
+ "rc": "^1.2.7",
+ "simple-get": "^4.0.0",
+ "tar-fs": "^2.0.0",
+ "tunnel-agent": "^0.6.0"
+ },
+ "bin": {
+ "prebuild-install": "bin.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/prepend-http": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz",
+ "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "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=="
+ },
+ "node_modules/proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "dependencies": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/psl": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
+ "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
+ },
+ "node_modules/pstree.remy": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
+ "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w=="
+ },
+ "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",
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/pupa": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz",
+ "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==",
+ "dependencies": {
+ "escape-goat": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/qs": {
+ "version": "6.9.6",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz",
+ "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==",
+ "engines": {
+ "node": ">=0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/raw-body": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz",
+ "integrity": "sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==",
+ "dependencies": {
+ "bytes": "3.1.1",
+ "http-errors": "1.8.1",
+ "iconv-lite": "0.4.24",
+ "unpipe": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "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/ini": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
+ },
+ "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==",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "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=="
+ },
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
+ "node_modules/registry-auth-token": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz",
+ "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==",
+ "dependencies": {
+ "rc": "^1.2.8"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/registry-url": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz",
+ "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==",
+ "dependencies": {
+ "rc": "^1.2.8"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/request": {
+ "version": "2.88.2",
+ "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
+ "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
+ "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
+ "dependencies": {
+ "aws-sign2": "~0.7.0",
+ "aws4": "^1.8.0",
+ "caseless": "~0.12.0",
+ "combined-stream": "~1.0.6",
+ "extend": "~3.0.2",
+ "forever-agent": "~0.6.1",
+ "form-data": "~2.3.2",
+ "har-validator": "~5.1.3",
+ "http-signature": "~1.2.0",
+ "is-typedarray": "~1.0.0",
+ "isstream": "~0.1.2",
+ "json-stringify-safe": "~5.0.1",
+ "mime-types": "~2.1.19",
+ "oauth-sign": "~0.9.0",
+ "performance-now": "^2.1.0",
+ "qs": "~6.5.2",
+ "safe-buffer": "^5.1.2",
+ "tough-cookie": "~2.5.0",
+ "tunnel-agent": "^0.6.0",
+ "uuid": "^3.3.2"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/request/node_modules/qs": {
+ "version": "6.5.3",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz",
+ "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/request/node_modules/uuid": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
+ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
+ "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.",
+ "bin": {
+ "uuid": "bin/uuid"
+ }
+ },
+ "node_modules/responselike": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz",
+ "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=",
+ "dependencies": {
+ "lowercase-keys": "^1.0.0"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+ },
+ "node_modules/saslprep": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
+ "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
+ "optional": true,
+ "dependencies": {
+ "sparse-bitfield": "^3.0.3"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "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/semver-diff": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz",
+ "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==",
+ "dependencies": {
+ "semver": "^6.3.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/semver-diff/node_modules/semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/send": {
+ "version": "0.17.2",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz",
+ "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==",
+ "dependencies": {
+ "debug": "2.6.9",
+ "depd": "~1.1.2",
+ "destroy": "~1.0.4",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "0.5.2",
+ "http-errors": "1.8.1",
+ "mime": "1.6.0",
+ "ms": "2.1.3",
+ "on-finished": "~2.3.0",
+ "range-parser": "~1.2.1",
+ "statuses": "~1.5.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/send/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
+ },
+ "node_modules/serialport": {
+ "version": "9.2.8",
+ "resolved": "https://registry.npmjs.org/serialport/-/serialport-9.2.8.tgz",
+ "integrity": "sha512-FsWpMQgSJxi93JgWl5xM1f9/Z8IjRJuaUEoHqLf8FPBLw7gMhInuHOBhI2onQufWIYPGTz3H3oGcu1nCaK1EfA==",
+ "dependencies": {
+ "@serialport/binding-mock": "9.2.4",
+ "@serialport/bindings": "9.2.8",
+ "@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/serialport/node_modules/debug": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
+ "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/serialport/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=="
+ },
+ "node_modules/serve-static": {
+ "version": "1.14.2",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz",
+ "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==",
+ "dependencies": {
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.3",
+ "send": "0.17.2"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "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/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
+ },
+ "node_modules/sift": {
+ "version": "13.5.2",
+ "resolved": "https://registry.npmjs.org/sift/-/sift-13.5.2.tgz",
+ "integrity": "sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA=="
+ },
+ "node_modules/signal-exit": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz",
+ "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ=="
+ },
+ "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": "4.0.0",
+ "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.0.tgz",
+ "integrity": "sha512-ZalZGexYr3TA0SwySsr5HlgOOinS4Jsa8YB2GJ6lUNAazyAu4KG/VmzMTwAt2YVXzzVj8QmefmAonZIK2BSGcQ==",
+ "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": {
+ "decompress-response": "^6.0.0",
+ "once": "^1.3.1",
+ "simple-concat": "^1.0.0"
+ }
+ },
+ "node_modules/simple-get/node_modules/decompress-response": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
+ "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
+ "dependencies": {
+ "mimic-response": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/simple-get/node_modules/mimic-response": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
+ "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/smart-buffer": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
+ "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
+ "engines": {
+ "node": ">= 6.0.0",
+ "npm": ">= 3.0.0"
+ }
+ },
+ "node_modules/socks": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz",
+ "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==",
+ "dependencies": {
+ "ip": "^1.1.5",
+ "smart-buffer": "^4.2.0"
+ },
+ "engines": {
+ "node": ">= 10.13.0",
+ "npm": ">= 3.0.0"
+ }
+ },
+ "node_modules/sparse-bitfield": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
+ "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
+ "optional": true,
+ "dependencies": {
+ "memory-pager": "^1.0.2"
+ }
+ },
+ "node_modules/sshpk": {
+ "version": "1.17.0",
+ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz",
+ "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==",
+ "dependencies": {
+ "asn1": "~0.2.3",
+ "assert-plus": "^1.0.0",
+ "bcrypt-pbkdf": "^1.0.0",
+ "dashdash": "^1.12.0",
+ "ecc-jsbn": "~0.1.1",
+ "getpass": "^0.1.1",
+ "jsbn": "~0.1.0",
+ "safer-buffer": "^2.0.2",
+ "tweetnacl": "~0.14.0"
+ },
+ "bin": {
+ "sshpk-conv": "bin/sshpk-conv",
+ "sshpk-sign": "bin/sshpk-sign",
+ "sshpk-verify": "bin/sshpk-verify"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/statuses": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
+ "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "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=="
+ },
+ "node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "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/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "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/to-readable-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz",
+ "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/touch": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
+ "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
+ "dependencies": {
+ "nopt": "~1.0.10"
+ },
+ "bin": {
+ "nodetouch": "bin/nodetouch.js"
+ }
+ },
+ "node_modules/tough-cookie": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
+ "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
+ "dependencies": {
+ "psl": "^1.1.28",
+ "punycode": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/tr46": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
+ "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
+ "dependencies": {
+ "punycode": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "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/tweetnacl": {
+ "version": "0.14.5",
+ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
+ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
+ },
+ "node_modules/type-fest": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
+ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/type-is": {
+ "version": "1.6.18",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "dependencies": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.24"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/typedarray-to-buffer": {
+ "version": "3.1.5",
+ "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
+ "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
+ "dependencies": {
+ "is-typedarray": "^1.0.0"
+ }
+ },
+ "node_modules/undefsafe": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
+ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA=="
+ },
+ "node_modules/unique-string": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz",
+ "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==",
+ "dependencies": {
+ "crypto-random-string": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/update-notifier": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz",
+ "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==",
+ "dependencies": {
+ "boxen": "^5.0.0",
+ "chalk": "^4.1.0",
+ "configstore": "^5.0.1",
+ "has-yarn": "^2.1.0",
+ "import-lazy": "^2.1.0",
+ "is-ci": "^2.0.0",
+ "is-installed-globally": "^0.4.0",
+ "is-npm": "^5.0.0",
+ "is-yarn-global": "^0.3.0",
+ "latest-version": "^5.1.0",
+ "pupa": "^2.1.1",
+ "semver": "^7.3.4",
+ "semver-diff": "^3.1.1",
+ "xdg-basedir": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/yeoman/update-notifier?sponsor=1"
+ }
+ },
+ "node_modules/update-notifier/node_modules/semver": {
+ "version": "7.3.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+ "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/uri-js": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+ "dependencies": {
+ "punycode": "^2.1.0"
+ }
+ },
+ "node_modules/url-parse-lax": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz",
+ "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=",
+ "dependencies": {
+ "prepend-http": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
+ },
+ "node_modules/utils-merge": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=",
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/uuid": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/verror": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
+ "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
+ "engines": [
+ "node >=0.6.0"
+ ],
+ "dependencies": {
+ "assert-plus": "^1.0.0",
+ "core-util-is": "1.0.2",
+ "extsprintf": "^1.2.0"
+ }
+ },
+ "node_modules/verror/node_modules/core-util-is": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
+ },
+ "node_modules/webidl-conversions": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
+ "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/whatwg-url": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
+ "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
+ "dependencies": {
+ "tr46": "^3.0.0",
+ "webidl-conversions": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/wide-align": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",
+ "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",
+ "dependencies": {
+ "string-width": "^1.0.2 || 2 || 3 || 4"
+ }
+ },
+ "node_modules/widest-line": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz",
+ "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==",
+ "dependencies": {
+ "string-width": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+ },
+ "node_modules/write-file-atomic": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
+ "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
+ "dependencies": {
+ "imurmurhash": "^0.1.4",
+ "is-typedarray": "^1.0.0",
+ "signal-exit": "^3.0.2",
+ "typedarray-to-buffer": "^3.1.5"
+ }
+ },
+ "node_modules/ws": {
+ "version": "8.5.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz",
+ "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": "^5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/xdg-basedir": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz",
+ "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
+ }
+ }
+}
diff --git a/server/node_modules/@serialport/binding-abstract/CHANGELOG.md b/server/node_modules/@serialport/binding-abstract/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..a25aa06dd8bf8f5b72375b9204c9f042b525b8b9
--- /dev/null
+++ b/server/node_modules/@serialport/binding-abstract/CHANGELOG.md
@@ -0,0 +1,59 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [9.2.3](https://github.com/serialport/node-serialport/compare/v9.2.1...v9.2.3) (2021-09-24)
+
+**Note:** Version bump only for package @serialport/binding-abstract
+
+
+
+
+
+## [9.2.2](https://github.com/serialport/node-serialport/compare/v9.2.1...v9.2.2) (2021-09-24)
+
+**Note:** Version bump only for package @serialport/binding-abstract
+
+
+
+
+
+## [9.0.7](https://github.com/serialport/node-serialport/compare/v9.0.6...v9.0.7) (2021-02-22)
+
+**Note:** Version bump only for package @serialport/binding-abstract
+
+
+
+
+
+## [9.0.2](https://github.com/serialport/node-serialport/compare/v9.0.1...v9.0.2) (2020-10-16)
+
+
+### Bug Fixes
+
+* while validating for offset, check for offset's value for NaN instead length ([#2124](https://github.com/serialport/node-serialport/issues/2124)) ([4215122](https://github.com/serialport/node-serialport/commit/42151228240c5c818ac5327d6ff5c01398805564))
+
+
+
+
+
+## [9.0.1](https://github.com/serialport/node-serialport/compare/v9.0.0...v9.0.1) (2020-08-08)
+
+**Note:** Version bump only for package @serialport/binding-abstract
+
+
+
+
+
+# [9.0.0](https://github.com/serialport/node-serialport/compare/v8.0.8...v9.0.0) (2020-05-10)
+
+**Note:** Version bump only for package @serialport/binding-abstract
+
+
+
+
+
+## [8.0.6](https://github.com/serialport/node-serialport/compare/v8.0.5...v8.0.6) (2019-12-25)
+
+**Note:** Version bump only for package @serialport/binding-abstract
diff --git a/server/node_modules/@serialport/binding-abstract/LICENSE b/server/node_modules/@serialport/binding-abstract/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..800d7767c0ac4d336ac201850eee0c26be1f7421
--- /dev/null
+++ b/server/node_modules/@serialport/binding-abstract/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright 2010 Christopher Williams. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/server/node_modules/@serialport/binding-abstract/README.md b/server/node_modules/@serialport/binding-abstract/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..df7bda10f3c8ba613b54acb95720ef9d176b75d2
--- /dev/null
+++ b/server/node_modules/@serialport/binding-abstract/README.md
@@ -0,0 +1,14 @@
+# @serialport/BindingAbstract
+
+This Abstract binding class is the base for all serialport bindings. You wouldn't use this class directly but instead extend it to make a new binding for a different platform or underling technology.
+
+This is currently used for the win32, linux, darwin and mock bindings.
+
+This is how you use it.
+```js
+class MockBinding extends AbstractBinding {
+ constructor(opt) {
+ super(opt)
+ }
+}
+```
diff --git a/server/node_modules/@serialport/binding-abstract/lib/index.js b/server/node_modules/@serialport/binding-abstract/lib/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..7095716dc5e58363f23a0f0d8b2aea334e937cbc
--- /dev/null
+++ b/server/node_modules/@serialport/binding-abstract/lib/index.js
@@ -0,0 +1,222 @@
+const debug = require('debug')('serialport/binding-abstract')
+
+/**
+ * @name Binding
+ * @type {AbstractBinding}
+ * @since 5.0.0
+ * @description The `Binding` is how Node-SerialPort talks to the underlying system. By default, we auto detect Windows, Linux and OS X, and load the appropriate module for your system. You can assign `SerialPort.Binding` to any binding you like. Find more by searching at [npm](https://npmjs.org/).
+ Prevent auto loading the default bindings by requiring SerialPort with:
+ ```js
+ var SerialPort = require('@serialport/stream');
+ SerialPort.Binding = MyBindingClass;
+ ```
+ */
+
+/**
+ * You never have to use `Binding` objects directly. SerialPort uses them to access the underlying hardware. This documentation is geared towards people who are making bindings for different platforms. This class can be inherited from to get type checking for each method.
+ * @class AbstractBinding
+ * @param {object} options options for the binding
+ * @property {boolean} isOpen Required property. `true` if the port is open, `false` otherwise. Should be read-only.
+ * @throws {TypeError} When given invalid arguments, a `TypeError` is thrown.
+ * @since 5.0.0
+ */
+class AbstractBinding {
+ /**
+ * Retrieves a list of available serial ports with metadata. The `path` must be guaranteed, and all other fields should be undefined if unavailable. The `path` is either the path or an identifier (eg `COM1`) used to open the serialport.
+ * @returns {Promise} resolves to an array of port [info objects](#module_serialport--SerialPort.list).
+ */
+ static async list() {
+ debug('list')
+ }
+
+ constructor(opt = {}) {
+ if (typeof opt !== 'object') {
+ throw new TypeError('"options" is not an object')
+ }
+ }
+
+ /**
+ * Opens a connection to the serial port referenced by the path.
+ * @param {string} path the path or com port to open
+ * @param {openOptions} options openOptions for the serialport
+ * @returns {Promise} Resolves after the port is opened and configured.
+ * @rejects {TypeError} When given invalid arguments, a `TypeError` is rejected.
+ */
+ async open(path, options) {
+ if (!path) {
+ throw new TypeError('"path" is not a valid port')
+ }
+
+ if (typeof options !== 'object') {
+ throw new TypeError('"options" is not an object')
+ }
+ debug('open')
+
+ if (this.isOpen) {
+ throw new Error('Already open')
+ }
+ }
+
+ /**
+ * Closes an open connection
+ * @returns {Promise} Resolves once the connection is closed.
+ * @rejects {TypeError} When given invalid arguments, a `TypeError` is rejected.
+ */
+ async close() {
+ debug('close')
+ if (!this.isOpen) {
+ throw new Error('Port is not open')
+ }
+ }
+
+ /**
+ * Request a number of bytes from the SerialPort. This function is similar to Node's [`fs.read`](http://nodejs.org/api/fs.html#fs_fs_read_fd_buffer_offset_length_position_callback) except it will always return at least one byte.
+
+The in progress reads must error when the port is closed with an error object that has the property `canceled` equal to `true`. Any other error will cause a disconnection.
+
+ * @param {buffer} buffer Accepts a [`Buffer`](http://nodejs.org/api/buffer.html) object.
+ * @param {integer} offset The offset in the buffer to start writing at.
+ * @param {integer} length Specifies the maximum number of bytes to read.
+ * @returns {Promise} Resolves with the number of bytes read after a read operation.
+ * @rejects {TypeError} When given invalid arguments, a `TypeError` is rejected.
+ */
+ async read(buffer, offset, length) {
+ if (!Buffer.isBuffer(buffer)) {
+ throw new TypeError('"buffer" is not a Buffer')
+ }
+
+ if (typeof offset !== 'number' || isNaN(offset)) {
+ throw new TypeError(`"offset" is not an integer got "${isNaN(offset) ? 'NaN' : typeof offset}"`)
+ }
+
+ if (typeof length !== 'number' || isNaN(length)) {
+ throw new TypeError(`"length" is not an integer got "${isNaN(length) ? 'NaN' : typeof length}"`)
+ }
+
+ debug('read')
+ if (buffer.length < offset + length) {
+ throw new Error('buffer is too small')
+ }
+
+ if (!this.isOpen) {
+ throw new Error('Port is not open')
+ }
+ }
+
+ /**
+ * Write bytes to the SerialPort. Only called when there is no pending write operation.
+
+The in progress writes must error when the port is closed with an error object that has the property `canceled` equal to `true`. Any other error will cause a disconnection.
+
+ * @param {buffer} buffer - Accepts a [`Buffer`](http://nodejs.org/api/buffer.html) object.
+ * @returns {Promise} Resolves after the data is passed to the operating system for writing.
+ * @rejects {TypeError} When given invalid arguments, a `TypeError` is rejected.
+ */
+ async write(buffer) {
+ if (!Buffer.isBuffer(buffer)) {
+ throw new TypeError('"buffer" is not a Buffer')
+ }
+
+ debug('write', buffer.length, 'bytes')
+ if (!this.isOpen) {
+ debug('write', 'error port is not open')
+
+ throw new Error('Port is not open')
+ }
+ }
+
+ /**
+ * Changes connection settings on an open port. Only `baudRate` is supported.
+ * @param {object=} options Only supports `baudRate`.
+ * @param {number=} [options.baudRate] If provided a baud rate that the bindings do not support, it should reject.
+ * @returns {Promise} Resolves once the port's baud rate changes.
+ * @rejects {TypeError} When given invalid arguments, a `TypeError` is rejected.
+ */
+ async update(options) {
+ if (typeof options !== 'object') {
+ throw TypeError('"options" is not an object')
+ }
+
+ if (typeof options.baudRate !== 'number') {
+ throw new TypeError('"options.baudRate" is not a number')
+ }
+
+ debug('update')
+ if (!this.isOpen) {
+ throw new Error('Port is not open')
+ }
+ }
+
+ /**
+ * Set control flags on an open port.
+ * @param {object=} options All options are operating system default when the port is opened. Every flag is set on each call to the provided or default values. All options are always provided.
+ * @param {Boolean} [options.brk=false] flag for brk
+ * @param {Boolean} [options.cts=false] flag for cts
+ * @param {Boolean} [options.dsr=false] flag for dsr
+ * @param {Boolean} [options.dtr=true] flag for dtr
+ * @param {Boolean} [options.rts=true] flag for rts
+ * @param {Boolean} [options.lowLatency=false] flag for lowLatency mode on Linux
+ * @returns {Promise} Resolves once the port's flags are set.
+ * @rejects {TypeError} When given invalid arguments, a `TypeError` is rejected.
+ */
+ async set(options) {
+ if (typeof options !== 'object') {
+ throw new TypeError('"options" is not an object')
+ }
+ debug('set')
+ if (!this.isOpen) {
+ throw new Error('Port is not open')
+ }
+ }
+
+ /**
+ * Get the control flags (CTS, DSR, DCD) on the open port.
+ * @returns {Promise} Resolves with the retrieved flags.
+ * @rejects {TypeError} When given invalid arguments, a `TypeError` is rejected.
+ */
+ async get() {
+ debug('get')
+ if (!this.isOpen) {
+ throw new Error('Port is not open')
+ }
+ }
+
+ /**
+ * Get the OS reported baud rate for the open port.
+ * Used mostly for debugging custom baud rates.
+ * @returns {Promise} Resolves with the current baud rate.
+ * @rejects {TypeError} When given invalid arguments, a `TypeError` is rejected.
+ */
+ async getBaudRate() {
+ debug('getbaudRate')
+ if (!this.isOpen) {
+ throw new Error('Port is not open')
+ }
+ }
+
+ /**
+ * Flush (discard) data received but not read, and written but not transmitted.
+ * @returns {Promise} Resolves once the flush operation finishes.
+ * @rejects {TypeError} When given invalid arguments, a `TypeError` is rejected.
+ */
+ async flush() {
+ debug('flush')
+ if (!this.isOpen) {
+ throw new Error('Port is not open')
+ }
+ }
+
+ /**
+ * Drain waits until all output data is transmitted to the serial port. An in progress write should be completed before this returns.
+ * @returns {Promise} Resolves once the drain operation finishes.
+ * @rejects {TypeError} When given invalid arguments, a `TypeError` is rejected.
+ */
+ async drain() {
+ debug('drain')
+ if (!this.isOpen) {
+ throw new Error('Port is not open')
+ }
+ }
+}
+
+module.exports = AbstractBinding
diff --git a/server/node_modules/@serialport/binding-abstract/node_modules/debug/LICENSE b/server/node_modules/@serialport/binding-abstract/node_modules/debug/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..1a9820e262b26b60fe71a4dcd9bc9cfd0a01f26e
--- /dev/null
+++ b/server/node_modules/@serialport/binding-abstract/node_modules/debug/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk
+Copyright (c) 2018-2021 Josh Junon
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+and associated documentation files (the 'Software'), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/server/node_modules/@serialport/binding-abstract/node_modules/debug/README.md b/server/node_modules/@serialport/binding-abstract/node_modules/debug/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..5ea4cd2759b917de9797f7073d738833ae9ba980
--- /dev/null
+++ b/server/node_modules/@serialport/binding-abstract/node_modules/debug/README.md
@@ -0,0 +1,478 @@
+# debug
+[](https://travis-ci.org/debug-js/debug) [](https://coveralls.io/github/debug-js/debug?branch=master) [](https://visionmedia-community-slackin.now.sh/) [](#backers)
+[](#sponsors)
+
+
+
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example [_app.js_](./examples/node/app.js):
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %o', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example [_worker.js_](./examples/node/worker.js):
+
+```js
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
+
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
+```
+
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
+
+Here are some examples:
+
+
+
+
+
+#### Windows command prompt notes
+
+##### CMD
+
+On Windows the environment variable is set using the `set` command.
+
+```cmd
+set DEBUG=*,-not_this
+```
+
+Example:
+
+```cmd
+set DEBUG=* & node app.js
+```
+
+##### PowerShell (VS Code default)
+
+PowerShell uses different syntax to set environment variables.
+
+```cmd
+$env:DEBUG = "*,-not_this"
+```
+
+Example:
+
+```cmd
+$env:DEBUG='app';node app.js
+```
+
+Then, run the program to be debugged as usual.
+
+npm script example:
+```js
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
+```
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+
+
+
+## Millisecond diff
+
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+
+
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+
+
+
+## Conventions
+
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
+
+## Wildcards
+
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
+
+## Environment Variables
+
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
+
+## Formatters
+
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+
+### Custom formatters
+
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example [_stdout.js_](./examples/node/stdout.js):
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+## Extend
+You can simply extend debugger
+```js
+const log = require('debug')('auth');
+
+//creates new debug instance with extended namespace
+const logSign = log.extend('sign');
+const logLogin = log.extend('login');
+
+log('hello'); // auth hello
+logSign('hello'); //auth:sign hello
+logLogin('hello'); //auth:login hello
+```
+
+## Set dynamically
+
+You can also enable debug dynamically by calling the `enable()` method :
+
+```js
+let debug = require('debug');
+
+console.log(1, debug.enabled('test'));
+
+debug.enable('test');
+console.log(2, debug.enabled('test'));
+
+debug.disable();
+console.log(3, debug.enabled('test'));
+
+```
+
+print :
+```
+1 false
+2 true
+3 false
+```
+
+Usage :
+`enable(namespaces)`
+`namespaces` can include modes separated by a colon and wildcards.
+
+Note that calling `enable()` completely overrides previously set DEBUG variable :
+
+```
+$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
+=> false
+```
+
+`disable()`
+
+Will disable all namespaces. The functions returns the namespaces currently
+enabled (and skipped). This can be useful if you want to disable debugging
+temporarily without knowing what was enabled to begin with.
+
+For example:
+
+```js
+let debug = require('debug');
+debug.enable('foo:*,-foo:bar');
+let namespaces = debug.disable();
+debug.enable(namespaces);
+```
+
+Note: There is no guarantee that the string will be identical to the initial
+enable string, but semantically they will be identical.
+
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
+## Usage in child processes
+
+Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process.
+For example:
+
+```javascript
+worker = fork(WORKER_WRAP_PATH, [workerPath], {
+ stdio: [
+ /* stdin: */ 0,
+ /* stdout: */ 'pipe',
+ /* stderr: */ 'pipe',
+ 'ipc',
+ ],
+ env: Object.assign({}, process.env, {
+ DEBUG_COLORS: 1 // without this settings, colors won't be shown
+ }),
+});
+
+worker.stderr.pipe(process.stderr, { end: false });
+```
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+ - Josh Junon
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
+Copyright (c) 2018-2021 Josh Junon
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/server/node_modules/@serialport/binding-abstract/node_modules/debug/package.json b/server/node_modules/@serialport/binding-abstract/node_modules/debug/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..0b269fc537a934e94e477857353982c2b3f51f86
--- /dev/null
+++ b/server/node_modules/@serialport/binding-abstract/node_modules/debug/package.json
@@ -0,0 +1,101 @@
+{
+ "_from": "debug@^4.3.2",
+ "_id": "debug@4.3.3",
+ "_inBundle": false,
+ "_integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
+ "_location": "/@serialport/binding-abstract/debug",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "debug@^4.3.2",
+ "name": "debug",
+ "escapedName": "debug",
+ "rawSpec": "^4.3.2",
+ "saveSpec": null,
+ "fetchSpec": "^4.3.2"
+ },
+ "_requiredBy": [
+ "/@serialport/binding-abstract"
+ ],
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
+ "_shasum": "04266e0b70a98d4462e6e288e38259213332b664",
+ "_spec": "debug@^4.3.2",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/@serialport/binding-abstract",
+ "author": {
+ "name": "Josh Junon",
+ "email": "josh.junon@protonmail.com"
+ },
+ "browser": "./src/browser.js",
+ "bugs": {
+ "url": "https://github.com/debug-js/debug/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io"
+ },
+ {
+ "name": "Andrew Rhyne",
+ "email": "rhyneandrew@gmail.com"
+ }
+ ],
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "deprecated": false,
+ "description": "Lightweight debugging utility for Node.js and the browser",
+ "devDependencies": {
+ "brfs": "^2.0.1",
+ "browserify": "^16.2.3",
+ "coveralls": "^3.0.2",
+ "istanbul": "^0.4.5",
+ "karma": "^3.1.4",
+ "karma-browserify": "^6.0.0",
+ "karma-chrome-launcher": "^2.2.0",
+ "karma-mocha": "^1.3.0",
+ "mocha": "^5.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "xo": "^0.23.0"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "files": [
+ "src",
+ "LICENSE",
+ "README.md"
+ ],
+ "homepage": "https://github.com/debug-js/debug#readme",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "license": "MIT",
+ "main": "./src/index.js",
+ "name": "debug",
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/debug-js/debug.git"
+ },
+ "scripts": {
+ "lint": "xo",
+ "test": "npm run test:node && npm run test:browser && npm run lint",
+ "test:browser": "karma start --single-run",
+ "test:coverage": "cat ./coverage/lcov.info | coveralls",
+ "test:node": "istanbul cover _mocha -- test.js"
+ },
+ "version": "4.3.3"
+}
diff --git a/server/node_modules/@serialport/binding-abstract/node_modules/debug/src/browser.js b/server/node_modules/@serialport/binding-abstract/node_modules/debug/src/browser.js
new file mode 100644
index 0000000000000000000000000000000000000000..3bf30ea51ba16c08a17865ba1263a0240580daad
--- /dev/null
+++ b/server/node_modules/@serialport/binding-abstract/node_modules/debug/src/browser.js
@@ -0,0 +1,269 @@
+/* eslint-env browser */
+
+/**
+ * This is the web browser implementation of `debug()`.
+ */
+
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = localstorage();
+exports.destroy = (() => {
+ let warned = false;
+
+ return () => {
+ if (!warned) {
+ warned = true;
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+ };
+})();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ '#0000CC',
+ '#0000FF',
+ '#0033CC',
+ '#0033FF',
+ '#0066CC',
+ '#0066FF',
+ '#0099CC',
+ '#0099FF',
+ '#00CC00',
+ '#00CC33',
+ '#00CC66',
+ '#00CC99',
+ '#00CCCC',
+ '#00CCFF',
+ '#3300CC',
+ '#3300FF',
+ '#3333CC',
+ '#3333FF',
+ '#3366CC',
+ '#3366FF',
+ '#3399CC',
+ '#3399FF',
+ '#33CC00',
+ '#33CC33',
+ '#33CC66',
+ '#33CC99',
+ '#33CCCC',
+ '#33CCFF',
+ '#6600CC',
+ '#6600FF',
+ '#6633CC',
+ '#6633FF',
+ '#66CC00',
+ '#66CC33',
+ '#9900CC',
+ '#9900FF',
+ '#9933CC',
+ '#9933FF',
+ '#99CC00',
+ '#99CC33',
+ '#CC0000',
+ '#CC0033',
+ '#CC0066',
+ '#CC0099',
+ '#CC00CC',
+ '#CC00FF',
+ '#CC3300',
+ '#CC3333',
+ '#CC3366',
+ '#CC3399',
+ '#CC33CC',
+ '#CC33FF',
+ '#CC6600',
+ '#CC6633',
+ '#CC9900',
+ '#CC9933',
+ '#CCCC00',
+ '#CCCC33',
+ '#FF0000',
+ '#FF0033',
+ '#FF0066',
+ '#FF0099',
+ '#FF00CC',
+ '#FF00FF',
+ '#FF3300',
+ '#FF3333',
+ '#FF3366',
+ '#FF3399',
+ '#FF33CC',
+ '#FF33FF',
+ '#FF6600',
+ '#FF6633',
+ '#FF9900',
+ '#FF9933',
+ '#FFCC00',
+ '#FFCC33'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+// eslint-disable-next-line complexity
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
+ return true;
+ }
+
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // Is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // Is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // Double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ args[0] = (this.useColors ? '%c' : '') +
+ this.namespace +
+ (this.useColors ? ' %c' : ' ') +
+ args[0] +
+ (this.useColors ? '%c ' : ' ') +
+ '+' + module.exports.humanize(this.diff);
+
+ if (!this.useColors) {
+ return;
+ }
+
+ const c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit');
+
+ // The final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ let index = 0;
+ let lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, match => {
+ if (match === '%%') {
+ return;
+ }
+ index++;
+ if (match === '%c') {
+ // We only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.debug()` when available.
+ * No-op when `console.debug` is not a "function".
+ * If `console.debug` is not available, falls back
+ * to `console.log`.
+ *
+ * @api public
+ */
+exports.log = console.debug || console.log || (() => {});
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ try {
+ if (namespaces) {
+ exports.storage.setItem('debug', namespaces);
+ } else {
+ exports.storage.removeItem('debug');
+ }
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+function load() {
+ let r;
+ try {
+ r = exports.storage.getItem('debug');
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+ // The Browser also has localStorage in the global context.
+ return localStorage;
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+module.exports = require('debug/src/common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+formatters.j = function (v) {
+ try {
+ return JSON.stringify(v);
+ } catch (error) {
+ return '[UnexpectedJSONParseError]: ' + error.message;
+ }
+};
diff --git a/server/node_modules/@serialport/binding-abstract/node_modules/debug/src/common.js b/server/node_modules/@serialport/binding-abstract/node_modules/debug/src/common.js
new file mode 100644
index 0000000000000000000000000000000000000000..6d571d2844dd950db81c8e07cabbfc9048c59658
--- /dev/null
+++ b/server/node_modules/@serialport/binding-abstract/node_modules/debug/src/common.js
@@ -0,0 +1,274 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ */
+
+function setup(env) {
+ createDebug.debug = createDebug;
+ createDebug.default = createDebug;
+ createDebug.coerce = coerce;
+ createDebug.disable = disable;
+ createDebug.enable = enable;
+ createDebug.enabled = enabled;
+ createDebug.humanize = require('ms');
+ createDebug.destroy = destroy;
+
+ Object.keys(env).forEach(key => {
+ createDebug[key] = env[key];
+ });
+
+ /**
+ * The currently active debug mode names, and names to skip.
+ */
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ /**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+ createDebug.formatters = {};
+
+ /**
+ * Selects a color for a debug namespace
+ * @param {String} namespace The namespace string for the debug instance to be colored
+ * @return {Number|String} An ANSI color code for the given namespace
+ * @api private
+ */
+ function selectColor(namespace) {
+ let hash = 0;
+
+ for (let i = 0; i < namespace.length; i++) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
+ }
+ createDebug.selectColor = selectColor;
+
+ /**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+ function createDebug(namespace) {
+ let prevTime;
+ let enableOverride = null;
+ let namespacesCache;
+ let enabledCache;
+
+ function debug(...args) {
+ // Disabled?
+ if (!debug.enabled) {
+ return;
+ }
+
+ const self = debug;
+
+ // Set `diff` timestamp
+ const curr = Number(new Date());
+ const ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ args[0] = createDebug.coerce(args[0]);
+
+ if (typeof args[0] !== 'string') {
+ // Anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // Apply any `formatters` transformations
+ let index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
+ // If we encounter an escaped % then don't increase the array index
+ if (match === '%%') {
+ return '%';
+ }
+ index++;
+ const formatter = createDebug.formatters[format];
+ if (typeof formatter === 'function') {
+ const val = args[index];
+ match = formatter.call(self, val);
+
+ // Now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // Apply env-specific formatting (colors, etc.)
+ createDebug.formatArgs.call(self, args);
+
+ const logFn = self.log || createDebug.log;
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.useColors = createDebug.useColors();
+ debug.color = createDebug.selectColor(namespace);
+ debug.extend = extend;
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
+
+ Object.defineProperty(debug, 'enabled', {
+ enumerable: true,
+ configurable: false,
+ get: () => {
+ if (enableOverride !== null) {
+ return enableOverride;
+ }
+ if (namespacesCache !== createDebug.namespaces) {
+ namespacesCache = createDebug.namespaces;
+ enabledCache = createDebug.enabled(namespace);
+ }
+
+ return enabledCache;
+ },
+ set: v => {
+ enableOverride = v;
+ }
+ });
+
+ // Env-specific initialization logic for debug instances
+ if (typeof createDebug.init === 'function') {
+ createDebug.init(debug);
+ }
+
+ return debug;
+ }
+
+ function extend(namespace, delimiter) {
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
+ newDebug.log = this.log;
+ return newDebug;
+ }
+
+ /**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+ function enable(namespaces) {
+ createDebug.save(namespaces);
+ createDebug.namespaces = namespaces;
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ let i;
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ const len = split.length;
+
+ for (i = 0; i < len; i++) {
+ if (!split[i]) {
+ // ignore empty strings
+ continue;
+ }
+
+ namespaces = split[i].replace(/\*/g, '.*?');
+
+ if (namespaces[0] === '-') {
+ createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+ }
+
+ /**
+ * Disable debug output.
+ *
+ * @return {String} namespaces
+ * @api public
+ */
+ function disable() {
+ const namespaces = [
+ ...createDebug.names.map(toNamespace),
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
+ ].join(',');
+ createDebug.enable('');
+ return namespaces;
+ }
+
+ /**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+ function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
+
+ let i;
+ let len;
+
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
+ if (createDebug.skips[i].test(name)) {
+ return false;
+ }
+ }
+
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
+ if (createDebug.names[i].test(name)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Convert regexp to namespace
+ *
+ * @param {RegExp} regxep
+ * @return {String} namespace
+ * @api private
+ */
+ function toNamespace(regexp) {
+ return regexp.toString()
+ .substring(2, regexp.toString().length - 2)
+ .replace(/\.\*\?$/, '*');
+ }
+
+ /**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+ function coerce(val) {
+ if (val instanceof Error) {
+ return val.stack || val.message;
+ }
+ return val;
+ }
+
+ /**
+ * XXX DO NOT USE. This is a temporary stub function.
+ * XXX It WILL be removed in the next major release.
+ */
+ function destroy() {
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+
+ createDebug.enable(createDebug.load());
+
+ return createDebug;
+}
+
+module.exports = setup;
diff --git a/server/node_modules/@serialport/binding-abstract/node_modules/debug/src/index.js b/server/node_modules/@serialport/binding-abstract/node_modules/debug/src/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..d0b8579432a88872cc1df415ae061509df74b38f
--- /dev/null
+++ b/server/node_modules/@serialport/binding-abstract/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer / nwjs process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
+ module.exports = require('debug/src/browser.js');
+} else {
+ module.exports = require('debug/src/node.js');
+}
diff --git a/server/node_modules/@serialport/binding-abstract/node_modules/debug/src/node.js b/server/node_modules/@serialport/binding-abstract/node_modules/debug/src/node.js
new file mode 100644
index 0000000000000000000000000000000000000000..3044efcce21274bf69b98b20d159031766e47d73
--- /dev/null
+++ b/server/node_modules/@serialport/binding-abstract/node_modules/debug/src/node.js
@@ -0,0 +1,263 @@
+/**
+ * Module dependencies.
+ */
+
+const tty = require('tty');
+const util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ */
+
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.destroy = util.deprecate(
+ () => {},
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
+);
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+try {
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
+ // eslint-disable-next-line import/no-extraneous-dependencies
+ const supportsColor = require('supports-color');
+
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
+ exports.colors = [
+ 20,
+ 21,
+ 26,
+ 27,
+ 32,
+ 33,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 56,
+ 57,
+ 62,
+ 63,
+ 68,
+ 69,
+ 74,
+ 75,
+ 76,
+ 77,
+ 78,
+ 79,
+ 80,
+ 81,
+ 92,
+ 93,
+ 98,
+ 99,
+ 112,
+ 113,
+ 128,
+ 129,
+ 134,
+ 135,
+ 148,
+ 149,
+ 160,
+ 161,
+ 162,
+ 163,
+ 164,
+ 165,
+ 166,
+ 167,
+ 168,
+ 169,
+ 170,
+ 171,
+ 172,
+ 173,
+ 178,
+ 179,
+ 184,
+ 185,
+ 196,
+ 197,
+ 198,
+ 199,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 207,
+ 208,
+ 209,
+ 214,
+ 215,
+ 220,
+ 221
+ ];
+ }
+} catch (error) {
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(key => {
+ return /^debug_/i.test(key);
+}).reduce((obj, key) => {
+ // Camel-case
+ const prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, (_, k) => {
+ return k.toUpperCase();
+ });
+
+ // Coerce string value into JS value
+ let val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === 'null') {
+ val = null;
+ } else {
+ val = Number(val);
+ }
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts ?
+ Boolean(exports.inspectOpts.colors) :
+ tty.isatty(process.stderr.fd);
+}
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ const {namespace: name, useColors} = this;
+
+ if (useColors) {
+ const c = this.color;
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ }
+ return new Date().toISOString() + ' ';
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
+ */
+
+function log(...args) {
+ return process.stderr.write(util.format(...args) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ if (namespaces) {
+ process.env.DEBUG = namespaces;
+ } else {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init(debug) {
+ debug.inspectOpts = {};
+
+ const keys = Object.keys(exports.inspectOpts);
+ for (let i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+module.exports = require('debug/src/common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+formatters.o = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n')
+ .map(str => str.trim())
+ .join(' ');
+};
+
+/**
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+formatters.O = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
diff --git a/server/node_modules/@serialport/binding-abstract/node_modules/ms/index.js b/server/node_modules/@serialport/binding-abstract/node_modules/ms/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..c4498bcc212589664a5fe0d45e5908b174ab0a37
--- /dev/null
+++ b/server/node_modules/@serialport/binding-abstract/node_modules/ms/index.js
@@ -0,0 +1,162 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var w = d * 7;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isFinite(val)) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (msAbs >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (msAbs >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (msAbs >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, 'day');
+ }
+ if (msAbs >= h) {
+ return plural(ms, msAbs, h, 'hour');
+ }
+ if (msAbs >= m) {
+ return plural(ms, msAbs, m, 'minute');
+ }
+ if (msAbs >= s) {
+ return plural(ms, msAbs, s, 'second');
+ }
+ return ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
+}
diff --git a/server/node_modules/@serialport/binding-abstract/node_modules/ms/license.md b/server/node_modules/@serialport/binding-abstract/node_modules/ms/license.md
new file mode 100644
index 0000000000000000000000000000000000000000..69b61253a38926757b7de1d4df4880fc2105c2c9
--- /dev/null
+++ b/server/node_modules/@serialport/binding-abstract/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/server/node_modules/@serialport/binding-abstract/node_modules/ms/package.json b/server/node_modules/@serialport/binding-abstract/node_modules/ms/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..f717ff75b8b59d04f95c738c8346f25bcfc35d3e
--- /dev/null
+++ b/server/node_modules/@serialport/binding-abstract/node_modules/ms/package.json
@@ -0,0 +1,69 @@
+{
+ "_from": "ms@2.1.2",
+ "_id": "ms@2.1.2",
+ "_inBundle": false,
+ "_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "_location": "/@serialport/binding-abstract/ms",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "ms@2.1.2",
+ "name": "ms",
+ "escapedName": "ms",
+ "rawSpec": "2.1.2",
+ "saveSpec": null,
+ "fetchSpec": "2.1.2"
+ },
+ "_requiredBy": [
+ "/@serialport/binding-abstract/debug"
+ ],
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "_shasum": "d09d1f357b443f493382a8eb3ccd183872ae6009",
+ "_spec": "ms@2.1.2",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/@serialport/binding-abstract/node_modules/debug",
+ "bugs": {
+ "url": "https://github.com/zeit/ms/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Tiny millisecond conversion utility",
+ "devDependencies": {
+ "eslint": "4.12.1",
+ "expect.js": "0.3.1",
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/zeit/ms#readme",
+ "license": "MIT",
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "main": "./index",
+ "name": "ms",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/zeit/ms.git"
+ },
+ "scripts": {
+ "lint": "eslint lib/* bin/*",
+ "precommit": "lint-staged",
+ "test": "mocha tests.js"
+ },
+ "version": "2.1.2"
+}
diff --git a/server/node_modules/@serialport/binding-abstract/node_modules/ms/readme.md b/server/node_modules/@serialport/binding-abstract/node_modules/ms/readme.md
new file mode 100644
index 0000000000000000000000000000000000000000..9a1996b17e0de6854dd1cf10c5f2ee642e494085
--- /dev/null
+++ b/server/node_modules/@serialport/binding-abstract/node_modules/ms/readme.md
@@ -0,0 +1,60 @@
+# ms
+
+[](https://travis-ci.org/zeit/ms)
+[](https://spectrum.chat/zeit)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
+```
+
+### Convert from Milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time Format Written-Out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
+
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/server/node_modules/@serialport/binding-abstract/package.json b/server/node_modules/@serialport/binding-abstract/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..399dae6c0dbfec965b2c9e09104e172abf00d347
--- /dev/null
+++ b/server/node_modules/@serialport/binding-abstract/package.json
@@ -0,0 +1,56 @@
+{
+ "_from": "@serialport/binding-abstract@9.2.3",
+ "_id": "@serialport/binding-abstract@9.2.3",
+ "_inBundle": false,
+ "_integrity": "sha512-cQs9tbIlG3P0IrOWyVirqlhWuJ7Ms2Zh9m2108z6Y5UW/iVj6wEOiW8EmK9QX9jmJXYllE7wgGgvVozP5oCj3w==",
+ "_location": "/@serialport/binding-abstract",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "@serialport/binding-abstract@9.2.3",
+ "name": "@serialport/binding-abstract",
+ "escapedName": "@serialport%2fbinding-abstract",
+ "scope": "@serialport",
+ "rawSpec": "9.2.3",
+ "saveSpec": null,
+ "fetchSpec": "9.2.3"
+ },
+ "_requiredBy": [
+ "/@serialport/binding-mock",
+ "/@serialport/bindings"
+ ],
+ "_resolved": "https://registry.npmjs.org/@serialport/binding-abstract/-/binding-abstract-9.2.3.tgz",
+ "_shasum": "e7dd273357b6a698af7ad58db6f57f62443a0acb",
+ "_spec": "@serialport/binding-abstract@9.2.3",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/@serialport/binding-mock",
+ "bugs": {
+ "url": "https://github.com/serialport/node-serialport/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "debug": "^4.3.2"
+ },
+ "deprecated": false,
+ "description": "This Abstract binding class is the base for all serialport bindings. You wouldn't use this class directly but instead extend it to make a new binding for a different platform or underling technology.",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": "https://opencollective.com/serialport/donate",
+ "gitHead": "176149a820d89bdcab2a3900b3113fc66140e67d",
+ "homepage": "https://github.com/serialport/node-serialport#readme",
+ "keywords": [
+ "serialport-binding"
+ ],
+ "license": "MIT",
+ "main": "lib",
+ "name": "@serialport/binding-abstract",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/serialport/node-serialport.git"
+ },
+ "version": "9.2.3"
+}
diff --git a/server/node_modules/@serialport/binding-mock/CHANGELOG.md b/server/node_modules/@serialport/binding-mock/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..8a0ed0c58590cebeb91c7e993bf15eba1500bd51
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/CHANGELOG.md
@@ -0,0 +1,67 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [9.2.4](https://github.com/serialport/node-serialport/compare/v9.2.3...v9.2.4) (2021-09-28)
+
+**Note:** Version bump only for package @serialport/binding-mock
+
+
+
+
+
+## [9.2.3](https://github.com/serialport/node-serialport/compare/v9.2.1...v9.2.3) (2021-09-24)
+
+**Note:** Version bump only for package @serialport/binding-mock
+
+
+
+
+
+## [9.2.2](https://github.com/serialport/node-serialport/compare/v9.2.1...v9.2.2) (2021-09-24)
+
+**Note:** Version bump only for package @serialport/binding-mock
+
+
+
+
+
+## [9.0.7](https://github.com/serialport/node-serialport/compare/v9.0.6...v9.0.7) (2021-02-22)
+
+**Note:** Version bump only for package @serialport/binding-mock
+
+
+
+
+
+## [9.0.2](https://github.com/serialport/node-serialport/compare/v9.0.1...v9.0.2) (2020-10-16)
+
+**Note:** Version bump only for package @serialport/binding-mock
+
+
+
+
+
+## [9.0.1](https://github.com/serialport/node-serialport/compare/v9.0.0...v9.0.1) (2020-08-08)
+
+**Note:** Version bump only for package @serialport/binding-mock
+
+
+
+
+
+# [9.0.0](https://github.com/serialport/node-serialport/compare/v8.0.8...v9.0.0) (2020-05-10)
+
+**Note:** Version bump only for package @serialport/binding-mock
+
+
+
+
+
+## [8.0.6](https://github.com/serialport/node-serialport/compare/v8.0.5...v8.0.6) (2019-12-25)
+
+
+### Bug Fixes
+
+* bindings.close() should cause a canceled read error ([#1972](https://github.com/serialport/node-serialport/issues/1972)) ([50f967e](https://github.com/serialport/node-serialport/commit/50f967e788f362da57d782829712542c8f15f8c8))
diff --git a/server/node_modules/@serialport/binding-mock/LICENSE b/server/node_modules/@serialport/binding-mock/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..800d7767c0ac4d336ac201850eee0c26be1f7421
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright 2010 Christopher Williams. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/server/node_modules/@serialport/binding-mock/README.md b/server/node_modules/@serialport/binding-mock/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..ada699376ebc6e525437db2168115e92bf1997fe
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/README.md
@@ -0,0 +1,11 @@
+# @serialport/BindingMock
+
+This stream does some neat stuff.
+
+This is why you'd use it.
+
+This is how you use it.
+```js
+const bindingMock = new BindingMock()
+
+```
diff --git a/server/node_modules/@serialport/binding-mock/lib/index.js b/server/node_modules/@serialport/binding-mock/lib/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..d5b9a6425b5c99d4e3d281d537e8ba4eec179c93
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/lib/index.js
@@ -0,0 +1,233 @@
+const AbstractBinding = require('@serialport/binding-abstract')
+const debug = require('debug')('serialport/binding-mock')
+const { wrapWithHiddenComName } = require('@serialport/binding-mock/lib/legacy')
+
+let ports = {}
+let serialNumber = 0
+
+function resolveNextTick(value) {
+ return new Promise(resolve => process.nextTick(() => resolve(value)))
+}
+
+const cancelError = message => {
+ const err = new Error(message)
+ err.canceled = true
+ return err
+}
+
+/**
+ * Mock bindings for pretend serialport access
+ */
+class MockBinding extends AbstractBinding {
+ constructor(opt = {}) {
+ super(opt)
+ this.pendingRead = null // thunk for a promise or null
+ this.isOpen = false
+ this.port = null
+ this.lastWrite = null
+ this.recording = Buffer.alloc(0)
+ this.writeOperation = null // in flight promise or null
+ }
+
+ // Reset mocks
+ static reset() {
+ ports = {}
+ serialNumber = 0
+ }
+
+ // Create a mock port
+ static createPort(path, opt) {
+ serialNumber++
+ opt = {
+ echo: false,
+ record: false,
+ readyData: Buffer.from('READY'),
+ manufacturer: 'The J5 Robotics Company',
+ vendorId: undefined,
+ productId: undefined,
+ ...opt,
+ }
+
+ ports[path] = {
+ data: Buffer.alloc(0),
+ echo: opt.echo,
+ record: opt.record,
+ readyData: Buffer.from(opt.readyData),
+ info: {
+ path,
+ manufacturer: opt.manufacturer,
+ serialNumber,
+ pnpId: undefined,
+ locationId: undefined,
+ vendorId: opt.vendorId,
+ productId: opt.productId,
+ },
+ }
+ debug(serialNumber, 'created port', JSON.stringify({ path, opt }))
+ }
+
+ static async list() {
+ return wrapWithHiddenComName(Object.values(ports).map(port => port.info))
+ }
+
+ // Emit data on a mock port
+ emitData(data) {
+ if (!this.isOpen) {
+ throw new Error('Port must be open to pretend to receive data')
+ }
+ if (!Buffer.isBuffer(data)) {
+ data = Buffer.from(data)
+ }
+ debug(this.serialNumber, 'emitting data - pending read:', Boolean(this.pendingRead))
+ this.port.data = Buffer.concat([this.port.data, data])
+ if (this.pendingRead) {
+ process.nextTick(this.pendingRead)
+ this.pendingRead = null
+ }
+ }
+
+ async open(path, opt) {
+ debug(null, `opening path ${path}`)
+ const port = (this.port = ports[path])
+ await super.open(path, opt)
+ await resolveNextTick()
+ if (!port) {
+ throw new Error(`Port does not exist - please call MockBinding.createPort('${path}') first`)
+ }
+ this.serialNumber = port.info.serialNumber
+
+ if (port.openOpt && port.openOpt.lock) {
+ throw new Error('Port is locked cannot open')
+ }
+
+ if (this.isOpen) {
+ throw new Error('Open: binding is already open')
+ }
+
+ port.openOpt = { ...opt }
+ this.isOpen = true
+ debug(this.serialNumber, 'port is open')
+ if (port.echo) {
+ process.nextTick(() => {
+ if (this.isOpen) {
+ debug(this.serialNumber, 'emitting ready data')
+ this.emitData(port.readyData)
+ }
+ })
+ }
+ }
+
+ async close() {
+ const port = this.port
+ debug(this.serialNumber, 'closing port')
+ if (!port) {
+ throw new Error('already closed')
+ }
+
+ await super.close()
+ delete port.openOpt
+ // reset data on close
+ port.data = Buffer.alloc(0)
+ debug(this.serialNumber, 'port is closed')
+ delete this.port
+ delete this.serialNumber
+ this.isOpen = false
+ if (this.pendingRead) {
+ this.pendingRead(cancelError('port is closed'))
+ }
+ }
+
+ async read(buffer, offset, length) {
+ debug(this.serialNumber, 'reading', length, 'bytes')
+ await super.read(buffer, offset, length)
+ await resolveNextTick()
+ if (!this.isOpen) {
+ throw cancelError('Read canceled')
+ }
+ if (this.port.data.length <= 0) {
+ return new Promise((resolve, reject) => {
+ this.pendingRead = err => {
+ if (err) {
+ return reject(err)
+ }
+ this.read(buffer, offset, length).then(resolve, reject)
+ }
+ })
+ }
+ const data = this.port.data.slice(0, length)
+ const bytesRead = data.copy(buffer, offset)
+ this.port.data = this.port.data.slice(length)
+ debug(this.serialNumber, 'read', bytesRead, 'bytes')
+ return { bytesRead, buffer }
+ }
+
+ async write(buffer) {
+ debug(this.serialNumber, 'writing')
+ if (this.writeOperation) {
+ throw new Error('Overlapping writes are not supported and should be queued by the serialport object')
+ }
+ this.writeOperation = super.write(buffer).then(async () => {
+ await resolveNextTick()
+ if (!this.isOpen) {
+ throw new Error('Write canceled')
+ }
+ const data = (this.lastWrite = Buffer.from(buffer)) // copy
+ if (this.port.record) {
+ this.recording = Buffer.concat([this.recording, data])
+ }
+ if (this.port.echo) {
+ process.nextTick(() => {
+ if (this.isOpen) {
+ this.emitData(data)
+ }
+ })
+ }
+ this.writeOperation = null
+ debug(this.serialNumber, 'writing finished')
+ })
+ return this.writeOperation
+ }
+
+ async update(opt) {
+ await super.update(opt)
+ await resolveNextTick()
+ this.port.openOpt.baudRate = opt.baudRate
+ }
+
+ async set(opt) {
+ await super.set(opt)
+ await resolveNextTick()
+ }
+
+ async get() {
+ await super.get()
+ await resolveNextTick()
+ return {
+ cts: true,
+ dsr: false,
+ dcd: false,
+ }
+ }
+
+ async getBaudRate() {
+ await super.getBaudRate()
+ await resolveNextTick()
+ return {
+ baudRate: this.port.openOpt.baudRate,
+ }
+ }
+
+ async flush() {
+ await super.flush()
+ await resolveNextTick()
+ this.port.data = Buffer.alloc(0)
+ }
+
+ async drain() {
+ await super.drain()
+ await this.writeOperation
+ await resolveNextTick()
+ }
+}
+
+module.exports = MockBinding
diff --git a/server/node_modules/@serialport/binding-mock/lib/legacy.js b/server/node_modules/@serialport/binding-mock/lib/legacy.js
new file mode 100644
index 0000000000000000000000000000000000000000..9cd2b70eda6c5a89233afacacea2ff6e87108586
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/lib/legacy.js
@@ -0,0 +1,26 @@
+let warningSent = false
+
+const wrapWithHiddenComName = async portsPromise => {
+ const ports = await portsPromise
+ return ports.map(port => {
+ const newPort = { ...port }
+ return Object.defineProperties(newPort, {
+ comName: {
+ get() {
+ if (!warningSent) {
+ warningSent = true
+ console.warn(
+ `"PortInfo.comName" has been deprecated. You should now use "PortInfo.path". The property will be removed in the next major release.`
+ )
+ }
+ return newPort.path
+ },
+ enumerable: false,
+ },
+ })
+ })
+}
+
+module.exports = {
+ wrapWithHiddenComName,
+}
diff --git a/server/node_modules/@serialport/binding-mock/node_modules/debug/LICENSE b/server/node_modules/@serialport/binding-mock/node_modules/debug/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..1a9820e262b26b60fe71a4dcd9bc9cfd0a01f26e
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/node_modules/debug/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk
+Copyright (c) 2018-2021 Josh Junon
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+and associated documentation files (the 'Software'), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/server/node_modules/@serialport/binding-mock/node_modules/debug/README.md b/server/node_modules/@serialport/binding-mock/node_modules/debug/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..5ea4cd2759b917de9797f7073d738833ae9ba980
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/node_modules/debug/README.md
@@ -0,0 +1,478 @@
+# debug
+[](https://travis-ci.org/debug-js/debug) [](https://coveralls.io/github/debug-js/debug?branch=master) [](https://visionmedia-community-slackin.now.sh/) [](#backers)
+[](#sponsors)
+
+
+
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example [_app.js_](./examples/node/app.js):
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %o', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example [_worker.js_](./examples/node/worker.js):
+
+```js
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
+
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
+```
+
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
+
+Here are some examples:
+
+
+
+
+
+#### Windows command prompt notes
+
+##### CMD
+
+On Windows the environment variable is set using the `set` command.
+
+```cmd
+set DEBUG=*,-not_this
+```
+
+Example:
+
+```cmd
+set DEBUG=* & node app.js
+```
+
+##### PowerShell (VS Code default)
+
+PowerShell uses different syntax to set environment variables.
+
+```cmd
+$env:DEBUG = "*,-not_this"
+```
+
+Example:
+
+```cmd
+$env:DEBUG='app';node app.js
+```
+
+Then, run the program to be debugged as usual.
+
+npm script example:
+```js
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
+```
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+
+
+
+## Millisecond diff
+
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+
+
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+
+
+
+## Conventions
+
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
+
+## Wildcards
+
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
+
+## Environment Variables
+
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
+
+## Formatters
+
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+
+### Custom formatters
+
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example [_stdout.js_](./examples/node/stdout.js):
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+## Extend
+You can simply extend debugger
+```js
+const log = require('debug')('auth');
+
+//creates new debug instance with extended namespace
+const logSign = log.extend('sign');
+const logLogin = log.extend('login');
+
+log('hello'); // auth hello
+logSign('hello'); //auth:sign hello
+logLogin('hello'); //auth:login hello
+```
+
+## Set dynamically
+
+You can also enable debug dynamically by calling the `enable()` method :
+
+```js
+let debug = require('debug');
+
+console.log(1, debug.enabled('test'));
+
+debug.enable('test');
+console.log(2, debug.enabled('test'));
+
+debug.disable();
+console.log(3, debug.enabled('test'));
+
+```
+
+print :
+```
+1 false
+2 true
+3 false
+```
+
+Usage :
+`enable(namespaces)`
+`namespaces` can include modes separated by a colon and wildcards.
+
+Note that calling `enable()` completely overrides previously set DEBUG variable :
+
+```
+$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
+=> false
+```
+
+`disable()`
+
+Will disable all namespaces. The functions returns the namespaces currently
+enabled (and skipped). This can be useful if you want to disable debugging
+temporarily without knowing what was enabled to begin with.
+
+For example:
+
+```js
+let debug = require('debug');
+debug.enable('foo:*,-foo:bar');
+let namespaces = debug.disable();
+debug.enable(namespaces);
+```
+
+Note: There is no guarantee that the string will be identical to the initial
+enable string, but semantically they will be identical.
+
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
+## Usage in child processes
+
+Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process.
+For example:
+
+```javascript
+worker = fork(WORKER_WRAP_PATH, [workerPath], {
+ stdio: [
+ /* stdin: */ 0,
+ /* stdout: */ 'pipe',
+ /* stderr: */ 'pipe',
+ 'ipc',
+ ],
+ env: Object.assign({}, process.env, {
+ DEBUG_COLORS: 1 // without this settings, colors won't be shown
+ }),
+});
+
+worker.stderr.pipe(process.stderr, { end: false });
+```
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+ - Josh Junon
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
+Copyright (c) 2018-2021 Josh Junon
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/server/node_modules/@serialport/binding-mock/node_modules/debug/package.json b/server/node_modules/@serialport/binding-mock/node_modules/debug/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..c1d2adff8b453f49203c136f2067741693869a2d
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/node_modules/debug/package.json
@@ -0,0 +1,101 @@
+{
+ "_from": "debug@^4.3.2",
+ "_id": "debug@4.3.3",
+ "_inBundle": false,
+ "_integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
+ "_location": "/@serialport/binding-mock/debug",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "debug@^4.3.2",
+ "name": "debug",
+ "escapedName": "debug",
+ "rawSpec": "^4.3.2",
+ "saveSpec": null,
+ "fetchSpec": "^4.3.2"
+ },
+ "_requiredBy": [
+ "/@serialport/binding-mock"
+ ],
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
+ "_shasum": "04266e0b70a98d4462e6e288e38259213332b664",
+ "_spec": "debug@^4.3.2",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/@serialport/binding-mock",
+ "author": {
+ "name": "Josh Junon",
+ "email": "josh.junon@protonmail.com"
+ },
+ "browser": "./src/browser.js",
+ "bugs": {
+ "url": "https://github.com/debug-js/debug/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io"
+ },
+ {
+ "name": "Andrew Rhyne",
+ "email": "rhyneandrew@gmail.com"
+ }
+ ],
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "deprecated": false,
+ "description": "Lightweight debugging utility for Node.js and the browser",
+ "devDependencies": {
+ "brfs": "^2.0.1",
+ "browserify": "^16.2.3",
+ "coveralls": "^3.0.2",
+ "istanbul": "^0.4.5",
+ "karma": "^3.1.4",
+ "karma-browserify": "^6.0.0",
+ "karma-chrome-launcher": "^2.2.0",
+ "karma-mocha": "^1.3.0",
+ "mocha": "^5.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "xo": "^0.23.0"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "files": [
+ "src",
+ "LICENSE",
+ "README.md"
+ ],
+ "homepage": "https://github.com/debug-js/debug#readme",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "license": "MIT",
+ "main": "./src/index.js",
+ "name": "debug",
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/debug-js/debug.git"
+ },
+ "scripts": {
+ "lint": "xo",
+ "test": "npm run test:node && npm run test:browser && npm run lint",
+ "test:browser": "karma start --single-run",
+ "test:coverage": "cat ./coverage/lcov.info | coveralls",
+ "test:node": "istanbul cover _mocha -- test.js"
+ },
+ "version": "4.3.3"
+}
diff --git a/server/node_modules/@serialport/binding-mock/node_modules/debug/src/browser.js b/server/node_modules/@serialport/binding-mock/node_modules/debug/src/browser.js
new file mode 100644
index 0000000000000000000000000000000000000000..3bf30ea51ba16c08a17865ba1263a0240580daad
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/node_modules/debug/src/browser.js
@@ -0,0 +1,269 @@
+/* eslint-env browser */
+
+/**
+ * This is the web browser implementation of `debug()`.
+ */
+
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = localstorage();
+exports.destroy = (() => {
+ let warned = false;
+
+ return () => {
+ if (!warned) {
+ warned = true;
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+ };
+})();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ '#0000CC',
+ '#0000FF',
+ '#0033CC',
+ '#0033FF',
+ '#0066CC',
+ '#0066FF',
+ '#0099CC',
+ '#0099FF',
+ '#00CC00',
+ '#00CC33',
+ '#00CC66',
+ '#00CC99',
+ '#00CCCC',
+ '#00CCFF',
+ '#3300CC',
+ '#3300FF',
+ '#3333CC',
+ '#3333FF',
+ '#3366CC',
+ '#3366FF',
+ '#3399CC',
+ '#3399FF',
+ '#33CC00',
+ '#33CC33',
+ '#33CC66',
+ '#33CC99',
+ '#33CCCC',
+ '#33CCFF',
+ '#6600CC',
+ '#6600FF',
+ '#6633CC',
+ '#6633FF',
+ '#66CC00',
+ '#66CC33',
+ '#9900CC',
+ '#9900FF',
+ '#9933CC',
+ '#9933FF',
+ '#99CC00',
+ '#99CC33',
+ '#CC0000',
+ '#CC0033',
+ '#CC0066',
+ '#CC0099',
+ '#CC00CC',
+ '#CC00FF',
+ '#CC3300',
+ '#CC3333',
+ '#CC3366',
+ '#CC3399',
+ '#CC33CC',
+ '#CC33FF',
+ '#CC6600',
+ '#CC6633',
+ '#CC9900',
+ '#CC9933',
+ '#CCCC00',
+ '#CCCC33',
+ '#FF0000',
+ '#FF0033',
+ '#FF0066',
+ '#FF0099',
+ '#FF00CC',
+ '#FF00FF',
+ '#FF3300',
+ '#FF3333',
+ '#FF3366',
+ '#FF3399',
+ '#FF33CC',
+ '#FF33FF',
+ '#FF6600',
+ '#FF6633',
+ '#FF9900',
+ '#FF9933',
+ '#FFCC00',
+ '#FFCC33'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+// eslint-disable-next-line complexity
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
+ return true;
+ }
+
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // Is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // Is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // Double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ args[0] = (this.useColors ? '%c' : '') +
+ this.namespace +
+ (this.useColors ? ' %c' : ' ') +
+ args[0] +
+ (this.useColors ? '%c ' : ' ') +
+ '+' + module.exports.humanize(this.diff);
+
+ if (!this.useColors) {
+ return;
+ }
+
+ const c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit');
+
+ // The final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ let index = 0;
+ let lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, match => {
+ if (match === '%%') {
+ return;
+ }
+ index++;
+ if (match === '%c') {
+ // We only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.debug()` when available.
+ * No-op when `console.debug` is not a "function".
+ * If `console.debug` is not available, falls back
+ * to `console.log`.
+ *
+ * @api public
+ */
+exports.log = console.debug || console.log || (() => {});
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ try {
+ if (namespaces) {
+ exports.storage.setItem('debug', namespaces);
+ } else {
+ exports.storage.removeItem('debug');
+ }
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+function load() {
+ let r;
+ try {
+ r = exports.storage.getItem('debug');
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+ // The Browser also has localStorage in the global context.
+ return localStorage;
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+module.exports = require('debug/src/common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+formatters.j = function (v) {
+ try {
+ return JSON.stringify(v);
+ } catch (error) {
+ return '[UnexpectedJSONParseError]: ' + error.message;
+ }
+};
diff --git a/server/node_modules/@serialport/binding-mock/node_modules/debug/src/common.js b/server/node_modules/@serialport/binding-mock/node_modules/debug/src/common.js
new file mode 100644
index 0000000000000000000000000000000000000000..6d571d2844dd950db81c8e07cabbfc9048c59658
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/node_modules/debug/src/common.js
@@ -0,0 +1,274 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ */
+
+function setup(env) {
+ createDebug.debug = createDebug;
+ createDebug.default = createDebug;
+ createDebug.coerce = coerce;
+ createDebug.disable = disable;
+ createDebug.enable = enable;
+ createDebug.enabled = enabled;
+ createDebug.humanize = require('ms');
+ createDebug.destroy = destroy;
+
+ Object.keys(env).forEach(key => {
+ createDebug[key] = env[key];
+ });
+
+ /**
+ * The currently active debug mode names, and names to skip.
+ */
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ /**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+ createDebug.formatters = {};
+
+ /**
+ * Selects a color for a debug namespace
+ * @param {String} namespace The namespace string for the debug instance to be colored
+ * @return {Number|String} An ANSI color code for the given namespace
+ * @api private
+ */
+ function selectColor(namespace) {
+ let hash = 0;
+
+ for (let i = 0; i < namespace.length; i++) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
+ }
+ createDebug.selectColor = selectColor;
+
+ /**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+ function createDebug(namespace) {
+ let prevTime;
+ let enableOverride = null;
+ let namespacesCache;
+ let enabledCache;
+
+ function debug(...args) {
+ // Disabled?
+ if (!debug.enabled) {
+ return;
+ }
+
+ const self = debug;
+
+ // Set `diff` timestamp
+ const curr = Number(new Date());
+ const ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ args[0] = createDebug.coerce(args[0]);
+
+ if (typeof args[0] !== 'string') {
+ // Anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // Apply any `formatters` transformations
+ let index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
+ // If we encounter an escaped % then don't increase the array index
+ if (match === '%%') {
+ return '%';
+ }
+ index++;
+ const formatter = createDebug.formatters[format];
+ if (typeof formatter === 'function') {
+ const val = args[index];
+ match = formatter.call(self, val);
+
+ // Now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // Apply env-specific formatting (colors, etc.)
+ createDebug.formatArgs.call(self, args);
+
+ const logFn = self.log || createDebug.log;
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.useColors = createDebug.useColors();
+ debug.color = createDebug.selectColor(namespace);
+ debug.extend = extend;
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
+
+ Object.defineProperty(debug, 'enabled', {
+ enumerable: true,
+ configurable: false,
+ get: () => {
+ if (enableOverride !== null) {
+ return enableOverride;
+ }
+ if (namespacesCache !== createDebug.namespaces) {
+ namespacesCache = createDebug.namespaces;
+ enabledCache = createDebug.enabled(namespace);
+ }
+
+ return enabledCache;
+ },
+ set: v => {
+ enableOverride = v;
+ }
+ });
+
+ // Env-specific initialization logic for debug instances
+ if (typeof createDebug.init === 'function') {
+ createDebug.init(debug);
+ }
+
+ return debug;
+ }
+
+ function extend(namespace, delimiter) {
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
+ newDebug.log = this.log;
+ return newDebug;
+ }
+
+ /**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+ function enable(namespaces) {
+ createDebug.save(namespaces);
+ createDebug.namespaces = namespaces;
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ let i;
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ const len = split.length;
+
+ for (i = 0; i < len; i++) {
+ if (!split[i]) {
+ // ignore empty strings
+ continue;
+ }
+
+ namespaces = split[i].replace(/\*/g, '.*?');
+
+ if (namespaces[0] === '-') {
+ createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+ }
+
+ /**
+ * Disable debug output.
+ *
+ * @return {String} namespaces
+ * @api public
+ */
+ function disable() {
+ const namespaces = [
+ ...createDebug.names.map(toNamespace),
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
+ ].join(',');
+ createDebug.enable('');
+ return namespaces;
+ }
+
+ /**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+ function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
+
+ let i;
+ let len;
+
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
+ if (createDebug.skips[i].test(name)) {
+ return false;
+ }
+ }
+
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
+ if (createDebug.names[i].test(name)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Convert regexp to namespace
+ *
+ * @param {RegExp} regxep
+ * @return {String} namespace
+ * @api private
+ */
+ function toNamespace(regexp) {
+ return regexp.toString()
+ .substring(2, regexp.toString().length - 2)
+ .replace(/\.\*\?$/, '*');
+ }
+
+ /**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+ function coerce(val) {
+ if (val instanceof Error) {
+ return val.stack || val.message;
+ }
+ return val;
+ }
+
+ /**
+ * XXX DO NOT USE. This is a temporary stub function.
+ * XXX It WILL be removed in the next major release.
+ */
+ function destroy() {
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+
+ createDebug.enable(createDebug.load());
+
+ return createDebug;
+}
+
+module.exports = setup;
diff --git a/server/node_modules/@serialport/binding-mock/node_modules/debug/src/index.js b/server/node_modules/@serialport/binding-mock/node_modules/debug/src/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..d0b8579432a88872cc1df415ae061509df74b38f
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer / nwjs process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
+ module.exports = require('debug/src/browser.js');
+} else {
+ module.exports = require('debug/src/node.js');
+}
diff --git a/server/node_modules/@serialport/binding-mock/node_modules/debug/src/node.js b/server/node_modules/@serialport/binding-mock/node_modules/debug/src/node.js
new file mode 100644
index 0000000000000000000000000000000000000000..3044efcce21274bf69b98b20d159031766e47d73
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/node_modules/debug/src/node.js
@@ -0,0 +1,263 @@
+/**
+ * Module dependencies.
+ */
+
+const tty = require('tty');
+const util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ */
+
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.destroy = util.deprecate(
+ () => {},
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
+);
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+try {
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
+ // eslint-disable-next-line import/no-extraneous-dependencies
+ const supportsColor = require('supports-color');
+
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
+ exports.colors = [
+ 20,
+ 21,
+ 26,
+ 27,
+ 32,
+ 33,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 56,
+ 57,
+ 62,
+ 63,
+ 68,
+ 69,
+ 74,
+ 75,
+ 76,
+ 77,
+ 78,
+ 79,
+ 80,
+ 81,
+ 92,
+ 93,
+ 98,
+ 99,
+ 112,
+ 113,
+ 128,
+ 129,
+ 134,
+ 135,
+ 148,
+ 149,
+ 160,
+ 161,
+ 162,
+ 163,
+ 164,
+ 165,
+ 166,
+ 167,
+ 168,
+ 169,
+ 170,
+ 171,
+ 172,
+ 173,
+ 178,
+ 179,
+ 184,
+ 185,
+ 196,
+ 197,
+ 198,
+ 199,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 207,
+ 208,
+ 209,
+ 214,
+ 215,
+ 220,
+ 221
+ ];
+ }
+} catch (error) {
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(key => {
+ return /^debug_/i.test(key);
+}).reduce((obj, key) => {
+ // Camel-case
+ const prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, (_, k) => {
+ return k.toUpperCase();
+ });
+
+ // Coerce string value into JS value
+ let val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === 'null') {
+ val = null;
+ } else {
+ val = Number(val);
+ }
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts ?
+ Boolean(exports.inspectOpts.colors) :
+ tty.isatty(process.stderr.fd);
+}
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ const {namespace: name, useColors} = this;
+
+ if (useColors) {
+ const c = this.color;
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ }
+ return new Date().toISOString() + ' ';
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
+ */
+
+function log(...args) {
+ return process.stderr.write(util.format(...args) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ if (namespaces) {
+ process.env.DEBUG = namespaces;
+ } else {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init(debug) {
+ debug.inspectOpts = {};
+
+ const keys = Object.keys(exports.inspectOpts);
+ for (let i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+module.exports = require('debug/src/common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+formatters.o = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n')
+ .map(str => str.trim())
+ .join(' ');
+};
+
+/**
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+formatters.O = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
diff --git a/server/node_modules/@serialport/binding-mock/node_modules/ms/index.js b/server/node_modules/@serialport/binding-mock/node_modules/ms/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..c4498bcc212589664a5fe0d45e5908b174ab0a37
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/node_modules/ms/index.js
@@ -0,0 +1,162 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var w = d * 7;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isFinite(val)) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (msAbs >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (msAbs >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (msAbs >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, 'day');
+ }
+ if (msAbs >= h) {
+ return plural(ms, msAbs, h, 'hour');
+ }
+ if (msAbs >= m) {
+ return plural(ms, msAbs, m, 'minute');
+ }
+ if (msAbs >= s) {
+ return plural(ms, msAbs, s, 'second');
+ }
+ return ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
+}
diff --git a/server/node_modules/@serialport/binding-mock/node_modules/ms/license.md b/server/node_modules/@serialport/binding-mock/node_modules/ms/license.md
new file mode 100644
index 0000000000000000000000000000000000000000..69b61253a38926757b7de1d4df4880fc2105c2c9
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/server/node_modules/@serialport/binding-mock/node_modules/ms/package.json b/server/node_modules/@serialport/binding-mock/node_modules/ms/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..30c94de2c17064e0bfd18992f7630be4e3a737dc
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/node_modules/ms/package.json
@@ -0,0 +1,69 @@
+{
+ "_from": "ms@2.1.2",
+ "_id": "ms@2.1.2",
+ "_inBundle": false,
+ "_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "_location": "/@serialport/binding-mock/ms",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "ms@2.1.2",
+ "name": "ms",
+ "escapedName": "ms",
+ "rawSpec": "2.1.2",
+ "saveSpec": null,
+ "fetchSpec": "2.1.2"
+ },
+ "_requiredBy": [
+ "/@serialport/binding-mock/debug"
+ ],
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "_shasum": "d09d1f357b443f493382a8eb3ccd183872ae6009",
+ "_spec": "ms@2.1.2",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/@serialport/binding-mock/node_modules/debug",
+ "bugs": {
+ "url": "https://github.com/zeit/ms/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Tiny millisecond conversion utility",
+ "devDependencies": {
+ "eslint": "4.12.1",
+ "expect.js": "0.3.1",
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/zeit/ms#readme",
+ "license": "MIT",
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "main": "./index",
+ "name": "ms",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/zeit/ms.git"
+ },
+ "scripts": {
+ "lint": "eslint lib/* bin/*",
+ "precommit": "lint-staged",
+ "test": "mocha tests.js"
+ },
+ "version": "2.1.2"
+}
diff --git a/server/node_modules/@serialport/binding-mock/node_modules/ms/readme.md b/server/node_modules/@serialport/binding-mock/node_modules/ms/readme.md
new file mode 100644
index 0000000000000000000000000000000000000000..9a1996b17e0de6854dd1cf10c5f2ee642e494085
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/node_modules/ms/readme.md
@@ -0,0 +1,60 @@
+# ms
+
+[](https://travis-ci.org/zeit/ms)
+[](https://spectrum.chat/zeit)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
+```
+
+### Convert from Milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time Format Written-Out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
+
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/server/node_modules/@serialport/binding-mock/package.json b/server/node_modules/@serialport/binding-mock/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..3c83593d6394f3646e5dede23bce5fd73c701a42
--- /dev/null
+++ b/server/node_modules/@serialport/binding-mock/package.json
@@ -0,0 +1,56 @@
+{
+ "_from": "@serialport/binding-mock@9.2.4",
+ "_id": "@serialport/binding-mock@9.2.4",
+ "_inBundle": false,
+ "_integrity": "sha512-dpEhACCs44oQhh6ajJfJdvQdK38Vq0N4W6iD/gdplglDCK7qXRQCMUjJIeKdS/HSEiWkC3bwumUhUufdsOyT4g==",
+ "_location": "/@serialport/binding-mock",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "@serialport/binding-mock@9.2.4",
+ "name": "@serialport/binding-mock",
+ "escapedName": "@serialport%2fbinding-mock",
+ "scope": "@serialport",
+ "rawSpec": "9.2.4",
+ "saveSpec": null,
+ "fetchSpec": "9.2.4"
+ },
+ "_requiredBy": [
+ "/serialport"
+ ],
+ "_resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-9.2.4.tgz",
+ "_shasum": "8adf34742abcee80919e19f1266423ce1c9407e2",
+ "_spec": "@serialport/binding-mock@9.2.4",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/serialport",
+ "bugs": {
+ "url": "https://github.com/serialport/node-serialport/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "@serialport/binding-abstract": "9.2.3",
+ "debug": "^4.3.2"
+ },
+ "deprecated": false,
+ "description": "This stream does some neat stuff.",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": "https://opencollective.com/serialport/donate",
+ "gitHead": "494fd0f097e25fd5475e543f80bf23cc05ea6abc",
+ "homepage": "https://github.com/serialport/node-serialport#readme",
+ "keywords": [
+ "serialport-binding"
+ ],
+ "license": "MIT",
+ "main": "lib",
+ "name": "@serialport/binding-mock",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/serialport/node-serialport.git"
+ },
+ "version": "9.2.4"
+}
diff --git a/server/node_modules/@serialport/bindings/.prebuild-installrc b/server/node_modules/@serialport/bindings/.prebuild-installrc
new file mode 100644
index 0000000000000000000000000000000000000000..dc9ece4f38a89af347948ad41a740475a256fa74
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/.prebuild-installrc
@@ -0,0 +1,3 @@
+{
+ "tag-prefix": "@serialport/bindings@"
+}
diff --git a/server/node_modules/@serialport/bindings/LICENSE b/server/node_modules/@serialport/bindings/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..800d7767c0ac4d336ac201850eee0c26be1f7421
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright 2010 Christopher Williams. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/server/node_modules/@serialport/bindings/README.md b/server/node_modules/@serialport/bindings/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..f559f0785af18eac64e757385514406a8783fcbb
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/README.md
@@ -0,0 +1,13 @@
+# @serialport/Bindings
+
+The `Binding` is how Node-SerialPort talks to the underlying system. By default, we auto detect Windows, Linux and OS X, and load the appropriate module for your system. You can assign `SerialPort.Binding` to any binding you like. Find more by searching ["serialport-binding" at npm](https://www.npmjs.com/search?q=serialport-binding).
+
+Learn more at our [bindings documentation](https://serialport.io/docs/api-bindings) page.
+
+# Android users
+
+When using termux there is a way to compile serialport to be used under Android
+
+```sh
+CFLAGS=-fPIC CXXFLAGS=-fPIC yarn rebuild
+```
diff --git a/server/node_modules/@serialport/bindings/binding.gyp b/server/node_modules/@serialport/bindings/binding.gyp
new file mode 100644
index 0000000000000000000000000000000000000000..c8001c33172d4ae2d51731762bac0af21361ffe7
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/binding.gyp
@@ -0,0 +1,68 @@
+{
+ 'targets': [{
+ 'target_name': 'bindings',
+ 'sources': [
+ 'src/serialport.cpp'
+ ],
+ 'include_dirs': [
+ ' {
+ if (buffer.length === 0) {
+ return
+ }
+ await unixWrite({ binding: this, buffer })
+ this.writeOperation = null
+ })
+ return this.writeOperation
+ }
+
+ async update(options) {
+ await super.update(options)
+ return asyncUpdate(this.fd, options)
+ }
+
+ async set(options) {
+ await super.set(options)
+ return asyncSet(this.fd, options)
+ }
+
+ async get() {
+ await super.get()
+ return asyncGet(this.fd)
+ }
+
+ async getBaudRate() {
+ await super.get()
+ return asyncGetBaudRate(this.fd)
+ }
+
+ async drain() {
+ await super.drain()
+ await this.writeOperation
+ return asyncDrain(this.fd)
+ }
+
+ async flush() {
+ await super.flush()
+ return asyncFlush(this.fd)
+ }
+}
+
+module.exports = DarwinBinding
diff --git a/server/node_modules/@serialport/bindings/lib/index.js b/server/node_modules/@serialport/bindings/lib/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..b3725e31e42297c7e98c22aa4b3f43a492900e39
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/lib/index.js
@@ -0,0 +1,15 @@
+const debug = require('debug')('serialport/bindings')
+
+switch (process.platform) {
+ case 'win32':
+ debug('loading WindowsBinding')
+ module.exports = require('@serialport/bindings/lib/win32')
+ break
+ case 'darwin':
+ debug('loading DarwinBinding')
+ module.exports = require('@serialport/bindings/lib/darwin')
+ break
+ default:
+ debug('loading LinuxBinding')
+ module.exports = require('@serialport/bindings/lib/linux')
+}
diff --git a/server/node_modules/@serialport/bindings/lib/legacy.js b/server/node_modules/@serialport/bindings/lib/legacy.js
new file mode 100644
index 0000000000000000000000000000000000000000..9cd2b70eda6c5a89233afacacea2ff6e87108586
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/lib/legacy.js
@@ -0,0 +1,26 @@
+let warningSent = false
+
+const wrapWithHiddenComName = async portsPromise => {
+ const ports = await portsPromise
+ return ports.map(port => {
+ const newPort = { ...port }
+ return Object.defineProperties(newPort, {
+ comName: {
+ get() {
+ if (!warningSent) {
+ warningSent = true
+ console.warn(
+ `"PortInfo.comName" has been deprecated. You should now use "PortInfo.path". The property will be removed in the next major release.`
+ )
+ }
+ return newPort.path
+ },
+ enumerable: false,
+ },
+ })
+ })
+}
+
+module.exports = {
+ wrapWithHiddenComName,
+}
diff --git a/server/node_modules/@serialport/bindings/lib/linux-list.js b/server/node_modules/@serialport/bindings/lib/linux-list.js
new file mode 100644
index 0000000000000000000000000000000000000000..63cb95a89f9e980450f6ac1e1f90c17786511ca4
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/lib/linux-list.js
@@ -0,0 +1,100 @@
+const childProcess = require('child_process')
+const Readline = require('@serialport/parser-readline')
+
+// get only serial port names
+function checkPathOfDevice(path) {
+ return /(tty(S|WCH|ACM|USB|AMA|MFD|O|XRUSB)|rfcomm)/.test(path) && path
+}
+
+function propName(name) {
+ return {
+ DEVNAME: 'path',
+ ID_VENDOR_ENC: 'manufacturer',
+ ID_SERIAL_SHORT: 'serialNumber',
+ ID_VENDOR_ID: 'vendorId',
+ ID_MODEL_ID: 'productId',
+ DEVLINKS: 'pnpId',
+ }[name.toUpperCase()]
+}
+
+function decodeHexEscape(str) {
+ return str.replace(/\\x([a-fA-F0-9]{2})/g, (a, b) => {
+ return String.fromCharCode(parseInt(b, 16))
+ })
+}
+
+function propVal(name, val) {
+ if (name === 'pnpId') {
+ const match = val.match(/\/by-id\/([^\s]+)/)
+ return (match && match[1]) || undefined
+ }
+ if (name === 'manufacturer') {
+ return decodeHexEscape(val)
+ }
+ if (/^0x/.test(val)) {
+ return val.substr(2)
+ }
+ return val
+}
+
+function listLinux() {
+ return new Promise((resolve, reject) => {
+ const ports = []
+ const ude = childProcess.spawn('udevadm', ['info', '-e'])
+ const lines = ude.stdout.pipe(new Readline())
+ ude.on('close', code => code && reject(new Error(`Error listing ports udevadm exited with error code: ${code}`)))
+ ude.on('error', reject)
+ lines.on('error', reject)
+
+ let port = {}
+ let skipPort = false
+ lines.on('data', line => {
+ const lineType = line.slice(0, 1)
+ const data = line.slice(3)
+ // new port entry
+ if (lineType === 'P') {
+ port = {
+ manufacturer: undefined,
+ serialNumber: undefined,
+ pnpId: undefined,
+ locationId: undefined,
+ vendorId: undefined,
+ productId: undefined,
+ }
+ skipPort = false
+ return
+ }
+
+ if (skipPort) {
+ return
+ }
+
+ // Check dev name and save port if it matches flag to skip the rest of the data if not
+ if (lineType === 'N') {
+ if (checkPathOfDevice(data)) {
+ ports.push(port)
+ } else {
+ skipPort = true
+ }
+ return
+ }
+
+ // parse data about each port
+ if (lineType === 'E') {
+ const keyValue = data.match(/^(.+)=(.*)/)
+ if (!keyValue) {
+ return
+ }
+ const key = propName(keyValue[1])
+ if (!key) {
+ return
+ }
+ port[key] = propVal(key, keyValue[2])
+ }
+ })
+
+ lines.on('finish', () => resolve(ports))
+ })
+}
+
+module.exports = listLinux
diff --git a/server/node_modules/@serialport/bindings/lib/linux.js b/server/node_modules/@serialport/bindings/lib/linux.js
new file mode 100644
index 0000000000000000000000000000000000000000..62268d332b1dafc18d1c5246fd50c900d1de48b1
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/lib/linux.js
@@ -0,0 +1,110 @@
+const { promisify } = require('util')
+const binding = require('bindings')('bindings.node')
+const AbstractBinding = require('@serialport/binding-abstract')
+const linuxList = require('@serialport/bindings/lib/linux-list')
+const Poller = require('@serialport/bindings/lib/poller')
+const unixRead = require('@serialport/bindings/lib/unix-read')
+const unixWrite = require('@serialport/bindings/lib/unix-write')
+const { wrapWithHiddenComName } = require('@serialport/bindings/lib/legacy')
+
+const defaultBindingOptions = Object.freeze({
+ vmin: 1,
+ vtime: 0,
+})
+
+const asyncOpen = promisify(binding.open)
+const asyncClose = promisify(binding.close)
+const asyncUpdate = promisify(binding.update)
+const asyncSet = promisify(binding.set)
+const asyncGet = promisify(binding.get)
+const asyncGetBaudRate = promisify(binding.getBaudRate)
+const asyncDrain = promisify(binding.drain)
+const asyncFlush = promisify(binding.flush)
+
+/**
+ * The linux binding layer
+ */
+class LinuxBinding extends AbstractBinding {
+ static list() {
+ return wrapWithHiddenComName(linuxList())
+ }
+
+ constructor(opt = {}) {
+ super(opt)
+ this.bindingOptions = { ...defaultBindingOptions, ...opt.bindingOptions }
+ this.fd = null
+ this.writeOperation = null
+ }
+
+ get isOpen() {
+ return this.fd !== null
+ }
+
+ async open(path, options) {
+ await super.open(path, options)
+ this.openOptions = { ...this.bindingOptions, ...options }
+ const fd = await asyncOpen(path, this.openOptions)
+ this.fd = fd
+ this.poller = new Poller(fd)
+ }
+
+ async close() {
+ await super.close()
+ const fd = this.fd
+ this.poller.stop()
+ this.poller.destroy()
+ this.poller = null
+ this.openOptions = null
+ this.fd = null
+ return asyncClose(fd)
+ }
+
+ async read(buffer, offset, length) {
+ await super.read(buffer, offset, length)
+ return unixRead({ binding: this, buffer, offset, length })
+ }
+
+ async write(buffer) {
+ this.writeOperation = super.write(buffer).then(async () => {
+ if (buffer.length === 0) {
+ return
+ }
+ await unixWrite({ binding: this, buffer })
+ this.writeOperation = null
+ })
+ return this.writeOperation
+ }
+
+ async update(options) {
+ await super.update(options)
+ return asyncUpdate(this.fd, options)
+ }
+
+ async set(options) {
+ await super.set(options)
+ return asyncSet(this.fd, options)
+ }
+
+ async get() {
+ await super.get()
+ return asyncGet(this.fd)
+ }
+
+ async getBaudRate() {
+ await super.get()
+ return asyncGetBaudRate(this.fd)
+ }
+
+ async drain() {
+ await super.drain()
+ await this.writeOperation
+ return asyncDrain(this.fd)
+ }
+
+ async flush() {
+ await super.flush()
+ return asyncFlush(this.fd)
+ }
+}
+
+module.exports = LinuxBinding
diff --git a/server/node_modules/@serialport/bindings/lib/poller.js b/server/node_modules/@serialport/bindings/lib/poller.js
new file mode 100644
index 0000000000000000000000000000000000000000..085ac0231a5d208c99848dda7edf93c4665c81a7
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/lib/poller.js
@@ -0,0 +1,111 @@
+const debug = require('debug')
+const logger = debug('serialport/bindings/poller')
+const EventEmitter = require('events')
+const PollerBindings = require('bindings')('bindings.node').Poller
+
+const EVENTS = {
+ UV_READABLE: 0b0001,
+ UV_WRITABLE: 0b0010,
+ UV_DISCONNECT: 0b0100,
+}
+
+function handleEvent(error, eventFlag) {
+ if (error) {
+ logger('error', error)
+ this.emit('readable', error)
+ this.emit('writable', error)
+ this.emit('disconnect', error)
+ return
+ }
+ if (eventFlag & EVENTS.UV_READABLE) {
+ logger('received "readable"')
+ this.emit('readable', null)
+ }
+ if (eventFlag & EVENTS.UV_WRITABLE) {
+ logger('received "writable"')
+ this.emit('writable', null)
+ }
+ if (eventFlag & EVENTS.UV_DISCONNECT) {
+ logger('received "disconnect"')
+ this.emit('disconnect', null)
+ }
+}
+
+/**
+ * Polls unix systems for readable or writable states of a file or serialport
+ */
+class Poller extends EventEmitter {
+ constructor(fd, FDPoller = PollerBindings) {
+ logger('Creating poller')
+ super()
+ this.poller = new FDPoller(fd, handleEvent.bind(this))
+ }
+ /**
+ * Wait for the next event to occur
+ * @param {string} event ('readable'|'writable'|'disconnect')
+ * @returns {Poller} returns itself
+ */
+ once(event, callback) {
+ switch (event) {
+ case 'readable':
+ this.poll(EVENTS.UV_READABLE)
+ break
+ case 'writable':
+ this.poll(EVENTS.UV_WRITABLE)
+ break
+ case 'disconnect':
+ this.poll(EVENTS.UV_DISCONNECT)
+ break
+ }
+ return super.once(event, callback)
+ }
+
+ /**
+ * Ask the bindings to listen for an event, it is recommend to use `.once()` for easy use
+ * @param {EVENTS} eventFlag polls for an event or group of events based upon a flag.
+ * @returns {undefined}
+ */
+ poll(eventFlag) {
+ eventFlag = eventFlag || 0
+
+ if (eventFlag & EVENTS.UV_READABLE) {
+ logger('Polling for "readable"')
+ }
+ if (eventFlag & EVENTS.UV_WRITABLE) {
+ logger('Polling for "writable"')
+ }
+ if (eventFlag & EVENTS.UV_DISCONNECT) {
+ logger('Polling for "disconnect"')
+ }
+
+ this.poller.poll(eventFlag)
+ }
+
+ /**
+ * Stop listening for events and cancel all outstanding listening with an error
+ * @returns {undefined}
+ */
+ stop() {
+ logger('Stopping poller')
+ this.poller.stop()
+ this.emitCanceled()
+ }
+
+ destroy() {
+ logger('Destroying poller')
+ this.poller.destroy()
+ this.emitCanceled()
+ }
+
+ emitCanceled() {
+ const err = new Error('Canceled')
+ err.canceled = true
+ this.emit('readable', err)
+ this.emit('writable', err)
+ this.emit('disconnect', err)
+ }
+}
+
+Poller.EVENTS = EVENTS
+
+module.exports = Poller
diff --git a/server/node_modules/@serialport/bindings/lib/unix-read.js b/server/node_modules/@serialport/bindings/lib/unix-read.js
new file mode 100644
index 0000000000000000000000000000000000000000..ea3107d113fca5a205518c2d27ba20366c275cd8
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/lib/unix-read.js
@@ -0,0 +1,57 @@
+const fs = require('fs')
+const debug = require('debug')
+const logger = debug('serialport/bindings/unixRead')
+const { promisify } = require('util')
+
+const readAsync = promisify(fs.read)
+
+const readable = binding => {
+ return new Promise((resolve, reject) => {
+ binding.poller.once('readable', err => (err ? reject(err) : resolve()))
+ })
+}
+
+const unixRead = async ({ binding, buffer, offset, length, fsReadAsync = readAsync }) => {
+ logger('Starting read')
+ if (!binding.isOpen) {
+ const err = new Error('Port is not open')
+ err.canceled = true
+ throw err
+ }
+
+ try {
+ const { bytesRead } = await fsReadAsync(binding.fd, buffer, offset, length, null)
+ if (bytesRead === 0) {
+ return unixRead({ binding, buffer, offset, length, fsReadAsync })
+ }
+ logger('Finished read', bytesRead, 'bytes')
+ return { bytesRead, buffer }
+ } catch (err) {
+ logger('read error', err)
+ if (err.code === 'EAGAIN' || err.code === 'EWOULDBLOCK' || err.code === 'EINTR') {
+ if (!binding.isOpen) {
+ const err = new Error('Port is not open')
+ err.canceled = true
+ throw err
+ }
+ logger('waiting for readable because of code:', err.code)
+ await readable(binding)
+ return unixRead({ binding, buffer, offset, length, fsReadAsync })
+ }
+
+ const disconnectError =
+ err.code === 'EBADF' || // Bad file number means we got closed
+ err.code === 'ENXIO' || // No such device or address probably usb disconnect
+ err.code === 'UNKNOWN' ||
+ err.errno === -1 // generic error
+
+ if (disconnectError) {
+ err.disconnect = true
+ logger('disconnecting', err)
+ }
+
+ throw err
+ }
+}
+
+module.exports = unixRead
diff --git a/server/node_modules/@serialport/bindings/lib/unix-write.js b/server/node_modules/@serialport/bindings/lib/unix-write.js
new file mode 100644
index 0000000000000000000000000000000000000000..dd8cd3439df8ec415057aca7d25083370a9670a3
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/lib/unix-write.js
@@ -0,0 +1,57 @@
+const fs = require('fs')
+const debug = require('debug')
+const logger = debug('serialport/bindings/unixWrite')
+const { promisify } = require('util')
+
+const writeAsync = promisify(fs.write)
+
+const writable = binding => {
+ return new Promise((resolve, reject) => {
+ binding.poller.once('writable', err => (err ? reject(err) : resolve()))
+ })
+}
+
+const unixWrite = async ({ binding, buffer, offset = 0, fsWriteAsync = writeAsync }) => {
+ const bytesToWrite = buffer.length - offset
+ logger('Starting write', buffer.length, 'bytes offset', offset, 'bytesToWrite', bytesToWrite)
+ if (!binding.isOpen) {
+ throw new Error('Port is not open')
+ }
+ try {
+ const { bytesWritten } = await fsWriteAsync(binding.fd, buffer, offset, bytesToWrite)
+ logger('write returned: wrote', bytesWritten, 'bytes')
+ if (bytesWritten + offset < buffer.length) {
+ if (!binding.isOpen) {
+ throw new Error('Port is not open')
+ }
+ return unixWrite({ binding, buffer, offset: bytesWritten + offset, fsWriteAsync })
+ }
+
+ logger('Finished writing', bytesWritten + offset, 'bytes')
+ } catch (err) {
+ logger('write errored', err)
+ if (err.code === 'EAGAIN' || err.code === 'EWOULDBLOCK' || err.code === 'EINTR') {
+ if (!binding.isOpen) {
+ throw new Error('Port is not open')
+ }
+ logger('waiting for writable because of code:', err.code)
+ await writable(binding)
+ return unixWrite({ binding, buffer, offset, fsWriteAsync })
+ }
+
+ const disconnectError =
+ err.code === 'EBADF' || // Bad file number means we got closed
+ err.code === 'ENXIO' || // No such device or address probably usb disconnect
+ err.code === 'UNKNOWN' ||
+ err.errno === -1 // generic error
+
+ if (disconnectError) {
+ err.disconnect = true
+ logger('disconnecting', err)
+ }
+
+ logger('error', err)
+ throw err
+ }
+}
+module.exports = unixWrite
diff --git a/server/node_modules/@serialport/bindings/lib/win32-sn-parser.js b/server/node_modules/@serialport/bindings/lib/win32-sn-parser.js
new file mode 100644
index 0000000000000000000000000000000000000000..6322f6bbeb23c28c76d4e1fe046fe6adf23a6fdd
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/lib/win32-sn-parser.js
@@ -0,0 +1,14 @@
+const PARSERS = [/USB\\(?:.+)\\(.+)/, /FTDIBUS\\(?:.+)\+(.+?)A?\\.+/]
+
+module.exports = pnpId => {
+ if (!pnpId) {
+ return null
+ }
+ for (const parser of PARSERS) {
+ const sn = pnpId.match(parser)
+ if (sn) {
+ return sn[1]
+ }
+ }
+ return null
+}
diff --git a/server/node_modules/@serialport/bindings/lib/win32.js b/server/node_modules/@serialport/bindings/lib/win32.js
new file mode 100644
index 0000000000000000000000000000000000000000..d969c109fa32f3959a5684c792f680a34e2a95d7
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/lib/win32.js
@@ -0,0 +1,123 @@
+const binding = require('bindings')('bindings.node')
+const AbstractBinding = require('@serialport/binding-abstract')
+const { promisify } = require('util')
+const serialNumParser = require('@serialport/bindings/lib/win32-sn-parser')
+
+const asyncList = promisify(binding.list)
+const asyncOpen = promisify(binding.open)
+const asyncClose = promisify(binding.close)
+const asyncRead = promisify(binding.read)
+const asyncWrite = promisify(binding.write)
+const asyncUpdate = promisify(binding.update)
+const asyncSet = promisify(binding.set)
+const asyncGet = promisify(binding.get)
+const asyncGetBaudRate = promisify(binding.getBaudRate)
+const asyncDrain = promisify(binding.drain)
+const asyncFlush = promisify(binding.flush)
+const { wrapWithHiddenComName } = require('@serialport/bindings/lib/legacy')
+
+/**
+ * The Windows binding layer
+ */
+class WindowsBinding extends AbstractBinding {
+ static async list() {
+ const ports = await asyncList()
+ // Grab the serial number from the pnp id
+ return wrapWithHiddenComName(
+ ports.map(port => {
+ if (port.pnpId && !port.serialNumber) {
+ const serialNumber = serialNumParser(port.pnpId)
+ if (serialNumber) {
+ return {
+ ...port,
+ serialNumber,
+ }
+ }
+ }
+ return port
+ })
+ )
+ }
+
+ constructor(opt = {}) {
+ super(opt)
+ this.bindingOptions = { ...opt.bindingOptions }
+ this.fd = null
+ this.writeOperation = null
+ }
+
+ get isOpen() {
+ return this.fd !== null
+ }
+
+ async open(path, options) {
+ await super.open(path, options)
+ this.openOptions = { ...this.bindingOptions, ...options }
+ const fd = await asyncOpen(path, this.openOptions)
+ this.fd = fd
+ }
+
+ async close() {
+ await super.close()
+ const fd = this.fd
+ this.fd = null
+ return asyncClose(fd)
+ }
+
+ async read(buffer, offset, length) {
+ await super.read(buffer, offset, length)
+ try {
+ const bytesRead = await asyncRead(this.fd, buffer, offset, length)
+ return { bytesRead, buffer }
+ } catch (err) {
+ if (!this.isOpen) {
+ err.canceled = true
+ }
+ throw err
+ }
+ }
+
+ async write(buffer) {
+ this.writeOperation = super.write(buffer).then(async () => {
+ if (buffer.length === 0) {
+ return
+ }
+ await asyncWrite(this.fd, buffer)
+ this.writeOperation = null
+ })
+ return this.writeOperation
+ }
+
+ async update(options) {
+ await super.update(options)
+ return asyncUpdate(this.fd, options)
+ }
+
+ async set(options) {
+ await super.set(options)
+ return asyncSet(this.fd, options)
+ }
+
+ async get() {
+ await super.get()
+ return asyncGet(this.fd)
+ }
+
+ async getBaudRate() {
+ await super.get()
+ return asyncGetBaudRate(this.fd)
+ }
+
+ async drain() {
+ await super.drain()
+ await this.writeOperation
+ return asyncDrain(this.fd)
+ }
+
+ async flush() {
+ await super.flush()
+ return asyncFlush(this.fd)
+ }
+}
+
+module.exports = WindowsBinding
diff --git a/server/node_modules/@serialport/bindings/node_modules/debug/LICENSE b/server/node_modules/@serialport/bindings/node_modules/debug/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..1a9820e262b26b60fe71a4dcd9bc9cfd0a01f26e
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/node_modules/debug/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk
+Copyright (c) 2018-2021 Josh Junon
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+and associated documentation files (the 'Software'), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/server/node_modules/@serialport/bindings/node_modules/debug/README.md b/server/node_modules/@serialport/bindings/node_modules/debug/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..5ea4cd2759b917de9797f7073d738833ae9ba980
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/node_modules/debug/README.md
@@ -0,0 +1,478 @@
+# debug
+[](https://travis-ci.org/debug-js/debug) [](https://coveralls.io/github/debug-js/debug?branch=master) [](https://visionmedia-community-slackin.now.sh/) [](#backers)
+[](#sponsors)
+
+
+
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example [_app.js_](./examples/node/app.js):
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %o', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example [_worker.js_](./examples/node/worker.js):
+
+```js
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
+
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
+```
+
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
+
+Here are some examples:
+
+
+
+
+
+#### Windows command prompt notes
+
+##### CMD
+
+On Windows the environment variable is set using the `set` command.
+
+```cmd
+set DEBUG=*,-not_this
+```
+
+Example:
+
+```cmd
+set DEBUG=* & node app.js
+```
+
+##### PowerShell (VS Code default)
+
+PowerShell uses different syntax to set environment variables.
+
+```cmd
+$env:DEBUG = "*,-not_this"
+```
+
+Example:
+
+```cmd
+$env:DEBUG='app';node app.js
+```
+
+Then, run the program to be debugged as usual.
+
+npm script example:
+```js
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
+```
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+
+
+
+## Millisecond diff
+
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+
+
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+
+
+
+## Conventions
+
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
+
+## Wildcards
+
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
+
+## Environment Variables
+
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
+
+## Formatters
+
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+
+### Custom formatters
+
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example [_stdout.js_](./examples/node/stdout.js):
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+## Extend
+You can simply extend debugger
+```js
+const log = require('debug')('auth');
+
+//creates new debug instance with extended namespace
+const logSign = log.extend('sign');
+const logLogin = log.extend('login');
+
+log('hello'); // auth hello
+logSign('hello'); //auth:sign hello
+logLogin('hello'); //auth:login hello
+```
+
+## Set dynamically
+
+You can also enable debug dynamically by calling the `enable()` method :
+
+```js
+let debug = require('debug');
+
+console.log(1, debug.enabled('test'));
+
+debug.enable('test');
+console.log(2, debug.enabled('test'));
+
+debug.disable();
+console.log(3, debug.enabled('test'));
+
+```
+
+print :
+```
+1 false
+2 true
+3 false
+```
+
+Usage :
+`enable(namespaces)`
+`namespaces` can include modes separated by a colon and wildcards.
+
+Note that calling `enable()` completely overrides previously set DEBUG variable :
+
+```
+$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
+=> false
+```
+
+`disable()`
+
+Will disable all namespaces. The functions returns the namespaces currently
+enabled (and skipped). This can be useful if you want to disable debugging
+temporarily without knowing what was enabled to begin with.
+
+For example:
+
+```js
+let debug = require('debug');
+debug.enable('foo:*,-foo:bar');
+let namespaces = debug.disable();
+debug.enable(namespaces);
+```
+
+Note: There is no guarantee that the string will be identical to the initial
+enable string, but semantically they will be identical.
+
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
+## Usage in child processes
+
+Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process.
+For example:
+
+```javascript
+worker = fork(WORKER_WRAP_PATH, [workerPath], {
+ stdio: [
+ /* stdin: */ 0,
+ /* stdout: */ 'pipe',
+ /* stderr: */ 'pipe',
+ 'ipc',
+ ],
+ env: Object.assign({}, process.env, {
+ DEBUG_COLORS: 1 // without this settings, colors won't be shown
+ }),
+});
+
+worker.stderr.pipe(process.stderr, { end: false });
+```
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+ - Josh Junon
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
+Copyright (c) 2018-2021 Josh Junon
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/server/node_modules/@serialport/bindings/node_modules/debug/package.json b/server/node_modules/@serialport/bindings/node_modules/debug/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..e2c178a228aa0c2dbab3f6df10851f4b84f55318
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/node_modules/debug/package.json
@@ -0,0 +1,101 @@
+{
+ "_from": "debug@^4.3.2",
+ "_id": "debug@4.3.3",
+ "_inBundle": false,
+ "_integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
+ "_location": "/@serialport/bindings/debug",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "debug@^4.3.2",
+ "name": "debug",
+ "escapedName": "debug",
+ "rawSpec": "^4.3.2",
+ "saveSpec": null,
+ "fetchSpec": "^4.3.2"
+ },
+ "_requiredBy": [
+ "/@serialport/bindings"
+ ],
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
+ "_shasum": "04266e0b70a98d4462e6e288e38259213332b664",
+ "_spec": "debug@^4.3.2",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/@serialport/bindings",
+ "author": {
+ "name": "Josh Junon",
+ "email": "josh.junon@protonmail.com"
+ },
+ "browser": "./src/browser.js",
+ "bugs": {
+ "url": "https://github.com/debug-js/debug/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io"
+ },
+ {
+ "name": "Andrew Rhyne",
+ "email": "rhyneandrew@gmail.com"
+ }
+ ],
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "deprecated": false,
+ "description": "Lightweight debugging utility for Node.js and the browser",
+ "devDependencies": {
+ "brfs": "^2.0.1",
+ "browserify": "^16.2.3",
+ "coveralls": "^3.0.2",
+ "istanbul": "^0.4.5",
+ "karma": "^3.1.4",
+ "karma-browserify": "^6.0.0",
+ "karma-chrome-launcher": "^2.2.0",
+ "karma-mocha": "^1.3.0",
+ "mocha": "^5.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "xo": "^0.23.0"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "files": [
+ "src",
+ "LICENSE",
+ "README.md"
+ ],
+ "homepage": "https://github.com/debug-js/debug#readme",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "license": "MIT",
+ "main": "./src/index.js",
+ "name": "debug",
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/debug-js/debug.git"
+ },
+ "scripts": {
+ "lint": "xo",
+ "test": "npm run test:node && npm run test:browser && npm run lint",
+ "test:browser": "karma start --single-run",
+ "test:coverage": "cat ./coverage/lcov.info | coveralls",
+ "test:node": "istanbul cover _mocha -- test.js"
+ },
+ "version": "4.3.3"
+}
diff --git a/server/node_modules/@serialport/bindings/node_modules/debug/src/browser.js b/server/node_modules/@serialport/bindings/node_modules/debug/src/browser.js
new file mode 100644
index 0000000000000000000000000000000000000000..3bf30ea51ba16c08a17865ba1263a0240580daad
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/node_modules/debug/src/browser.js
@@ -0,0 +1,269 @@
+/* eslint-env browser */
+
+/**
+ * This is the web browser implementation of `debug()`.
+ */
+
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = localstorage();
+exports.destroy = (() => {
+ let warned = false;
+
+ return () => {
+ if (!warned) {
+ warned = true;
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+ };
+})();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ '#0000CC',
+ '#0000FF',
+ '#0033CC',
+ '#0033FF',
+ '#0066CC',
+ '#0066FF',
+ '#0099CC',
+ '#0099FF',
+ '#00CC00',
+ '#00CC33',
+ '#00CC66',
+ '#00CC99',
+ '#00CCCC',
+ '#00CCFF',
+ '#3300CC',
+ '#3300FF',
+ '#3333CC',
+ '#3333FF',
+ '#3366CC',
+ '#3366FF',
+ '#3399CC',
+ '#3399FF',
+ '#33CC00',
+ '#33CC33',
+ '#33CC66',
+ '#33CC99',
+ '#33CCCC',
+ '#33CCFF',
+ '#6600CC',
+ '#6600FF',
+ '#6633CC',
+ '#6633FF',
+ '#66CC00',
+ '#66CC33',
+ '#9900CC',
+ '#9900FF',
+ '#9933CC',
+ '#9933FF',
+ '#99CC00',
+ '#99CC33',
+ '#CC0000',
+ '#CC0033',
+ '#CC0066',
+ '#CC0099',
+ '#CC00CC',
+ '#CC00FF',
+ '#CC3300',
+ '#CC3333',
+ '#CC3366',
+ '#CC3399',
+ '#CC33CC',
+ '#CC33FF',
+ '#CC6600',
+ '#CC6633',
+ '#CC9900',
+ '#CC9933',
+ '#CCCC00',
+ '#CCCC33',
+ '#FF0000',
+ '#FF0033',
+ '#FF0066',
+ '#FF0099',
+ '#FF00CC',
+ '#FF00FF',
+ '#FF3300',
+ '#FF3333',
+ '#FF3366',
+ '#FF3399',
+ '#FF33CC',
+ '#FF33FF',
+ '#FF6600',
+ '#FF6633',
+ '#FF9900',
+ '#FF9933',
+ '#FFCC00',
+ '#FFCC33'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+// eslint-disable-next-line complexity
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
+ return true;
+ }
+
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // Is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // Is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // Double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ args[0] = (this.useColors ? '%c' : '') +
+ this.namespace +
+ (this.useColors ? ' %c' : ' ') +
+ args[0] +
+ (this.useColors ? '%c ' : ' ') +
+ '+' + module.exports.humanize(this.diff);
+
+ if (!this.useColors) {
+ return;
+ }
+
+ const c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit');
+
+ // The final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ let index = 0;
+ let lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, match => {
+ if (match === '%%') {
+ return;
+ }
+ index++;
+ if (match === '%c') {
+ // We only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.debug()` when available.
+ * No-op when `console.debug` is not a "function".
+ * If `console.debug` is not available, falls back
+ * to `console.log`.
+ *
+ * @api public
+ */
+exports.log = console.debug || console.log || (() => {});
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ try {
+ if (namespaces) {
+ exports.storage.setItem('debug', namespaces);
+ } else {
+ exports.storage.removeItem('debug');
+ }
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+function load() {
+ let r;
+ try {
+ r = exports.storage.getItem('debug');
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+ // The Browser also has localStorage in the global context.
+ return localStorage;
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+module.exports = require('debug/src/common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+formatters.j = function (v) {
+ try {
+ return JSON.stringify(v);
+ } catch (error) {
+ return '[UnexpectedJSONParseError]: ' + error.message;
+ }
+};
diff --git a/server/node_modules/@serialport/bindings/node_modules/debug/src/common.js b/server/node_modules/@serialport/bindings/node_modules/debug/src/common.js
new file mode 100644
index 0000000000000000000000000000000000000000..6d571d2844dd950db81c8e07cabbfc9048c59658
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/node_modules/debug/src/common.js
@@ -0,0 +1,274 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ */
+
+function setup(env) {
+ createDebug.debug = createDebug;
+ createDebug.default = createDebug;
+ createDebug.coerce = coerce;
+ createDebug.disable = disable;
+ createDebug.enable = enable;
+ createDebug.enabled = enabled;
+ createDebug.humanize = require('ms');
+ createDebug.destroy = destroy;
+
+ Object.keys(env).forEach(key => {
+ createDebug[key] = env[key];
+ });
+
+ /**
+ * The currently active debug mode names, and names to skip.
+ */
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ /**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+ createDebug.formatters = {};
+
+ /**
+ * Selects a color for a debug namespace
+ * @param {String} namespace The namespace string for the debug instance to be colored
+ * @return {Number|String} An ANSI color code for the given namespace
+ * @api private
+ */
+ function selectColor(namespace) {
+ let hash = 0;
+
+ for (let i = 0; i < namespace.length; i++) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
+ }
+ createDebug.selectColor = selectColor;
+
+ /**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+ function createDebug(namespace) {
+ let prevTime;
+ let enableOverride = null;
+ let namespacesCache;
+ let enabledCache;
+
+ function debug(...args) {
+ // Disabled?
+ if (!debug.enabled) {
+ return;
+ }
+
+ const self = debug;
+
+ // Set `diff` timestamp
+ const curr = Number(new Date());
+ const ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ args[0] = createDebug.coerce(args[0]);
+
+ if (typeof args[0] !== 'string') {
+ // Anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // Apply any `formatters` transformations
+ let index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
+ // If we encounter an escaped % then don't increase the array index
+ if (match === '%%') {
+ return '%';
+ }
+ index++;
+ const formatter = createDebug.formatters[format];
+ if (typeof formatter === 'function') {
+ const val = args[index];
+ match = formatter.call(self, val);
+
+ // Now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // Apply env-specific formatting (colors, etc.)
+ createDebug.formatArgs.call(self, args);
+
+ const logFn = self.log || createDebug.log;
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.useColors = createDebug.useColors();
+ debug.color = createDebug.selectColor(namespace);
+ debug.extend = extend;
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
+
+ Object.defineProperty(debug, 'enabled', {
+ enumerable: true,
+ configurable: false,
+ get: () => {
+ if (enableOverride !== null) {
+ return enableOverride;
+ }
+ if (namespacesCache !== createDebug.namespaces) {
+ namespacesCache = createDebug.namespaces;
+ enabledCache = createDebug.enabled(namespace);
+ }
+
+ return enabledCache;
+ },
+ set: v => {
+ enableOverride = v;
+ }
+ });
+
+ // Env-specific initialization logic for debug instances
+ if (typeof createDebug.init === 'function') {
+ createDebug.init(debug);
+ }
+
+ return debug;
+ }
+
+ function extend(namespace, delimiter) {
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
+ newDebug.log = this.log;
+ return newDebug;
+ }
+
+ /**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+ function enable(namespaces) {
+ createDebug.save(namespaces);
+ createDebug.namespaces = namespaces;
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ let i;
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ const len = split.length;
+
+ for (i = 0; i < len; i++) {
+ if (!split[i]) {
+ // ignore empty strings
+ continue;
+ }
+
+ namespaces = split[i].replace(/\*/g, '.*?');
+
+ if (namespaces[0] === '-') {
+ createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+ }
+
+ /**
+ * Disable debug output.
+ *
+ * @return {String} namespaces
+ * @api public
+ */
+ function disable() {
+ const namespaces = [
+ ...createDebug.names.map(toNamespace),
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
+ ].join(',');
+ createDebug.enable('');
+ return namespaces;
+ }
+
+ /**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+ function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
+
+ let i;
+ let len;
+
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
+ if (createDebug.skips[i].test(name)) {
+ return false;
+ }
+ }
+
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
+ if (createDebug.names[i].test(name)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Convert regexp to namespace
+ *
+ * @param {RegExp} regxep
+ * @return {String} namespace
+ * @api private
+ */
+ function toNamespace(regexp) {
+ return regexp.toString()
+ .substring(2, regexp.toString().length - 2)
+ .replace(/\.\*\?$/, '*');
+ }
+
+ /**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+ function coerce(val) {
+ if (val instanceof Error) {
+ return val.stack || val.message;
+ }
+ return val;
+ }
+
+ /**
+ * XXX DO NOT USE. This is a temporary stub function.
+ * XXX It WILL be removed in the next major release.
+ */
+ function destroy() {
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+
+ createDebug.enable(createDebug.load());
+
+ return createDebug;
+}
+
+module.exports = setup;
diff --git a/server/node_modules/@serialport/bindings/node_modules/debug/src/index.js b/server/node_modules/@serialport/bindings/node_modules/debug/src/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..d0b8579432a88872cc1df415ae061509df74b38f
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer / nwjs process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
+ module.exports = require('debug/src/browser.js');
+} else {
+ module.exports = require('debug/src/node.js');
+}
diff --git a/server/node_modules/@serialport/bindings/node_modules/debug/src/node.js b/server/node_modules/@serialport/bindings/node_modules/debug/src/node.js
new file mode 100644
index 0000000000000000000000000000000000000000..3044efcce21274bf69b98b20d159031766e47d73
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/node_modules/debug/src/node.js
@@ -0,0 +1,263 @@
+/**
+ * Module dependencies.
+ */
+
+const tty = require('tty');
+const util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ */
+
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.destroy = util.deprecate(
+ () => {},
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
+);
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+try {
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
+ // eslint-disable-next-line import/no-extraneous-dependencies
+ const supportsColor = require('supports-color');
+
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
+ exports.colors = [
+ 20,
+ 21,
+ 26,
+ 27,
+ 32,
+ 33,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 56,
+ 57,
+ 62,
+ 63,
+ 68,
+ 69,
+ 74,
+ 75,
+ 76,
+ 77,
+ 78,
+ 79,
+ 80,
+ 81,
+ 92,
+ 93,
+ 98,
+ 99,
+ 112,
+ 113,
+ 128,
+ 129,
+ 134,
+ 135,
+ 148,
+ 149,
+ 160,
+ 161,
+ 162,
+ 163,
+ 164,
+ 165,
+ 166,
+ 167,
+ 168,
+ 169,
+ 170,
+ 171,
+ 172,
+ 173,
+ 178,
+ 179,
+ 184,
+ 185,
+ 196,
+ 197,
+ 198,
+ 199,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 207,
+ 208,
+ 209,
+ 214,
+ 215,
+ 220,
+ 221
+ ];
+ }
+} catch (error) {
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(key => {
+ return /^debug_/i.test(key);
+}).reduce((obj, key) => {
+ // Camel-case
+ const prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, (_, k) => {
+ return k.toUpperCase();
+ });
+
+ // Coerce string value into JS value
+ let val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === 'null') {
+ val = null;
+ } else {
+ val = Number(val);
+ }
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts ?
+ Boolean(exports.inspectOpts.colors) :
+ tty.isatty(process.stderr.fd);
+}
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ const {namespace: name, useColors} = this;
+
+ if (useColors) {
+ const c = this.color;
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ }
+ return new Date().toISOString() + ' ';
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
+ */
+
+function log(...args) {
+ return process.stderr.write(util.format(...args) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ if (namespaces) {
+ process.env.DEBUG = namespaces;
+ } else {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init(debug) {
+ debug.inspectOpts = {};
+
+ const keys = Object.keys(exports.inspectOpts);
+ for (let i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+module.exports = require('debug/src/common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+formatters.o = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n')
+ .map(str => str.trim())
+ .join(' ');
+};
+
+/**
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+formatters.O = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
diff --git a/server/node_modules/@serialport/bindings/node_modules/ms/index.js b/server/node_modules/@serialport/bindings/node_modules/ms/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..c4498bcc212589664a5fe0d45e5908b174ab0a37
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/node_modules/ms/index.js
@@ -0,0 +1,162 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var w = d * 7;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isFinite(val)) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (msAbs >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (msAbs >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (msAbs >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, 'day');
+ }
+ if (msAbs >= h) {
+ return plural(ms, msAbs, h, 'hour');
+ }
+ if (msAbs >= m) {
+ return plural(ms, msAbs, m, 'minute');
+ }
+ if (msAbs >= s) {
+ return plural(ms, msAbs, s, 'second');
+ }
+ return ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
+}
diff --git a/server/node_modules/@serialport/bindings/node_modules/ms/license.md b/server/node_modules/@serialport/bindings/node_modules/ms/license.md
new file mode 100644
index 0000000000000000000000000000000000000000..69b61253a38926757b7de1d4df4880fc2105c2c9
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/server/node_modules/@serialport/bindings/node_modules/ms/package.json b/server/node_modules/@serialport/bindings/node_modules/ms/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..c397a8f2677d7fbb5d45ea28bd6652a4c9f37b67
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/node_modules/ms/package.json
@@ -0,0 +1,69 @@
+{
+ "_from": "ms@2.1.2",
+ "_id": "ms@2.1.2",
+ "_inBundle": false,
+ "_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "_location": "/@serialport/bindings/ms",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "ms@2.1.2",
+ "name": "ms",
+ "escapedName": "ms",
+ "rawSpec": "2.1.2",
+ "saveSpec": null,
+ "fetchSpec": "2.1.2"
+ },
+ "_requiredBy": [
+ "/@serialport/bindings/debug"
+ ],
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "_shasum": "d09d1f357b443f493382a8eb3ccd183872ae6009",
+ "_spec": "ms@2.1.2",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/@serialport/bindings/node_modules/debug",
+ "bugs": {
+ "url": "https://github.com/zeit/ms/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Tiny millisecond conversion utility",
+ "devDependencies": {
+ "eslint": "4.12.1",
+ "expect.js": "0.3.1",
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/zeit/ms#readme",
+ "license": "MIT",
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "main": "./index",
+ "name": "ms",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/zeit/ms.git"
+ },
+ "scripts": {
+ "lint": "eslint lib/* bin/*",
+ "precommit": "lint-staged",
+ "test": "mocha tests.js"
+ },
+ "version": "2.1.2"
+}
diff --git a/server/node_modules/@serialport/bindings/node_modules/ms/readme.md b/server/node_modules/@serialport/bindings/node_modules/ms/readme.md
new file mode 100644
index 0000000000000000000000000000000000000000..9a1996b17e0de6854dd1cf10c5f2ee642e494085
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/node_modules/ms/readme.md
@@ -0,0 +1,60 @@
+# ms
+
+[](https://travis-ci.org/zeit/ms)
+[](https://spectrum.chat/zeit)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
+```
+
+### Convert from Milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time Format Written-Out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
+
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/server/node_modules/@serialport/bindings/package.json b/server/node_modules/@serialport/bindings/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..31bc1f3a1f13f5c2e2baac3e7fa9534671493f21
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/package.json
@@ -0,0 +1,84 @@
+{
+ "_from": "@serialport/bindings@9.2.8",
+ "_id": "@serialport/bindings@9.2.8",
+ "_inBundle": false,
+ "_integrity": "sha512-hSLxTe0tADZ3LMMGwvEJWOC/TaFQTyPeFalUCsJ1lSQ0k6bPF04JwrtB/C81GetmDBTNRY0GlD0SNtKCc7Dr5g==",
+ "_location": "/@serialport/bindings",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "@serialport/bindings@9.2.8",
+ "name": "@serialport/bindings",
+ "escapedName": "@serialport%2fbindings",
+ "scope": "@serialport",
+ "rawSpec": "9.2.8",
+ "saveSpec": null,
+ "fetchSpec": "9.2.8"
+ },
+ "_requiredBy": [
+ "/serialport"
+ ],
+ "_resolved": "https://registry.npmjs.org/@serialport/bindings/-/bindings-9.2.8.tgz",
+ "_shasum": "59c2be09d91df922d56de31cb9e21c6736004e39",
+ "_spec": "@serialport/bindings@9.2.8",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/serialport",
+ "bugs": {
+ "url": "https://github.com/serialport/node-serialport/issues"
+ },
+ "bundleDependencies": false,
+ "cc": {
+ "filter": [
+ "legal/copyright",
+ "build/include"
+ ],
+ "files": [
+ "src/*.cpp",
+ "src/*.h"
+ ],
+ "linelength": "120"
+ },
+ "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": "^7.0.0"
+ },
+ "deprecated": false,
+ "description": "The `Binding` is how Node-SerialPort talks to the underlying system. By default, we auto detect Windows, Linux and OS X, and load the appropriate module for your system. You can assign `SerialPort.Binding` to any binding you like. Find more by searching [\"serialport-binding\" at npm](https://www.npmjs.com/search?q=serialport-binding).",
+ "devDependencies": {
+ "@serialport/binding-mock": "9.2.4",
+ "node-abi": "3.5.0"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": "https://opencollective.com/serialport/donate",
+ "gitHead": "e90a43225655bf390735eb77bd3ba17f205eae08",
+ "gypfile": true,
+ "homepage": "https://github.com/serialport/node-serialport#readme",
+ "keywords": [
+ "serialport-binding"
+ ],
+ "license": "MIT",
+ "main": "lib",
+ "name": "@serialport/bindings",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/serialport/node-serialport.git"
+ },
+ "scripts": {
+ "install": "prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild",
+ "lint": "cc --verbose",
+ "prebuild": "npm run prebuild-node && npm run prebuild-electron",
+ "prebuild-electron": "prebuild --force --strip --verbose --tag-prefix @serialport/bindings@ -r electron -t 13.0.0 -t 14.0.0 -t 15.0.0 -t 16.0.0",
+ "prebuild-node": "prebuild --force --strip --verbose --tag-prefix @serialport/bindings@ -t 12.0.0 -t 14.0.0 -t 16.0.0",
+ "rebuild": "node-gyp rebuild"
+ },
+ "version": "9.2.8"
+}
diff --git a/server/node_modules/@serialport/bindings/src/darwin_list.cpp b/server/node_modules/@serialport/bindings/src/darwin_list.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6e1a8494a4cb1c6fed92facaa0abd80ee21153a1
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/src/darwin_list.cpp
@@ -0,0 +1,355 @@
+#include "./darwin_list.h"
+
+#include
+#include
+#include
+#include
+
+#if defined(MAC_OS_X_VERSION_10_4) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4)
+#include
+#include
+#endif
+
+#include
+#include
+
+uv_mutex_t list_mutex;
+Boolean lockInitialised = FALSE;
+
+NAN_METHOD(List) {
+ // callback
+ if (!info[0]->IsFunction()) {
+ Nan::ThrowTypeError("First argument must be a function");
+ return;
+ }
+
+ ListBaton* baton = new ListBaton();
+ snprintf(baton->errorString, sizeof(baton->errorString), "");
+ baton->callback.Reset(info[0].As());
+
+ uv_work_t* req = new uv_work_t();
+ req->data = baton;
+ uv_queue_work(uv_default_loop(), req, EIO_List, (uv_after_work_cb)EIO_AfterList);
+}
+
+void setIfNotEmpty(v8::Local item, std::string key, const char *value) {
+ v8::Local v8key = Nan::New(key).ToLocalChecked();
+ if (strlen(value) > 0) {
+ Nan::Set(item, v8key, Nan::New(value).ToLocalChecked());
+ } else {
+ Nan::Set(item, v8key, Nan::Undefined());
+ }
+}
+
+
+// Function prototypes
+static kern_return_t FindModems(io_iterator_t *matchingServices);
+static io_service_t GetUsbDevice(io_service_t service);
+static stDeviceListItem* GetSerialDevices();
+
+
+static kern_return_t FindModems(io_iterator_t *matchingServices) {
+ kern_return_t kernResult;
+ CFMutableDictionaryRef classesToMatch;
+ classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue);
+ if (classesToMatch != NULL) {
+ CFDictionarySetValue(classesToMatch,
+ CFSTR(kIOSerialBSDTypeKey),
+ CFSTR(kIOSerialBSDAllTypes));
+ }
+
+ kernResult = IOServiceGetMatchingServices(kIOMasterPortDefault, classesToMatch, matchingServices);
+
+ return kernResult;
+}
+
+static io_service_t GetUsbDevice(io_service_t service) {
+ IOReturn status;
+ io_iterator_t iterator = 0;
+ io_service_t device = 0;
+
+ if (!service) {
+ return device;
+ }
+
+ status = IORegistryEntryCreateIterator(service,
+ kIOServicePlane,
+ (kIORegistryIterateParents | kIORegistryIterateRecursively),
+ &iterator);
+
+ if (status == kIOReturnSuccess) {
+ io_service_t currentService;
+ while ((currentService = IOIteratorNext(iterator)) && device == 0) {
+ io_name_t serviceName;
+ status = IORegistryEntryGetNameInPlane(currentService, kIOServicePlane, serviceName);
+ if (status == kIOReturnSuccess && IOObjectConformsTo(currentService, kIOUSBDeviceClassName)) {
+ device = currentService;
+ } else {
+ // Release the service object which is no longer needed
+ (void) IOObjectRelease(currentService);
+ }
+ }
+
+ // Release the iterator
+ (void) IOObjectRelease(iterator);
+ }
+
+ return device;
+}
+
+static void ExtractUsbInformation(stSerialDevice *serialDevice, IOUSBDeviceInterface **deviceInterface) {
+ kern_return_t kernResult;
+ UInt32 locationID;
+ kernResult = (*deviceInterface)->GetLocationID(deviceInterface, &locationID);
+ if (KERN_SUCCESS == kernResult) {
+ snprintf(serialDevice->locationId, sizeof(serialDevice->locationId), "%08x", locationID);
+ }
+
+ UInt16 vendorID;
+ kernResult = (*deviceInterface)->GetDeviceVendor(deviceInterface, &vendorID);
+ if (KERN_SUCCESS == kernResult) {
+ snprintf(serialDevice->vendorId, sizeof(serialDevice->vendorId), "%04x", vendorID);
+ }
+
+ UInt16 productID;
+ kernResult = (*deviceInterface)->GetDeviceProduct(deviceInterface, &productID);
+ if (KERN_SUCCESS == kernResult) {
+ snprintf(serialDevice->productId, sizeof(serialDevice->productId), "%04x", productID);
+ }
+}
+
+static stDeviceListItem* GetSerialDevices() {
+ char bsdPath[MAXPATHLEN];
+
+ io_iterator_t serialPortIterator;
+ FindModems(&serialPortIterator);
+
+ kern_return_t kernResult = KERN_FAILURE;
+ Boolean modemFound = false;
+
+ // Initialize the returned path
+ *bsdPath = '\0';
+
+ stDeviceListItem* devices = NULL;
+ stDeviceListItem* lastDevice = NULL;
+ int length = 0;
+
+ io_service_t modemService;
+ while ((modemService = IOIteratorNext(serialPortIterator))) {
+ CFTypeRef bsdPathAsCFString;
+ bsdPathAsCFString = IORegistryEntrySearchCFProperty(
+ modemService,
+ kIOServicePlane,
+ CFSTR(kIODialinDeviceKey),
+ kCFAllocatorDefault,
+ kIORegistryIterateRecursively);
+
+ if (bsdPathAsCFString) {
+ Boolean result;
+
+ // Convert the path from a CFString to a C (NUL-terminated)
+ result = CFStringGetCString((CFStringRef) bsdPathAsCFString,
+ bsdPath,
+ sizeof(bsdPath),
+ kCFStringEncodingUTF8);
+ CFRelease(bsdPathAsCFString);
+
+ if (result) {
+ stDeviceListItem *deviceListItem = reinterpret_cast( malloc(sizeof(stDeviceListItem)));
+ stSerialDevice *serialDevice = &(deviceListItem->value);
+ snprintf(serialDevice->port, sizeof(serialDevice->port), "%s", bsdPath);
+ memset(serialDevice->locationId, 0, sizeof(serialDevice->locationId));
+ memset(serialDevice->vendorId, 0, sizeof(serialDevice->vendorId));
+ memset(serialDevice->productId, 0, sizeof(serialDevice->productId));
+ serialDevice->manufacturer[0] = '\0';
+ serialDevice->serialNumber[0] = '\0';
+ deviceListItem->next = NULL;
+ deviceListItem->length = &length;
+
+ if (devices == NULL) {
+ devices = deviceListItem;
+ } else {
+ lastDevice->next = deviceListItem;
+ }
+
+ lastDevice = deviceListItem;
+ length++;
+
+ modemFound = true;
+ kernResult = KERN_SUCCESS;
+
+ uv_mutex_lock(&list_mutex);
+
+ io_service_t device = GetUsbDevice(modemService);
+
+ if (device) {
+ CFStringRef manufacturerAsCFString = (CFStringRef) IORegistryEntryCreateCFProperty(device,
+ CFSTR(kUSBVendorString),
+ kCFAllocatorDefault,
+ 0);
+
+ if (manufacturerAsCFString) {
+ Boolean result;
+ char manufacturer[MAXPATHLEN];
+
+ // Convert from a CFString to a C (NUL-terminated)
+ result = CFStringGetCString(manufacturerAsCFString,
+ manufacturer,
+ sizeof(manufacturer),
+ kCFStringEncodingUTF8);
+
+ if (result) {
+ snprintf(serialDevice->manufacturer, sizeof(serialDevice->manufacturer), "%s", manufacturer);
+ }
+
+ CFRelease(manufacturerAsCFString);
+ }
+
+ CFStringRef serialNumberAsCFString = (CFStringRef) IORegistryEntrySearchCFProperty(device,
+ kIOServicePlane,
+ CFSTR(kUSBSerialNumberString),
+ kCFAllocatorDefault,
+ kIORegistryIterateRecursively);
+
+ if (serialNumberAsCFString) {
+ Boolean result;
+ char serialNumber[MAXPATHLEN];
+
+ // Convert from a CFString to a C (NUL-terminated)
+ result = CFStringGetCString(serialNumberAsCFString,
+ serialNumber,
+ sizeof(serialNumber),
+ kCFStringEncodingUTF8);
+
+ if (result) {
+ snprintf(serialDevice->serialNumber, sizeof(serialDevice->serialNumber), "%s", serialNumber);
+ }
+
+ CFRelease(serialNumberAsCFString);
+ }
+
+ IOCFPlugInInterface **plugInInterface = NULL;
+ SInt32 score;
+ HRESULT res;
+
+ IOUSBDeviceInterface **deviceInterface = NULL;
+
+ kernResult = IOCreatePlugInInterfaceForService(device, kIOUSBDeviceUserClientTypeID, kIOCFPlugInInterfaceID,
+ &plugInInterface, &score);
+
+ if ((kIOReturnSuccess == kernResult) && plugInInterface) {
+ // Use the plugin interface to retrieve the device interface.
+ res = (*plugInInterface)->QueryInterface(plugInInterface, CFUUIDGetUUIDBytes(kIOUSBDeviceInterfaceID),
+ reinterpret_cast (&deviceInterface));
+
+ // Now done with the plugin interface.
+ (*plugInInterface)->Release(plugInInterface);
+
+ if (!res && deviceInterface != NULL) {
+ // Extract the desired Information
+ ExtractUsbInformation(serialDevice, deviceInterface);
+
+ // Release the Interface
+ (*deviceInterface)->Release(deviceInterface);
+ }
+ }
+
+ // Release the device
+ (void) IOObjectRelease(device);
+ }
+
+ uv_mutex_unlock(&list_mutex);
+ }
+ }
+
+ // Release the io_service_t now that we are done with it.
+ (void) IOObjectRelease(modemService);
+ }
+
+ IOObjectRelease(serialPortIterator); // Release the iterator.
+
+ return devices;
+}
+
+void EIO_List(uv_work_t* req) {
+ ListBaton* data = static_cast(req->data);
+
+ if (!lockInitialised) {
+ uv_mutex_init(&list_mutex);
+ lockInitialised = TRUE;
+ }
+
+ stDeviceListItem* devices = GetSerialDevices();
+ if (devices != NULL && *(devices->length) > 0) {
+ stDeviceListItem* next = devices;
+
+ for (int i = 0, len = *(devices->length); i < len; i++) {
+ stSerialDevice device = (* next).value;
+
+ ListResultItem* resultItem = new ListResultItem();
+ resultItem->path = device.port;
+
+ if (*device.locationId) {
+ resultItem->locationId = device.locationId;
+ }
+ if (*device.vendorId) {
+ resultItem->vendorId = device.vendorId;
+ }
+ if (*device.productId) {
+ resultItem->productId = device.productId;
+ }
+ if (*device.manufacturer) {
+ resultItem->manufacturer = device.manufacturer;
+ }
+ if (*device.serialNumber) {
+ resultItem->serialNumber = device.serialNumber;
+ }
+ data->results.push_back(resultItem);
+
+ stDeviceListItem* current = next;
+
+ if (next->next != NULL) {
+ next = next->next;
+ }
+
+ free(current);
+ }
+ }
+}
+
+void EIO_AfterList(uv_work_t* req) {
+ Nan::HandleScope scope;
+
+ ListBaton* data = static_cast(req->data);
+
+ v8::Local argv[2];
+ if (data->errorString[0]) {
+ argv[0] = v8::Exception::Error(Nan::New(data->errorString).ToLocalChecked());
+ argv[1] = Nan::Undefined();
+ } else {
+ v8::Local results = Nan::New();
+ int i = 0;
+ for (std::list::iterator it = data->results.begin(); it != data->results.end(); ++it, i++) {
+ v8::Local item = Nan::New();
+
+ setIfNotEmpty(item, "path", (*it)->path.c_str());
+ setIfNotEmpty(item, "manufacturer", (*it)->manufacturer.c_str());
+ setIfNotEmpty(item, "serialNumber", (*it)->serialNumber.c_str());
+ setIfNotEmpty(item, "pnpId", (*it)->pnpId.c_str());
+ setIfNotEmpty(item, "locationId", (*it)->locationId.c_str());
+ setIfNotEmpty(item, "vendorId", (*it)->vendorId.c_str());
+ setIfNotEmpty(item, "productId", (*it)->productId.c_str());
+
+ Nan::Set(results, i, item);
+ }
+ argv[0] = Nan::Null();
+ argv[1] = results;
+ }
+ data->callback.Call(2, argv, data);
+
+ for (std::list::iterator it = data->results.begin(); it != data->results.end(); ++it) {
+ delete *it;
+ }
+ delete data;
+ delete req;
+}
diff --git a/server/node_modules/@serialport/bindings/src/darwin_list.h b/server/node_modules/@serialport/bindings/src/darwin_list.h
new file mode 100644
index 0000000000000000000000000000000000000000..2459a881816a9574e429878c696de90895e8a8d3
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/src/darwin_list.h
@@ -0,0 +1,46 @@
+#ifndef PACKAGES_SERIALPORT_SRC_DARWIN_LIST_H_
+#define PACKAGES_SERIALPORT_SRC_DARWIN_LIST_H_
+#include // For MAXPATHLEN
+#include
+#include
+#include
+
+#define ERROR_STRING_SIZE 1024
+
+NAN_METHOD(List);
+void EIO_List(uv_work_t* req);
+void EIO_AfterList(uv_work_t* req);
+
+struct ListResultItem {
+ std::string path;
+ std::string manufacturer;
+ std::string serialNumber;
+ std::string pnpId;
+ std::string locationId;
+ std::string vendorId;
+ std::string productId;
+};
+
+struct ListBaton : public Nan::AsyncResource {
+ ListBaton() : AsyncResource("node-serialport:ListBaton"), errorString() {}
+ Nan::Callback callback;
+ std::list results;
+ char errorString[ERROR_STRING_SIZE];
+};
+
+typedef struct SerialDevice {
+ char port[MAXPATHLEN];
+ char locationId[MAXPATHLEN];
+ char vendorId[MAXPATHLEN];
+ char productId[MAXPATHLEN];
+ char manufacturer[MAXPATHLEN];
+ char serialNumber[MAXPATHLEN];
+} stSerialDevice;
+
+typedef struct DeviceListItem {
+ struct SerialDevice value;
+ struct DeviceListItem *next;
+ int* length;
+} stDeviceListItem;
+
+#endif // PACKAGES_SERIALPORT_SRC_DARWIN_LIST_H_
diff --git a/server/node_modules/@serialport/bindings/src/poller.cpp b/server/node_modules/@serialport/bindings/src/poller.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e2d9201d57eefdcba78ea8e60ff378d25c242baa
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/src/poller.cpp
@@ -0,0 +1,142 @@
+#include
+#include "./poller.h"
+
+Poller::Poller(int fd) : AsyncResource("node-serialport:poller") {
+ Nan::HandleScope scope;
+ this->fd = fd;
+ this->poll_handle = new uv_poll_t();
+ memset(this->poll_handle, 0, sizeof(uv_poll_t));
+ poll_handle->data = this;
+ int status = uv_poll_init(uv_default_loop(), poll_handle, fd);
+ if (0 != status) {
+ Nan::ThrowError(uv_strerror(status));
+ return;
+ }
+ uv_poll_init_success = true;
+}
+
+Poller::~Poller() {
+ // if we call uv_poll_stop after uv_poll_init failed we segfault
+ if (uv_poll_init_success) {
+ uv_poll_stop(poll_handle);
+ uv_close(reinterpret_cast (poll_handle), Poller::onClose);
+ } else {
+ delete poll_handle;
+ }
+}
+
+void Poller::onClose(uv_handle_t* poll_handle) {
+ // fprintf(stdout, "~Poller is closed\n");
+ delete poll_handle;
+}
+
+// Events can be UV_READABLE | UV_WRITABLE | UV_DISCONNECT
+void Poller::poll(int events) {
+ // fprintf(stdout, "Poller:poll for %d\n", events);
+ this->events = this->events | events;
+ int status = uv_poll_start(poll_handle, events, Poller::onData);
+ if (0 != status) {
+ Nan::ThrowTypeError(uv_strerror(status));
+ return;
+ }
+}
+
+void Poller::stop() {
+ int status = uv_poll_stop(poll_handle);
+ if (0 != status) {
+ Nan::ThrowTypeError(uv_strerror(status));
+ return;
+ }
+}
+
+int Poller::_stop() {
+ return uv_poll_stop(poll_handle);
+}
+
+void Poller::onData(uv_poll_t* handle, int status, int events) {
+ Nan::HandleScope scope;
+ Poller* obj = static_cast(handle->data);
+ v8::Local argv[2];
+
+ // if Error
+ if (0 != status) {
+ // fprintf(stdout, "OnData Error status=%s events=%d\n", uv_strerror(status), events);
+ argv[0] = v8::Exception::Error(Nan::New(uv_strerror(status)).ToLocalChecked());
+ argv[1] = Nan::Undefined();
+ obj->_stop(); // doesn't matter if this errors
+ } else {
+ // fprintf(stdout, "OnData status=%d events=%d subscribed=%d\n", status, events, obj->events);
+ argv[0] = Nan::Null();
+ argv[1] = Nan::New(events);
+ // remove triggered events from the poll
+ int newEvents = obj->events & ~events;
+ obj->poll(newEvents);
+ }
+
+ obj->callback.Call(2, argv, obj);
+}
+
+NAN_MODULE_INIT(Poller::Init) {
+ v8::Local tpl = Nan::New(New);
+ tpl->SetClassName(Nan::New("Poller").ToLocalChecked());
+ tpl->InstanceTemplate()->SetInternalFieldCount(1);
+
+ Nan::SetPrototypeMethod(tpl, "poll", poll);
+ Nan::SetPrototypeMethod(tpl, "stop", stop);
+ Nan::SetPrototypeMethod(tpl, "destroy", destroy);
+
+ constructor().Reset(Nan::GetFunction(tpl).ToLocalChecked());
+ Nan::Set(target, Nan::New("Poller").ToLocalChecked(), Nan::GetFunction(tpl).ToLocalChecked());
+}
+
+NAN_METHOD(Poller::New) {
+ if (!info.IsConstructCall()) {
+ const int argc = 2;
+ v8::Local argv[argc] = {info[0], info[1]};
+ v8::Local cons = Nan::New(constructor());
+ info.GetReturnValue().Set(Nan::NewInstance(cons, argc, argv).ToLocalChecked());
+ return;
+ }
+
+ if (!info[0]->IsInt32()) {
+ Nan::ThrowTypeError("fd must be an int");
+ return;
+ }
+ int fd = Nan::To(info[0]).FromJust();
+
+ if (!info[1]->IsFunction()) {
+ Nan::ThrowTypeError("cb must be a function");
+ return;
+ }
+
+ Poller *obj = new Poller(fd);
+ obj->callback.Reset(info[1].As());
+ obj->Wrap(info.This());
+ info.GetReturnValue().Set(info.This());
+}
+
+NAN_METHOD(Poller::poll) {
+ Poller* obj = Nan::ObjectWrap::Unwrap(info.Holder());
+ if (!info[0]->IsInt32()) {
+ Nan::ThrowTypeError("events must be an int");
+ return;
+ }
+ int events = Nan::To(info[0]).FromJust();
+ obj->poll(events);
+}
+
+NAN_METHOD(Poller::stop) {
+ Poller* obj = Nan::ObjectWrap::Unwrap(info.Holder());
+ obj->stop();
+}
+
+NAN_METHOD(Poller::destroy) {
+ Poller* obj = Nan::ObjectWrap::Unwrap(info.Holder());
+ obj->persistent().Reset();
+ delete obj;
+}
+
+inline Nan::Persistent & Poller::constructor() {
+ static Nan::Persistent my_constructor;
+ return my_constructor;
+}
diff --git a/server/node_modules/@serialport/bindings/src/poller.h b/server/node_modules/@serialport/bindings/src/poller.h
new file mode 100644
index 0000000000000000000000000000000000000000..3b15a2d4a3126e288935b4c6fe4f55aad2bfaf0e
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/src/poller.h
@@ -0,0 +1,34 @@
+#ifndef PACKAGES_SERIALPORT_SRC_POLLER_H_
+#define PACKAGES_SERIALPORT_SRC_POLLER_H_
+
+#include
+
+class Poller : public Nan::ObjectWrap, public Nan::AsyncResource {
+ public:
+ static NAN_MODULE_INIT(Init);
+ static void onData(uv_poll_t* handle, int status, int events);
+ static void onClose(uv_handle_t* poll_handle);
+
+ private:
+ int fd;
+ uv_poll_t* poll_handle;
+ Nan::Callback callback;
+ bool uv_poll_init_success = false;
+
+ // can this be read off of poll_handle?
+ int events = 0;
+
+ explicit Poller(int fd);
+ ~Poller();
+ void poll(int events);
+ void stop();
+ int _stop();
+
+ static NAN_METHOD(New);
+ static NAN_METHOD(poll);
+ static NAN_METHOD(stop);
+ static NAN_METHOD(destroy);
+ static inline Nan::Persistent & constructor();
+};
+
+#endif // PACKAGES_SERIALPORT_SRC_POLLER_H_
diff --git a/server/node_modules/@serialport/bindings/src/serialport.cpp b/server/node_modules/@serialport/bindings/src/serialport.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..dfe908bca26ab532335b249fb695e4e699f6d296
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/src/serialport.cpp
@@ -0,0 +1,486 @@
+#include "./serialport.h"
+
+#ifdef __APPLE__
+ #include "./darwin_list.h"
+#endif
+
+#ifdef WIN32
+ #define strncasecmp strnicmp
+ #include "./serialport_win.h"
+#else
+ #include "./poller.h"
+#endif
+
+v8::Local getValueFromObject(v8::Local options, std::string key) {
+ v8::Local v8str = Nan::New(key).ToLocalChecked();
+ return Nan::Get(options, v8str).ToLocalChecked();
+}
+
+int getIntFromObject(v8::Local options, std::string key) {
+ return Nan::To(getValueFromObject(options, key)).ToLocalChecked()->Value();
+}
+
+bool getBoolFromObject(v8::Local options, std::string key) {
+ return Nan::To(getValueFromObject(options, key)).ToLocalChecked()->Value();
+}
+
+v8::Local getStringFromObj(v8::Local options, std::string key) {
+ return Nan::To(getValueFromObject(options, key)).ToLocalChecked();
+}
+
+double getDoubleFromObject(v8::Local options, std::string key) {
+ return Nan::To(getValueFromObject(options, key)).FromMaybe(0);
+}
+
+NAN_METHOD(Open) {
+ // path
+ if (!info[0]->IsString()) {
+ Nan::ThrowTypeError("First argument must be a string");
+ return;
+ }
+ Nan::Utf8String path(info[0]);
+
+ // options
+ if (!info[1]->IsObject()) {
+ Nan::ThrowTypeError("Second argument must be an object");
+ return;
+ }
+ v8::Local options = Nan::To(info[1]).ToLocalChecked();
+
+ // callback
+ if (!info[2]->IsFunction()) {
+ Nan::ThrowTypeError("Third argument must be a function");
+ return;
+ }
+
+ OpenBaton* baton = new OpenBaton();
+ snprintf(baton->path, sizeof(baton->path), "%s", *path);
+ baton->baudRate = getIntFromObject(options, "baudRate");
+ baton->dataBits = getIntFromObject(options, "dataBits");
+ baton->parity = ToParityEnum(getStringFromObj(options, "parity"));
+ baton->stopBits = ToStopBitEnum(getDoubleFromObject(options, "stopBits"));
+ baton->rtscts = getBoolFromObject(options, "rtscts");
+ baton->xon = getBoolFromObject(options, "xon");
+ baton->xoff = getBoolFromObject(options, "xoff");
+ baton->xany = getBoolFromObject(options, "xany");
+ baton->hupcl = getBoolFromObject(options, "hupcl");
+ baton->lock = getBoolFromObject(options, "lock");
+ baton->callback.Reset(info[2].As());
+
+ #ifndef WIN32
+ baton->vmin = getIntFromObject(options, "vmin");
+ baton->vtime = getIntFromObject(options, "vtime");
+ #endif
+
+ uv_work_t* req = new uv_work_t();
+ req->data = baton;
+
+ uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_work_cb)EIO_AfterOpen);
+}
+
+void EIO_AfterOpen(uv_work_t* req) {
+ Nan::HandleScope scope;
+
+ OpenBaton* data = static_cast(req->data);
+
+ v8::Local argv[2];
+ if (data->errorString[0]) {
+ argv[0] = v8::Exception::Error(Nan::New(data->errorString).ToLocalChecked());
+ argv[1] = Nan::Undefined();
+ } else {
+ argv[0] = Nan::Null();
+ argv[1] = Nan::New(data->result);
+ }
+
+ data->callback.Call(2, argv, data);
+ delete data;
+ delete req;
+}
+
+NAN_METHOD(Update) {
+ // file descriptor
+ if (!info[0]->IsInt32()) {
+ Nan::ThrowTypeError("First argument must be an int");
+ return;
+ }
+ int fd = Nan::To(info[0]).FromJust();
+
+ // options
+ if (!info[1]->IsObject()) {
+ Nan::ThrowTypeError("Second argument must be an object");
+ return;
+ }
+ v8::Local options = Nan::To(info[1]).ToLocalChecked();
+
+ if (!Nan::Has(options, Nan::New("baudRate").ToLocalChecked()).FromMaybe(false)) {
+ Nan::ThrowTypeError("\"baudRate\" must be set on options object");
+ return;
+ }
+
+ // callback
+ if (!info[2]->IsFunction()) {
+ Nan::ThrowTypeError("Third argument must be a function");
+ return;
+ }
+
+ ConnectionOptionsBaton* baton = new ConnectionOptionsBaton();
+
+ baton->fd = fd;
+ baton->baudRate = getIntFromObject(options, "baudRate");
+ baton->callback.Reset(info[2].As());
+
+ uv_work_t* req = new uv_work_t();
+ req->data = baton;
+
+ uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate);
+}
+
+void EIO_AfterUpdate(uv_work_t* req) {
+ Nan::HandleScope scope;
+
+ ConnectionOptionsBaton* data = static_cast(req->data);
+
+ v8::Local argv[1];
+ if (data->errorString[0]) {
+ argv[0] = v8::Exception::Error(Nan::New(data->errorString).ToLocalChecked());
+ } else {
+ argv[0] = Nan::Null();
+ }
+
+ data->callback.Call(1, argv, data);
+
+ delete data;
+ delete req;
+}
+
+NAN_METHOD(Close) {
+ // file descriptor
+ if (!info[0]->IsInt32()) {
+ Nan::ThrowTypeError("First argument must be an int");
+ return;
+ }
+
+ // callback
+ if (!info[1]->IsFunction()) {
+ Nan::ThrowTypeError("Second argument must be a function");
+ return;
+ }
+
+ VoidBaton* baton = new VoidBaton();
+ baton->fd = Nan::To(info[0]).ToLocalChecked()->Value();
+ baton->callback.Reset(info[1].As());
+
+ uv_work_t* req = new uv_work_t();
+ req->data = baton;
+ uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_work_cb)EIO_AfterClose);
+}
+
+void EIO_AfterClose(uv_work_t* req) {
+ Nan::HandleScope scope;
+ VoidBaton* data = static_cast(req->data);
+
+ v8::Local argv[1];
+ if (data->errorString[0]) {
+ argv[0] = v8::Exception::Error(Nan::New(data->errorString).ToLocalChecked());
+ } else {
+ argv[0] = Nan::Null();
+ }
+ data->callback.Call(1, argv, data);
+
+ delete data;
+ delete req;
+}
+
+NAN_METHOD(Flush) {
+ // file descriptor
+ if (!info[0]->IsInt32()) {
+ Nan::ThrowTypeError("First argument must be an int");
+ return;
+ }
+ int fd = Nan::To(info[0]).FromJust();
+
+ // callback
+ if (!info[1]->IsFunction()) {
+ Nan::ThrowTypeError("Second argument must be a function");
+ return;
+ }
+ v8::Local callback = info[1].As();
+
+ VoidBaton* baton = new VoidBaton();
+ baton->fd = fd;
+ baton->callback.Reset(callback);
+
+ uv_work_t* req = new uv_work_t();
+ req->data = baton;
+ uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush);
+}
+
+void EIO_AfterFlush(uv_work_t* req) {
+ Nan::HandleScope scope;
+
+ VoidBaton* data = static_cast(req->data);
+
+ v8::Local argv[1];
+
+ if (data->errorString[0]) {
+ argv[0] = v8::Exception::Error(Nan::New(data->errorString).ToLocalChecked());
+ } else {
+ argv[0] = Nan::Null();
+ }
+
+ data->callback.Call(1, argv, data);
+
+ delete data;
+ delete req;
+}
+
+NAN_METHOD(Set) {
+ // file descriptor
+ if (!info[0]->IsInt32()) {
+ Nan::ThrowTypeError("First argument must be an int");
+ return;
+ }
+ int fd = Nan::To(info[0]).FromJust();
+
+ // options
+ if (!info[1]->IsObject()) {
+ Nan::ThrowTypeError("Second argument must be an object");
+ return;
+ }
+ v8::Local options = Nan::To(info[1]).ToLocalChecked();
+
+ // callback
+ if (!info[2]->IsFunction()) {
+ Nan::ThrowTypeError("Third argument must be a function");
+ return;
+ }
+ v8::Local callback = info[2].As();
+
+ SetBaton* baton = new SetBaton();
+ baton->fd = fd;
+ baton->callback.Reset(callback);
+ baton->brk = getBoolFromObject(options, "brk");
+ baton->rts = getBoolFromObject(options, "rts");
+ baton->cts = getBoolFromObject(options, "cts");
+ baton->dtr = getBoolFromObject(options, "dtr");
+ baton->dsr = getBoolFromObject(options, "dsr");
+ baton->lowLatency = getBoolFromObject(options, "lowLatency");
+
+ uv_work_t* req = new uv_work_t();
+ req->data = baton;
+ uv_queue_work(uv_default_loop(), req, EIO_Set, (uv_after_work_cb)EIO_AfterSet);
+}
+
+void EIO_AfterSet(uv_work_t* req) {
+ Nan::HandleScope scope;
+
+ SetBaton* data = static_cast(req->data);
+
+ v8::Local argv[1];
+
+ if (data->errorString[0]) {
+ argv[0] = v8::Exception::Error(Nan::New(data->errorString).ToLocalChecked());
+ } else {
+ argv[0] = Nan::Null();
+ }
+ data->callback.Call(1, argv, data);
+
+ delete data;
+ delete req;
+}
+
+NAN_METHOD(Get) {
+ // file descriptor
+ if (!info[0]->IsInt32()) {
+ Nan::ThrowTypeError("First argument must be an int");
+ return;
+ }
+ int fd = Nan::To(info[0]).FromJust();
+
+ // callback
+ if (!info[1]->IsFunction()) {
+ Nan::ThrowTypeError("Second argument must be a function");
+ return;
+ }
+
+ GetBaton* baton = new GetBaton();
+ baton->fd = fd;
+ baton->cts = false;
+ baton->dsr = false;
+ baton->dcd = false;
+ baton->lowLatency = false;
+ baton->callback.Reset(info[1].As());
+
+ uv_work_t* req = new uv_work_t();
+ req->data = baton;
+ uv_queue_work(uv_default_loop(), req, EIO_Get, (uv_after_work_cb)EIO_AfterGet);
+}
+
+void EIO_AfterGet(uv_work_t* req) {
+ Nan::HandleScope scope;
+
+ GetBaton* data = static_cast(req->data);
+
+ v8::Local argv[2];
+
+ if (data->errorString[0]) {
+ argv[0] = v8::Exception::Error(Nan::New(data->errorString).ToLocalChecked());
+ argv[1] = Nan::Undefined();
+ } else {
+ v8::Local results = Nan::New();
+ Nan::Set(results, Nan::New("cts").ToLocalChecked(), Nan::New(data->cts));
+ Nan::Set(results, Nan::New("dsr").ToLocalChecked(), Nan::New(data->dsr));
+ Nan::Set(results, Nan::New("dcd").ToLocalChecked(), Nan::New(data->dcd));
+ Nan::Set(results, Nan::New("lowLatency").ToLocalChecked(), Nan::New(data->lowLatency));
+
+ argv[0] = Nan::Null();
+ argv[1] = results;
+ }
+ data->callback.Call(2, argv, data);
+
+ delete data;
+ delete req;
+}
+
+NAN_METHOD(GetBaudRate) {
+ // file descriptor
+ if (!info[0]->IsInt32()) {
+ Nan::ThrowTypeError("First argument must be an int");
+ return;
+ }
+ int fd = Nan::To(info[0]).FromJust();
+
+ // callback
+ if (!info[1]->IsFunction()) {
+ Nan::ThrowTypeError("Second argument must be a function");
+ return;
+ }
+
+ GetBaudRateBaton* baton = new GetBaudRateBaton();
+ baton->fd = fd;
+ baton->baudRate = 0;
+ baton->callback.Reset(info[1].As());
+
+ uv_work_t* req = new uv_work_t();
+ req->data = baton;
+ uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate);
+}
+
+void EIO_AfterGetBaudRate(uv_work_t* req) {
+ Nan::HandleScope scope;
+
+ GetBaudRateBaton* data = static_cast(req->data);
+
+ v8::Local argv[2];
+
+ if (data->errorString[0]) {
+ argv[0] = v8::Exception::Error(Nan::New(data->errorString).ToLocalChecked());
+ argv[1] = Nan::Undefined();
+ } else {
+ v8::Local results = Nan::New();
+ Nan::Set(results, Nan::New("baudRate").ToLocalChecked(), Nan::New(data->baudRate));
+
+ argv[0] = Nan::Null();
+ argv[1] = results;
+ }
+ data->callback.Call(2, argv, data);
+
+ delete data;
+ delete req;
+}
+
+NAN_METHOD(Drain) {
+ // file descriptor
+ if (!info[0]->IsInt32()) {
+ Nan::ThrowTypeError("First argument must be an int");
+ return;
+ }
+ int fd = Nan::To(info[0]).FromJust();
+
+ // callback
+ if (!info[1]->IsFunction()) {
+ Nan::ThrowTypeError("Second argument must be a function");
+ return;
+ }
+
+ VoidBaton* baton = new VoidBaton();
+ baton->fd = fd;
+ baton->callback.Reset(info[1].As());
+
+ uv_work_t* req = new uv_work_t();
+ req->data = baton;
+ uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain);
+}
+
+void EIO_AfterDrain(uv_work_t* req) {
+ Nan::HandleScope scope;
+
+ VoidBaton* data = static_cast(req->data);
+
+ v8::Local argv[1];
+
+ if (data->errorString[0]) {
+ argv[0] = v8::Exception::Error(Nan::New(data->errorString).ToLocalChecked());
+ } else {
+ argv[0] = Nan::Null();
+ }
+ data->callback.Call(1, argv, data);
+
+ delete data;
+ delete req;
+}
+
+SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local& v8str)) {
+ Nan::HandleScope scope;
+ Nan::Utf8String str(v8str);
+ size_t count = strlen(*str);
+ SerialPortParity parity = SERIALPORT_PARITY_NONE;
+ if (!strncasecmp(*str, "none", count)) {
+ parity = SERIALPORT_PARITY_NONE;
+ } else if (!strncasecmp(*str, "even", count)) {
+ parity = SERIALPORT_PARITY_EVEN;
+ } else if (!strncasecmp(*str, "mark", count)) {
+ parity = SERIALPORT_PARITY_MARK;
+ } else if (!strncasecmp(*str, "odd", count)) {
+ parity = SERIALPORT_PARITY_ODD;
+ } else if (!strncasecmp(*str, "space", count)) {
+ parity = SERIALPORT_PARITY_SPACE;
+ }
+ return parity;
+}
+
+SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
+ if (stopBits > 1.4 && stopBits < 1.6) {
+ return SERIALPORT_STOPBITS_ONE_FIVE;
+ }
+ if (stopBits == 2) {
+ return SERIALPORT_STOPBITS_TWO;
+ }
+ return SERIALPORT_STOPBITS_ONE;
+}
+
+NAN_MODULE_INIT(init) {
+ Nan::HandleScope scope;
+ Nan::SetMethod(target, "set", Set);
+ Nan::SetMethod(target, "get", Get);
+ Nan::SetMethod(target, "getBaudRate", GetBaudRate);
+ Nan::SetMethod(target, "open", Open);
+ Nan::SetMethod(target, "update", Update);
+ Nan::SetMethod(target, "close", Close);
+ Nan::SetMethod(target, "flush", Flush);
+ Nan::SetMethod(target, "drain", Drain);
+
+ #ifdef __APPLE__
+ Nan::SetMethod(target, "list", List);
+ #endif
+
+ #ifdef WIN32
+ Nan::SetMethod(target, "write", Write);
+ Nan::SetMethod(target, "read", Read);
+ Nan::SetMethod(target, "list", List);
+ #else
+ Poller::Init(target);
+ #endif
+}
+
+NODE_MODULE(serialport, init);
diff --git a/server/node_modules/@serialport/bindings/src/serialport.h b/server/node_modules/@serialport/bindings/src/serialport.h
new file mode 100644
index 0000000000000000000000000000000000000000..5397d4d3523313f956b355d29e6e234feeddc960
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/src/serialport.h
@@ -0,0 +1,147 @@
+#ifndef PACKAGES_SERIALPORT_SRC_SERIALPORT_H_
+#define PACKAGES_SERIALPORT_SRC_SERIALPORT_H_
+
+// Workaround for electron 11 abi issue https://github.com/serialport/node-serialport/issues/2191
+#include
+#if CHECK_NODE_MODULE_VERSION && NODE_MODULE_VERSION == 85
+#define V8_REVERSE_JSARGS
+#endif
+
+#include
+#include
+#include
+#include
+#include
+
+#define ERROR_STRING_SIZE 1024
+
+NAN_METHOD(Open);
+void EIO_Open(uv_work_t* req);
+void EIO_AfterOpen(uv_work_t* req);
+
+NAN_METHOD(Update);
+void EIO_Update(uv_work_t* req);
+void EIO_AfterUpdate(uv_work_t* req);
+
+NAN_METHOD(Close);
+void EIO_Close(uv_work_t* req);
+void EIO_AfterClose(uv_work_t* req);
+
+NAN_METHOD(Flush);
+void EIO_Flush(uv_work_t* req);
+void EIO_AfterFlush(uv_work_t* req);
+
+NAN_METHOD(Set);
+void EIO_Set(uv_work_t* req);
+void EIO_AfterSet(uv_work_t* req);
+
+NAN_METHOD(Get);
+void EIO_Get(uv_work_t* req);
+void EIO_AfterGet(uv_work_t* req);
+
+NAN_METHOD(GetBaudRate);
+void EIO_GetBaudRate(uv_work_t* req);
+void EIO_AfterGetBaudRate(uv_work_t* req);
+
+NAN_METHOD(Drain);
+void EIO_Drain(uv_work_t* req);
+void EIO_AfterDrain(uv_work_t* req);
+
+enum SerialPortParity {
+ SERIALPORT_PARITY_NONE = 1,
+ SERIALPORT_PARITY_MARK = 2,
+ SERIALPORT_PARITY_EVEN = 3,
+ SERIALPORT_PARITY_ODD = 4,
+ SERIALPORT_PARITY_SPACE = 5
+};
+
+enum SerialPortStopBits {
+ SERIALPORT_STOPBITS_ONE = 1,
+ SERIALPORT_STOPBITS_ONE_FIVE = 2,
+ SERIALPORT_STOPBITS_TWO = 3
+};
+
+SerialPortParity ToParityEnum(const v8::Local& str);
+SerialPortStopBits ToStopBitEnum(double stopBits);
+
+struct OpenBaton : public Nan::AsyncResource {
+ OpenBaton() :
+ AsyncResource("node-serialport:OpenBaton"), errorString(), path() {}
+ char errorString[ERROR_STRING_SIZE];
+ Nan::Callback callback;
+ char path[1024];
+ int fd = 0;
+ int result = 0;
+ int baudRate = 0;
+ int dataBits = 0;
+ bool rtscts = false;
+ bool xon = false;
+ bool xoff = false;
+ bool xany = false;
+ bool dsrdtr = false;
+ bool hupcl = false;
+ bool lock = false;
+ SerialPortParity parity;
+ SerialPortStopBits stopBits;
+#ifndef WIN32
+ uint8_t vmin = 0;
+ uint8_t vtime = 0;
+#endif
+};
+
+struct ConnectionOptions {
+ ConnectionOptions() : errorString() {}
+ char errorString[ERROR_STRING_SIZE];
+ int fd = 0;
+ int baudRate = 0;
+};
+struct ConnectionOptionsBaton : ConnectionOptions, Nan::AsyncResource {
+ ConnectionOptionsBaton() :
+ AsyncResource("node-serialport:ConnectionOptionsBaton") {}
+ Nan::Callback callback;
+};
+
+struct SetBaton : public Nan::AsyncResource {
+ SetBaton() : AsyncResource("node-serialport:SetBaton"), errorString() {}
+ int fd = 0;
+ Nan::Callback callback;
+ int result = 0;
+ char errorString[ERROR_STRING_SIZE];
+ bool rts = false;
+ bool cts = false;
+ bool dtr = false;
+ bool dsr = false;
+ bool brk = false;
+ bool lowLatency = false;
+};
+
+struct GetBaton : public Nan::AsyncResource {
+ GetBaton() : AsyncResource("node-serialport:GetBaton"), errorString() {}
+ int fd = 0;
+ Nan::Callback callback;
+ char errorString[ERROR_STRING_SIZE];
+ bool cts = false;
+ bool dsr = false;
+ bool dcd = false;
+ bool lowLatency = false;
+};
+
+struct GetBaudRateBaton : public Nan::AsyncResource {
+ GetBaudRateBaton() :
+ AsyncResource("node-serialport:GetBaudRateBaton"), errorString() {}
+ int fd = 0;
+ Nan::Callback callback;
+ char errorString[ERROR_STRING_SIZE];
+ int baudRate = 0;
+};
+
+struct VoidBaton : public Nan::AsyncResource {
+ VoidBaton() : AsyncResource("node-serialport:VoidBaton"), errorString() {}
+ int fd = 0;
+ Nan::Callback callback;
+ char errorString[ERROR_STRING_SIZE];
+};
+
+int setup(int fd, OpenBaton *data);
+int setBaudRate(ConnectionOptions *data);
+#endif // PACKAGES_SERIALPORT_SRC_SERIALPORT_H_
diff --git a/server/node_modules/@serialport/bindings/src/serialport_linux.cpp b/server/node_modules/@serialport/bindings/src/serialport_linux.cpp
new file mode 100755
index 0000000000000000000000000000000000000000..b53ed1390316264daee9902ddf1b2cbba024c929
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/src/serialport_linux.cpp
@@ -0,0 +1,76 @@
+#if defined(__linux__)
+
+#include
+#include
+#include
+#include
+
+// Uses the termios2 interface to set nonstandard baud rates
+int linuxSetCustomBaudRate(const int fd, const unsigned int baudrate) {
+ struct termios2 t;
+
+ if (ioctl(fd, TCGETS2, &t) == -1) {
+ return -1;
+ }
+
+ t.c_cflag &= ~CBAUD;
+ t.c_cflag |= BOTHER;
+ t.c_ospeed = t.c_ispeed = baudrate;
+
+ if (ioctl(fd, TCSETS2, &t) == -1) {
+ return -2;
+ }
+
+ return 0;
+}
+
+// Uses termios2 interface to retrieve system reported baud rate
+int linuxGetSystemBaudRate(const int fd, int* const outbaud) {
+ struct termios2 t;
+
+ if (ioctl(fd, TCGETS2, &t) == -1) {
+ return -1;
+ }
+
+ *outbaud = static_cast(t.c_ospeed);
+
+ return 0;
+}
+
+int linuxSetLowLatencyMode(const int fd, const bool enable) {
+ struct serial_struct ss;
+
+ if (ioctl(fd, TIOCGSERIAL, &ss) == -1) {
+ return -1;
+ }
+
+ if ((ss.flags & ASYNC_LOW_LATENCY) == enable) {
+ return 0;
+ }
+
+ if (enable) {
+ ss.flags |= ASYNC_LOW_LATENCY;
+ } else {
+ ss.flags &= ~ASYNC_LOW_LATENCY;
+ }
+
+ if (ioctl(fd, TIOCSSERIAL, &ss) == -1) {
+ return -2;
+ }
+
+ return 0;
+}
+
+int linuxGetLowLatencyMode(const int fd, bool* const enabled) {
+ struct serial_struct ss;
+
+ if (ioctl(fd, TIOCGSERIAL, &ss) == -1) {
+ return -1;
+ }
+
+ *enabled = ss.flags & ASYNC_LOW_LATENCY;
+
+ return 0;
+}
+
+#endif
diff --git a/server/node_modules/@serialport/bindings/src/serialport_linux.h b/server/node_modules/@serialport/bindings/src/serialport_linux.h
new file mode 100755
index 0000000000000000000000000000000000000000..f6eb928f24a79a0739654dd92a685624cf24b4c9
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/src/serialport_linux.h
@@ -0,0 +1,10 @@
+#ifndef PACKAGES_SERIALPORT_SRC_SERIALPORT_LINUX_H_
+#define PACKAGES_SERIALPORT_SRC_SERIALPORT_LINUX_H_
+
+int linuxSetCustomBaudRate(const int fd, const unsigned int baudrate);
+int linuxGetSystemBaudRate(const int fd, int* const outbaud);
+int linuxSetLowLatencyMode(const int fd, const bool enable);
+int linuxGetLowLatencyMode(const int fd, bool* const enabled);
+
+#endif // PACKAGES_SERIALPORT_SRC_SERIALPORT_LINUX_H_
+
diff --git a/server/node_modules/@serialport/bindings/src/serialport_unix.cpp b/server/node_modules/@serialport/bindings/src/serialport_unix.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..25fc698650ae726da246fffb8c78cb01b09cc059
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/src/serialport_unix.cpp
@@ -0,0 +1,426 @@
+#include "serialport_unix.h"
+#include "serialport.h"
+
+#include
+#include
+#include
+#include
+#include
+
+#ifdef __APPLE__
+#include
+#include
+#endif
+
+#if defined(MAC_OS_X_VERSION_10_4) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4)
+#include
+#include
+
+#elif defined(__NetBSD__)
+#include
+
+#elif defined(__OpenBSD__)
+#include
+
+#elif defined(__linux__)
+#include
+#include
+#include "serialport_linux.h"
+#endif
+
+int ToStopBitsConstant(SerialPortStopBits stopBits);
+
+int ToBaudConstant(int baudRate) {
+ switch (baudRate) {
+ case 0: return B0;
+ case 50: return B50;
+ case 75: return B75;
+ case 110: return B110;
+ case 134: return B134;
+ case 150: return B150;
+ case 200: return B200;
+ case 300: return B300;
+ case 600: return B600;
+ case 1200: return B1200;
+ case 1800: return B1800;
+ case 2400: return B2400;
+ case 4800: return B4800;
+ case 9600: return B9600;
+ case 19200: return B19200;
+ case 38400: return B38400;
+ case 57600: return B57600;
+ case 115200: return B115200;
+ case 230400: return B230400;
+#if defined(__linux__)
+ case 460800: return B460800;
+ case 500000: return B500000;
+ case 576000: return B576000;
+ case 921600: return B921600;
+ case 1000000: return B1000000;
+ case 1152000: return B1152000;
+ case 1500000: return B1500000;
+ case 2000000: return B2000000;
+ case 2500000: return B2500000;
+ case 3000000: return B3000000;
+ case 3500000: return B3500000;
+ case 4000000: return B4000000;
+#endif
+ }
+ return -1;
+}
+
+int ToDataBitsConstant(int dataBits) {
+ switch (dataBits) {
+ case 8: default: return CS8;
+ case 7: return CS7;
+ case 6: return CS6;
+ case 5: return CS5;
+ }
+ return -1;
+}
+
+void EIO_Open(uv_work_t* req) {
+ OpenBaton* data = static_cast(req->data);
+
+ int flags = (O_RDWR | O_NOCTTY | O_NONBLOCK | O_CLOEXEC | O_SYNC);
+ int fd = open(data->path, flags);
+
+ if (-1 == fd) {
+ snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot open %s", strerror(errno), data->path);
+ return;
+ }
+
+ if (-1 == setup(fd, data)) {
+ close(fd);
+ return;
+ }
+
+ data->result = fd;
+}
+
+int setBaudRate(ConnectionOptions *data) {
+ // lookup the standard baudrates from the table
+ int baudRate = ToBaudConstant(data->baudRate);
+ int fd = data->fd;
+
+ // get port options
+ struct termios options;
+ if (-1 == tcgetattr(fd, &options)) {
+ snprintf(data->errorString, sizeof(data->errorString),
+ "Error: %s setting custom baud rate of %d", strerror(errno), data->baudRate);
+ return -1;
+ }
+
+ // If there is a custom baud rate on linux you can do the following trick with B38400
+ #if defined(__linux__) && defined(ASYNC_SPD_CUST)
+ if (baudRate == -1) {
+ int err = linuxSetCustomBaudRate(fd, data->baudRate);
+
+ if (err == -1) {
+ snprintf(data->errorString, sizeof(data->errorString),
+ "Error: %s || while retrieving termios2 info", strerror(errno));
+ return -1;
+ } else if (err == -2) {
+ snprintf(data->errorString, sizeof(data->errorString),
+ "Error: %s || while setting custom baud rate of %d", strerror(errno), data->baudRate);
+ return -1;
+ }
+
+ return 1;
+ }
+ #endif
+
+ // On OS X, starting with Tiger, we can set a custom baud rate with ioctl
+ #if defined(MAC_OS_X_VERSION_10_4) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4)
+ if (-1 == baudRate) {
+ speed_t speed = data->baudRate;
+ if (-1 == ioctl(fd, IOSSIOSPEED, &speed)) {
+ snprintf(data->errorString, sizeof(data->errorString),
+ "Error: %s calling ioctl(.., IOSSIOSPEED, %ld )", strerror(errno), speed);
+ return -1;
+ } else {
+ tcflush(fd, TCIOFLUSH);
+ return 1;
+ }
+ }
+ #endif
+
+ if (-1 == baudRate) {
+ snprintf(data->errorString, sizeof(data->errorString),
+ "Error baud rate of %d is not supported on your platform", data->baudRate);
+ return -1;
+ }
+
+ // If we have a good baud rate set it and lets go
+ cfsetospeed(&options, baudRate);
+ cfsetispeed(&options, baudRate);
+ // throw away all the buffered data
+ tcflush(fd, TCIOFLUSH);
+ // make the changes now
+ tcsetattr(fd, TCSANOW, &options);
+ return 1;
+}
+
+void EIO_Update(uv_work_t* req) {
+ ConnectionOptionsBaton* data = static_cast(req->data);
+ setBaudRate(data);
+}
+
+int setup(int fd, OpenBaton *data) {
+ int dataBits = ToDataBitsConstant(data->dataBits);
+ if (-1 == dataBits) {
+ snprintf(data->errorString, sizeof(data->errorString),
+ "Invalid data bits setting %d", data->dataBits);
+ return -1;
+ }
+
+ // Snow Leopard doesn't have O_CLOEXEC
+ if (-1 == fcntl(fd, F_SETFD, FD_CLOEXEC)) {
+ snprintf(data->errorString, sizeof(data->errorString), "Error %s Cannot open %s", strerror(errno), data->path);
+ return -1;
+ }
+
+ // Get port configuration for modification
+ struct termios options;
+ tcgetattr(fd, &options);
+
+ // IGNPAR: ignore bytes with parity errors
+ options.c_iflag = IGNPAR;
+
+ // ICRNL: map CR to NL (otherwise a CR input on the other computer will not terminate input)
+ // Future potential option
+ // options.c_iflag = ICRNL;
+ // otherwise make device raw (no other input processing)
+
+ // Specify data bits
+ options.c_cflag &= ~CSIZE;
+ options.c_cflag |= dataBits;
+
+ options.c_cflag &= ~(CRTSCTS);
+
+ if (data->rtscts) {
+ options.c_cflag |= CRTSCTS;
+ // evaluate specific flow control options
+ }
+
+ options.c_iflag &= ~(IXON | IXOFF | IXANY);
+
+ if (data->xon) {
+ options.c_iflag |= IXON;
+ }
+
+ if (data->xoff) {
+ options.c_iflag |= IXOFF;
+ }
+
+ if (data->xany) {
+ options.c_iflag |= IXANY;
+ }
+
+ switch (data->parity) {
+ case SERIALPORT_PARITY_NONE:
+ options.c_cflag &= ~PARENB;
+ // options.c_cflag &= ~CSTOPB;
+ // options.c_cflag &= ~CSIZE;
+ // options.c_cflag |= CS8;
+ break;
+ case SERIALPORT_PARITY_ODD:
+ options.c_cflag |= PARENB;
+ options.c_cflag |= PARODD;
+ // options.c_cflag &= ~CSTOPB;
+ // options.c_cflag &= ~CSIZE;
+ // options.c_cflag |= CS7;
+ break;
+ case SERIALPORT_PARITY_EVEN:
+ options.c_cflag |= PARENB;
+ options.c_cflag &= ~PARODD;
+ // options.c_cflag &= ~CSTOPB;
+ // options.c_cflag &= ~CSIZE;
+ // options.c_cflag |= CS7;
+ break;
+ default:
+ snprintf(data->errorString, sizeof(data->errorString), "Invalid parity setting %d", data->parity);
+ return -1;
+ }
+
+ switch (data->stopBits) {
+ case SERIALPORT_STOPBITS_ONE:
+ options.c_cflag &= ~CSTOPB;
+ break;
+ case SERIALPORT_STOPBITS_TWO:
+ options.c_cflag |= CSTOPB;
+ break;
+ default:
+ snprintf(data->errorString, sizeof(data->errorString), "Invalid stop bits setting %d", data->stopBits);
+ return -1;
+ }
+
+ options.c_cflag |= CLOCAL; // ignore status lines
+ options.c_cflag |= CREAD; // enable receiver
+ if (data->hupcl) {
+ options.c_cflag |= HUPCL; // drop DTR (i.e. hangup) on close
+ }
+
+ // Raw output
+ options.c_oflag = 0;
+
+ // ICANON makes partial lines not readable. It should be optional.
+ // It works with ICRNL.
+ options.c_lflag = 0; // ICANON;
+ options.c_cc[VMIN]= data->vmin;
+ options.c_cc[VTIME]= data->vtime;
+
+ // Note that tcsetattr() returns success if any of the requested changes could be successfully carried out.
+ // Therefore, when making multiple changes it may be necessary to follow this call with a further call to
+ // tcgetattr() to check that all changes have been performed successfully.
+ // This also fails on OSX
+ tcsetattr(fd, TCSANOW, &options);
+
+ if (data->lock) {
+ if (-1 == flock(fd, LOCK_EX | LOCK_NB)) {
+ snprintf(data->errorString, sizeof(data->errorString), "Error %s Cannot lock port", strerror(errno));
+ return -1;
+ }
+ }
+
+ // Copy the connection options into the ConnectionOptionsBaton to set the baud rate
+ ConnectionOptions* connectionOptions = new ConnectionOptions();
+ connectionOptions->fd = fd;
+ connectionOptions->baudRate = data->baudRate;
+
+ if (-1 == setBaudRate(connectionOptions)) {
+ strncpy(data->errorString, connectionOptions->errorString, sizeof(data->errorString));
+ delete(connectionOptions);
+ return -1;
+ }
+ delete(connectionOptions);
+
+ // flush all unread and wrote data up to this point because it could have been received or sent with bad settings
+ // Not needed since setBaudRate does this for us
+ // tcflush(fd, TCIOFLUSH);
+
+ return 1;
+}
+
+void EIO_Close(uv_work_t* req) {
+ VoidBaton* data = static_cast(req->data);
+
+ if (-1 == close(data->fd)) {
+ snprintf(data->errorString, sizeof(data->errorString),
+ "Error: %s, unable to close fd %d", strerror(errno), data->fd);
+ }
+}
+
+void EIO_Set(uv_work_t* req) {
+ SetBaton* data = static_cast(req->data);
+
+ int bits;
+ ioctl(data->fd, TIOCMGET, &bits);
+
+ bits &= ~(TIOCM_RTS | TIOCM_CTS | TIOCM_DTR | TIOCM_DSR);
+
+ if (data->rts) {
+ bits |= TIOCM_RTS;
+ }
+
+ if (data->cts) {
+ bits |= TIOCM_CTS;
+ }
+
+ if (data->dtr) {
+ bits |= TIOCM_DTR;
+ }
+
+ if (data->dsr) {
+ bits |= TIOCM_DSR;
+ }
+
+ int result = 0;
+ if (data->brk) {
+ result = ioctl(data->fd, TIOCSBRK, NULL);
+ } else {
+ result = ioctl(data->fd, TIOCCBRK, NULL);
+ }
+
+ if (-1 == result) {
+ snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot set", strerror(errno));
+ return;
+ }
+
+ if (-1 == ioctl(data->fd, TIOCMSET, &bits)) {
+ snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot set", strerror(errno));
+ return;
+ }
+
+ #if defined(__linux__)
+ int err = linuxSetLowLatencyMode(data->fd, data->lowLatency);
+ // Only report errors when the lowLatency is being set to true. Attempting to set as false can error, since the default is false
+ if (data->lowLatency) {
+ if (err == -1) {
+ snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot get low latency", strerror(errno));
+ return;
+ } else if(err == -2) {
+ snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot set low latency", strerror(errno));
+ return;
+ }
+ }
+ #endif
+}
+
+void EIO_Get(uv_work_t* req) {
+ GetBaton* data = static_cast(req->data);
+
+ int bits;
+ if (-1 == ioctl(data->fd, TIOCMGET, &bits)) {
+ snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot get", strerror(errno));
+ return;
+ }
+
+ data->cts = bits & TIOCM_CTS;
+ data->dsr = bits & TIOCM_DSR;
+ data->dcd = bits & TIOCM_CD;
+
+ #if defined(__linux__) && defined(ASYNC_LOW_LATENCY)
+ bool lowlatency = false;
+ // Try to get low latency info, but we don't care if fails (a failure state will still return lowlatency = false)
+ linuxGetLowLatencyMode(data->fd, &lowlatency);
+ data->lowLatency = lowlatency;
+ #else
+ data->lowLatency = false;
+ #endif
+}
+
+void EIO_GetBaudRate(uv_work_t* req) {
+ GetBaudRateBaton* data = static_cast(req->data);
+ int outbaud = -1;
+
+ #if defined(__linux__) && defined(ASYNC_SPD_CUST)
+ if (-1 == linuxGetSystemBaudRate(data->fd, &outbaud)) {
+ snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot get baud rate", strerror(errno));
+ return;
+ }
+ #else
+ snprintf(data->errorString, sizeof(data->errorString), "Error: System baud rate check not implemented on this platform");
+ return;
+ #endif
+
+ data->baudRate = outbaud;
+}
+
+void EIO_Flush(uv_work_t* req) {
+ VoidBaton* data = static_cast(req->data);
+
+ if (-1 == tcflush(data->fd, TCIOFLUSH)) {
+ snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot flush", strerror(errno));
+ return;
+ }
+}
+
+void EIO_Drain(uv_work_t* req) {
+ VoidBaton* data = static_cast(req->data);
+
+ if (-1 == tcdrain(data->fd)) {
+ snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot drain", strerror(errno));
+ return;
+ }
+}
diff --git a/server/node_modules/@serialport/bindings/src/serialport_unix.h b/server/node_modules/@serialport/bindings/src/serialport_unix.h
new file mode 100644
index 0000000000000000000000000000000000000000..08b11e0c3cb63ec0e3f2dcdaba5bfa6567de5559
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/src/serialport_unix.h
@@ -0,0 +1,7 @@
+#ifndef PACKAGES_SERIALPORT_SRC_SERIALPORT_UNIX_H_
+#define PACKAGES_SERIALPORT_SRC_SERIALPORT_UNIX_H_
+
+int ToBaudConstant(int baudRate);
+int ToDataBitsConstant(int dataBits);
+
+#endif // PACKAGES_SERIALPORT_SRC_SERIALPORT_UNIX_H_
diff --git a/server/node_modules/@serialport/bindings/src/serialport_win.cpp b/server/node_modules/@serialport/bindings/src/serialport_win.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..963483435a1ad8d8fca99a10989a5fb55282a579
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/src/serialport_win.cpp
@@ -0,0 +1,954 @@
+#include "./serialport.h"
+#include "./serialport_win.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#pragma comment(lib, "setupapi.lib")
+
+#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))
+
+#define MAX_BUFFER_SIZE 1000
+
+// As per https://msdn.microsoft.com/en-us/library/windows/desktop/ms724872(v=vs.85).aspx
+#define MAX_REGISTRY_KEY_SIZE 255
+
+// Declare type of pointer to CancelIoEx function
+typedef BOOL (WINAPI *CancelIoExType)(HANDLE hFile, LPOVERLAPPED lpOverlapped);
+
+static inline HANDLE int2handle(int ptr) {
+ return reinterpret_cast(static_cast(ptr));
+}
+
+std::list g_closingHandles;
+
+void ErrorCodeToString(const char* prefix, int errorCode, char *errorStr) {
+ switch (errorCode) {
+ case ERROR_FILE_NOT_FOUND:
+ _snprintf_s(errorStr, ERROR_STRING_SIZE, _TRUNCATE, "%s: File not found", prefix);
+ break;
+ case ERROR_INVALID_HANDLE:
+ _snprintf_s(errorStr, ERROR_STRING_SIZE, _TRUNCATE, "%s: Invalid handle", prefix);
+ break;
+ case ERROR_ACCESS_DENIED:
+ _snprintf_s(errorStr, ERROR_STRING_SIZE, _TRUNCATE, "%s: Access denied", prefix);
+ break;
+ case ERROR_OPERATION_ABORTED:
+ _snprintf_s(errorStr, ERROR_STRING_SIZE, _TRUNCATE, "%s: Operation aborted", prefix);
+ break;
+ case ERROR_INVALID_PARAMETER:
+ _snprintf_s(errorStr, ERROR_STRING_SIZE, _TRUNCATE, "%s: The parameter is incorrect", prefix);
+ break;
+ default:
+ _snprintf_s(errorStr, ERROR_STRING_SIZE, _TRUNCATE, "%s: Unknown error code %d", prefix, errorCode);
+ break;
+ }
+}
+
+void AsyncCloseCallback(uv_handle_t* handle) {
+ uv_async_t* async = reinterpret_cast(handle);
+ delete async;
+}
+
+void EIO_Open(uv_work_t* req) {
+ OpenBaton* data = static_cast(req->data);
+
+ char originalPath[1024];
+ strncpy_s(originalPath, sizeof(originalPath), data->path, _TRUNCATE);
+ // data->path is char[1024] but on Windows it has the form "COMx\0" or "COMxx\0"
+ // We want to prepend "\\\\.\\" to it before we call CreateFile
+ strncpy(data->path + 20, data->path, 10);
+ strncpy(data->path, "\\\\.\\", 4);
+ strncpy(data->path + 4, data->path + 20, 10);
+
+ int shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
+ if (data->lock) {
+ shareMode = 0;
+ }
+
+ HANDLE file = CreateFile(
+ data->path,
+ GENERIC_READ | GENERIC_WRITE,
+ shareMode, // dwShareMode 0 Prevents other processes from opening if they request delete, read, or write access
+ NULL,
+ OPEN_EXISTING,
+ FILE_FLAG_OVERLAPPED, // allows for reading and writing at the same time and sets the handle for asynchronous I/O
+ NULL);
+
+ if (file == INVALID_HANDLE_VALUE) {
+ DWORD errorCode = GetLastError();
+ char temp[100];
+ _snprintf_s(temp, sizeof(temp), _TRUNCATE, "Opening %s", originalPath);
+ ErrorCodeToString(temp, errorCode, data->errorString);
+ return;
+ }
+
+ DCB dcb = { 0 };
+ SecureZeroMemory(&dcb, sizeof(DCB));
+ dcb.DCBlength = sizeof(DCB);
+
+ if (!GetCommState(file, &dcb)) {
+ ErrorCodeToString("Open (GetCommState)", GetLastError(), data->errorString);
+ CloseHandle(file);
+ return;
+ }
+
+ if (data->hupcl) {
+ dcb.fDtrControl = DTR_CONTROL_ENABLE;
+ } else {
+ dcb.fDtrControl = DTR_CONTROL_DISABLE; // disable DTR to avoid reset
+ }
+
+ dcb.Parity = NOPARITY;
+ dcb.ByteSize = 8;
+ dcb.StopBits = ONESTOPBIT;
+
+
+ dcb.fOutxDsrFlow = FALSE;
+ dcb.fOutxCtsFlow = FALSE;
+
+ if (data->xon) {
+ dcb.fOutX = TRUE;
+ } else {
+ dcb.fOutX = FALSE;
+ }
+
+ if (data->xoff) {
+ dcb.fInX = TRUE;
+ } else {
+ dcb.fInX = FALSE;
+ }
+
+ if (data->rtscts) {
+ dcb.fRtsControl = RTS_CONTROL_HANDSHAKE;
+ dcb.fOutxCtsFlow = TRUE;
+ } else {
+ dcb.fRtsControl = RTS_CONTROL_DISABLE;
+ }
+
+ dcb.fBinary = true;
+ dcb.BaudRate = data->baudRate;
+ dcb.ByteSize = data->dataBits;
+
+ switch (data->parity) {
+ case SERIALPORT_PARITY_NONE:
+ dcb.Parity = NOPARITY;
+ break;
+ case SERIALPORT_PARITY_MARK:
+ dcb.Parity = MARKPARITY;
+ break;
+ case SERIALPORT_PARITY_EVEN:
+ dcb.Parity = EVENPARITY;
+ break;
+ case SERIALPORT_PARITY_ODD:
+ dcb.Parity = ODDPARITY;
+ break;
+ case SERIALPORT_PARITY_SPACE:
+ dcb.Parity = SPACEPARITY;
+ break;
+ }
+
+ switch (data->stopBits) {
+ case SERIALPORT_STOPBITS_ONE:
+ dcb.StopBits = ONESTOPBIT;
+ break;
+ case SERIALPORT_STOPBITS_ONE_FIVE:
+ dcb.StopBits = ONE5STOPBITS;
+ break;
+ case SERIALPORT_STOPBITS_TWO:
+ dcb.StopBits = TWOSTOPBITS;
+ break;
+ }
+
+ if (!SetCommState(file, &dcb)) {
+ ErrorCodeToString("Open (SetCommState)", GetLastError(), data->errorString);
+ CloseHandle(file);
+ return;
+ }
+
+ // Set the timeouts for read and write operations.
+ // Read operation will wait for at least 1 byte to be received.
+ COMMTIMEOUTS commTimeouts = {};
+ commTimeouts.ReadIntervalTimeout = 0; // Never timeout, always wait for data.
+ commTimeouts.ReadTotalTimeoutMultiplier = 0; // Do not allow big read timeout when big read buffer used
+ commTimeouts.ReadTotalTimeoutConstant = 0; // Total read timeout (period of read loop)
+ commTimeouts.WriteTotalTimeoutConstant = 0; // Const part of write timeout
+ commTimeouts.WriteTotalTimeoutMultiplier = 0; // Variable part of write timeout (per byte)
+
+ if (!SetCommTimeouts(file, &commTimeouts)) {
+ ErrorCodeToString("Open (SetCommTimeouts)", GetLastError(), data->errorString);
+ CloseHandle(file);
+ return;
+ }
+
+ // Remove garbage data in RX/TX queues
+ PurgeComm(file, PURGE_RXCLEAR);
+ PurgeComm(file, PURGE_TXCLEAR);
+
+ data->result = static_cast(reinterpret_cast(file));
+}
+
+void EIO_Update(uv_work_t* req) {
+ ConnectionOptionsBaton* data = static_cast(req->data);
+
+ DCB dcb = { 0 };
+ SecureZeroMemory(&dcb, sizeof(DCB));
+ dcb.DCBlength = sizeof(DCB);
+
+ if (!GetCommState(int2handle(data->fd), &dcb)) {
+ ErrorCodeToString("Update (GetCommState)", GetLastError(), data->errorString);
+ return;
+ }
+
+ dcb.BaudRate = data->baudRate;
+
+ if (!SetCommState(int2handle(data->fd), &dcb)) {
+ ErrorCodeToString("Update (SetCommState)", GetLastError(), data->errorString);
+ return;
+ }
+}
+
+void EIO_Set(uv_work_t* req) {
+ SetBaton* data = static_cast(req->data);
+
+ if (data->rts) {
+ EscapeCommFunction(int2handle(data->fd), SETRTS);
+ } else {
+ EscapeCommFunction(int2handle(data->fd), CLRRTS);
+ }
+
+ if (data->dtr) {
+ EscapeCommFunction(int2handle(data->fd), SETDTR);
+ } else {
+ EscapeCommFunction(int2handle(data->fd), CLRDTR);
+ }
+
+ if (data->brk) {
+ EscapeCommFunction(int2handle(data->fd), SETBREAK);
+ } else {
+ EscapeCommFunction(int2handle(data->fd), CLRBREAK);
+ }
+
+ DWORD bits = 0;
+
+ GetCommMask(int2handle(data->fd), &bits);
+
+ bits &= ~(EV_CTS | EV_DSR);
+
+ if (data->cts) {
+ bits |= EV_CTS;
+ }
+
+ if (data->dsr) {
+ bits |= EV_DSR;
+ }
+
+ if (!SetCommMask(int2handle(data->fd), bits)) {
+ ErrorCodeToString("Setting options on COM port (SetCommMask)", GetLastError(), data->errorString);
+ return;
+ }
+}
+
+void EIO_Get(uv_work_t* req) {
+ GetBaton* data = static_cast(req->data);
+
+ DWORD bits = 0;
+ if (!GetCommModemStatus(int2handle(data->fd), &bits)) {
+ ErrorCodeToString("Getting control settings on COM port (GetCommModemStatus)", GetLastError(), data->errorString);
+ return;
+ }
+
+ data->cts = bits & MS_CTS_ON;
+ data->dsr = bits & MS_DSR_ON;
+ data->dcd = bits & MS_RLSD_ON;
+}
+
+void EIO_GetBaudRate(uv_work_t* req) {
+ GetBaudRateBaton* data = static_cast(req->data);
+
+ DCB dcb = { 0 };
+ SecureZeroMemory(&dcb, sizeof(DCB));
+ dcb.DCBlength = sizeof(DCB);
+
+ if (!GetCommState(int2handle(data->fd), &dcb)) {
+ ErrorCodeToString("Getting baud rate (GetCommState)", GetLastError(), data->errorString);
+ return;
+ }
+
+ data->baudRate = static_cast(dcb.BaudRate);
+}
+
+bool IsClosingHandle(int fd) {
+ for (std::list::iterator it = g_closingHandles.begin(); it != g_closingHandles.end(); ++it) {
+ if (fd == *it) {
+ g_closingHandles.remove(fd);
+ return true;
+ }
+ }
+ return false;
+}
+
+NAN_METHOD(Write) {
+ // file descriptor
+ if (!info[0]->IsInt32()) {
+ Nan::ThrowTypeError("First argument must be an int");
+ return;
+ }
+ int fd = Nan::To(info[0]).FromJust();
+
+ // buffer
+ if (!info[1]->IsObject() || !node::Buffer::HasInstance(info[1])) {
+ Nan::ThrowTypeError("Second argument must be a buffer");
+ return;
+ }
+ v8::Local buffer = Nan::To(info[1]).ToLocalChecked();
+ char* bufferData = node::Buffer::Data(buffer);
+ size_t bufferLength = node::Buffer::Length(buffer);
+
+ // callback
+ if (!info[2]->IsFunction()) {
+ Nan::ThrowTypeError("Third argument must be a function");
+ return;
+ }
+
+ WriteBaton* baton = new WriteBaton();
+ baton->fd = fd;
+ baton->buffer.Reset(buffer);
+ baton->bufferData = bufferData;
+ baton->bufferLength = bufferLength;
+ baton->offset = 0;
+ baton->callback.Reset(info[2].As());
+ baton->complete = false;
+
+ uv_async_t* async = new uv_async_t;
+ uv_async_init(uv_default_loop(), async, EIO_AfterWrite);
+ async->data = baton;
+ // WriteFileEx requires a thread that can block. Create a new thread to
+ // run the write operation, saving the handle so it can be deallocated later.
+ baton->hThread = CreateThread(NULL, 0, WriteThread, async, 0, NULL);
+}
+
+void __stdcall WriteIOCompletion(DWORD errorCode, DWORD bytesTransferred, OVERLAPPED* ov) {
+ WriteBaton* baton = static_cast(ov->hEvent);
+ DWORD bytesWritten;
+ if (!GetOverlappedResult(int2handle(baton->fd), ov, &bytesWritten, TRUE)) {
+ errorCode = GetLastError();
+ ErrorCodeToString("Writing to COM port (GetOverlappedResult)", errorCode, baton->errorString);
+ baton->complete = true;
+ return;
+ }
+ if (bytesWritten) {
+ baton->offset += bytesWritten;
+ if (baton->offset >= baton->bufferLength) {
+ baton->complete = true;
+ }
+ }
+}
+
+DWORD __stdcall WriteThread(LPVOID param) {
+ uv_async_t* async = static_cast(param);
+ WriteBaton* baton = static_cast(async->data);
+
+ OVERLAPPED* ov = new OVERLAPPED;
+ memset(ov, 0, sizeof(OVERLAPPED));
+ ov->hEvent = static_cast(baton);
+
+ while (!baton->complete) {
+ char* offsetPtr = baton->bufferData + baton->offset;
+ // WriteFileEx requires calling GetLastError even upon success. Clear the error beforehand.
+ SetLastError(0);
+ WriteFileEx(int2handle(baton->fd), offsetPtr,
+ static_cast(baton->bufferLength - baton->offset), ov, WriteIOCompletion);
+ // Error codes when call is successful, such as ERROR_MORE_DATA.
+ DWORD lastError = GetLastError();
+ if (lastError != ERROR_SUCCESS) {
+ ErrorCodeToString("Writing to COM port (WriteFileEx)", lastError, baton->errorString);
+ break;
+ }
+ // IOCompletion routine is only called once this thread is in an alertable wait state.
+ SleepEx(INFINITE, TRUE);
+ }
+ delete ov;
+ // Signal the main thread to run the callback.
+ uv_async_send(async);
+ ExitThread(0);
+}
+
+void EIO_AfterWrite(uv_async_t* req) {
+ Nan::HandleScope scope;
+ WriteBaton* baton = static_cast(req->data);
+ WaitForSingleObject(baton->hThread, INFINITE);
+ CloseHandle(baton->hThread);
+ uv_close(reinterpret_cast(req), AsyncCloseCallback);
+
+ v8::Local argv[1];
+ if (baton->errorString[0]) {
+ argv[0] = v8::Exception::Error(Nan::New(baton->errorString).ToLocalChecked());
+ } else {
+ argv[0] = Nan::Null();
+ }
+ baton->callback.Call(1, argv, baton);
+ baton->buffer.Reset();
+ delete baton;
+}
+
+NAN_METHOD(Read) {
+ // file descriptor
+ if (!info[0]->IsInt32()) {
+ Nan::ThrowTypeError("First argument must be a fd");
+ return;
+ }
+ int fd = Nan::To(info[0]).FromJust();
+
+ // buffer
+ if (!info[1]->IsObject() || !node::Buffer::HasInstance(info[1])) {
+ Nan::ThrowTypeError("Second argument must be a buffer");
+ return;
+ }
+ v8::Local buffer = Nan::To(info[1]).ToLocalChecked();
+ size_t bufferLength = node::Buffer::Length(buffer);
+
+ // offset
+ if (!info[2]->IsInt32()) {
+ Nan::ThrowTypeError("Third argument must be an int");
+ return;
+ }
+ int offset = Nan::To(info[2]).ToLocalChecked()->Value();
+
+ // bytes to read
+ if (!info[3]->IsInt32()) {
+ Nan::ThrowTypeError("Fourth argument must be an int");
+ return;
+ }
+ size_t bytesToRead = Nan::To(info[3]).ToLocalChecked()->Value();
+
+ if ((bytesToRead + offset) > bufferLength) {
+ Nan::ThrowTypeError("'bytesToRead' + 'offset' cannot be larger than the buffer's length");
+ return;
+ }
+
+ // callback
+ if (!info[4]->IsFunction()) {
+ Nan::ThrowTypeError("Fifth argument must be a function");
+ return;
+ }
+
+ ReadBaton* baton = new ReadBaton();
+ baton->fd = fd;
+ baton->offset = offset;
+ baton->bytesToRead = bytesToRead;
+ baton->bufferLength = bufferLength;
+ baton->bufferData = node::Buffer::Data(buffer);
+ baton->callback.Reset(info[4].As());
+ baton->complete = false;
+
+ uv_async_t* async = new uv_async_t;
+ uv_async_init(uv_default_loop(), async, EIO_AfterRead);
+ async->data = baton;
+ // ReadFileEx requires a thread that can block. Create a new thread to
+ // run the read operation, saving the handle so it can be deallocated later.
+ baton->hThread = CreateThread(NULL, 0, ReadThread, async, 0, NULL);
+}
+
+void __stdcall ReadIOCompletion(DWORD errorCode, DWORD bytesTransferred, OVERLAPPED* ov) {
+ ReadBaton* baton = static_cast(ov->hEvent);
+
+ if (errorCode) {
+ ErrorCodeToString("Reading from COM port (ReadIOCompletion)", errorCode, baton->errorString);
+ baton->complete = true;
+ return;
+ }
+
+ DWORD lastError;
+ if (!GetOverlappedResult(int2handle(baton->fd), ov, &bytesTransferred, TRUE)) {
+ lastError = GetLastError();
+ ErrorCodeToString("Reading from COM port (GetOverlappedResult)", lastError, baton->errorString);
+ baton->complete = true;
+ return;
+ }
+ if (bytesTransferred) {
+ baton->bytesToRead -= bytesTransferred;
+ baton->bytesRead += bytesTransferred;
+ baton->offset += bytesTransferred;
+ }
+
+ // ReadFileEx and GetOverlappedResult retrieved only 1 byte. Read any additional data in the input
+ // buffer. Set the timeout to MAXDWORD in order to disable timeouts, so the read operation will
+ // return immediately no matter how much data is available.
+ COMMTIMEOUTS commTimeouts = {};
+ commTimeouts.ReadIntervalTimeout = MAXDWORD;
+ if (!SetCommTimeouts(int2handle(baton->fd), &commTimeouts)) {
+ lastError = GetLastError();
+ ErrorCodeToString("Setting COM timeout (SetCommTimeouts)", lastError, baton->errorString);
+ baton->complete = true;
+ return;
+ }
+
+ // Store additional data after whatever data has already been read.
+ char* offsetPtr = baton->bufferData + baton->offset;
+
+ // ReadFile, unlike ReadFileEx, needs an event in the overlapped structure.
+ memset(ov, 0, sizeof(OVERLAPPED));
+ ov->hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+ if (!ReadFile(int2handle(baton->fd), offsetPtr, baton->bytesToRead, &bytesTransferred, ov)) {
+ errorCode = GetLastError();
+
+ if (errorCode != ERROR_IO_PENDING) {
+ ErrorCodeToString("Reading from COM port (ReadFile)", errorCode, baton->errorString);
+ baton->complete = true;
+ CloseHandle(ov->hEvent);
+ return;
+ }
+
+ if (!GetOverlappedResult(int2handle(baton->fd), ov, &bytesTransferred, TRUE)) {
+ lastError = GetLastError();
+ ErrorCodeToString("Reading from COM port (GetOverlappedResult)", lastError, baton->errorString);
+ baton->complete = true;
+ CloseHandle(ov->hEvent);
+ return;
+ }
+ }
+ CloseHandle(ov->hEvent);
+
+ baton->bytesToRead -= bytesTransferred;
+ baton->bytesRead += bytesTransferred;
+ baton->complete = true;
+}
+
+DWORD __stdcall ReadThread(LPVOID param) {
+ uv_async_t* async = static_cast(param);
+ ReadBaton* baton = static_cast(async->data);
+ DWORD lastError;
+
+ OVERLAPPED* ov = new OVERLAPPED;
+ memset(ov, 0, sizeof(OVERLAPPED));
+ ov->hEvent = static_cast(baton);
+
+ while (!baton->complete) {
+ // Reset the read timeout to 0, so that it will block until more data arrives.
+ COMMTIMEOUTS commTimeouts = {};
+ commTimeouts.ReadIntervalTimeout = 0;
+ if (!SetCommTimeouts(int2handle(baton->fd), &commTimeouts)) {
+ lastError = GetLastError();
+ ErrorCodeToString("Setting COM timeout (SetCommTimeouts)", lastError, baton->errorString);
+ break;
+ }
+ // ReadFileEx doesn't use overlapped's hEvent, so it is reserved for user data.
+ ov->hEvent = static_cast(baton);
+ char* offsetPtr = baton->bufferData + baton->offset;
+ // ReadFileEx requires calling GetLastError even upon success. Clear the error beforehand.
+ SetLastError(0);
+ // Only read 1 byte, so that the callback will be triggered once any data arrives.
+ ReadFileEx(int2handle(baton->fd), offsetPtr, 1, ov, ReadIOCompletion);
+ // Error codes when call is successful, such as ERROR_MORE_DATA.
+ lastError = GetLastError();
+ if (lastError != ERROR_SUCCESS) {
+ ErrorCodeToString("Reading from COM port (ReadFileEx)", lastError, baton->errorString);
+ break;
+ }
+ // IOCompletion routine is only called once this thread is in an alertable wait state.
+ SleepEx(INFINITE, TRUE);
+ }
+ delete ov;
+ // Signal the main thread to run the callback.
+ uv_async_send(async);
+ ExitThread(0);
+}
+
+void EIO_AfterRead(uv_async_t* req) {
+ Nan::HandleScope scope;
+ ReadBaton* baton = static_cast(req->data);
+ WaitForSingleObject(baton->hThread, INFINITE);
+ CloseHandle(baton->hThread);
+ uv_close(reinterpret_cast(req), AsyncCloseCallback);
+
+ v8::Local argv[2];
+ if (baton->errorString[0]) {
+ argv[0] = Nan::Error(baton->errorString);
+ argv[1] = Nan::Undefined();
+ } else {
+ argv[0] = Nan::Null();
+ argv[1] = Nan::New(static_cast(baton->bytesRead));
+ }
+
+ baton->callback.Call(2, argv, baton);
+ delete baton;
+}
+
+void EIO_Close(uv_work_t* req) {
+ VoidBaton* data = static_cast(req->data);
+
+ g_closingHandles.push_back(data->fd);
+
+ HMODULE hKernel32 = LoadLibrary("kernel32.dll");
+ // Look up function address
+ CancelIoExType pCancelIoEx = (CancelIoExType)GetProcAddress(hKernel32, "CancelIoEx");
+ // Do something with it
+ if (pCancelIoEx) {
+ // Function exists so call it
+ // Cancel all pending IO Requests for the current device
+ pCancelIoEx(int2handle(data->fd), NULL);
+ }
+ if (!CloseHandle(int2handle(data->fd))) {
+ ErrorCodeToString("Closing connection (CloseHandle)", GetLastError(), data->errorString);
+ return;
+ }
+}
+
+char *copySubstring(char *someString, int n) {
+ char *new_ = reinterpret_cast(malloc(sizeof(char)*n + 1));
+ strncpy_s(new_, n + 1, someString, n);
+ new_[n] = '\0';
+ return new_;
+}
+
+NAN_METHOD(List) {
+ // callback
+ if (!info[0]->IsFunction()) {
+ Nan::ThrowTypeError("First argument must be a function");
+ return;
+ }
+
+ ListBaton* baton = new ListBaton();
+ snprintf(baton->errorString, sizeof(baton->errorString), "");
+ baton->callback.Reset(info[0].As());
+
+ uv_work_t* req = new uv_work_t();
+ req->data = baton;
+ uv_queue_work(uv_default_loop(), req, EIO_List, (uv_after_work_cb)EIO_AfterList);
+}
+
+// It's possible that the s/n is a construct and not the s/n of the parent USB
+// composite device. This performs some convoluted registry lookups to fetch the USB s/n.
+void getSerialNumber(const char *vid,
+ const char *pid,
+ const HDEVINFO hDevInfo,
+ SP_DEVINFO_DATA deviceInfoData,
+ const unsigned int maxSerialNumberLength,
+ char* serialNumber) {
+ _snprintf_s(serialNumber, maxSerialNumberLength, _TRUNCATE, "");
+ if (vid == NULL || pid == NULL) {
+ return;
+ }
+
+ DWORD dwSize;
+ WCHAR szWUuidBuffer[MAX_BUFFER_SIZE];
+ WCHAR containerUuid[MAX_BUFFER_SIZE];
+
+
+ // Fetch the "Container ID" for this device node. In USB context, this "Container
+ // ID" refers to the composite USB device, i.e. the USB device as a whole, not
+ // just one of its interfaces with a serial port driver attached.
+
+ // From https://stackoverflow.com/questions/3438366/setupdigetdeviceproperty-usage-example:
+ // Because this is not compiled with UNICODE defined, the call to SetupDiGetDevicePropertyW
+ // has to be setup manually.
+ DEVPROPTYPE ulPropertyType;
+ typedef BOOL (WINAPI *FN_SetupDiGetDevicePropertyW)(
+ __in HDEVINFO DeviceInfoSet,
+ __in PSP_DEVINFO_DATA DeviceInfoData,
+ __in const DEVPROPKEY *PropertyKey,
+ __out DEVPROPTYPE *PropertyType,
+ __out_opt PBYTE PropertyBuffer,
+ __in DWORD PropertyBufferSize,
+ __out_opt PDWORD RequiredSize,
+ __in DWORD Flags);
+
+ FN_SetupDiGetDevicePropertyW fn_SetupDiGetDevicePropertyW = (FN_SetupDiGetDevicePropertyW)
+ GetProcAddress(GetModuleHandle(TEXT("Setupapi.dll")), "SetupDiGetDevicePropertyW");
+
+ if (fn_SetupDiGetDevicePropertyW (
+ hDevInfo,
+ &deviceInfoData,
+ &DEVPKEY_Device_ContainerId,
+ &ulPropertyType,
+ reinterpret_cast(szWUuidBuffer),
+ sizeof(szWUuidBuffer),
+ &dwSize,
+ 0)) {
+ szWUuidBuffer[dwSize] = '\0';
+
+ // Given the UUID bytes, build up a (widechar) string from it. There's some mangling
+ // going on.
+ StringFromGUID2((REFGUID)szWUuidBuffer, containerUuid, ARRAY_SIZE(containerUuid));
+ } else {
+ // Container UUID could not be fetched, return empty serial number.
+ return;
+ }
+
+ // NOTE: Devices might have a containerUuid like {00000000-0000-0000-FFFF-FFFFFFFFFFFF}
+ // This means they're non-removable, and are not handled (yet).
+ // Maybe they should inherit the s/n from somewhere else.
+
+ // Sanitize input - for whatever reason, StringFromGUID2() returns a WCHAR* but
+ // the comparisons later need a plain old char*, in lowercase ASCII.
+ char wantedUuid[MAX_BUFFER_SIZE];
+ _snprintf_s(wantedUuid, MAX_BUFFER_SIZE, _TRUNCATE, "%ws", containerUuid);
+ strlwr(wantedUuid);
+
+ // Iterate through all the USB devices with the given VendorID/ProductID
+
+ HKEY vendorProductHKey;
+ DWORD retCode;
+ char hkeyPath[MAX_BUFFER_SIZE];
+
+ _snprintf_s(hkeyPath, MAX_BUFFER_SIZE, _TRUNCATE, "SYSTEM\\CurrentControlSet\\Enum\\USB\\VID_%s&PID_%s", vid, pid);
+
+ retCode = RegOpenKeyEx(
+ HKEY_LOCAL_MACHINE,
+ hkeyPath,
+ 0,
+ KEY_READ,
+ &vendorProductHKey);
+
+ if (retCode == ERROR_SUCCESS) {
+ DWORD serialNumbersCount = 0; // number of subkeys
+
+ // Fetch how many subkeys there are for this VendorID/ProductID pair.
+ // That's the number of devices for this VendorID/ProductID known to this machine.
+
+ retCode = RegQueryInfoKey(
+ vendorProductHKey, // hkey handle
+ NULL, // buffer for class name
+ NULL, // size of class string
+ NULL, // reserved
+ &serialNumbersCount, // number of subkeys
+ NULL, // longest subkey size
+ NULL, // longest class string
+ NULL, // number of values for this key
+ NULL, // longest value name
+ NULL, // longest value data
+ NULL, // security descriptor
+ NULL); // last write time
+
+ if (retCode == ERROR_SUCCESS && serialNumbersCount > 0) {
+ for (unsigned int i=0; i < serialNumbersCount; i++) {
+ // Each of the subkeys here is the serial number of a USB device with the
+ // given VendorId/ProductId. Now fetch the string for the S/N.
+ DWORD serialNumberLength = maxSerialNumberLength;
+ retCode = RegEnumKeyEx(vendorProductHKey,
+ i,
+ serialNumber,
+ &serialNumberLength,
+ NULL,
+ NULL,
+ NULL,
+ NULL);
+
+ if (retCode == ERROR_SUCCESS) {
+ // Lookup info for VID_(vendorId)&PID_(productId)\(serialnumber)
+
+ _snprintf_s(hkeyPath, MAX_BUFFER_SIZE, _TRUNCATE,
+ "SYSTEM\\CurrentControlSet\\Enum\\USB\\VID_%s&PID_%s\\%s",
+ vid, pid, serialNumber);
+
+ HKEY deviceHKey;
+
+ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, hkeyPath, 0, KEY_READ, &deviceHKey) == ERROR_SUCCESS) {
+ char readUuid[MAX_BUFFER_SIZE];
+ DWORD readSize = sizeof(readUuid);
+
+ // Query VID_(vendorId)&PID_(productId)\(serialnumber)\ContainerID
+ DWORD retCode = RegQueryValueEx(deviceHKey, "ContainerID", NULL, NULL, (LPBYTE)&readUuid, &readSize);
+ if (retCode == ERROR_SUCCESS) {
+ readUuid[readSize] = '\0';
+ if (strcmp(wantedUuid, readUuid) == 0) {
+ // The ContainerID UUIDs match, return now that serialNumber has
+ // the right value.
+ RegCloseKey(deviceHKey);
+ RegCloseKey(vendorProductHKey);
+ return;
+ }
+ }
+ }
+ RegCloseKey(deviceHKey);
+ }
+ }
+ }
+
+ /* In case we did not obtain the path, for whatever reason, we close the key and return an empty string. */
+ RegCloseKey(vendorProductHKey);
+ }
+
+ _snprintf_s(serialNumber, maxSerialNumberLength, _TRUNCATE, "");
+ return;
+}
+
+void EIO_List(uv_work_t* req) {
+ ListBaton* data = static_cast(req->data);
+
+ GUID *guidDev = (GUID*)& GUID_DEVCLASS_PORTS; // NOLINT
+ HDEVINFO hDevInfo = SetupDiGetClassDevs(guidDev, NULL, NULL, DIGCF_PRESENT | DIGCF_PROFILE);
+ SP_DEVINFO_DATA deviceInfoData;
+
+ int memberIndex = 0;
+ DWORD dwSize, dwPropertyRegDataType;
+ char szBuffer[MAX_BUFFER_SIZE];
+ char *pnpId;
+ char *vendorId;
+ char *productId;
+ char *name;
+ char *manufacturer;
+ char *locationId;
+ char serialNumber[MAX_REGISTRY_KEY_SIZE];
+ bool isCom;
+ while (true) {
+ isCom = false;
+ pnpId = NULL;
+ vendorId = NULL;
+ productId = NULL;
+ name = NULL;
+ manufacturer = NULL;
+ locationId = NULL;
+
+ ZeroMemory(&deviceInfoData, sizeof(SP_DEVINFO_DATA));
+ deviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
+
+ if (SetupDiEnumDeviceInfo(hDevInfo, memberIndex, &deviceInfoData) == FALSE) {
+ if (GetLastError() == ERROR_NO_MORE_ITEMS) {
+ break;
+ }
+ }
+
+ dwSize = sizeof(szBuffer);
+ SetupDiGetDeviceInstanceId(hDevInfo, &deviceInfoData, szBuffer, dwSize, &dwSize);
+ szBuffer[dwSize] = '\0';
+ pnpId = strdup(szBuffer);
+
+ vendorId = strstr(szBuffer, "VID_");
+ if (vendorId) {
+ vendorId += 4;
+ vendorId = copySubstring(vendorId, 4);
+ }
+ productId = strstr(szBuffer, "PID_");
+ if (productId) {
+ productId += 4;
+ productId = copySubstring(productId, 4);
+ }
+
+ getSerialNumber(vendorId, productId, hDevInfo, deviceInfoData, MAX_REGISTRY_KEY_SIZE, serialNumber);
+
+ if (SetupDiGetDeviceRegistryProperty(hDevInfo, &deviceInfoData,
+ SPDRP_LOCATION_INFORMATION, &dwPropertyRegDataType,
+ reinterpret_cast(szBuffer),
+ sizeof(szBuffer), &dwSize)) {
+ locationId = strdup(szBuffer);
+ }
+ if (SetupDiGetDeviceRegistryProperty(hDevInfo, &deviceInfoData,
+ SPDRP_MFG, &dwPropertyRegDataType,
+ reinterpret_cast(szBuffer),
+ sizeof(szBuffer), &dwSize)) {
+ manufacturer = strdup(szBuffer);
+ }
+
+ HKEY hkey = SetupDiOpenDevRegKey(hDevInfo, &deviceInfoData, DICS_FLAG_GLOBAL, 0, DIREG_DEV, KEY_READ);
+ if (hkey != INVALID_HANDLE_VALUE) {
+ dwSize = sizeof(szBuffer);
+ if (RegQueryValueEx(hkey, "PortName", NULL, NULL, (LPBYTE)&szBuffer, &dwSize) == ERROR_SUCCESS) {
+ szBuffer[dwSize] = '\0';
+ name = strdup(szBuffer);
+ isCom = strstr(szBuffer, "COM") != NULL;
+ }
+ }
+ if (isCom) {
+ ListResultItem* resultItem = new ListResultItem();
+ resultItem->path = name;
+ resultItem->manufacturer = manufacturer;
+ resultItem->pnpId = pnpId;
+ if (vendorId) {
+ resultItem->vendorId = vendorId;
+ }
+ if (productId) {
+ resultItem->productId = productId;
+ }
+ resultItem->serialNumber = serialNumber;
+ if (locationId) {
+ resultItem->locationId = locationId;
+ }
+ data->results.push_back(resultItem);
+ }
+ free(pnpId);
+ free(vendorId);
+ free(productId);
+ free(locationId);
+ free(manufacturer);
+ free(name);
+
+ RegCloseKey(hkey);
+ memberIndex++;
+ }
+ if (hDevInfo) {
+ SetupDiDestroyDeviceInfoList(hDevInfo);
+ }
+}
+
+void setIfNotEmpty(v8::Local item, std::string key, const char *value) {
+ v8::Local v8key = Nan::New(key).ToLocalChecked();
+ if (strlen(value) > 0) {
+ Nan::Set(item, v8key, Nan::New(value).ToLocalChecked());
+ } else {
+ Nan::Set(item, v8key, Nan::Undefined());
+ }
+}
+
+void EIO_AfterList(uv_work_t* req) {
+ Nan::HandleScope scope;
+
+ ListBaton* data = static_cast(req->data);
+
+ v8::Local argv[2];
+ if (data->errorString[0]) {
+ argv[0] = v8::Exception::Error(Nan::New(data->errorString).ToLocalChecked());
+ argv[1] = Nan::Undefined();
+ } else {
+ v8::Local results = Nan::New();
+ int i = 0;
+ for (std::list::iterator it = data->results.begin(); it != data->results.end(); ++it, i++) {
+ v8::Local item = Nan::New();
+
+ setIfNotEmpty(item, "path", (*it)->path.c_str());
+ setIfNotEmpty(item, "manufacturer", (*it)->manufacturer.c_str());
+ setIfNotEmpty(item, "serialNumber", (*it)->serialNumber.c_str());
+ setIfNotEmpty(item, "pnpId", (*it)->pnpId.c_str());
+ setIfNotEmpty(item, "locationId", (*it)->locationId.c_str());
+ setIfNotEmpty(item, "vendorId", (*it)->vendorId.c_str());
+ setIfNotEmpty(item, "productId", (*it)->productId.c_str());
+
+ Nan::Set(results, i, item);
+ }
+ argv[0] = Nan::Null();
+ argv[1] = results;
+ }
+ data->callback.Call(2, argv, data);
+
+ for (std::list::iterator it = data->results.begin(); it != data->results.end(); ++it) {
+ delete *it;
+ }
+ delete data;
+ delete req;
+}
+
+
+void EIO_Flush(uv_work_t* req) {
+ VoidBaton* data = static_cast(req->data);
+
+ DWORD purge_all = PURGE_RXCLEAR | PURGE_TXABORT | PURGE_TXCLEAR;
+ if (!PurgeComm(int2handle(data->fd), purge_all)) {
+ ErrorCodeToString("Flushing connection (PurgeComm)", GetLastError(), data->errorString);
+ return;
+ }
+}
+
+void EIO_Drain(uv_work_t* req) {
+ VoidBaton* data = static_cast(req->data);
+
+ if (!FlushFileBuffers(int2handle(data->fd))) {
+ ErrorCodeToString("Draining connection (FlushFileBuffers)", GetLastError(), data->errorString);
+ return;
+ }
+}
diff --git a/server/node_modules/@serialport/bindings/src/serialport_win.h b/server/node_modules/@serialport/bindings/src/serialport_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..503134f9dddd8f8da95ecd698d437c67e67ae1e2
--- /dev/null
+++ b/server/node_modules/@serialport/bindings/src/serialport_win.h
@@ -0,0 +1,74 @@
+#ifndef PACKAGES_SERIALPORT_SRC_SERIALPORT_WIN_H_
+#define PACKAGES_SERIALPORT_SRC_SERIALPORT_WIN_H_
+// #include
+// #include
+// #include
+#include
+#include
+#include
+
+#define ERROR_STRING_SIZE 1024
+
+struct WriteBaton : public Nan::AsyncResource {
+ WriteBaton() : AsyncResource("node-serialport:WriteBaton"), bufferData(), errorString() {}
+ int fd = 0;
+ char* bufferData = nullptr;
+ size_t bufferLength = 0;
+ size_t offset = 0;
+ size_t bytesWritten = 0;
+ void* hThread = nullptr;
+ bool complete = false;
+ Nan::Persistent buffer;
+ Nan::Callback callback;
+ int result = 0;
+ char errorString[ERROR_STRING_SIZE];
+};
+
+NAN_METHOD(Write);
+void EIO_Write(uv_work_t* req);
+void EIO_AfterWrite(uv_async_t* req);
+DWORD __stdcall WriteThread(LPVOID param);
+
+
+struct ReadBaton : public Nan::AsyncResource {
+ ReadBaton() : AsyncResource("node-serialport:ReadBaton"), errorString() {}
+ int fd = 0;
+ char* bufferData = nullptr;
+ size_t bufferLength = 0;
+ size_t bytesRead = 0;
+ size_t bytesToRead = 0;
+ size_t offset = 0;
+ void* hThread = nullptr;
+ bool complete = false;
+ char errorString[ERROR_STRING_SIZE];
+ Nan::Callback callback;
+};
+
+NAN_METHOD(Read);
+void EIO_Read(uv_work_t* req);
+void EIO_AfterRead(uv_async_t* req);
+DWORD __stdcall ReadThread(LPVOID param);
+
+
+NAN_METHOD(List);
+void EIO_List(uv_work_t* req);
+void EIO_AfterList(uv_work_t* req);
+
+struct ListResultItem {
+ std::string path;
+ std::string manufacturer;
+ std::string serialNumber;
+ std::string pnpId;
+ std::string locationId;
+ std::string vendorId;
+ std::string productId;
+};
+
+struct ListBaton : public Nan::AsyncResource {
+ ListBaton() : AsyncResource("node-serialport:ListBaton") {}
+ Nan::Callback callback;
+ std::list results;
+ char errorString[ERROR_STRING_SIZE] = "";
+};
+
+#endif // PACKAGES_SERIALPORT_SRC_SERIALPORT_WIN_H_
diff --git a/server/node_modules/@serialport/parser-byte-length/CHANGELOG.md b/server/node_modules/@serialport/parser-byte-length/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..8e7eb48e8f3baa83f65610d8a53a4bbd7e817fe3
--- /dev/null
+++ b/server/node_modules/@serialport/parser-byte-length/CHANGELOG.md
@@ -0,0 +1,40 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [9.2.4](https://github.com/serialport/node-serialport/compare/v9.2.3...v9.2.4) (2021-09-28)
+
+**Note:** Version bump only for package @serialport/parser-byte-length
+
+
+
+
+
+## [9.0.7](https://github.com/serialport/node-serialport/compare/v9.0.6...v9.0.7) (2021-02-22)
+
+**Note:** Version bump only for package @serialport/parser-byte-length
+
+
+
+
+
+## [9.0.1](https://github.com/serialport/node-serialport/compare/v9.0.0...v9.0.1) (2020-08-08)
+
+**Note:** Version bump only for package @serialport/parser-byte-length
+
+
+
+
+
+# [9.0.0](https://github.com/serialport/node-serialport/compare/v8.0.8...v9.0.0) (2020-05-10)
+
+**Note:** Version bump only for package @serialport/parser-byte-length
+
+
+
+
+
+## [8.0.6](https://github.com/serialport/node-serialport/compare/v8.0.5...v8.0.6) (2019-12-25)
+
+**Note:** Version bump only for package @serialport/parser-byte-length
diff --git a/server/node_modules/@serialport/parser-byte-length/LICENSE b/server/node_modules/@serialport/parser-byte-length/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..800d7767c0ac4d336ac201850eee0c26be1f7421
--- /dev/null
+++ b/server/node_modules/@serialport/parser-byte-length/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright 2010 Christopher Williams. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/server/node_modules/@serialport/parser-byte-length/README.md b/server/node_modules/@serialport/parser-byte-length/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..3a83f47f19947293ab2c16a3dc81081daf8aa351
--- /dev/null
+++ b/server/node_modules/@serialport/parser-byte-length/README.md
@@ -0,0 +1 @@
+See our api docs https://serialport.io/docs/api-parser-byte-length
diff --git a/server/node_modules/@serialport/parser-byte-length/lib/index.js b/server/node_modules/@serialport/parser-byte-length/lib/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..a54e1929defabbce0c5b4bc0358be7ffaf82c4e3
--- /dev/null
+++ b/server/node_modules/@serialport/parser-byte-length/lib/index.js
@@ -0,0 +1,55 @@
+const { Transform } = require('stream')
+
+/**
+ * Emit data every number of bytes
+ * @extends Transform
+ * @param {Object} options parser options object
+ * @param {Number} options.length the number of bytes on each data event
+ * @summary A transform stream that emits data as a buffer after a specific number of bytes are received. Runs in O(n) time.
+ * @example
+const SerialPort = require('serialport')
+const ByteLength = require('@serialport/parser-byte-length')
+const port = new SerialPort('/dev/tty-usbserial1')
+const parser = port.pipe(new ByteLength({length: 8}))
+parser.on('data', console.log) // will have 8 bytes per data event
+ */
+class ByteLengthParser extends Transform {
+ constructor(options = {}) {
+ super(options)
+
+ if (typeof options.length !== 'number') {
+ throw new TypeError('"length" is not a number')
+ }
+
+ if (options.length < 1) {
+ throw new TypeError('"length" is not greater than 0')
+ }
+
+ this.length = options.length
+ this.position = 0
+ this.buffer = Buffer.alloc(this.length)
+ }
+
+ _transform(chunk, encoding, cb) {
+ let cursor = 0
+ while (cursor < chunk.length) {
+ this.buffer[this.position] = chunk[cursor]
+ cursor++
+ this.position++
+ if (this.position === this.length) {
+ this.push(this.buffer)
+ this.buffer = Buffer.alloc(this.length)
+ this.position = 0
+ }
+ }
+ cb()
+ }
+
+ _flush(cb) {
+ this.push(this.buffer.slice(0, this.position))
+ this.buffer = Buffer.alloc(this.length)
+ cb()
+ }
+}
+
+module.exports = ByteLengthParser
diff --git a/server/node_modules/@serialport/parser-byte-length/package.json b/server/node_modules/@serialport/parser-byte-length/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..a5dc3d19d93fffbe35e78391ad6a42d9cfb7740c
--- /dev/null
+++ b/server/node_modules/@serialport/parser-byte-length/package.json
@@ -0,0 +1,49 @@
+{
+ "_from": "@serialport/parser-byte-length@9.2.4",
+ "_id": "@serialport/parser-byte-length@9.2.4",
+ "_inBundle": false,
+ "_integrity": "sha512-sQD/iw4ZMU3xW9PLi0/GlvU6Y623jGeWecbMkO7izUo/6P7gtfv1c9ikd5h0kwL8AoAOpQA1lxdHIKox+umBUg==",
+ "_location": "/@serialport/parser-byte-length",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "@serialport/parser-byte-length@9.2.4",
+ "name": "@serialport/parser-byte-length",
+ "escapedName": "@serialport%2fparser-byte-length",
+ "scope": "@serialport",
+ "rawSpec": "9.2.4",
+ "saveSpec": null,
+ "fetchSpec": "9.2.4"
+ },
+ "_requiredBy": [
+ "/serialport"
+ ],
+ "_resolved": "https://registry.npmjs.org/@serialport/parser-byte-length/-/parser-byte-length-9.2.4.tgz",
+ "_shasum": "cccdf3a95018d838cee9e7aa86ab3b5ad9e6c00f",
+ "_spec": "@serialport/parser-byte-length@9.2.4",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/serialport",
+ "bugs": {
+ "url": "https://github.com/serialport/node-serialport/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "See our api docs https://serialport.io/docs/api-parser-byte-length",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": "https://opencollective.com/serialport/donate",
+ "gitHead": "494fd0f097e25fd5475e543f80bf23cc05ea6abc",
+ "homepage": "https://github.com/serialport/node-serialport#readme",
+ "license": "MIT",
+ "main": "lib",
+ "name": "@serialport/parser-byte-length",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/serialport/node-serialport.git"
+ },
+ "version": "9.2.4"
+}
diff --git a/server/node_modules/@serialport/parser-cctalk/CHANGELOG.md b/server/node_modules/@serialport/parser-cctalk/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..02b467512e8adc2512a4ad7aecba7bfbdf92b6bf
--- /dev/null
+++ b/server/node_modules/@serialport/parser-cctalk/CHANGELOG.md
@@ -0,0 +1,40 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [9.2.4](https://github.com/serialport/node-serialport/compare/v9.2.3...v9.2.4) (2021-09-28)
+
+**Note:** Version bump only for package @serialport/parser-cctalk
+
+
+
+
+
+## [9.0.7](https://github.com/serialport/node-serialport/compare/v9.0.6...v9.0.7) (2021-02-22)
+
+**Note:** Version bump only for package @serialport/parser-cctalk
+
+
+
+
+
+## [9.0.1](https://github.com/serialport/node-serialport/compare/v9.0.0...v9.0.1) (2020-08-08)
+
+**Note:** Version bump only for package @serialport/parser-cctalk
+
+
+
+
+
+# [9.0.0](https://github.com/serialport/node-serialport/compare/v8.0.8...v9.0.0) (2020-05-10)
+
+**Note:** Version bump only for package @serialport/parser-cctalk
+
+
+
+
+
+## [8.0.6](https://github.com/serialport/node-serialport/compare/v8.0.5...v8.0.6) (2019-12-25)
+
+**Note:** Version bump only for package @serialport/parser-cctalk
diff --git a/server/node_modules/@serialport/parser-cctalk/LICENSE b/server/node_modules/@serialport/parser-cctalk/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..800d7767c0ac4d336ac201850eee0c26be1f7421
--- /dev/null
+++ b/server/node_modules/@serialport/parser-cctalk/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright 2010 Christopher Williams. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/server/node_modules/@serialport/parser-cctalk/README.md b/server/node_modules/@serialport/parser-cctalk/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..a6bb54a86f410bf22edac531fc1615c4d387af3f
--- /dev/null
+++ b/server/node_modules/@serialport/parser-cctalk/README.md
@@ -0,0 +1 @@
+See our api docs https://node-serialport.github.io/node-serialport/CCTalkParser.html
diff --git a/server/node_modules/@serialport/parser-cctalk/lib/index.js b/server/node_modules/@serialport/parser-cctalk/lib/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..bfea1eba3305e0a0d0ac4935dafb12359baaa9b9
--- /dev/null
+++ b/server/node_modules/@serialport/parser-cctalk/lib/index.js
@@ -0,0 +1,52 @@
+const { Transform } = require('stream')
+
+/**
+ * Parse the CCTalk protocol
+ * @extends Transform
+ * @summary A transform stream that emits CCTalk packets as they are received.
+ * @example
+const SerialPort = require('serialport')
+const CCTalk = require('@serialport/parser-cctalk')
+const port = new SerialPort('/dev/ttyUSB0')
+const parser = port.pipe(new CCtalk())
+parser.on('data', console.log)
+ */
+class CCTalkParser extends Transform {
+ constructor(maxDelayBetweenBytesMs = 50) {
+ super()
+ this.array = []
+ this.cursor = 0
+ this.lastByteFetchTime = 0
+ this.maxDelayBetweenBytesMs = maxDelayBetweenBytesMs
+ }
+ _transform(buffer, _, cb) {
+ if (this.maxDelayBetweenBytesMs > 0) {
+ const now = Date.now()
+ if (now - this.lastByteFetchTime > this.maxDelayBetweenBytesMs) {
+ this.array = []
+ this.cursor = 0
+ }
+ this.lastByteFetchTime = now
+ }
+
+ this.cursor += buffer.length
+ // TODO: Better Faster es7 no supported by node 4
+ // ES7 allows directly push [...buffer]
+ // this.array = this.array.concat(Array.from(buffer)) //Slower ?!?
+ Array.from(buffer).map(byte => this.array.push(byte))
+ while (this.cursor > 1 && this.cursor >= this.array[1] + 5) {
+ // full frame accumulated
+ // copy command from the array
+ const FullMsgLength = this.array[1] + 5
+
+ const frame = Buffer.from(this.array.slice(0, FullMsgLength))
+ // Preserve Extra Data
+ this.array = this.array.slice(frame.length, this.array.length)
+ this.cursor -= FullMsgLength
+ this.push(frame)
+ }
+ cb()
+ }
+}
+
+module.exports = CCTalkParser
diff --git a/server/node_modules/@serialport/parser-cctalk/package.json b/server/node_modules/@serialport/parser-cctalk/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..d147f13466b60091552bbd96ba2845595821f3d3
--- /dev/null
+++ b/server/node_modules/@serialport/parser-cctalk/package.json
@@ -0,0 +1,49 @@
+{
+ "_from": "@serialport/parser-cctalk@9.2.4",
+ "_id": "@serialport/parser-cctalk@9.2.4",
+ "_inBundle": false,
+ "_integrity": "sha512-T4TU5vQMwmo9AB3gQLFDWbfJXlW5jd9guEsB/nqKjFHTv0FXPdZ7DQ2TpSp8RnHWxU3GX6kYTaDO20BKzc8GPQ==",
+ "_location": "/@serialport/parser-cctalk",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "@serialport/parser-cctalk@9.2.4",
+ "name": "@serialport/parser-cctalk",
+ "escapedName": "@serialport%2fparser-cctalk",
+ "scope": "@serialport",
+ "rawSpec": "9.2.4",
+ "saveSpec": null,
+ "fetchSpec": "9.2.4"
+ },
+ "_requiredBy": [
+ "/serialport"
+ ],
+ "_resolved": "https://registry.npmjs.org/@serialport/parser-cctalk/-/parser-cctalk-9.2.4.tgz",
+ "_shasum": "441533e6afc789e8cc5a017697632217bb33a861",
+ "_spec": "@serialport/parser-cctalk@9.2.4",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/serialport",
+ "bugs": {
+ "url": "https://github.com/serialport/node-serialport/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "See our api docs https://node-serialport.github.io/node-serialport/CCTalkParser.html",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": "https://opencollective.com/serialport/donate",
+ "gitHead": "494fd0f097e25fd5475e543f80bf23cc05ea6abc",
+ "homepage": "https://github.com/serialport/node-serialport#readme",
+ "license": "MIT",
+ "main": "lib",
+ "name": "@serialport/parser-cctalk",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/serialport/node-serialport.git"
+ },
+ "version": "9.2.4"
+}
diff --git a/server/node_modules/@serialport/parser-delimiter/CHANGELOG.md b/server/node_modules/@serialport/parser-delimiter/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..0d73894ecf90426e7ebd7684df1447f0e121795a
--- /dev/null
+++ b/server/node_modules/@serialport/parser-delimiter/CHANGELOG.md
@@ -0,0 +1,40 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [9.2.4](https://github.com/serialport/node-serialport/compare/v9.2.3...v9.2.4) (2021-09-28)
+
+**Note:** Version bump only for package @serialport/parser-delimiter
+
+
+
+
+
+## [9.0.7](https://github.com/serialport/node-serialport/compare/v9.0.6...v9.0.7) (2021-02-22)
+
+**Note:** Version bump only for package @serialport/parser-delimiter
+
+
+
+
+
+## [9.0.1](https://github.com/serialport/node-serialport/compare/v9.0.0...v9.0.1) (2020-08-08)
+
+**Note:** Version bump only for package @serialport/parser-delimiter
+
+
+
+
+
+# [9.0.0](https://github.com/serialport/node-serialport/compare/v8.0.8...v9.0.0) (2020-05-10)
+
+**Note:** Version bump only for package @serialport/parser-delimiter
+
+
+
+
+
+## [8.0.6](https://github.com/serialport/node-serialport/compare/v8.0.5...v8.0.6) (2019-12-25)
+
+**Note:** Version bump only for package @serialport/parser-delimiter
diff --git a/server/node_modules/@serialport/parser-delimiter/LICENSE b/server/node_modules/@serialport/parser-delimiter/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..800d7767c0ac4d336ac201850eee0c26be1f7421
--- /dev/null
+++ b/server/node_modules/@serialport/parser-delimiter/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright 2010 Christopher Williams. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/server/node_modules/@serialport/parser-delimiter/README.md b/server/node_modules/@serialport/parser-delimiter/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..b60cf122373c46149c788d745d61c3383222bf6c
--- /dev/null
+++ b/server/node_modules/@serialport/parser-delimiter/README.md
@@ -0,0 +1 @@
+See our api docs https://serialport.io/docs/api-parser-delimiter
diff --git a/server/node_modules/@serialport/parser-delimiter/lib/index.js b/server/node_modules/@serialport/parser-delimiter/lib/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..1d101485c860a55cee75a2597142adbedf54796f
--- /dev/null
+++ b/server/node_modules/@serialport/parser-delimiter/lib/index.js
@@ -0,0 +1,49 @@
+const { Transform } = require('stream')
+
+/**
+ * A transform stream that emits data each time a byte sequence is received.
+ * @extends Transform
+ * @summary To use the `Delimiter` parser, provide a delimiter as a string, buffer, or array of bytes. Runs in O(n) time.
+ * @example
+const SerialPort = require('serialport')
+const Delimiter = require('@serialport/parser-delimiter')
+const port = new SerialPort('/dev/tty-usbserial1')
+const parser = port.pipe(new Delimiter({ delimiter: '\n' }))
+parser.on('data', console.log)
+ */
+class DelimiterParser extends Transform {
+ constructor(options = {}) {
+ super(options)
+
+ if (options.delimiter === undefined) {
+ throw new TypeError('"delimiter" is not a bufferable object')
+ }
+
+ if (options.delimiter.length === 0) {
+ throw new TypeError('"delimiter" has a 0 or undefined length')
+ }
+
+ this.includeDelimiter = options.includeDelimiter !== undefined ? options.includeDelimiter : false
+ this.delimiter = Buffer.from(options.delimiter)
+ this.buffer = Buffer.alloc(0)
+ }
+
+ _transform(chunk, encoding, cb) {
+ let data = Buffer.concat([this.buffer, chunk])
+ let position
+ while ((position = data.indexOf(this.delimiter)) !== -1) {
+ this.push(data.slice(0, position + (this.includeDelimiter ? this.delimiter.length : 0)))
+ data = data.slice(position + this.delimiter.length)
+ }
+ this.buffer = data
+ cb()
+ }
+
+ _flush(cb) {
+ this.push(this.buffer)
+ this.buffer = Buffer.alloc(0)
+ cb()
+ }
+}
+
+module.exports = DelimiterParser
diff --git a/server/node_modules/@serialport/parser-delimiter/package.json b/server/node_modules/@serialport/parser-delimiter/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..fb94ac90b9c9f87bdde58dbc554fd97e74b51164
--- /dev/null
+++ b/server/node_modules/@serialport/parser-delimiter/package.json
@@ -0,0 +1,50 @@
+{
+ "_from": "@serialport/parser-delimiter@9.2.4",
+ "_id": "@serialport/parser-delimiter@9.2.4",
+ "_inBundle": false,
+ "_integrity": "sha512-4nvTAoYAgkxFiXrkI+3CA49Yd43CODjeszh89EK+I9c8wOZ+etZduRCzINYPiy26g7zO+GRAb9FoPCsY+sYcbQ==",
+ "_location": "/@serialport/parser-delimiter",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "@serialport/parser-delimiter@9.2.4",
+ "name": "@serialport/parser-delimiter",
+ "escapedName": "@serialport%2fparser-delimiter",
+ "scope": "@serialport",
+ "rawSpec": "9.2.4",
+ "saveSpec": null,
+ "fetchSpec": "9.2.4"
+ },
+ "_requiredBy": [
+ "/@serialport/parser-readline",
+ "/serialport"
+ ],
+ "_resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-9.2.4.tgz",
+ "_shasum": "7906162ab5601b52abe7bb011678248f0b50f6c0",
+ "_spec": "@serialport/parser-delimiter@9.2.4",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/serialport",
+ "bugs": {
+ "url": "https://github.com/serialport/node-serialport/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "See our api docs https://serialport.io/docs/api-parser-delimiter",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": "https://opencollective.com/serialport/donate",
+ "gitHead": "494fd0f097e25fd5475e543f80bf23cc05ea6abc",
+ "homepage": "https://github.com/serialport/node-serialport#readme",
+ "license": "MIT",
+ "main": "lib",
+ "name": "@serialport/parser-delimiter",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/serialport/node-serialport.git"
+ },
+ "version": "9.2.4"
+}
diff --git a/server/node_modules/@serialport/parser-inter-byte-timeout/CHANGELOG.md b/server/node_modules/@serialport/parser-inter-byte-timeout/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..6a68a9343f156389e6efa80a14f618b9c6d1ee7e
--- /dev/null
+++ b/server/node_modules/@serialport/parser-inter-byte-timeout/CHANGELOG.md
@@ -0,0 +1,40 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [9.2.4](https://github.com/serialport/node-serialport/compare/v9.2.3...v9.2.4) (2021-09-28)
+
+**Note:** Version bump only for package @serialport/parser-inter-byte-timeout
+
+
+
+
+
+## [9.0.7](https://github.com/serialport/node-serialport/compare/v9.0.6...v9.0.7) (2021-02-22)
+
+**Note:** Version bump only for package @serialport/parser-inter-byte-timeout
+
+
+
+
+
+## [9.0.1](https://github.com/serialport/node-serialport/compare/v9.0.0...v9.0.1) (2020-08-08)
+
+**Note:** Version bump only for package @serialport/parser-inter-byte-timeout
+
+
+
+
+
+# [9.0.0](https://github.com/serialport/node-serialport/compare/v8.0.8...v9.0.0) (2020-05-10)
+
+**Note:** Version bump only for package @serialport/parser-inter-byte-timeout
+
+
+
+
+
+## [8.0.6](https://github.com/serialport/node-serialport/compare/v8.0.5...v8.0.6) (2019-12-25)
+
+**Note:** Version bump only for package @serialport/parser-inter-byte-timeout
diff --git a/server/node_modules/@serialport/parser-inter-byte-timeout/LICENSE b/server/node_modules/@serialport/parser-inter-byte-timeout/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..800d7767c0ac4d336ac201850eee0c26be1f7421
--- /dev/null
+++ b/server/node_modules/@serialport/parser-inter-byte-timeout/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright 2010 Christopher Williams. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/server/node_modules/@serialport/parser-inter-byte-timeout/README.md b/server/node_modules/@serialport/parser-inter-byte-timeout/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..b5110739332bd51dae9564ef9b545125d5546551
--- /dev/null
+++ b/server/node_modules/@serialport/parser-inter-byte-timeout/README.md
@@ -0,0 +1 @@
+See our api docs https://serialport.io/docs/api-parser-inter-byte-timeout
diff --git a/server/node_modules/@serialport/parser-inter-byte-timeout/lib/index.js b/server/node_modules/@serialport/parser-inter-byte-timeout/lib/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..0183fe8e54ce00f6f8c9b2f3f08343e166e10af3
--- /dev/null
+++ b/server/node_modules/@serialport/parser-inter-byte-timeout/lib/index.js
@@ -0,0 +1,71 @@
+const { Transform } = require('stream')
+
+/**
+ * Emits data if there is a pause between packets for the specified amount of time.
+ * @extends Transform
+ * @param {Object} options parser options object
+ * @param {Number} options.interval the period of silence in milliseconds after which data is emited
+ * @param {Number} options.maxBufferSize the maximum number of bytes after which data will be emited. Defaults to 65536.
+ * @summary A transform stream that emits data as a buffer after not receiving any bytes for the specified amount of time.
+ * @example
+const SerialPort = require('serialport')
+const InterByteTimeout = require('@serialport/parser-inter-byte-timeout')
+const port = new SerialPort('/dev/tty-usbserial1')
+const parser = port.pipe(new InterByteTimeout({interval: 30}))
+parser.on('data', console.log) // will emit data if there is a pause between packets greater than 30ms
+ */
+
+class InterByteTimeoutParser extends Transform {
+ constructor(options) {
+ super()
+ options = { maxBufferSize: 65536, ...options }
+ if (!options.interval) {
+ throw new TypeError('"interval" is required')
+ }
+
+ if (typeof options.interval !== 'number' || Number.isNaN(options.interval)) {
+ throw new TypeError('"interval" is not a number')
+ }
+
+ if (options.interval < 1) {
+ throw new TypeError('"interval" is not greater than 0')
+ }
+
+ if (typeof options.maxBufferSize !== 'number' || Number.isNaN(options.maxBufferSize)) {
+ throw new TypeError('"maxBufferSize" is not a number')
+ }
+
+ if (options.maxBufferSize < 1) {
+ throw new TypeError('"maxBufferSize" is not greater than 0')
+ }
+
+ this.maxBufferSize = options.maxBufferSize
+ this.currentPacket = []
+ this.interval = options.interval
+ this.intervalID = -1
+ }
+ _transform(chunk, encoding, cb) {
+ clearTimeout(this.intervalID)
+ for (let offset = 0; offset < chunk.length; offset++) {
+ this.currentPacket.push(chunk[offset])
+ if (this.currentPacket.length >= this.maxBufferSize) {
+ this.emitPacket()
+ }
+ }
+ this.intervalID = setTimeout(this.emitPacket.bind(this), this.interval)
+ cb()
+ }
+ emitPacket() {
+ clearTimeout(this.intervalID)
+ if (this.currentPacket.length > 0) {
+ this.push(Buffer.from(this.currentPacket))
+ }
+ this.currentPacket = []
+ }
+ _flush(cb) {
+ this.emitPacket()
+ cb()
+ }
+}
+
+module.exports = InterByteTimeoutParser
diff --git a/server/node_modules/@serialport/parser-inter-byte-timeout/package.json b/server/node_modules/@serialport/parser-inter-byte-timeout/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..53dbbdb032f0447672a78fc72317002692f980b6
--- /dev/null
+++ b/server/node_modules/@serialport/parser-inter-byte-timeout/package.json
@@ -0,0 +1,49 @@
+{
+ "_from": "@serialport/parser-inter-byte-timeout@9.2.4",
+ "_id": "@serialport/parser-inter-byte-timeout@9.2.4",
+ "_inBundle": false,
+ "_integrity": "sha512-SOAdvr0oBQIOCXX198hiTlxs4JTKg9j5piapw5tNq52fwDOWdbYrFneT/wN04UTMKaDrJuEvXq6T4rv4j7nJ5A==",
+ "_location": "/@serialport/parser-inter-byte-timeout",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "@serialport/parser-inter-byte-timeout@9.2.4",
+ "name": "@serialport/parser-inter-byte-timeout",
+ "escapedName": "@serialport%2fparser-inter-byte-timeout",
+ "scope": "@serialport",
+ "rawSpec": "9.2.4",
+ "saveSpec": null,
+ "fetchSpec": "9.2.4"
+ },
+ "_requiredBy": [
+ "/serialport"
+ ],
+ "_resolved": "https://registry.npmjs.org/@serialport/parser-inter-byte-timeout/-/parser-inter-byte-timeout-9.2.4.tgz",
+ "_shasum": "0ffb7f1449636f6363e894127d1f819b38e91c3c",
+ "_spec": "@serialport/parser-inter-byte-timeout@9.2.4",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/serialport",
+ "bugs": {
+ "url": "https://github.com/serialport/node-serialport/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "See our api docs https://serialport.io/docs/api-parser-inter-byte-timeout",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": "https://opencollective.com/serialport/donate",
+ "gitHead": "494fd0f097e25fd5475e543f80bf23cc05ea6abc",
+ "homepage": "https://github.com/serialport/node-serialport#readme",
+ "license": "MIT",
+ "main": "lib",
+ "name": "@serialport/parser-inter-byte-timeout",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/serialport/node-serialport.git"
+ },
+ "version": "9.2.4"
+}
diff --git a/server/node_modules/@serialport/parser-readline/CHANGELOG.md b/server/node_modules/@serialport/parser-readline/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..f9edd740d9a6fca6c660086b375e272db9a4d3c7
--- /dev/null
+++ b/server/node_modules/@serialport/parser-readline/CHANGELOG.md
@@ -0,0 +1,40 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [9.2.4](https://github.com/serialport/node-serialport/compare/v9.2.3...v9.2.4) (2021-09-28)
+
+**Note:** Version bump only for package @serialport/parser-readline
+
+
+
+
+
+## [9.0.7](https://github.com/serialport/node-serialport/compare/v9.0.6...v9.0.7) (2021-02-22)
+
+**Note:** Version bump only for package @serialport/parser-readline
+
+
+
+
+
+## [9.0.1](https://github.com/serialport/node-serialport/compare/v9.0.0...v9.0.1) (2020-08-08)
+
+**Note:** Version bump only for package @serialport/parser-readline
+
+
+
+
+
+# [9.0.0](https://github.com/serialport/node-serialport/compare/v8.0.8...v9.0.0) (2020-05-10)
+
+**Note:** Version bump only for package @serialport/parser-readline
+
+
+
+
+
+## [8.0.6](https://github.com/serialport/node-serialport/compare/v8.0.5...v8.0.6) (2019-12-25)
+
+**Note:** Version bump only for package @serialport/parser-readline
diff --git a/server/node_modules/@serialport/parser-readline/LICENSE b/server/node_modules/@serialport/parser-readline/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..800d7767c0ac4d336ac201850eee0c26be1f7421
--- /dev/null
+++ b/server/node_modules/@serialport/parser-readline/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright 2010 Christopher Williams. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/server/node_modules/@serialport/parser-readline/README.md b/server/node_modules/@serialport/parser-readline/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..6c9669c1c9ef0879231dc53891dc5fe017315ac1
--- /dev/null
+++ b/server/node_modules/@serialport/parser-readline/README.md
@@ -0,0 +1 @@
+See our api docs See our api docs https://serialport.io/docs/api-parser-readline
diff --git a/server/node_modules/@serialport/parser-readline/lib/index.js b/server/node_modules/@serialport/parser-readline/lib/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..795f60843cec0003ab18011941ab53255056c1e7
--- /dev/null
+++ b/server/node_modules/@serialport/parser-readline/lib/index.js
@@ -0,0 +1,30 @@
+const DelimiterParser = require('@serialport/parser-delimiter')
+
+/**
+ * A transform stream that emits data after a newline delimiter is received.
+ * @summary To use the `Readline` parser, provide a delimiter (defaults to `\n`). Data is emitted as string controllable by the `encoding` option (defaults to `utf8`).
+ * @extends DelimiterParser
+ * @example
+const SerialPort = require('serialport')
+const Readline = require('@serialport/parser-readline')
+const port = new SerialPort('/dev/tty-usbserial1')
+const parser = port.pipe(new Readline({ delimiter: '\r\n' }))
+parser.on('data', console.log)
+*/
+class ReadLineParser extends DelimiterParser {
+ constructor(options) {
+ const opts = {
+ delimiter: Buffer.from('\n', 'utf8'),
+ encoding: 'utf8',
+ ...options,
+ }
+
+ if (typeof opts.delimiter === 'string') {
+ opts.delimiter = Buffer.from(opts.delimiter, opts.encoding)
+ }
+
+ super(opts)
+ }
+}
+
+module.exports = ReadLineParser
diff --git a/server/node_modules/@serialport/parser-readline/package.json b/server/node_modules/@serialport/parser-readline/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..529469970995e80e8df27951b95a6666a8455e09
--- /dev/null
+++ b/server/node_modules/@serialport/parser-readline/package.json
@@ -0,0 +1,53 @@
+{
+ "_from": "@serialport/parser-readline@9.2.4",
+ "_id": "@serialport/parser-readline@9.2.4",
+ "_inBundle": false,
+ "_integrity": "sha512-Z1/qrZTQUVhNSJP1hd9YfDvq0o7d87rNwAjjRKbVpa7Qi51tG5BnKt43IV3NFMyBlVcRe0rnIb3tJu57E0SOwg==",
+ "_location": "/@serialport/parser-readline",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "@serialport/parser-readline@9.2.4",
+ "name": "@serialport/parser-readline",
+ "escapedName": "@serialport%2fparser-readline",
+ "scope": "@serialport",
+ "rawSpec": "9.2.4",
+ "saveSpec": null,
+ "fetchSpec": "9.2.4"
+ },
+ "_requiredBy": [
+ "/@serialport/bindings",
+ "/serialport"
+ ],
+ "_resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-9.2.4.tgz",
+ "_shasum": "15a4ec7e86ddc33ac84faac7bffd4560e4544ccb",
+ "_spec": "@serialport/parser-readline@9.2.4",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/serialport",
+ "bugs": {
+ "url": "https://github.com/serialport/node-serialport/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "@serialport/parser-delimiter": "9.2.4"
+ },
+ "deprecated": false,
+ "description": "See our api docs See our api docs https://serialport.io/docs/api-parser-readline",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": "https://opencollective.com/serialport/donate",
+ "gitHead": "494fd0f097e25fd5475e543f80bf23cc05ea6abc",
+ "homepage": "https://github.com/serialport/node-serialport#readme",
+ "license": "MIT",
+ "main": "lib",
+ "name": "@serialport/parser-readline",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/serialport/node-serialport.git"
+ },
+ "version": "9.2.4"
+}
diff --git a/server/node_modules/@serialport/parser-ready/CHANGELOG.md b/server/node_modules/@serialport/parser-ready/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..5b2ffa04c8b8a9d28a3f9c586618daf698b04db1
--- /dev/null
+++ b/server/node_modules/@serialport/parser-ready/CHANGELOG.md
@@ -0,0 +1,40 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [9.2.4](https://github.com/serialport/node-serialport/compare/v9.2.3...v9.2.4) (2021-09-28)
+
+**Note:** Version bump only for package @serialport/parser-ready
+
+
+
+
+
+## [9.0.7](https://github.com/serialport/node-serialport/compare/v9.0.6...v9.0.7) (2021-02-22)
+
+**Note:** Version bump only for package @serialport/parser-ready
+
+
+
+
+
+## [9.0.1](https://github.com/serialport/node-serialport/compare/v9.0.0...v9.0.1) (2020-08-08)
+
+**Note:** Version bump only for package @serialport/parser-ready
+
+
+
+
+
+# [9.0.0](https://github.com/serialport/node-serialport/compare/v8.0.8...v9.0.0) (2020-05-10)
+
+**Note:** Version bump only for package @serialport/parser-ready
+
+
+
+
+
+## [8.0.6](https://github.com/serialport/node-serialport/compare/v8.0.5...v8.0.6) (2019-12-25)
+
+**Note:** Version bump only for package @serialport/parser-ready
diff --git a/server/node_modules/@serialport/parser-ready/LICENSE b/server/node_modules/@serialport/parser-ready/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..800d7767c0ac4d336ac201850eee0c26be1f7421
--- /dev/null
+++ b/server/node_modules/@serialport/parser-ready/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright 2010 Christopher Williams. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/server/node_modules/@serialport/parser-ready/README.md b/server/node_modules/@serialport/parser-ready/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..a868a08db503c253600c8df5bb45369fe009a0fc
--- /dev/null
+++ b/server/node_modules/@serialport/parser-ready/README.md
@@ -0,0 +1 @@
+See our api docs https://serialport.io/docs/api-parser-ready
diff --git a/server/node_modules/@serialport/parser-ready/lib/index.js b/server/node_modules/@serialport/parser-ready/lib/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..2f741585673d347dcde1e73bc29a070b3a1404c2
--- /dev/null
+++ b/server/node_modules/@serialport/parser-ready/lib/index.js
@@ -0,0 +1,63 @@
+const { Transform } = require('stream')
+
+/**
+ * A transform stream that waits for a sequence of "ready" bytes before emitting a ready event and emitting data events
+ * @summary To use the `Ready` parser provide a byte start sequence. After the bytes have been received a ready event is fired and data events are passed through.
+ * @extends Transform
+ * @example
+const SerialPort = require('serialport')
+const Ready = require('@serialport/parser-ready')
+const port = new SerialPort('/dev/tty-usbserial1')
+const parser = port.pipe(new Ready({ delimiter: 'READY' }))
+parser.on('ready', () => console.log('the ready byte sequence has been received'))
+parser.on('data', console.log) // all data after READY is received
+ */
+class ReadyParser extends Transform {
+ /**
+ *
+ * @param {object} options options for the parser
+ * @param {string|Buffer|array} options.delimiter data to look for before emitted "ready"
+ */
+ constructor(options = {}) {
+ if (options.delimiter === undefined) {
+ throw new TypeError('"delimiter" is not a bufferable object')
+ }
+
+ if (options.delimiter.length === 0) {
+ throw new TypeError('"delimiter" has a 0 or undefined length')
+ }
+
+ super(options)
+ this.delimiter = Buffer.from(options.delimiter)
+ this.readOffset = 0
+ this.ready = false
+ }
+
+ _transform(chunk, encoding, cb) {
+ if (this.ready) {
+ this.push(chunk)
+ return cb()
+ }
+ const delimiter = this.delimiter
+ let chunkOffset = 0
+ while (this.readOffset < delimiter.length && chunkOffset < chunk.length) {
+ if (delimiter[this.readOffset] === chunk[chunkOffset]) {
+ this.readOffset++
+ } else {
+ this.readOffset = 0
+ }
+ chunkOffset++
+ }
+ if (this.readOffset === delimiter.length) {
+ this.ready = true
+ this.emit('ready')
+ const chunkRest = chunk.slice(chunkOffset)
+ if (chunkRest.length > 0) {
+ this.push(chunkRest)
+ }
+ }
+ cb()
+ }
+}
+
+module.exports = ReadyParser
diff --git a/server/node_modules/@serialport/parser-ready/package.json b/server/node_modules/@serialport/parser-ready/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..fa20a4f0346e9a9fa58d79cd5875782f7077cf93
--- /dev/null
+++ b/server/node_modules/@serialport/parser-ready/package.json
@@ -0,0 +1,49 @@
+{
+ "_from": "@serialport/parser-ready@9.2.4",
+ "_id": "@serialport/parser-ready@9.2.4",
+ "_inBundle": false,
+ "_integrity": "sha512-Pyi94Itjl6qAURwIZr/gmZpMAyTmKXThm6vL5DoAWGQjcRHWB0gwv2TY2v7N+mQLJYUKU3cMnvnATXxHm7xjxw==",
+ "_location": "/@serialport/parser-ready",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "@serialport/parser-ready@9.2.4",
+ "name": "@serialport/parser-ready",
+ "escapedName": "@serialport%2fparser-ready",
+ "scope": "@serialport",
+ "rawSpec": "9.2.4",
+ "saveSpec": null,
+ "fetchSpec": "9.2.4"
+ },
+ "_requiredBy": [
+ "/serialport"
+ ],
+ "_resolved": "https://registry.npmjs.org/@serialport/parser-ready/-/parser-ready-9.2.4.tgz",
+ "_shasum": "e1fc93b9e3057972104db3f9311263397f420f25",
+ "_spec": "@serialport/parser-ready@9.2.4",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/serialport",
+ "bugs": {
+ "url": "https://github.com/serialport/node-serialport/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "See our api docs https://serialport.io/docs/api-parser-ready",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": "https://opencollective.com/serialport/donate",
+ "gitHead": "494fd0f097e25fd5475e543f80bf23cc05ea6abc",
+ "homepage": "https://github.com/serialport/node-serialport#readme",
+ "license": "MIT",
+ "main": "lib",
+ "name": "@serialport/parser-ready",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/serialport/node-serialport.git"
+ },
+ "version": "9.2.4"
+}
diff --git a/server/node_modules/@serialport/parser-regex/CHANGELOG.md b/server/node_modules/@serialport/parser-regex/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..567789d88ec1024051a4d5c81f6e79795e5c7698
--- /dev/null
+++ b/server/node_modules/@serialport/parser-regex/CHANGELOG.md
@@ -0,0 +1,40 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [9.2.4](https://github.com/serialport/node-serialport/compare/v9.2.3...v9.2.4) (2021-09-28)
+
+**Note:** Version bump only for package @serialport/parser-regex
+
+
+
+
+
+## [9.0.7](https://github.com/serialport/node-serialport/compare/v9.0.6...v9.0.7) (2021-02-22)
+
+**Note:** Version bump only for package @serialport/parser-regex
+
+
+
+
+
+## [9.0.1](https://github.com/serialport/node-serialport/compare/v9.0.0...v9.0.1) (2020-08-08)
+
+**Note:** Version bump only for package @serialport/parser-regex
+
+
+
+
+
+# [9.0.0](https://github.com/serialport/node-serialport/compare/v8.0.8...v9.0.0) (2020-05-10)
+
+**Note:** Version bump only for package @serialport/parser-regex
+
+
+
+
+
+## [8.0.6](https://github.com/serialport/node-serialport/compare/v8.0.5...v8.0.6) (2019-12-25)
+
+**Note:** Version bump only for package @serialport/parser-regex
diff --git a/server/node_modules/@serialport/parser-regex/LICENSE b/server/node_modules/@serialport/parser-regex/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..800d7767c0ac4d336ac201850eee0c26be1f7421
--- /dev/null
+++ b/server/node_modules/@serialport/parser-regex/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright 2010 Christopher Williams. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/server/node_modules/@serialport/parser-regex/README.md b/server/node_modules/@serialport/parser-regex/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..bba891c7f252ceeec94042fff89488662ef1082f
--- /dev/null
+++ b/server/node_modules/@serialport/parser-regex/README.md
@@ -0,0 +1 @@
+See our api docs https://serialport.io/docs/api-parser-regex
diff --git a/server/node_modules/@serialport/parser-regex/lib/index.js b/server/node_modules/@serialport/parser-regex/lib/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..ad7175e106314980de9cae9f2555f5fab18597c9
--- /dev/null
+++ b/server/node_modules/@serialport/parser-regex/lib/index.js
@@ -0,0 +1,53 @@
+const { Transform } = require('stream')
+
+/**
+ * A transform stream that uses a regular expression to split the incoming text upon.
+ *
+ * To use the `Regex` parser provide a regular expression to split the incoming text upon. Data is emitted as string controllable by the `encoding` option (defaults to `utf8`).
+ * @extends Transform
+ * @example
+const SerialPort = require('serialport')
+const Regex = require('@serialport/parser-regex')
+const port = new SerialPort('/dev/tty-usbserial1')
+const parser = port.pipe(new Regex({ regex: /[\r\n]+/ }))
+parser.on('data', console.log)
+ */
+class RegexParser extends Transform {
+ constructor(options) {
+ const opts = {
+ encoding: 'utf8',
+ ...options,
+ }
+
+ if (opts.regex === undefined) {
+ throw new TypeError('"options.regex" must be a regular expression pattern or object')
+ }
+
+ if (!(opts.regex instanceof RegExp)) {
+ opts.regex = new RegExp(opts.regex)
+ }
+ super(opts)
+
+ this.regex = opts.regex
+ this.data = ''
+ }
+
+ _transform(chunk, encoding, cb) {
+ const data = this.data + chunk
+ const parts = data.split(this.regex)
+ this.data = parts.pop()
+
+ parts.forEach(part => {
+ this.push(part)
+ })
+ cb()
+ }
+
+ _flush(cb) {
+ this.push(this.data)
+ this.data = ''
+ cb()
+ }
+}
+
+module.exports = RegexParser
diff --git a/server/node_modules/@serialport/parser-regex/package.json b/server/node_modules/@serialport/parser-regex/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..34728db3449c93b341afce32fa6244002c8c6067
--- /dev/null
+++ b/server/node_modules/@serialport/parser-regex/package.json
@@ -0,0 +1,49 @@
+{
+ "_from": "@serialport/parser-regex@9.2.4",
+ "_id": "@serialport/parser-regex@9.2.4",
+ "_inBundle": false,
+ "_integrity": "sha512-sI/cVvPOYz+Dbv4ZdnW16qAwvXiFf/1pGASQdbveRTlgJDdz7sRNlCBifzfTN2xljwvCTZYqiudKvDdC1TepRQ==",
+ "_location": "/@serialport/parser-regex",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "@serialport/parser-regex@9.2.4",
+ "name": "@serialport/parser-regex",
+ "escapedName": "@serialport%2fparser-regex",
+ "scope": "@serialport",
+ "rawSpec": "9.2.4",
+ "saveSpec": null,
+ "fetchSpec": "9.2.4"
+ },
+ "_requiredBy": [
+ "/serialport"
+ ],
+ "_resolved": "https://registry.npmjs.org/@serialport/parser-regex/-/parser-regex-9.2.4.tgz",
+ "_shasum": "e232a84e00f3e8c366fc65ce20f8f4ac14960448",
+ "_spec": "@serialport/parser-regex@9.2.4",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/serialport",
+ "bugs": {
+ "url": "https://github.com/serialport/node-serialport/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "See our api docs https://serialport.io/docs/api-parser-regex",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": "https://opencollective.com/serialport/donate",
+ "gitHead": "494fd0f097e25fd5475e543f80bf23cc05ea6abc",
+ "homepage": "https://github.com/serialport/node-serialport#readme",
+ "license": "MIT",
+ "main": "lib",
+ "name": "@serialport/parser-regex",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/serialport/node-serialport.git"
+ },
+ "version": "9.2.4"
+}
diff --git a/server/node_modules/@serialport/stream/CHANGELOG.md b/server/node_modules/@serialport/stream/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..6f22f5aadbb7a0c2a4537ed5a72aac91d895336c
--- /dev/null
+++ b/server/node_modules/@serialport/stream/CHANGELOG.md
@@ -0,0 +1,68 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [9.2.4](https://github.com/serialport/node-serialport/compare/v9.2.3...v9.2.4) (2021-09-28)
+
+**Note:** Version bump only for package @serialport/stream
+
+
+
+
+
+## [9.2.3](https://github.com/serialport/node-serialport/compare/v9.2.1...v9.2.3) (2021-09-24)
+
+**Note:** Version bump only for package @serialport/stream
+
+
+
+
+
+## [9.2.2](https://github.com/serialport/node-serialport/compare/v9.2.1...v9.2.2) (2021-09-24)
+
+**Note:** Version bump only for package @serialport/stream
+
+
+
+
+
+## [9.0.7](https://github.com/serialport/node-serialport/compare/v9.0.6...v9.0.7) (2021-02-22)
+
+**Note:** Version bump only for package @serialport/stream
+
+
+
+
+
+## [9.0.2](https://github.com/serialport/node-serialport/compare/v9.0.1...v9.0.2) (2020-10-16)
+
+**Note:** Version bump only for package @serialport/stream
+
+
+
+
+
+## [9.0.1](https://github.com/serialport/node-serialport/compare/v9.0.0...v9.0.1) (2020-08-08)
+
+**Note:** Version bump only for package @serialport/stream
+
+
+
+
+
+# [9.0.0](https://github.com/serialport/node-serialport/compare/v8.0.8...v9.0.0) (2020-05-10)
+
+**Note:** Version bump only for package @serialport/stream
+
+
+
+
+
+## [8.0.6](https://github.com/serialport/node-serialport/compare/v8.0.5...v8.0.6) (2019-12-25)
+
+
+### Bug Fixes
+
+* bindings.close() should cause a canceled read error ([#1972](https://github.com/serialport/node-serialport/issues/1972)) ([50f967e](https://github.com/serialport/node-serialport/commit/50f967e788f362da57d782829712542c8f15f8c8))
+* stream required bindings-mock as a dep ([#1970](https://github.com/serialport/node-serialport/issues/1970)) ([e978b7e](https://github.com/serialport/node-serialport/commit/e978b7eb244b87a6be2ae914965adeb1f4562935))
diff --git a/server/node_modules/@serialport/stream/LICENSE b/server/node_modules/@serialport/stream/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..800d7767c0ac4d336ac201850eee0c26be1f7421
--- /dev/null
+++ b/server/node_modules/@serialport/stream/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright 2010 Christopher Williams. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/server/node_modules/@serialport/stream/README.md b/server/node_modules/@serialport/stream/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..d568e964cf7baaf371097e90d865a47ad724f6ea
--- /dev/null
+++ b/server/node_modules/@serialport/stream/README.md
@@ -0,0 +1,16 @@
+# @serialport/Stream
+
+The serialport stream interface. This package requires bindings to work.
+
+You'd use this if you want to keep your package size down by requiring only the parts of serialport that you want to use. It is used internally in the `serialport` package.
+
+This is how you use it.
+```js
+
+const SerialPort = require('@serialport/stream')
+const Binding = require('@serialport/bindings')
+SerialPort.Binding = Binding
+const port = new Serialport('/dev/ttyay')
+```
+
+Learn more at our [stream documentation](https://serialport.io/docs/api-stream) page.
diff --git a/server/node_modules/@serialport/stream/lib/index.js b/server/node_modules/@serialport/stream/lib/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..92b042c75c8345b64e1e15194f19c3a7d42de219
--- /dev/null
+++ b/server/node_modules/@serialport/stream/lib/index.js
@@ -0,0 +1,656 @@
+const stream = require('stream')
+const util = require('util')
+const debug = require('debug')('serialport/stream')
+
+// VALIDATION
+const DATABITS = Object.freeze([5, 6, 7, 8])
+const STOPBITS = Object.freeze([1, 1.5, 2])
+const PARITY = Object.freeze(['none', 'even', 'mark', 'odd', 'space'])
+const FLOWCONTROLS = Object.freeze(['xon', 'xoff', 'xany', 'rtscts'])
+
+const defaultSettings = Object.freeze({
+ autoOpen: true,
+ endOnClose: false,
+ baudRate: 9600,
+ dataBits: 8,
+ hupcl: true,
+ lock: true,
+ parity: 'none',
+ rtscts: false,
+ stopBits: 1,
+ xany: false,
+ xoff: false,
+ xon: false,
+ highWaterMark: 64 * 1024,
+})
+
+const defaultSetFlags = Object.freeze({
+ brk: false,
+ cts: false,
+ dtr: true,
+ dts: false,
+ rts: true,
+})
+
+function allocNewReadPool(poolSize) {
+ const pool = Buffer.allocUnsafe(poolSize)
+ pool.used = 0
+ return pool
+}
+
+/**
+ * A callback called with an error or null.
+ * @typedef {function} errorCallback
+ * @param {?error} error
+ */
+
+/**
+ * A callback called with an error or an object with the modem line values (cts, dsr, dcd).
+ * @typedef {function} modemBitsCallback
+ * @param {?error} error
+ * @param {?object} status
+ * @param {boolean} [status.cts=false]
+ * @param {boolean} [status.dsr=false]
+ * @param {boolean} [status.dcd=false]
+ */
+
+/**
+ * @typedef {Object} openOptions
+ * @property {boolean} [autoOpen=true] Automatically opens the port on `nextTick`.
+ * @property {number=} [baudRate=9600] The baud rate of the port to be opened. This should match one of the commonly available baud rates, such as 110, 300, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, or 115200. Custom rates are supported best effort per platform. The device connected to the serial port is not guaranteed to support the requested baud rate, even if the port itself supports that baud rate.
+ * @property {number} [dataBits=8] Must be one of these: 8, 7, 6, or 5.
+ * @property {number} [highWaterMark=65536] The size of the read and write buffers defaults to 64k.
+ * @property {boolean} [lock=true] Prevent other processes from opening the port. Windows does not currently support `false`.
+ * @property {number} [stopBits=1] Must be one of these: 1 or 2.
+ * @property {string} [parity=none] Must be one of these: 'none', 'even', 'mark', 'odd', 'space'.
+ * @property {boolean} [rtscts=false] flow control setting
+ * @property {boolean} [xon=false] flow control setting
+ * @property {boolean} [xoff=false] flow control setting
+ * @property {boolean} [xany=false] flow control setting
+ * @property {object=} bindingOptions sets binding-specific options
+ * @property {Binding=} binding The hardware access binding. `Bindings` are how Node-Serialport talks to the underlying system. By default we auto detect Windows (`WindowsBinding`), Linux (`LinuxBinding`) and OS X (`DarwinBinding`) and load the appropriate module for your system.
+ * @property {number} [bindingOptions.vmin=1] see [`man termios`](http://linux.die.net/man/3/termios) LinuxBinding and DarwinBinding
+ * @property {number} [bindingOptions.vtime=0] see [`man termios`](http://linux.die.net/man/3/termios) LinuxBinding and DarwinBinding
+ */
+
+/**
+ * Create a new serial port object for the `path`. In the case of invalid arguments or invalid options, when constructing a new SerialPort it will throw an error. The port will open automatically by default, which is the equivalent of calling `port.open(openCallback)` in the next tick. You can disable this by setting the option `autoOpen` to `false`.
+ * @class SerialPort
+ * @param {string} path - The system path of the serial port you want to open. For example, `/dev/tty.XXX` on Mac/Linux, or `COM1` on Windows.
+ * @param {openOptions=} options - Port configuration options
+ * @param {errorCallback=} openCallback - Called after a connection is opened. If this is not provided and an error occurs, it will be emitted on the port's `error` event. The callback will NOT be called if `autoOpen` is set to `false` in the `openOptions` as the open will not be performed.
+ * @property {number} baudRate The port's baudRate. Use `.update` to change it. Read-only.
+ * @property {object} binding The binding object backing the port. Read-only.
+ * @property {boolean} isOpen `true` if the port is open, `false` otherwise. Read-only. (`since 5.0.0`)
+ * @property {string} path The system path or name of the serial port. Read-only.
+ * @throws {TypeError} When given invalid arguments, a `TypeError` will be thrown.
+ * @emits open
+ * @emits data
+ * @emits close
+ * @emits error
+ * @alias module:serialport
+ */
+function SerialPort(path, options, openCallback) {
+ if (!(this instanceof SerialPort)) {
+ return new SerialPort(path, options, openCallback)
+ }
+
+ if (options instanceof Function) {
+ openCallback = options
+ options = {}
+ }
+
+ const settings = { ...defaultSettings, ...options }
+
+ stream.Duplex.call(this, {
+ highWaterMark: settings.highWaterMark,
+ })
+
+ const Binding = settings.binding || SerialPort.Binding
+
+ if (!Binding) {
+ throw new TypeError('"Bindings" is invalid pass it as `options.binding` or set it on `SerialPort.Binding`')
+ }
+
+ if (!path) {
+ throw new TypeError(`"path" is not defined: ${path}`)
+ }
+
+ if (settings.baudrate) {
+ throw new TypeError(`"baudrate" is an unknown option, did you mean "baudRate"?`)
+ }
+
+ if (typeof settings.baudRate !== 'number') {
+ throw new TypeError(`"baudRate" must be a number: ${settings.baudRate}`)
+ }
+
+ if (DATABITS.indexOf(settings.dataBits) === -1) {
+ throw new TypeError(`"databits" is invalid: ${settings.dataBits}`)
+ }
+
+ if (STOPBITS.indexOf(settings.stopBits) === -1) {
+ throw new TypeError(`"stopbits" is invalid: ${settings.stopbits}`)
+ }
+
+ if (PARITY.indexOf(settings.parity) === -1) {
+ throw new TypeError(`"parity" is invalid: ${settings.parity}`)
+ }
+
+ FLOWCONTROLS.forEach(control => {
+ if (typeof settings[control] !== 'boolean') {
+ throw new TypeError(`"${control}" is not boolean: ${settings[control]}`)
+ }
+ })
+
+ const binding = new Binding({
+ bindingOptions: settings.bindingOptions,
+ })
+
+ Object.defineProperties(this, {
+ binding: {
+ enumerable: true,
+ value: binding,
+ },
+ path: {
+ enumerable: true,
+ value: path,
+ },
+ settings: {
+ enumerable: true,
+ value: settings,
+ },
+ })
+
+ this.opening = false
+ this.closing = false
+ this._pool = allocNewReadPool(this.settings.highWaterMark)
+ this._kMinPoolSpace = 128
+
+ if (this.settings.autoOpen) {
+ this.open(openCallback)
+ }
+}
+
+util.inherits(SerialPort, stream.Duplex)
+
+Object.defineProperties(SerialPort.prototype, {
+ isOpen: {
+ enumerable: true,
+ get() {
+ return this.binding.isOpen && !this.closing
+ },
+ },
+ baudRate: {
+ enumerable: true,
+ get() {
+ return this.settings.baudRate
+ },
+ },
+})
+
+/**
+ * The `error` event's callback is called with an error object whenever there is an error.
+ * @event error
+ */
+
+SerialPort.prototype._error = function (error, callback) {
+ if (callback) {
+ callback.call(this, error)
+ } else {
+ this.emit('error', error)
+ }
+}
+
+SerialPort.prototype._asyncError = function (error, callback) {
+ process.nextTick(() => this._error(error, callback))
+}
+
+/**
+ * The `open` event's callback is called with no arguments when the port is opened and ready for writing. This happens if you have the constructor open immediately (which opens in the next tick) or if you open the port manually with `open()`. See [Useage/Opening a Port](#opening-a-port) for more information.
+ * @event open
+ */
+
+/**
+ * Opens a connection to the given serial port.
+ * @param {errorCallback=} openCallback - Called after a connection is opened. If this is not provided and an error occurs, it will be emitted on the port's `error` event.
+ * @emits open
+ * @returns {undefined}
+ */
+SerialPort.prototype.open = function (openCallback) {
+ if (this.isOpen) {
+ return this._asyncError(new Error('Port is already open'), openCallback)
+ }
+
+ if (this.opening) {
+ return this._asyncError(new Error('Port is opening'), openCallback)
+ }
+
+ this.opening = true
+ debug('opening', `path: ${this.path}`)
+ this.binding.open(this.path, this.settings).then(
+ () => {
+ debug('opened', `path: ${this.path}`)
+ this.opening = false
+ this.emit('open')
+ if (openCallback) {
+ openCallback.call(this, null)
+ }
+ },
+ err => {
+ this.opening = false
+ debug('Binding #open had an error', err)
+ this._error(err, openCallback)
+ }
+ )
+}
+
+/**
+ * Changes the baud rate for an open port. Throws if you provide a bad argument. Emits an error or calls the callback if the baud rate isn't supported.
+ * @param {object=} options Only supports `baudRate`.
+ * @param {number=} [options.baudRate] The baud rate of the port to be opened. This should match one of the commonly available baud rates, such as 110, 300, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, or 115200. Custom rates are supported best effort per platform. The device connected to the serial port is not guaranteed to support the requested baud rate, even if the port itself supports that baud rate.
+ * @param {errorCallback=} [callback] Called once the port's baud rate changes. If `.update` is called without a callback, and there is an error, an error event is emitted.
+ * @returns {undefined}
+ */
+SerialPort.prototype.update = function (options, callback) {
+ if (typeof options !== 'object') {
+ throw TypeError('"options" is not an object')
+ }
+
+ if (!this.isOpen) {
+ debug('update attempted, but port is not open')
+ return this._asyncError(new Error('Port is not open'), callback)
+ }
+
+ const settings = { ...defaultSettings, ...options }
+ this.settings.baudRate = settings.baudRate
+
+ debug('update', `baudRate: ${settings.baudRate}`)
+ this.binding.update(this.settings).then(
+ () => {
+ debug('binding.update', 'finished')
+ if (callback) {
+ callback.call(this, null)
+ }
+ },
+ err => {
+ debug('binding.update', 'error', err)
+ return this._error(err, callback)
+ }
+ )
+}
+
+/**
+ * Writes data to the given serial port. Buffers written data if the port is not open.
+
+The write operation is non-blocking. When it returns, data might still not have been written to the serial port. See `drain()`.
+
+Some devices, like the Arduino, reset when you open a connection to them. In such cases, immediately writing to the device will cause lost data as they wont be ready to receive the data. This is often worked around by having the Arduino send a "ready" byte that your Node program waits for before writing. You can also often get away with waiting around 400ms.
+
+If a port is disconnected during a write, the write will error in addition to the `close` event.
+
+From the [stream docs](https://nodejs.org/api/stream.html#stream_writable_write_chunk_encoding_callback) write errors don't always provide the error in the callback, sometimes they use the error event.
+> If an error occurs, the callback may or may not be called with the error as its first argument. To reliably detect write errors, add a listener for the 'error' event.
+
+In addition to the usual `stream.write` arguments (`String` and `Buffer`), `write()` can accept arrays of bytes (positive numbers under 256) which is passed to `Buffer.from([])` for conversion. This extra functionality is pretty sweet.
+ * @method SerialPort.prototype.write
+ * @param {(string|array|buffer)} data Accepts a [`Buffer`](http://nodejs.org/api/buffer.html) object, or a type that is accepted by the `Buffer` constructor (e.g. an array of bytes or a string).
+ * @param {string=} encoding The encoding, if chunk is a string. Defaults to `'utf8'`. Also accepts `'ascii'`, `'base64'`, `'binary'`, and `'hex'` See [Buffers and Character Encodings](https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings) for all available options.
+ * @param {function=} callback Called once the write operation finishes. Data may not yet be flushed to the underlying port. No arguments.
+ * @returns {boolean} `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+ * @since 5.0.0
+ */
+const superWrite = SerialPort.prototype.write
+SerialPort.prototype.write = function (data, encoding, callback) {
+ if (Array.isArray(data)) {
+ data = Buffer.from(data)
+ }
+ return superWrite.call(this, data, encoding, callback)
+}
+
+SerialPort.prototype._write = function (data, encoding, callback) {
+ if (!this.isOpen) {
+ return this.once('open', function afterOpenWrite() {
+ this._write(data, encoding, callback)
+ })
+ }
+ debug('_write', `${data.length} bytes of data`)
+ this.binding.write(data).then(
+ () => {
+ debug('binding.write', 'write finished')
+ callback(null)
+ },
+ err => {
+ debug('binding.write', 'error', err)
+ if (!err.canceled) {
+ this._disconnected(err)
+ }
+ callback(err)
+ }
+ )
+}
+
+SerialPort.prototype._writev = function (data, callback) {
+ debug('_writev', `${data.length} chunks of data`)
+ const dataV = data.map(write => write.chunk)
+ this._write(Buffer.concat(dataV), null, callback)
+}
+
+/**
+ * Request a number of bytes from the SerialPort. The `read()` method pulls some data out of the internal buffer and returns it. If no data is available to be read, null is returned. By default, the data is returned as a `Buffer` object unless an encoding has been specified using the `.setEncoding()` method.
+ * @method SerialPort.prototype.read
+ * @param {number=} size Specify how many bytes of data to return, if available
+ * @returns {(string|Buffer|null)} The data from internal buffers
+ * @since 5.0.0
+ */
+
+/**
+ * Listening for the `data` event puts the port in flowing mode. Data is emitted as soon as it's received. Data is a `Buffer` object with a varying amount of data in it. The `readLine` parser converts the data into string lines. See the [parsers](https://serialport.io/docs/api-parsers-overview) section for more information on parsers, and the [Node.js stream documentation](https://nodejs.org/api/stream.html#stream_event_data) for more information on the data event.
+ * @event data
+ */
+
+SerialPort.prototype._read = function (bytesToRead) {
+ if (!this.isOpen) {
+ debug('_read', 'queueing _read for after open')
+ this.once('open', () => {
+ this._read(bytesToRead)
+ })
+ return
+ }
+
+ if (!this._pool || this._pool.length - this._pool.used < this._kMinPoolSpace) {
+ debug('_read', 'discarding the read buffer pool because it is below kMinPoolSpace')
+ this._pool = allocNewReadPool(this.settings.highWaterMark)
+ }
+
+ // Grab another reference to the pool in the case that while we're
+ // in the thread pool another read() finishes up the pool, and
+ // allocates a new one.
+ const pool = this._pool
+ // Read the smaller of rest of the pool or however many bytes we want
+ const toRead = Math.min(pool.length - pool.used, bytesToRead)
+ const start = pool.used
+
+ // the actual read.
+ debug('_read', `reading`, { start, toRead })
+ this.binding.read(pool, start, toRead).then(
+ ({ bytesRead }) => {
+ debug('binding.read', `finished`, { bytesRead })
+ // zero bytes means read means we've hit EOF? Maybe this should be an error
+ if (bytesRead === 0) {
+ debug('binding.read', 'Zero bytes read closing readable stream')
+ this.push(null)
+ return
+ }
+ pool.used += bytesRead
+ this.push(pool.slice(start, start + bytesRead))
+ },
+ err => {
+ debug('binding.read', `error`, err)
+ if (!err.canceled) {
+ this._disconnected(err)
+ }
+ this._read(bytesToRead) // prime to read more once we're reconnected
+ }
+ )
+}
+
+SerialPort.prototype._disconnected = function (err) {
+ if (!this.isOpen) {
+ debug('disconnected aborted because already closed', err)
+ return
+ }
+ debug('disconnected', err)
+ err.disconnected = true
+ this.close(null, err)
+}
+
+/**
+ * The `close` event's callback is called with no arguments when the port is closed. In the case of a disconnect it will be called with a Disconnect Error object (`err.disconnected == true`). In the event of a close error (unlikely), an error event is triggered.
+ * @event close
+ */
+
+/**
+ * Closes an open connection.
+ *
+ * If there are in progress writes when the port is closed the writes will error.
+ * @param {errorCallback} callback Called once a connection is closed.
+ * @param {Error} disconnectError used internally to propagate a disconnect error
+ * @emits close
+ * @returns {undefined}
+ */
+SerialPort.prototype.close = function (callback, disconnectError) {
+ disconnectError = disconnectError || null
+
+ if (!this.isOpen) {
+ debug('close attempted, but port is not open')
+ return this._asyncError(new Error('Port is not open'), callback)
+ }
+
+ this.closing = true
+ debug('#close')
+ this.binding.close().then(
+ () => {
+ this.closing = false
+ debug('binding.close', 'finished')
+ this.emit('close', disconnectError)
+ if (this.settings.endOnClose) {
+ this.emit('end')
+ }
+ if (callback) {
+ callback.call(this, disconnectError)
+ }
+ },
+ err => {
+ this.closing = false
+ debug('binding.close', 'had an error', err)
+ return this._error(err, callback)
+ }
+ )
+}
+
+/**
+ * Set control flags on an open port. Uses [`SetCommMask`](https://msdn.microsoft.com/en-us/library/windows/desktop/aa363257(v=vs.85).aspx) for Windows and [`ioctl`](http://linux.die.net/man/4/tty_ioctl) for OS X and Linux.
+ * @param {object=} options All options are operating system default when the port is opened. Every flag is set on each call to the provided or default values. If options isn't provided default options is used.
+ * @param {Boolean} [options.brk=false] sets the brk flag
+ * @param {Boolean} [options.cts=false] sets the cts flag
+ * @param {Boolean} [options.dsr=false] sets the dsr flag
+ * @param {Boolean} [options.dtr=true] sets the dtr flag
+ * @param {Boolean} [options.rts=true] sets the rts flag
+ * @param {errorCallback=} callback Called once the port's flags have been set.
+ * @since 5.0.0
+ * @returns {undefined}
+ */
+SerialPort.prototype.set = function (options, callback) {
+ if (typeof options !== 'object') {
+ throw TypeError('"options" is not an object')
+ }
+
+ if (!this.isOpen) {
+ debug('set attempted, but port is not open')
+ return this._asyncError(new Error('Port is not open'), callback)
+ }
+
+ const settings = { ...defaultSetFlags, ...options }
+ debug('#set', settings)
+ this.binding.set(settings).then(
+ () => {
+ debug('binding.set', 'finished')
+ if (callback) {
+ callback.call(this, null)
+ }
+ },
+ err => {
+ debug('binding.set', 'had an error', err)
+ return this._error(err, callback)
+ }
+ )
+}
+
+/**
+ * Returns the control flags (CTS, DSR, DCD) on the open port.
+ * Uses [`GetCommModemStatus`](https://msdn.microsoft.com/en-us/library/windows/desktop/aa363258(v=vs.85).aspx) for Windows and [`ioctl`](http://linux.die.net/man/4/tty_ioctl) for mac and linux.
+ * @param {modemBitsCallback=} callback Called once the modem bits are retrieved.
+ * @returns {undefined}
+ */
+SerialPort.prototype.get = function (callback) {
+ if (!this.isOpen) {
+ debug('get attempted, but port is not open')
+ return this._asyncError(new Error('Port is not open'), callback)
+ }
+
+ debug('#get')
+ this.binding.get().then(
+ status => {
+ debug('binding.get', 'finished')
+ if (callback) {
+ callback.call(this, null, status)
+ }
+ },
+ err => {
+ debug('binding.get', 'had an error', err)
+ return this._error(err, callback)
+ }
+ )
+}
+
+/**
+ * Flush discards data received but not read, and written but not transmitted by the operating system. For more technical details, see [`tcflush(fd, TCIOFLUSH)`](http://linux.die.net/man/3/tcflush) for Mac/Linux and [`FlushFileBuffers`](http://msdn.microsoft.com/en-us/library/windows/desktop/aa364439) for Windows.
+ * @param {errorCallback=} callback Called once the flush operation finishes.
+ * @returns {undefined}
+ */
+SerialPort.prototype.flush = function (callback) {
+ if (!this.isOpen) {
+ debug('flush attempted, but port is not open')
+ return this._asyncError(new Error('Port is not open'), callback)
+ }
+
+ debug('#flush')
+ this.binding.flush().then(
+ () => {
+ debug('binding.flush', 'finished')
+ if (callback) {
+ callback.call(this, null)
+ }
+ },
+ err => {
+ debug('binding.flush', 'had an error', err)
+ return this._error(err, callback)
+ }
+ )
+}
+
+/**
+ * Waits until all output data is transmitted to the serial port. After any pending write has completed it calls [`tcdrain()`](http://linux.die.net/man/3/tcdrain) or [FlushFileBuffers()](https://msdn.microsoft.com/en-us/library/windows/desktop/aa364439(v=vs.85).aspx) to ensure it has been written to the device.
+ * @param {errorCallback=} callback Called once the drain operation returns.
+ * @returns {undefined}
+ * @example
+Write the `data` and wait until it has finished transmitting to the target serial port before calling the callback. This will queue until the port is open and writes are finished.
+
+```js
+function writeAndDrain (data, callback) {
+ port.write(data);
+ port.drain(callback);
+}
+```
+ */
+SerialPort.prototype.drain = function (callback) {
+ debug('drain')
+ if (!this.isOpen) {
+ debug('drain queuing on port open')
+ return this.once('open', () => {
+ this.drain(callback)
+ })
+ }
+ this.binding.drain().then(
+ () => {
+ debug('binding.drain', 'finished')
+ if (callback) {
+ callback.call(this, null)
+ }
+ },
+ err => {
+ debug('binding.drain', 'had an error', err)
+ return this._error(err, callback)
+ }
+ )
+}
+
+/**
+ * The `pause()` method causes a stream in flowing mode to stop emitting 'data' events, switching out of flowing mode. Any data that becomes available remains in the internal buffer.
+ * @method SerialPort.prototype.pause
+ * @see resume
+ * @since 5.0.0
+ * @returns `this`
+ */
+
+/**
+ * The `resume()` method causes an explicitly paused, `Readable` stream to resume emitting 'data' events, switching the stream into flowing mode.
+ * @method SerialPort.prototype.resume
+ * @see pause
+ * @since 5.0.0
+ * @returns `this`
+ */
+
+/**
+ * Retrieves a list of available serial ports with metadata. Only the `path` is guaranteed. If unavailable the other fields will be undefined. The `path` is either the path or an identifier (eg `COM1`) used to open the SerialPort.
+ *
+ * We make an effort to identify the hardware attached and have consistent results between systems. Linux and OS X are mostly consistent. Windows relies on 3rd party device drivers for the information and is unable to guarantee the information. On windows If you have a USB connected device can we provide a serial number otherwise it will be `undefined`. The `pnpId` and `locationId` are not the same or present on all systems. The examples below were run with the same Arduino Uno.
+ * @type {function}
+ * @returns {Promise} Resolves with the list of available serial ports.
+ * @example
+```js
+// OSX example port
+{
+ path: '/dev/tty.usbmodem1421',
+ manufacturer: 'Arduino (www.arduino.cc)',
+ serialNumber: '752303138333518011C1',
+ pnpId: undefined,
+ locationId: '14500000',
+ productId: '0043',
+ vendorId: '2341'
+}
+
+// Linux example port
+{
+ path: '/dev/ttyACM0',
+ manufacturer: 'Arduino (www.arduino.cc)',
+ serialNumber: '752303138333518011C1',
+ pnpId: 'usb-Arduino__www.arduino.cc__0043_752303138333518011C1-if00',
+ locationId: undefined,
+ productId: '0043',
+ vendorId: '2341'
+}
+
+// Windows example port
+{
+ path: 'COM3',
+ manufacturer: 'Arduino LLC (www.arduino.cc)',
+ serialNumber: '752303138333518011C1',
+ pnpId: 'USB\\VID_2341&PID_0043\\752303138333518011C1',
+ locationId: 'Port_#0003.Hub_#0001',
+ productId: '0043',
+ vendorId: '2341'
+}
+```
+
+```js
+var SerialPort = require('serialport');
+
+// promise approach
+SerialPort.list()
+ .then(ports) {...});
+ .catch(err) {...});
+```
+ */
+SerialPort.list = async function (callback) {
+ debug('.list')
+ if (!SerialPort.Binding) {
+ throw new TypeError('No Binding set on `SerialPort.Binding`')
+ }
+ if (callback) {
+ throw new TypeError('SerialPort.list no longer takes a callback and only returns a promise')
+ }
+ return SerialPort.Binding.list()
+}
+
+module.exports = SerialPort
diff --git a/server/node_modules/@serialport/stream/node_modules/debug/LICENSE b/server/node_modules/@serialport/stream/node_modules/debug/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..1a9820e262b26b60fe71a4dcd9bc9cfd0a01f26e
--- /dev/null
+++ b/server/node_modules/@serialport/stream/node_modules/debug/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk
+Copyright (c) 2018-2021 Josh Junon
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+and associated documentation files (the 'Software'), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/server/node_modules/@serialport/stream/node_modules/debug/README.md b/server/node_modules/@serialport/stream/node_modules/debug/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..5ea4cd2759b917de9797f7073d738833ae9ba980
--- /dev/null
+++ b/server/node_modules/@serialport/stream/node_modules/debug/README.md
@@ -0,0 +1,478 @@
+# debug
+[](https://travis-ci.org/debug-js/debug) [](https://coveralls.io/github/debug-js/debug?branch=master) [](https://visionmedia-community-slackin.now.sh/) [](#backers)
+[](#sponsors)
+
+
+
+A tiny JavaScript debugging utility modelled after Node.js core's debugging
+technique. Works in Node.js and web browsers.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
+
+Example [_app.js_](./examples/node/app.js):
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %o', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example [_worker.js_](./examples/node/worker.js):
+
+```js
+var a = require('debug')('worker:a')
+ , b = require('debug')('worker:b');
+
+function work() {
+ a('doing lots of uninteresting work');
+ setTimeout(work, Math.random() * 1000);
+}
+
+work();
+
+function workb() {
+ b('doing some work');
+ setTimeout(workb, Math.random() * 2000);
+}
+
+workb();
+```
+
+The `DEBUG` environment variable is then used to enable these based on space or
+comma-delimited names.
+
+Here are some examples:
+
+
+
+
+
+#### Windows command prompt notes
+
+##### CMD
+
+On Windows the environment variable is set using the `set` command.
+
+```cmd
+set DEBUG=*,-not_this
+```
+
+Example:
+
+```cmd
+set DEBUG=* & node app.js
+```
+
+##### PowerShell (VS Code default)
+
+PowerShell uses different syntax to set environment variables.
+
+```cmd
+$env:DEBUG = "*,-not_this"
+```
+
+Example:
+
+```cmd
+$env:DEBUG='app';node app.js
+```
+
+Then, run the program to be debugged as usual.
+
+npm script example:
+```js
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
+```
+
+## Namespace Colors
+
+Every debug instance has a color generated for it based on its namespace name.
+This helps when visually parsing the debug output to identify which debug instance
+a debug line belongs to.
+
+#### Node.js
+
+In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
+the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
+otherwise debug will only use a small handful of basic colors.
+
+
+
+#### Web Browser
+
+Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+option. These are WebKit web inspectors, Firefox ([since version
+31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+and the Firebug plugin for Firefox (any version).
+
+
+
+
+## Millisecond diff
+
+When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+
+
+When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
+
+
+
+
+## Conventions
+
+If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
+
+## Wildcards
+
+The `*` character may be used as a wildcard. Suppose for example your library has
+debuggers named "connect:bodyParser", "connect:compress", "connect:session",
+instead of listing all three with
+`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
+`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+You can also exclude specific debuggers by prefixing them with a "-" character.
+For example, `DEBUG=*,-connect:*` would include all debuggers except those
+starting with "connect:".
+
+## Environment Variables
+
+When running through Node.js, you can set a few environment variables that will
+change the behavior of the debug logging:
+
+| Name | Purpose |
+|-----------|-------------------------------------------------|
+| `DEBUG` | Enables/disables specific debugging namespaces. |
+| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
+| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
+| `DEBUG_DEPTH` | Object inspection depth. |
+| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
+
+
+__Note:__ The environment variables beginning with `DEBUG_` end up being
+converted into an Options object that gets used with `%o`/`%O` formatters.
+See the Node.js documentation for
+[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
+for the complete list.
+
+## Formatters
+
+Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
+Below are the officially supported formatters:
+
+| Formatter | Representation |
+|-----------|----------------|
+| `%O` | Pretty-print an Object on multiple lines. |
+| `%o` | Pretty-print an Object all on a single line. |
+| `%s` | String. |
+| `%d` | Number (both integer and float). |
+| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
+| `%%` | Single percent sign ('%'). This does not consume an argument. |
+
+
+### Custom formatters
+
+You can add custom formatters by extending the `debug.formatters` object.
+For example, if you wanted to add support for rendering a Buffer as hex with
+`%h`, you could do something like:
+
+```js
+const createDebug = require('debug')
+createDebug.formatters.h = (v) => {
+ return v.toString('hex')
+}
+
+// …elsewhere
+const debug = createDebug('foo')
+debug('this is hex: %h', new Buffer('hello world'))
+// foo this is hex: 68656c6c6f20776f726c6421 +0ms
+```
+
+
+## Browser Support
+
+You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
+or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
+if you don't want to build it yourself.
+
+Debug's enable state is currently persisted by `localStorage`.
+Consider the situation shown below where you have `worker:a` and `worker:b`,
+and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+
+## Output streams
+
+ By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
+
+Example [_stdout.js_](./examples/node/stdout.js):
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+## Extend
+You can simply extend debugger
+```js
+const log = require('debug')('auth');
+
+//creates new debug instance with extended namespace
+const logSign = log.extend('sign');
+const logLogin = log.extend('login');
+
+log('hello'); // auth hello
+logSign('hello'); //auth:sign hello
+logLogin('hello'); //auth:login hello
+```
+
+## Set dynamically
+
+You can also enable debug dynamically by calling the `enable()` method :
+
+```js
+let debug = require('debug');
+
+console.log(1, debug.enabled('test'));
+
+debug.enable('test');
+console.log(2, debug.enabled('test'));
+
+debug.disable();
+console.log(3, debug.enabled('test'));
+
+```
+
+print :
+```
+1 false
+2 true
+3 false
+```
+
+Usage :
+`enable(namespaces)`
+`namespaces` can include modes separated by a colon and wildcards.
+
+Note that calling `enable()` completely overrides previously set DEBUG variable :
+
+```
+$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
+=> false
+```
+
+`disable()`
+
+Will disable all namespaces. The functions returns the namespaces currently
+enabled (and skipped). This can be useful if you want to disable debugging
+temporarily without knowing what was enabled to begin with.
+
+For example:
+
+```js
+let debug = require('debug');
+debug.enable('foo:*,-foo:bar');
+let namespaces = debug.disable();
+debug.enable(namespaces);
+```
+
+Note: There is no guarantee that the string will be identical to the initial
+enable string, but semantically they will be identical.
+
+## Checking whether a debug target is enabled
+
+After you've created a debug instance, you can determine whether or not it is
+enabled by checking the `enabled` property:
+
+```javascript
+const debug = require('debug')('http');
+
+if (debug.enabled) {
+ // do stuff...
+}
+```
+
+You can also manually toggle this property to force the debug instance to be
+enabled or disabled.
+
+## Usage in child processes
+
+Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process.
+For example:
+
+```javascript
+worker = fork(WORKER_WRAP_PATH, [workerPath], {
+ stdio: [
+ /* stdin: */ 0,
+ /* stdout: */ 'pipe',
+ /* stderr: */ 'pipe',
+ 'ipc',
+ ],
+ env: Object.assign({}, process.env, {
+ DEBUG_COLORS: 1 // without this settings, colors won't be shown
+ }),
+});
+
+worker.stderr.pipe(process.stderr, { end: false });
+```
+
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+ - Josh Junon
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
+Copyright (c) 2018-2021 Josh Junon
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/server/node_modules/@serialport/stream/node_modules/debug/package.json b/server/node_modules/@serialport/stream/node_modules/debug/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..3e65caf5bff2262da6e0acd207a6949d27f94b0f
--- /dev/null
+++ b/server/node_modules/@serialport/stream/node_modules/debug/package.json
@@ -0,0 +1,101 @@
+{
+ "_from": "debug@^4.3.2",
+ "_id": "debug@4.3.3",
+ "_inBundle": false,
+ "_integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
+ "_location": "/@serialport/stream/debug",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "debug@^4.3.2",
+ "name": "debug",
+ "escapedName": "debug",
+ "rawSpec": "^4.3.2",
+ "saveSpec": null,
+ "fetchSpec": "^4.3.2"
+ },
+ "_requiredBy": [
+ "/@serialport/stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
+ "_shasum": "04266e0b70a98d4462e6e288e38259213332b664",
+ "_spec": "debug@^4.3.2",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/@serialport/stream",
+ "author": {
+ "name": "Josh Junon",
+ "email": "josh.junon@protonmail.com"
+ },
+ "browser": "./src/browser.js",
+ "bugs": {
+ "url": "https://github.com/debug-js/debug/issues"
+ },
+ "bundleDependencies": false,
+ "contributors": [
+ {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io"
+ },
+ {
+ "name": "Andrew Rhyne",
+ "email": "rhyneandrew@gmail.com"
+ }
+ ],
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "deprecated": false,
+ "description": "Lightweight debugging utility for Node.js and the browser",
+ "devDependencies": {
+ "brfs": "^2.0.1",
+ "browserify": "^16.2.3",
+ "coveralls": "^3.0.2",
+ "istanbul": "^0.4.5",
+ "karma": "^3.1.4",
+ "karma-browserify": "^6.0.0",
+ "karma-chrome-launcher": "^2.2.0",
+ "karma-mocha": "^1.3.0",
+ "mocha": "^5.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "xo": "^0.23.0"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "files": [
+ "src",
+ "LICENSE",
+ "README.md"
+ ],
+ "homepage": "https://github.com/debug-js/debug#readme",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "license": "MIT",
+ "main": "./src/index.js",
+ "name": "debug",
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/debug-js/debug.git"
+ },
+ "scripts": {
+ "lint": "xo",
+ "test": "npm run test:node && npm run test:browser && npm run lint",
+ "test:browser": "karma start --single-run",
+ "test:coverage": "cat ./coverage/lcov.info | coveralls",
+ "test:node": "istanbul cover _mocha -- test.js"
+ },
+ "version": "4.3.3"
+}
diff --git a/server/node_modules/@serialport/stream/node_modules/debug/src/browser.js b/server/node_modules/@serialport/stream/node_modules/debug/src/browser.js
new file mode 100644
index 0000000000000000000000000000000000000000..3bf30ea51ba16c08a17865ba1263a0240580daad
--- /dev/null
+++ b/server/node_modules/@serialport/stream/node_modules/debug/src/browser.js
@@ -0,0 +1,269 @@
+/* eslint-env browser */
+
+/**
+ * This is the web browser implementation of `debug()`.
+ */
+
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = localstorage();
+exports.destroy = (() => {
+ let warned = false;
+
+ return () => {
+ if (!warned) {
+ warned = true;
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+ };
+})();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ '#0000CC',
+ '#0000FF',
+ '#0033CC',
+ '#0033FF',
+ '#0066CC',
+ '#0066FF',
+ '#0099CC',
+ '#0099FF',
+ '#00CC00',
+ '#00CC33',
+ '#00CC66',
+ '#00CC99',
+ '#00CCCC',
+ '#00CCFF',
+ '#3300CC',
+ '#3300FF',
+ '#3333CC',
+ '#3333FF',
+ '#3366CC',
+ '#3366FF',
+ '#3399CC',
+ '#3399FF',
+ '#33CC00',
+ '#33CC33',
+ '#33CC66',
+ '#33CC99',
+ '#33CCCC',
+ '#33CCFF',
+ '#6600CC',
+ '#6600FF',
+ '#6633CC',
+ '#6633FF',
+ '#66CC00',
+ '#66CC33',
+ '#9900CC',
+ '#9900FF',
+ '#9933CC',
+ '#9933FF',
+ '#99CC00',
+ '#99CC33',
+ '#CC0000',
+ '#CC0033',
+ '#CC0066',
+ '#CC0099',
+ '#CC00CC',
+ '#CC00FF',
+ '#CC3300',
+ '#CC3333',
+ '#CC3366',
+ '#CC3399',
+ '#CC33CC',
+ '#CC33FF',
+ '#CC6600',
+ '#CC6633',
+ '#CC9900',
+ '#CC9933',
+ '#CCCC00',
+ '#CCCC33',
+ '#FF0000',
+ '#FF0033',
+ '#FF0066',
+ '#FF0099',
+ '#FF00CC',
+ '#FF00FF',
+ '#FF3300',
+ '#FF3333',
+ '#FF3366',
+ '#FF3399',
+ '#FF33CC',
+ '#FF33FF',
+ '#FF6600',
+ '#FF6633',
+ '#FF9900',
+ '#FF9933',
+ '#FFCC00',
+ '#FFCC33'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+// eslint-disable-next-line complexity
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
+ return true;
+ }
+
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // Is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // Is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // Double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ args[0] = (this.useColors ? '%c' : '') +
+ this.namespace +
+ (this.useColors ? ' %c' : ' ') +
+ args[0] +
+ (this.useColors ? '%c ' : ' ') +
+ '+' + module.exports.humanize(this.diff);
+
+ if (!this.useColors) {
+ return;
+ }
+
+ const c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit');
+
+ // The final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ let index = 0;
+ let lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, match => {
+ if (match === '%%') {
+ return;
+ }
+ index++;
+ if (match === '%c') {
+ // We only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.debug()` when available.
+ * No-op when `console.debug` is not a "function".
+ * If `console.debug` is not available, falls back
+ * to `console.log`.
+ *
+ * @api public
+ */
+exports.log = console.debug || console.log || (() => {});
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ try {
+ if (namespaces) {
+ exports.storage.setItem('debug', namespaces);
+ } else {
+ exports.storage.removeItem('debug');
+ }
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+function load() {
+ let r;
+ try {
+ r = exports.storage.getItem('debug');
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+ // The Browser also has localStorage in the global context.
+ return localStorage;
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+module.exports = require('debug/src/common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+formatters.j = function (v) {
+ try {
+ return JSON.stringify(v);
+ } catch (error) {
+ return '[UnexpectedJSONParseError]: ' + error.message;
+ }
+};
diff --git a/server/node_modules/@serialport/stream/node_modules/debug/src/common.js b/server/node_modules/@serialport/stream/node_modules/debug/src/common.js
new file mode 100644
index 0000000000000000000000000000000000000000..6d571d2844dd950db81c8e07cabbfc9048c59658
--- /dev/null
+++ b/server/node_modules/@serialport/stream/node_modules/debug/src/common.js
@@ -0,0 +1,274 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ */
+
+function setup(env) {
+ createDebug.debug = createDebug;
+ createDebug.default = createDebug;
+ createDebug.coerce = coerce;
+ createDebug.disable = disable;
+ createDebug.enable = enable;
+ createDebug.enabled = enabled;
+ createDebug.humanize = require('ms');
+ createDebug.destroy = destroy;
+
+ Object.keys(env).forEach(key => {
+ createDebug[key] = env[key];
+ });
+
+ /**
+ * The currently active debug mode names, and names to skip.
+ */
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ /**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+ createDebug.formatters = {};
+
+ /**
+ * Selects a color for a debug namespace
+ * @param {String} namespace The namespace string for the debug instance to be colored
+ * @return {Number|String} An ANSI color code for the given namespace
+ * @api private
+ */
+ function selectColor(namespace) {
+ let hash = 0;
+
+ for (let i = 0; i < namespace.length; i++) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
+ }
+ createDebug.selectColor = selectColor;
+
+ /**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+ function createDebug(namespace) {
+ let prevTime;
+ let enableOverride = null;
+ let namespacesCache;
+ let enabledCache;
+
+ function debug(...args) {
+ // Disabled?
+ if (!debug.enabled) {
+ return;
+ }
+
+ const self = debug;
+
+ // Set `diff` timestamp
+ const curr = Number(new Date());
+ const ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ args[0] = createDebug.coerce(args[0]);
+
+ if (typeof args[0] !== 'string') {
+ // Anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // Apply any `formatters` transformations
+ let index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
+ // If we encounter an escaped % then don't increase the array index
+ if (match === '%%') {
+ return '%';
+ }
+ index++;
+ const formatter = createDebug.formatters[format];
+ if (typeof formatter === 'function') {
+ const val = args[index];
+ match = formatter.call(self, val);
+
+ // Now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // Apply env-specific formatting (colors, etc.)
+ createDebug.formatArgs.call(self, args);
+
+ const logFn = self.log || createDebug.log;
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.useColors = createDebug.useColors();
+ debug.color = createDebug.selectColor(namespace);
+ debug.extend = extend;
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
+
+ Object.defineProperty(debug, 'enabled', {
+ enumerable: true,
+ configurable: false,
+ get: () => {
+ if (enableOverride !== null) {
+ return enableOverride;
+ }
+ if (namespacesCache !== createDebug.namespaces) {
+ namespacesCache = createDebug.namespaces;
+ enabledCache = createDebug.enabled(namespace);
+ }
+
+ return enabledCache;
+ },
+ set: v => {
+ enableOverride = v;
+ }
+ });
+
+ // Env-specific initialization logic for debug instances
+ if (typeof createDebug.init === 'function') {
+ createDebug.init(debug);
+ }
+
+ return debug;
+ }
+
+ function extend(namespace, delimiter) {
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
+ newDebug.log = this.log;
+ return newDebug;
+ }
+
+ /**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+ function enable(namespaces) {
+ createDebug.save(namespaces);
+ createDebug.namespaces = namespaces;
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ let i;
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ const len = split.length;
+
+ for (i = 0; i < len; i++) {
+ if (!split[i]) {
+ // ignore empty strings
+ continue;
+ }
+
+ namespaces = split[i].replace(/\*/g, '.*?');
+
+ if (namespaces[0] === '-') {
+ createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+ }
+
+ /**
+ * Disable debug output.
+ *
+ * @return {String} namespaces
+ * @api public
+ */
+ function disable() {
+ const namespaces = [
+ ...createDebug.names.map(toNamespace),
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
+ ].join(',');
+ createDebug.enable('');
+ return namespaces;
+ }
+
+ /**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+ function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
+
+ let i;
+ let len;
+
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
+ if (createDebug.skips[i].test(name)) {
+ return false;
+ }
+ }
+
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
+ if (createDebug.names[i].test(name)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Convert regexp to namespace
+ *
+ * @param {RegExp} regxep
+ * @return {String} namespace
+ * @api private
+ */
+ function toNamespace(regexp) {
+ return regexp.toString()
+ .substring(2, regexp.toString().length - 2)
+ .replace(/\.\*\?$/, '*');
+ }
+
+ /**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+ function coerce(val) {
+ if (val instanceof Error) {
+ return val.stack || val.message;
+ }
+ return val;
+ }
+
+ /**
+ * XXX DO NOT USE. This is a temporary stub function.
+ * XXX It WILL be removed in the next major release.
+ */
+ function destroy() {
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+
+ createDebug.enable(createDebug.load());
+
+ return createDebug;
+}
+
+module.exports = setup;
diff --git a/server/node_modules/@serialport/stream/node_modules/debug/src/index.js b/server/node_modules/@serialport/stream/node_modules/debug/src/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..d0b8579432a88872cc1df415ae061509df74b38f
--- /dev/null
+++ b/server/node_modules/@serialport/stream/node_modules/debug/src/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer / nwjs process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
+ module.exports = require('debug/src/browser.js');
+} else {
+ module.exports = require('debug/src/node.js');
+}
diff --git a/server/node_modules/@serialport/stream/node_modules/debug/src/node.js b/server/node_modules/@serialport/stream/node_modules/debug/src/node.js
new file mode 100644
index 0000000000000000000000000000000000000000..3044efcce21274bf69b98b20d159031766e47d73
--- /dev/null
+++ b/server/node_modules/@serialport/stream/node_modules/debug/src/node.js
@@ -0,0 +1,263 @@
+/**
+ * Module dependencies.
+ */
+
+const tty = require('tty');
+const util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ */
+
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.destroy = util.deprecate(
+ () => {},
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
+);
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+try {
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
+ // eslint-disable-next-line import/no-extraneous-dependencies
+ const supportsColor = require('supports-color');
+
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
+ exports.colors = [
+ 20,
+ 21,
+ 26,
+ 27,
+ 32,
+ 33,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 56,
+ 57,
+ 62,
+ 63,
+ 68,
+ 69,
+ 74,
+ 75,
+ 76,
+ 77,
+ 78,
+ 79,
+ 80,
+ 81,
+ 92,
+ 93,
+ 98,
+ 99,
+ 112,
+ 113,
+ 128,
+ 129,
+ 134,
+ 135,
+ 148,
+ 149,
+ 160,
+ 161,
+ 162,
+ 163,
+ 164,
+ 165,
+ 166,
+ 167,
+ 168,
+ 169,
+ 170,
+ 171,
+ 172,
+ 173,
+ 178,
+ 179,
+ 184,
+ 185,
+ 196,
+ 197,
+ 198,
+ 199,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 207,
+ 208,
+ 209,
+ 214,
+ 215,
+ 220,
+ 221
+ ];
+ }
+} catch (error) {
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(key => {
+ return /^debug_/i.test(key);
+}).reduce((obj, key) => {
+ // Camel-case
+ const prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, (_, k) => {
+ return k.toUpperCase();
+ });
+
+ // Coerce string value into JS value
+ let val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === 'null') {
+ val = null;
+ } else {
+ val = Number(val);
+ }
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts ?
+ Boolean(exports.inspectOpts.colors) :
+ tty.isatty(process.stderr.fd);
+}
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ const {namespace: name, useColors} = this;
+
+ if (useColors) {
+ const c = this.color;
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ }
+ return new Date().toISOString() + ' ';
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
+ */
+
+function log(...args) {
+ return process.stderr.write(util.format(...args) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ if (namespaces) {
+ process.env.DEBUG = namespaces;
+ } else {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init(debug) {
+ debug.inspectOpts = {};
+
+ const keys = Object.keys(exports.inspectOpts);
+ for (let i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+module.exports = require('debug/src/common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+formatters.o = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n')
+ .map(str => str.trim())
+ .join(' ');
+};
+
+/**
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+formatters.O = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
diff --git a/server/node_modules/@serialport/stream/node_modules/ms/index.js b/server/node_modules/@serialport/stream/node_modules/ms/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..c4498bcc212589664a5fe0d45e5908b174ab0a37
--- /dev/null
+++ b/server/node_modules/@serialport/stream/node_modules/ms/index.js
@@ -0,0 +1,162 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var w = d * 7;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === 'string' && val.length > 0) {
+ return parse(val);
+ } else if (type === 'number' && isFinite(val)) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error(
+ 'val is not a non-empty string or a valid number. val=' +
+ JSON.stringify(val)
+ );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+ str
+ );
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'weeks':
+ case 'week':
+ case 'w':
+ return n * w;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return Math.round(ms / d) + 'd';
+ }
+ if (msAbs >= h) {
+ return Math.round(ms / h) + 'h';
+ }
+ if (msAbs >= m) {
+ return Math.round(ms / m) + 'm';
+ }
+ if (msAbs >= s) {
+ return Math.round(ms / s) + 's';
+ }
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, 'day');
+ }
+ if (msAbs >= h) {
+ return plural(ms, msAbs, h, 'hour');
+ }
+ if (msAbs >= m) {
+ return plural(ms, msAbs, m, 'minute');
+ }
+ if (msAbs >= s) {
+ return plural(ms, msAbs, s, 'second');
+ }
+ return ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
+}
diff --git a/server/node_modules/@serialport/stream/node_modules/ms/license.md b/server/node_modules/@serialport/stream/node_modules/ms/license.md
new file mode 100644
index 0000000000000000000000000000000000000000..69b61253a38926757b7de1d4df4880fc2105c2c9
--- /dev/null
+++ b/server/node_modules/@serialport/stream/node_modules/ms/license.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/server/node_modules/@serialport/stream/node_modules/ms/package.json b/server/node_modules/@serialport/stream/node_modules/ms/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..6ddf30a11b25bd44036ddfbc97f4ee1d1897b562
--- /dev/null
+++ b/server/node_modules/@serialport/stream/node_modules/ms/package.json
@@ -0,0 +1,69 @@
+{
+ "_from": "ms@2.1.2",
+ "_id": "ms@2.1.2",
+ "_inBundle": false,
+ "_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "_location": "/@serialport/stream/ms",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "ms@2.1.2",
+ "name": "ms",
+ "escapedName": "ms",
+ "rawSpec": "2.1.2",
+ "saveSpec": null,
+ "fetchSpec": "2.1.2"
+ },
+ "_requiredBy": [
+ "/@serialport/stream/debug"
+ ],
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "_shasum": "d09d1f357b443f493382a8eb3ccd183872ae6009",
+ "_spec": "ms@2.1.2",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/@serialport/stream/node_modules/debug",
+ "bugs": {
+ "url": "https://github.com/zeit/ms/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "Tiny millisecond conversion utility",
+ "devDependencies": {
+ "eslint": "4.12.1",
+ "expect.js": "0.3.1",
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/zeit/ms#readme",
+ "license": "MIT",
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "main": "./index",
+ "name": "ms",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/zeit/ms.git"
+ },
+ "scripts": {
+ "lint": "eslint lib/* bin/*",
+ "precommit": "lint-staged",
+ "test": "mocha tests.js"
+ },
+ "version": "2.1.2"
+}
diff --git a/server/node_modules/@serialport/stream/node_modules/ms/readme.md b/server/node_modules/@serialport/stream/node_modules/ms/readme.md
new file mode 100644
index 0000000000000000000000000000000000000000..9a1996b17e0de6854dd1cf10c5f2ee642e494085
--- /dev/null
+++ b/server/node_modules/@serialport/stream/node_modules/ms/readme.md
@@ -0,0 +1,60 @@
+# ms
+
+[](https://travis-ci.org/zeit/ms)
+[](https://spectrum.chat/zeit)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+ms('-3 days') // -259200000
+ms('-1h') // -3600000
+ms('-200') // -200
+```
+
+### Convert from Milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(-3 * 60000) // "-3m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time Format Written-Out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(-3 * 60000, { long: true }) // "-3 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [Node.js](https://nodejs.org) and in the browser
+- If a number is supplied to `ms`, a string with a unit is returned
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
+- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
+
+## Related Packages
+
+- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
+
+## Caught a Bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/server/node_modules/@serialport/stream/package.json b/server/node_modules/@serialport/stream/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..4c888df5f0c1b4c677ab3dac548f07dd2e09c6a7
--- /dev/null
+++ b/server/node_modules/@serialport/stream/package.json
@@ -0,0 +1,55 @@
+{
+ "_from": "@serialport/stream@9.2.4",
+ "_id": "@serialport/stream@9.2.4",
+ "_inBundle": false,
+ "_integrity": "sha512-bLye8Ub4vUFQGmkh8qEqehr7SE7EJs2yDs0h9jzuL5oKi+F34CFmWkEErO8GAOQ8YNn7p6b3GxUgs+0BrHHDZQ==",
+ "_location": "/@serialport/stream",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "@serialport/stream@9.2.4",
+ "name": "@serialport/stream",
+ "escapedName": "@serialport%2fstream",
+ "scope": "@serialport",
+ "rawSpec": "9.2.4",
+ "saveSpec": null,
+ "fetchSpec": "9.2.4"
+ },
+ "_requiredBy": [
+ "/serialport"
+ ],
+ "_resolved": "https://registry.npmjs.org/@serialport/stream/-/stream-9.2.4.tgz",
+ "_shasum": "9fce093d0b46ed4599953b4fae81718e050d2b33",
+ "_spec": "@serialport/stream@9.2.4",
+ "_where": "/home/souhail/M2-IWOCS/IOT/Arduino-Iot/node_modules/serialport",
+ "bugs": {
+ "url": "https://github.com/serialport/node-serialport/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "debug": "^4.3.2"
+ },
+ "deprecated": false,
+ "description": "The serialport stream interface. This package requires bindings to work.",
+ "devDependencies": {
+ "@serialport/binding-mock": "9.2.4"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "funding": "https://opencollective.com/serialport/donate",
+ "gitHead": "494fd0f097e25fd5475e543f80bf23cc05ea6abc",
+ "homepage": "https://github.com/serialport/node-serialport#readme",
+ "license": "MIT",
+ "main": "lib",
+ "name": "@serialport/stream",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/serialport/node-serialport.git"
+ },
+ "version": "9.2.4"
+}
diff --git a/server/node_modules/@sindresorhus/is/dist/index.d.ts b/server/node_modules/@sindresorhus/is/dist/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..e94d30b76707562befc37ab0ee24cc604c3cb7ac
--- /dev/null
+++ b/server/node_modules/@sindresorhus/is/dist/index.d.ts
@@ -0,0 +1,132 @@
+///
+///
+///
+///
+///
+declare type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
+declare type Primitive = null | undefined | string | number | boolean | Symbol;
+export interface ArrayLike {
+ length: number;
+}
+export interface Class {
+ new (...args: any[]): T;
+}
+declare type DomElement = object & {
+ nodeType: 1;
+ nodeName: string;
+};
+declare type NodeStream = object & {
+ pipe: Function;
+};
+export declare const enum TypeName {
+ null = "null",
+ boolean = "boolean",
+ undefined = "undefined",
+ string = "string",
+ number = "number",
+ symbol = "symbol",
+ Function = "Function",
+ GeneratorFunction = "GeneratorFunction",
+ AsyncFunction = "AsyncFunction",
+ Observable = "Observable",
+ Array = "Array",
+ Buffer = "Buffer",
+ Object = "Object",
+ RegExp = "RegExp",
+ Date = "Date",
+ Error = "Error",
+ Map = "Map",
+ Set = "Set",
+ WeakMap = "WeakMap",
+ WeakSet = "WeakSet",
+ Int8Array = "Int8Array",
+ Uint8Array = "Uint8Array",
+ Uint8ClampedArray = "Uint8ClampedArray",
+ Int16Array = "Int16Array",
+ Uint16Array = "Uint16Array",
+ Int32Array = "Int32Array",
+ Uint32Array = "Uint32Array",
+ Float32Array = "Float32Array",
+ Float64Array = "Float64Array",
+ ArrayBuffer = "ArrayBuffer",
+ SharedArrayBuffer = "SharedArrayBuffer",
+ DataView = "DataView",
+ Promise = "Promise",
+ URL = "URL"
+}
+declare function is(value: unknown): TypeName;
+declare namespace is {
+ const undefined: (value: unknown) => value is undefined;
+ const string: (value: unknown) => value is string;
+ const number: (value: unknown) => value is number;
+ const function_: (value: unknown) => value is Function;
+ const null_: (value: unknown) => value is null;
+ const class_: (value: unknown) => value is Class;
+ const boolean: (value: unknown) => value is boolean;
+ const symbol: (value: unknown) => value is Symbol;
+ const numericString: (value: unknown) => boolean;
+ const array: (arg: any) => arg is any[];
+ const buffer: (input: unknown) => input is Buffer;
+ const nullOrUndefined: (value: unknown) => value is null | undefined;
+ const object: (value: unknown) => value is object;
+ const iterable: (value: unknown) => value is IterableIterator;
+ const asyncIterable: (value: unknown) => value is AsyncIterableIterator;
+ const generator: (value: unknown) => value is Generator;
+ const nativePromise: (value: unknown) => value is Promise;
+ const promise: (value: unknown) => value is Promise;
+ const generatorFunction: (value: unknown) => value is GeneratorFunction;
+ const asyncFunction: (value: unknown) => value is Function;
+ const boundFunction: (value: unknown) => value is Function;
+ const regExp: (value: unknown) => value is RegExp;
+ const date: (value: unknown) => value is Date;
+ const error: (value: unknown) => value is Error;
+ const map: (value: unknown) => value is Map;
+ const set: (value: unknown) => value is Set;
+ const weakMap: (value: unknown) => value is WeakMap