From e65f266acabb1cd13dfc2c87ce4f9d367cb3314f Mon Sep 17 00:00:00 2001 From: ngradwohl Date: Sat, 20 Jul 2019 16:02:51 +0200 Subject: [PATCH 01/22] first osc msg tests --- desktop/main.js | 1 + desktop/package.json | 7 ++++++- desktop/sources/scripts/library.js | 7 +++++++ desktop/sources/scripts/ronin.js | 25 +++++++++++++++++++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/desktop/main.js b/desktop/main.js index 33934bd..d0cfba2 100644 --- a/desktop/main.js +++ b/desktop/main.js @@ -1,6 +1,7 @@ const { app, BrowserWindow, webFrame, Menu } = require('electron') const path = require('path') const url = require('url') +const osc = require('osc') const shell = require('electron').shell let isShown = true diff --git a/desktop/package.json b/desktop/package.json index fd78a06..b846576 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -4,6 +4,7 @@ "main": "main.js", "scripts": { "start": "electron .", + "install": "electron-rebuild", "clean": "rm -r ~/Desktop/Ronin-darwin-x64/ ; rm -r ~/Desktop/Ronin-linux-x64/ ; rm -r ~/Desktop/Ronin-win32-x64/ ; echo 'cleaned build location'", "build_osx": "electron-packager . Ronin --platform=darwin --arch=x64 --out ~/Desktop/ --overwrite --icon=icon.icns ; echo 'Built for OSX'", "build_linux": "electron-packager . Ronin --platform=linux --arch=x64 --out ~/Desktop/ --overwrite --icon=icon.ico ; echo 'Built for LINUX'", @@ -16,8 +17,12 @@ "push_status": "~/butler status hundredrabbits/ronin", "push": "npm run build ; npm run push_theme ; npm run push_osx ; npm run push_linux ; npm run push_win ; npm run clean ; npm run push_status" }, + "dependencies": { + "osc": "^2.3.1" + }, "devDependencies": { "electron": "^5.0.6", - "electron-packager": "^13.1.1" + "electron-packager": "^13.1.1", + "electron-rebuild": "^1.8.5" } } diff --git a/desktop/sources/scripts/library.js b/desktop/sources/scripts/library.js index ea3483a..39167f9 100644 --- a/desktop/sources/scripts/library.js +++ b/desktop/sources/scripts/library.js @@ -374,4 +374,11 @@ function Library (ronin) { console.log(`time taken: ${Date.now() - start}ms`) return result } + + // osc + + this.osc = () => { // Returns a rect of the frame. + return ronin.getOsc() + } + } diff --git a/desktop/sources/scripts/ronin.js b/desktop/sources/scripts/ronin.js index 1e229c7..b492a9c 100644 --- a/desktop/sources/scripts/ronin.js +++ b/desktop/sources/scripts/ronin.js @@ -1,3 +1,5 @@ +const osc = require('osc') + function Ronin () { const defaultTheme = { background: '#111', @@ -20,6 +22,7 @@ function Ronin () { this.surface = new Surface(this) this.library = new Library(this) + this.oscMsg = {} // Parameters this.always = false @@ -43,9 +46,31 @@ function Ronin () { this.source.start() this.commander.start() this.surface.start() + + var udpPort = new osc.UDPPort({ + localAddress: "0.0.0.0", + localPort: 57121, + metadata: true + }); + + udpPort.on("message", this.onOscMsg) + + udpPort.open(); + this.log("started") + console.log('Ronin', 'Started') } + this.onOscMsg = (oscMsg, timeTag, info) => { + this.oscMsg = oscMsg; + console.log("An OSC message just arrived!", oscMsg) + this.log("Remote info is: ", info); + } + + this.getOsc = function() { + return this.oscMsg; + } + this.reset = function () { this.theme.reset() } From 2574ad297b54ddf018c99ffb94917901517a87b5 Mon Sep 17 00:00:00 2001 From: Quentin Leonetti Date: Sat, 20 Jul 2019 19:46:52 +0200 Subject: [PATCH 02/22] add suport for {} objects --- desktop/sources/scripts/library.js | 8 ++++++++ desktop/sources/scripts/lisp.js | 27 +++++++++++++++++++++------ examples/objects.lisp | 11 +++++++++++ 3 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 examples/objects.lisp diff --git a/desktop/sources/scripts/library.js b/desktop/sources/scripts/library.js index e0a5ea4..0a8aa78 100644 --- a/desktop/sources/scripts/library.js +++ b/desktop/sources/scripts/library.js @@ -233,6 +233,14 @@ function Library (ronin) { }, h) } + this.keys = (item) => { // Returns a list of the object's keys + return Object.keys(item) + } + + this.values = (item) => { // Returns a list of the object's values + return Object.values(item) + } + // Frame this.frame = () => { // Returns a rect of the frame. diff --git a/desktop/sources/scripts/lisp.js b/desktop/sources/scripts/lisp.js index 4fd0f1e..3077df4 100644 --- a/desktop/sources/scripts/lisp.js +++ b/desktop/sources/scripts/lisp.js @@ -60,6 +60,12 @@ function Lisp (input, lib) { return interpret(input[2], new Context(lambdaScope, context)) } }, + if: async function (input, context) { + if (await interpret(input[1], context)) { + return interpret(input[2], context) + } + return input[3] ? interpret(input[3], context) : [] + }, __fn: function (input, context) { return async function () { const lambdaArguments = arguments @@ -70,11 +76,12 @@ function Lisp (input, lib) { return interpret(input.slice(1), new Context(lambdaScope, context)) } }, - if: async function (input, context) { - if (await interpret(input[1], context)) { - return interpret(input[2], context) + __obj: async function (input, context) { + const obj = {} + for (let i = 1 ; i Date: Sat, 20 Jul 2019 20:16:36 +0200 Subject: [PATCH 03/22] add symbol syntax --- desktop/sources/scripts/lisp.js | 2 ++ examples/objects.lisp | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/desktop/sources/scripts/lisp.js b/desktop/sources/scripts/lisp.js index 3077df4..19bab38 100644 --- a/desktop/sources/scripts/lisp.js +++ b/desktop/sources/scripts/lisp.js @@ -115,6 +115,8 @@ function Lisp (input, lib) { return { type: TYPES.number, value: parseFloat(input) } } else if (input[0] === '"' && input.slice(-1) === '"') { return { type: TYPES.string, value: input.slice(1, -1) } + } else if (input[0] === ':') { + return { type: TYPES.string, value: input.slice(1) } } else if (input === 'true' || input === 'false') { return { type: TYPES.bool, value: input === 'true' } } else { diff --git a/examples/objects.lisp b/examples/objects.lisp index 31e681c..e02eca0 100644 --- a/examples/objects.lisp +++ b/examples/objects.lisp @@ -1,11 +1,15 @@ ; objects -(def ob {"a" 1 "b" 2}) +(test "symbols" :a "a") -(echo (of ob "a")) +(def ob {:a "fantastic" :b 2}) + +((of (js) :console :log) ob) + +(echo (of ob :a)) (echo (keys ob)) (echo (values ob)) -(set ob "a" 4) -(echo (of ob "a")) \ No newline at end of file +(set ob :a 4) +(echo (of ob :a)) \ No newline at end of file From 4d437eaac1ad746ebb70282968b653a3ec7e670b Mon Sep 17 00:00:00 2001 From: Quentin Leonetti Date: Sat, 20 Jul 2019 20:34:23 +0200 Subject: [PATCH 04/22] add lambda shorthand with params --- desktop/sources/scripts/lisp.js | 8 ++++++-- examples/lambda.lisp | 7 +------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/desktop/sources/scripts/lisp.js b/desktop/sources/scripts/lisp.js index 19bab38..71105dd 100644 --- a/desktop/sources/scripts/lisp.js +++ b/desktop/sources/scripts/lisp.js @@ -69,8 +69,12 @@ function Lisp (input, lib) { __fn: function (input, context) { return async function () { const lambdaArguments = arguments - const lambdaScope = [].reduce(function (acc, x, i) { - acc[x.value] = lambdaArguments[i] + const keys = input.slice(2).filter(i => + i.type === TYPES.identifier && + i.value[0] === '%' + ).map(x => x.value).sort() + const lambdaScope = keys.reduce(function (acc, x, i) { + acc[x] = lambdaArguments[i] return acc }, {}) return interpret(input.slice(1), new Context(lambdaScope, context)) diff --git a/examples/lambda.lisp b/examples/lambda.lisp index ed62eb4..d22fb5c 100644 --- a/examples/lambda.lisp +++ b/examples/lambda.lisp @@ -1,6 +1 @@ -( - -(echo (map '(add 1 2) (4 5 6)) - -) - +(echo (map '(add %1 2) (4 5 6)) From 9d11b5ba89807d324204b8bab9b6254cbe337cc8 Mon Sep 17 00:00:00 2001 From: ngradwohl Date: Sat, 20 Jul 2019 20:35:46 +0200 Subject: [PATCH 05/22] move osc code to separate file --- desktop/sources/index.html | 2 ++ desktop/sources/scripts/osc.js | 27 +++++++++++++++++++++++++++ desktop/sources/scripts/ronin.js | 25 +++---------------------- 3 files changed, 32 insertions(+), 22 deletions(-) create mode 100644 desktop/sources/scripts/osc.js diff --git a/desktop/sources/index.html b/desktop/sources/index.html index 955ce4b..ce0e6c2 100644 --- a/desktop/sources/index.html +++ b/desktop/sources/index.html @@ -9,6 +9,8 @@ + + diff --git a/desktop/sources/scripts/osc.js b/desktop/sources/scripts/osc.js new file mode 100644 index 0000000..21e87d2 --- /dev/null +++ b/desktop/sources/scripts/osc.js @@ -0,0 +1,27 @@ +'use strict' + +function Osc (ronin) { + const osc = require('osc') + + this.oscMsg = {} + + this.start = function () { + var udpPort = new osc.UDPPort({ + localAddress: "0.0.0.0", + localPort: 12940, + metadata: true + }); + + udpPort.on("message", this.onOscMsg) + + udpPort.open(); + this.ronin.log("osc started") + } + + + this.onOscMsg = (oscMsg, timeTag, info) => { + this.oscMsg = oscMsg; + this.ronin.log("An OSC message just arrived!", oscMsg) + this.ronin.log("Remote info is: ", info); + } +} diff --git a/desktop/sources/scripts/ronin.js b/desktop/sources/scripts/ronin.js index b492a9c..7f13811 100644 --- a/desktop/sources/scripts/ronin.js +++ b/desktop/sources/scripts/ronin.js @@ -1,5 +1,3 @@ -const osc = require('osc') - function Ronin () { const defaultTheme = { background: '#111', @@ -21,6 +19,7 @@ function Ronin () { this.commander = new Commander(this) this.surface = new Surface(this) this.library = new Library(this) + this.osc = new Osc(this) this.oscMsg = {} // Parameters @@ -46,29 +45,11 @@ function Ronin () { this.source.start() this.commander.start() this.surface.start() - - var udpPort = new osc.UDPPort({ - localAddress: "0.0.0.0", - localPort: 57121, - metadata: true - }); - - udpPort.on("message", this.onOscMsg) - - udpPort.open(); - this.log("started") - - console.log('Ronin', 'Started') - } - - this.onOscMsg = (oscMsg, timeTag, info) => { - this.oscMsg = oscMsg; - console.log("An OSC message just arrived!", oscMsg) - this.log("Remote info is: ", info); + this.osc.start() } this.getOsc = function() { - return this.oscMsg; + return this.osc.oscMsg; } this.reset = function () { From 55bff65635cee1493ff38f79542092c52dc1f258 Mon Sep 17 00:00:00 2001 From: Quentin Leonetti Date: Sat, 20 Jul 2019 20:49:25 +0200 Subject: [PATCH 06/22] fix lambda shorthand, update array example --- desktop/sources/scripts/lisp.js | 4 ++-- examples/arrays.lisp | 25 +++++++++++++------------ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/desktop/sources/scripts/lisp.js b/desktop/sources/scripts/lisp.js index 71105dd..07b4165 100644 --- a/desktop/sources/scripts/lisp.js +++ b/desktop/sources/scripts/lisp.js @@ -69,10 +69,10 @@ function Lisp (input, lib) { __fn: function (input, context) { return async function () { const lambdaArguments = arguments - const keys = input.slice(2).filter(i => + const keys = [...new Set(input.slice(2).flat(100).filter(i => i.type === TYPES.identifier && i.value[0] === '%' - ).map(x => x.value).sort() + ).map(x => x.value).sort())] const lambdaScope = keys.reduce(function (acc, x, i) { acc[x] = lambdaArguments[i] return acc diff --git a/examples/arrays.lisp b/examples/arrays.lisp index 76c2054..e2dbf47 100644 --- a/examples/arrays.lisp +++ b/examples/arrays.lisp @@ -1,25 +1,26 @@ -(echo (map (lambda (a) (add a 1)) (1 2 3))) +(echo (map '(add %1 1) (1 2 3))) (echo (first (1 2 3))) (echo (rest (1 2 3))) (echo (filter - (lambda (a) (eq 0 (mod a 2))) + '(eq 0 (mod %1 2)) (1 2 3 4 5)) ) (clear) -(map (lambda (a) - (stroke (rect (mul a 30) 20 50 50) -1 "red")) +(map + '(stroke (rect (mul a 30) 20 50 50) +1 "red") (range 0 20 5)) -(map (lambda (a) - (stroke +(map + '(stroke (rect - (mul a 10) - (add 50 (mul (sin a) 40)) - a - (add 20 (mul (cos a) 50))) 1 "red")) - (range 0 200 5)) \ No newline at end of file + (mul %1 10) + (add 50 (mul (sin %1) 40)) + %1 + (add 20 (mul (cos %1) 50))) 1 "red") + (range 0 200 5)) + From fade8cb3968ba04ad1de5547c145cd723961a241 Mon Sep 17 00:00:00 2001 From: Quentin Leonetti Date: Sat, 20 Jul 2019 20:51:19 +0200 Subject: [PATCH 07/22] update array example --- examples/arrays.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/arrays.lisp b/examples/arrays.lisp index e2dbf47..2f99e20 100644 --- a/examples/arrays.lisp +++ b/examples/arrays.lisp @@ -19,8 +19,8 @@ '(stroke (rect (mul %1 10) - (add 50 (mul (sin %1) 40)) - %1 + (add 250 (mul (sin %1) 250)) + (mul 4 %1) (add 20 (mul (cos %1) 50))) 1 "red") (range 0 200 5)) From 0f2acc0d0e8690a88a863fac37018f3059d0eb55 Mon Sep 17 00:00:00 2001 From: Quentin Leonetti Date: Sat, 20 Jul 2019 21:25:28 +0200 Subject: [PATCH 08/22] add prelude.lisp --- desktop/sources/lisp/prelude.lisp | 11 +++++++++++ desktop/sources/scripts/lisp.js | 6 ++++-- examples/glitch.lisp | 11 +++++------ 3 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 desktop/sources/lisp/prelude.lisp diff --git a/desktop/sources/lisp/prelude.lisp b/desktop/sources/lisp/prelude.lisp new file mode 100644 index 0000000..82c0999 --- /dev/null +++ b/desktop/sources/lisp/prelude.lisp @@ -0,0 +1,11 @@ +(echo "Loading prelude.lisp") + +(defn translate + (r p) + (clone + r + (rect + (of p :x) + (of p :y) + (of r :w) + (of r :h)))) diff --git a/desktop/sources/scripts/lisp.js b/desktop/sources/scripts/lisp.js index 07b4165..46a55d4 100644 --- a/desktop/sources/scripts/lisp.js +++ b/desktop/sources/scripts/lisp.js @@ -167,10 +167,12 @@ function Lisp (input, lib) { } this.parse = function (input) { - return parenthesize(tokenize(`(${input})`)) + return parenthesize(tokenize(input)) } this.toPixels = async function () { - return interpret(this.parse(input)) + return interpret(this.parse(`( + (include "./sources/lisp/prelude.lisp") + ${input})`)) } } diff --git a/examples/glitch.lisp b/examples/glitch.lisp index 5491fc8..064d5e1 100644 --- a/examples/glitch.lisp +++ b/examples/glitch.lisp @@ -5,12 +5,11 @@ (defn glitch (rec) (if (gt rec 1) - ((clone - (rect (random 400) (random 400) 2 2) - (rect (random 400) (random 400) -(random 10) (random 30))) - (glitch (sub rec 1)))) -) + ( + (translate + (rect (random 400) (random 400) (random 10) (random 10)) + (pos (random 400) (random 400))) + (glitch (sub rec 1))))) (import "../static/crystal.jpg" From a559269b2dc74fc8a1dab39270c2d82d3a1b0771 Mon Sep 17 00:00:00 2001 From: Quentin Leonetti Date: Sat, 20 Jul 2019 21:49:25 +0200 Subject: [PATCH 09/22] update include --- desktop/sources/scripts/lisp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/sources/scripts/lisp.js b/desktop/sources/scripts/lisp.js index 46a55d4..d2a9541 100644 --- a/desktop/sources/scripts/lisp.js +++ b/desktop/sources/scripts/lisp.js @@ -22,7 +22,7 @@ function Lisp (input, lib) { include: (input, context) => { if (!input[1].value || !fs.existsSync(input[1].value)) { console.warn('Source', input[1].value); return [] } const file = fs.readFileSync(input[1].value, { encoding: 'utf-8' }) - return interpret(this.parse(file), context) + return interpret(this.parse(`(${file})`), context) }, let: function (input, context) { const letContext = input[1].reduce(function (acc, x) { From 0e7af66c16fb6a72f6df2863fc964f3943691841 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 21 Jul 2019 07:37:11 +0900 Subject: [PATCH 10/22] Fixed issue with prelude path in builds --- desktop/sources/index.html | 15 ++++----- desktop/sources/scripts/commander.js | 3 +- desktop/sources/scripts/lisp.js | 46 ++++++++++++++++------------ desktop/sources/scripts/ronin.js | 1 + desktop/sources/scripts/source.js | 6 ---- 5 files changed, 37 insertions(+), 34 deletions(-) diff --git a/desktop/sources/index.html b/desktop/sources/index.html index 955ce4b..ce810ca 100644 --- a/desktop/sources/index.html +++ b/desktop/sources/index.html @@ -18,10 +18,10 @@ diff --git a/desktop/sources/scripts/commander.js b/desktop/sources/scripts/commander.js index f42d1d1..6cdfd21 100644 --- a/desktop/sources/scripts/commander.js +++ b/desktop/sources/scripts/commander.js @@ -33,8 +33,7 @@ function Commander (ronin) { this.run = (txt = this._input.value) => { if (txt.indexOf('$') > -1) { ronin.log('Present: $'); return } - const inter = new Lisp(txt, ronin.library) - inter.toPixels() + const inter = new Lisp(txt, ronin.library, ronin.includes).run() ronin.always === true && requestAnimationFrame(() => this.run(txt)) } diff --git a/desktop/sources/scripts/lisp.js b/desktop/sources/scripts/lisp.js index d2a9541..d383fb8 100644 --- a/desktop/sources/scripts/lisp.js +++ b/desktop/sources/scripts/lisp.js @@ -1,6 +1,6 @@ 'use strict' -function Lisp (input, lib) { +function Lisp (input, lib, includes) { const path = require('path') const fs = require('fs') @@ -20,7 +20,7 @@ function Lisp (input, lib) { const special = { include: (input, context) => { - if (!input[1].value || !fs.existsSync(input[1].value)) { console.warn('Source', input[1].value); return [] } + if (!input[1].value || !fs.existsSync(input[1].value)) { console.warn('Lisp', 'No file: ' + input[1].value); return [] } const file = fs.readFileSync(input[1].value, { encoding: 'utf-8' }) return interpret(this.parse(`(${file})`), context) }, @@ -69,7 +69,7 @@ function Lisp (input, lib) { __fn: function (input, context) { return async function () { const lambdaArguments = arguments - const keys = [...new Set(input.slice(2).flat(100).filter(i => + const keys = [...new Set(input.slice(2).flat(100).filter(i => i.type === TYPES.identifier && i.value[0] === '%' ).map(x => x.value).sort())] @@ -82,8 +82,8 @@ function Lisp (input, lib) { }, __obj: async function (input, context) { const obj = {} - for (let i = 1 ; i { + const p = path.join(__dirname, `lisp/${item}.lisp`) + if (!fs.existsSync(p)) { console.warn('Lisp', `Missing include: ${p}`); return acc } + return `${acc}(include "${p}") ` + }, '') } this.parse = function (input) { return parenthesize(tokenize(input)) } - this.toPixels = async function () { + this.run = async function () { return interpret(this.parse(`( - (include "./sources/lisp/prelude.lisp") - ${input})`)) + ${this.inc()} + ${input})`)) } } diff --git a/desktop/sources/scripts/ronin.js b/desktop/sources/scripts/ronin.js index 1e229c7..a782a8b 100644 --- a/desktop/sources/scripts/ronin.js +++ b/desktop/sources/scripts/ronin.js @@ -23,6 +23,7 @@ function Ronin () { // Parameters this.always = false + this.includes = ['prelude'] this.install = function (host = document.body) { this._wrapper = document.createElement('div') diff --git a/desktop/sources/scripts/source.js b/desktop/sources/scripts/source.js index d0abb44..8ceec2e 100644 --- a/desktop/sources/scripts/source.js +++ b/desktop/sources/scripts/source.js @@ -126,12 +126,6 @@ function Source (ronin) { return `${str}` } - this.locate = function (name) { - if (!this.path) { return } - const loc = path.join(this.folder(), name) - return fs.existsSync(loc) ? loc : null - } - // Etc this.name = function () { From aaa77de890b8b15846d48c97f0126479a17122fc Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 21 Jul 2019 08:25:23 +0900 Subject: [PATCH 11/22] Moved the interpreter into ronin --- desktop/sources/scripts/commander.js | 2 +- desktop/sources/scripts/lisp.js | 7 ++++--- desktop/sources/scripts/ronin.js | 4 +++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/desktop/sources/scripts/commander.js b/desktop/sources/scripts/commander.js index 6cdfd21..fa74696 100644 --- a/desktop/sources/scripts/commander.js +++ b/desktop/sources/scripts/commander.js @@ -33,7 +33,7 @@ function Commander (ronin) { this.run = (txt = this._input.value) => { if (txt.indexOf('$') > -1) { ronin.log('Present: $'); return } - const inter = new Lisp(txt, ronin.library, ronin.includes).run() + ronin.interpreter.run(txt) ronin.always === true && requestAnimationFrame(() => this.run(txt)) } diff --git a/desktop/sources/scripts/lisp.js b/desktop/sources/scripts/lisp.js index d383fb8..82fe8de 100644 --- a/desktop/sources/scripts/lisp.js +++ b/desktop/sources/scripts/lisp.js @@ -1,14 +1,15 @@ 'use strict' -function Lisp (input, lib, includes) { +function Lisp (lib = {}, includes = []) { + console.log(includes) const path = require('path') const fs = require('fs') const TYPES = { identifier: 0, number: 1, string: 2, bool: 3 } + const Context = function (scope, parent) { this.scope = scope this.parent = parent - this.get = function (identifier) { if (identifier in this.scope) { return this.scope[identifier] @@ -178,7 +179,7 @@ function Lisp (input, lib, includes) { return parenthesize(tokenize(input)) } - this.run = async function () { + this.run = async function (input) { return interpret(this.parse(`( ${this.inc()} ${input})`)) diff --git a/desktop/sources/scripts/ronin.js b/desktop/sources/scripts/ronin.js index a782a8b..fade53f 100644 --- a/desktop/sources/scripts/ronin.js +++ b/desktop/sources/scripts/ronin.js @@ -10,6 +10,8 @@ function Ronin () { b_low: '#aaa', b_inv: '#ffb545' } + + this.includes = ['prelude'] this.el = document.createElement('div') this.el.id = 'ronin' @@ -19,11 +21,11 @@ function Ronin () { this.commander = new Commander(this) this.surface = new Surface(this) this.library = new Library(this) + this.interpreter = new Lisp(this.library, this.includes) // Parameters this.always = false - this.includes = ['prelude'] this.install = function (host = document.body) { this._wrapper = document.createElement('div') From 3ea7fff85f5c0932153f67704010e04e20cde06e Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 21 Jul 2019 09:20:04 +0900 Subject: [PATCH 12/22] Added (times i fn) to prelude --- desktop/sources/lisp/prelude.lisp | 27 +++-- desktop/sources/scripts/library.js | 154 ++++++++++++++--------------- desktop/sources/scripts/ronin.js | 2 +- examples/basics.lisp | 9 +- 4 files changed, 104 insertions(+), 88 deletions(-) diff --git a/desktop/sources/lisp/prelude.lisp b/desktop/sources/lisp/prelude.lisp index 82c0999..ef8b670 100644 --- a/desktop/sources/lisp/prelude.lisp +++ b/desktop/sources/lisp/prelude.lisp @@ -1,11 +1,20 @@ +; (echo "Loading prelude.lisp") - +; translate (defn translate - (r p) - (clone - r - (rect - (of p :x) - (of p :y) - (of r :w) - (of r :h)))) + (r p) + (clone r + (rect + (of p :x) + (of p :y) + (of r :w) + (of r :h)))) +; times +(defn times + (v f) + ( + (f v) + (if + (gt v 1) + (times + (sub v 1) f)))) \ No newline at end of file diff --git a/desktop/sources/scripts/library.js b/desktop/sources/scripts/library.js index 0a8aa78..35b48b2 100644 --- a/desktop/sources/scripts/library.js +++ b/desktop/sources/scripts/library.js @@ -64,6 +64,83 @@ function Library (ronin) { return rect } + // Frame + + this.frame = () => { // Returns a rect of the frame. + return ronin.surface.getFrame() + } + + this.center = () => { // Returns a position of the center of the frame. + const rect = this.frame() + return this.pos(rect.w / 2, rect.h / 2) + } + + this.resize = async (w, h, fit = true) => { // Resizes the canvas to target w and h, returns the rect. + const rect = { x: 0, y: 0, w, h } + const a = document.createElement('img') + const b = document.createElement('img') + a.src = ronin.surface.el.toDataURL() + await ronin.surface.resizeImage(a, b) + ronin.surface.resize(rect, fit) + return ronin.surface.draw(b, rect) + } + + this.rescale = async (w, h) => { // Rescales the canvas to target ratio of w and h, returns the rect. + const rect = { x: 0, y: 0, w: this.frame().w * w, h: this.frame().h * h } + const a = document.createElement('img') + const b = document.createElement('img') + a.src = ronin.surface.el.toDataURL() + await ronin.surface.resizeImage(a, b) + ronin.surface.resize(rect, true) + return ronin.surface.draw(b, rect) + } + + this.crop = async (rect) => { // Crop canvas to rect. + return ronin.surface.crop(rect) + } + + this.clone = (a, b) => { + ronin.surface.clone(a, b) + return [a, b] + } + + this.theme = (variable, el = document.documentElement) => { + // ex. (theme "f_main") -> :root { --f_main: "#fff" } + return getComputedStyle(el).getPropertyValue(`--${variable}`) + } + + // Gradients + + this.gradient = ([x1, y1, x2, y2], colors = ['white', 'black']) => { + return ronin.surface.linearGradient(x1, y1, x2, y2, colors) + } + + // Pixels + + this.pixels = (rect, fn, q) => { + const img = ronin.surface.context.getImageData(0, 0, rect.w, rect.h) + for (let i = 0, loop = img.data.length; i < loop; i += 4) { + const pixel = { r: img.data[i], g: img.data[i + 1], b: img.data[i + 2], a: img.data[i + 3] } + const processed = fn(pixel, q) + img.data[i] = processed[0] + img.data[i + 1] = processed[1] + img.data[i + 2] = processed[2] + img.data[i + 3] = processed[3] + } + ronin.surface.context.putImageData(img, 0, 0) + return rect + } + + this.saturation = (pixel, q = 1) => { + const color = 0.2126 * pixel.r + 0.7152 * pixel.g + 0.0722 * pixel.b + return [(color * (1 - q)) + (pixel.r * q), (color * (1 - q)) + (pixel.g * q), (color * (1 - q)) + (pixel.b * q), pixel.a] + } + + this.contrast = (pixel, q = 1) => { + const intercept = 128 * (1 - q) + return [pixel.r * q + intercept, pixel.g * q + intercept, pixel.b * q + intercept, pixel.a] + } + // Strings this.concat = function (...items) { // Concat multiple strings. @@ -241,83 +318,6 @@ function Library (ronin) { return Object.values(item) } - // Frame - - this.frame = () => { // Returns a rect of the frame. - return ronin.surface.getFrame() - } - - this.center = () => { // Returns a position of the center of the frame. - const rect = this.frame() - return this.pos(rect.w / 2, rect.h / 2) - } - - this.resize = async (w, h, fit = true) => { // Resizes the canvas to target w and h, returns the rect. - const rect = { x: 0, y: 0, w, h } - const a = document.createElement('img') - const b = document.createElement('img') - a.src = ronin.surface.el.toDataURL() - await ronin.surface.resizeImage(a, b) - ronin.surface.resize(rect, fit) - return ronin.surface.draw(b, rect) - } - - this.rescale = async (w, h) => { // Rescales the canvas to target ratio of w and h, returns the rect. - const rect = { x: 0, y: 0, w: this.frame().w * w, h: this.frame().h * h } - const a = document.createElement('img') - const b = document.createElement('img') - a.src = ronin.surface.el.toDataURL() - await ronin.surface.resizeImage(a, b) - ronin.surface.resize(rect, true) - return ronin.surface.draw(b, rect) - } - - this.crop = async (rect) => { // Crop canvas to rect. - return ronin.surface.crop(rect) - } - - this.clone = (a, b) => { - ronin.surface.clone(a, b) - return [a, b] - } - - this.theme = (variable, el = document.documentElement) => { - // ex. (theme "f_main") -> :root { --f_main: "#fff" } - return getComputedStyle(el).getPropertyValue(`--${variable}`) - } - - // Gradients - - this.gradient = ([x1, y1, x2, y2], colors = ['white', 'black']) => { - return ronin.surface.linearGradient(x1, y1, x2, y2, colors) - } - - // Pixels - - this.pixels = (rect, fn, q) => { - const img = ronin.surface.context.getImageData(0, 0, rect.w, rect.h) - for (let i = 0, loop = img.data.length; i < loop; i += 4) { - const pixel = { r: img.data[i], g: img.data[i + 1], b: img.data[i + 2], a: img.data[i + 3] } - const processed = fn(pixel, q) - img.data[i] = processed[0] - img.data[i + 1] = processed[1] - img.data[i + 2] = processed[2] - img.data[i + 3] = processed[3] - } - ronin.surface.context.putImageData(img, 0, 0) - return rect - } - - this.saturation = (pixel, q = 1) => { - const color = 0.2126 * pixel.r + 0.7152 * pixel.g + 0.0722 * pixel.b - return [(color * (1 - q)) + (pixel.r * q), (color * (1 - q)) + (pixel.g * q), (color * (1 - q)) + (pixel.b * q), pixel.a] - } - - this.contrast = (pixel, q = 1) => { - const intercept = 128 * (1 - q) - return [pixel.r * q + intercept, pixel.g * q + intercept, pixel.b * q + intercept, pixel.a] - } - // File System this.dir = (path = this.dirpath()) => { // Returns the content of a directory. diff --git a/desktop/sources/scripts/ronin.js b/desktop/sources/scripts/ronin.js index fade53f..927d388 100644 --- a/desktop/sources/scripts/ronin.js +++ b/desktop/sources/scripts/ronin.js @@ -10,7 +10,7 @@ function Ronin () { b_low: '#aaa', b_inv: '#ffb545' } - + this.includes = ['prelude'] this.el = document.createElement('div') diff --git a/examples/basics.lisp b/examples/basics.lisp index 997be5d..3c6f391 100644 --- a/examples/basics.lisp +++ b/examples/basics.lisp @@ -6,4 +6,11 @@ ; define a function (defn add-two (a) (add 2 a)) -(echo (add-two 4)) \ No newline at end of file +(echo (add-two 4)) + +; run +(times 5 + (lambda + (a) + (echo + (concat "time:" a)))) \ No newline at end of file From 938a9d22ec596c1a83dc980af2f5940b4517ff90 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 21 Jul 2019 09:52:37 +0900 Subject: [PATCH 13/22] =?UTF-8?q?Added=20support=20for=20=CE=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 26 +++++++++++++++----------- desktop/sources/scripts/lisp.js | 2 +- examples/basics.lisp | 7 ++----- examples/benchmark.lisp | 8 ++++---- examples/dejong.lisp | 2 +- examples/theme.lisp | 4 ++-- 6 files changed, 25 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index d49c62f..b1251db 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,8 @@ npm start ## Library +Additional functions can be found in the [includes](https://github.com/hundredrabbits/Ronin/tree/master/desktop/sources/lisp), you can also look at the [examples](https://github.com/hundredrabbits/Ronin/tree/master/examples) to see them in action. + - `(import path rect)` Imports a graphic file with format. - `(export path ~format ~quality)` Exports a graphic file with format. - `(open path)` Imports a graphic file and resizes the frame. @@ -38,6 +40,17 @@ npm start - `(stroke ~shape)` Strokes a shape. - `(fill ~rect)` Fills a shape. - `(clear ~rect)` Clears a rect. +- `(frame)` Returns a rect of the frame. +- `(center)` Returns a position of the center of the frame. +- `(resize w h ~fit)` Resizes the canvas to target w and h, returns the rect. +- `(rescale w h)` Rescales the canvas to target ratio of w and h, returns the rect. +- `(crop rect)` Crop canvas to rect. +- `(clone a b)` +- `(theme variable ~el)` +- `(gradient [x1 y1 x2 y2] ~colors 'black'])` +- `(pixels rect fn q)` +- `(saturation pixel ~q)` +- `(contrast pixel ~q)` - `(concat ...items)` Concat multiple strings. - `(add ...args)` Adds values. - `(sub ...args)` Subtracts values. @@ -71,17 +84,8 @@ npm start - `(get item key)` Gets an object's parameter with name. - `(set item key val)` Sets an object's parameter with name as value. - `(of h ...keys)` Gets object parameters with names. -- `(frame)` Returns a rect of the frame. -- `(center)` Returns a position of the center of the frame. -- `(resize w h ~fit)` Resizes the canvas to target w and h, returns the rect. -- `(rescale w h)` Rescales the canvas to target ratio of w and h, returns the rect. -- `(crop rect)` Crop canvas to rect. -- `(clone a b)` -- `(theme variable ~el)` -- `(gradient [x1 y1 x2 y2] ~colors 'black'])` -- `(pixels rect fn q)` -- `(saturation pixel ~q)` -- `(contrast pixel ~q)` +- `(keys item)` Returns a list of the object's keys +- `(values item)` Returns a list of the object's values - `(dir ~path)` Returns the content of a directory. - `(file ~path)` Returns the content of a file. - `(dirpath ~path)` Returns the path of a directory. diff --git a/desktop/sources/scripts/lisp.js b/desktop/sources/scripts/lisp.js index 82fe8de..e13eb79 100644 --- a/desktop/sources/scripts/lisp.js +++ b/desktop/sources/scripts/lisp.js @@ -153,7 +153,7 @@ function Lisp (lib = {}, includes = []) { } const tokenize = function (input) { - const i = input.replace(/^\;.*\n?/gm, '').split('"') + const i = input.replace(/^\;.*\n?/gm, '').replace('λ','lambda ').split('"') return i.map(function (x, i) { return i % 2 === 0 ? x.replace(/\(/g, ' ( ') diff --git a/examples/basics.lisp b/examples/basics.lisp index 3c6f391..cbffb3e 100644 --- a/examples/basics.lisp +++ b/examples/basics.lisp @@ -8,9 +8,6 @@ (defn add-two (a) (add 2 a)) (echo (add-two 4)) -; run +; use a lambda (times 5 - (lambda - (a) - (echo - (concat "time:" a)))) \ No newline at end of file + (λ (a) (echo (concat "time:" a)))) \ No newline at end of file diff --git a/examples/benchmark.lisp b/examples/benchmark.lisp index e0b698e..03e1e51 100644 --- a/examples/benchmark.lisp +++ b/examples/benchmark.lisp @@ -35,14 +35,14 @@ (test "range simple" (range 0 4) (0 1 2 3 4)) (test "range with step" (range 0 4 2) (0 2 4)) (test "range with negative step" (range 0 -4 -1) (0 -1 -2 -3 -4)) - (test "map" (map (lambda (a) (add 1 a)) (1 2 3)) (2 3 4)) - (test "filter" (filter (lambda (a) (eq 0 (mod a 2))) (2 3 4 5 6)) (2 4 6)) - (test "reduce" (reduce (lambda (acc val) (add acc val)) (1 2 3) 4) 10) + (test "map" (map (λ (a) (add 1 a)) (1 2 3)) (2 3 4)) + (test "filter" (filter (λ (a) (eq 0 (mod a 2))) (2 3 4 5 6)) (2 4 6)) + (test "reduce" (reduce (λ (acc val) (add acc val)) (1 2 3) 4) 10) ; Scope (def aaa 123) - (def addOne (lambda (a) (add a 1))) + (def addOne (λ (a) (add a 1))) (test "def - value" aaa 123) (test "def - func" (addOne 4) 5) (defn addTwo (a) (add 2 a)) diff --git a/examples/dejong.lisp b/examples/dejong.lisp index 654271c..d373008 100644 --- a/examples/dejong.lisp +++ b/examples/dejong.lisp @@ -16,7 +16,7 @@ (defn dejong (r a b c d) (reduce - (lambda (acc val) + (λ (acc val) (first ( (_dejong (first acc) (last acc) a b c d) ))) diff --git a/examples/theme.lisp b/examples/theme.lisp index cba7b21..7a5db32 100644 --- a/examples/theme.lisp +++ b/examples/theme.lisp @@ -2,7 +2,7 @@ (clear) (def col - (lambda + (λ (i) (of ( @@ -16,7 +16,7 @@ (theme "b_inv")) (mod i 8)))) (def rec - (lambda + (λ (v i) (if (gt v 0) From 3093a74d57470cdada357b3f1dd2b0db1ba398c0 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 21 Jul 2019 10:01:03 +0900 Subject: [PATCH 14/22] Test for number of parens --- desktop/sources/scripts/commander.js | 4 ++++ desktop/sources/scripts/lisp.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/desktop/sources/scripts/commander.js b/desktop/sources/scripts/commander.js index fa74696..852b2b9 100644 --- a/desktop/sources/scripts/commander.js +++ b/desktop/sources/scripts/commander.js @@ -46,6 +46,10 @@ function Commander (ronin) { this.reindent = function () { let val = this._input.value.replace(/\n/g, '').replace(/ +(?= )/g, '').replace(/\( \(/g, '((').replace(/\) \)/g, '))').trim() let depth = 0 + if (val.split('(').length !== val.split(')').length) { + ronin.log('Uneven number of parens.') + return + } for (let i = 0; i < val.length; i++) { const c = val.charAt(i) if (c === '(') { depth++ } else if (c === ')') { depth-- } diff --git a/desktop/sources/scripts/lisp.js b/desktop/sources/scripts/lisp.js index e13eb79..1eebdd8 100644 --- a/desktop/sources/scripts/lisp.js +++ b/desktop/sources/scripts/lisp.js @@ -153,7 +153,7 @@ function Lisp (lib = {}, includes = []) { } const tokenize = function (input) { - const i = input.replace(/^\;.*\n?/gm, '').replace('λ','lambda ').split('"') + const i = input.replace(/^\;.*\n?/gm, '').replace('λ', 'lambda ').split('"') return i.map(function (x, i) { return i % 2 === 0 ? x.replace(/\(/g, ' ( ') From 70c8625db7007488dd3a894a8be85c7762c5733e Mon Sep 17 00:00:00 2001 From: ngradwohl Date: Sun, 21 Jul 2019 04:06:12 +0200 Subject: [PATCH 15/22] add example, update readme --- README.md | 1 + examples/osc1.lisp | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 examples/osc1.lisp diff --git a/README.md b/README.md index b1251db..8bd3240 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,7 @@ Additional functions can be found in the [includes](https://github.com/hundredra - `(js)` Javascript interop. - `(test name a b)` - `(benchmark fn)` logs time taken to execute a function. +- `(osc ~address)` returns the last received osc msg on port 12940 ## Extras diff --git a/examples/osc1.lisp b/examples/osc1.lisp new file mode 100644 index 0000000..70e1e6f --- /dev/null +++ b/examples/osc1.lisp @@ -0,0 +1,11 @@ +(clear) +(def x (of (osc "/test") "args" "0" "value")) +(def y (of (osc "/test") "args" "1" "value")) +(def r (of (osc "/test") "args" "2" "value")) + +(fill +(circle x y r) +"red") +(stroke +(circle x y r) +5 "white") From 0b72893ae9326e37f5c3690b7a0693cf72d761e4 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 21 Jul 2019 11:20:58 +0900 Subject: [PATCH 16/22] Added star example --- desktop/sources/scripts/commander.js | 1 + desktop/sources/scripts/library.js | 9 +++-- desktop/sources/scripts/surface.js | 2 +- examples/stars.lisp | 51 ++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 examples/stars.lisp diff --git a/desktop/sources/scripts/commander.js b/desktop/sources/scripts/commander.js index 852b2b9..658c34a 100644 --- a/desktop/sources/scripts/commander.js +++ b/desktop/sources/scripts/commander.js @@ -33,6 +33,7 @@ function Commander (ronin) { this.run = (txt = this._input.value) => { if (txt.indexOf('$') > -1) { ronin.log('Present: $'); return } + ronin.surface.maximize() ronin.interpreter.run(txt) ronin.always === true && requestAnimationFrame(() => this.run(txt)) } diff --git a/desktop/sources/scripts/library.js b/desktop/sources/scripts/library.js index 35b48b2..0bd9482 100644 --- a/desktop/sources/scripts/library.js +++ b/desktop/sources/scripts/library.js @@ -31,8 +31,8 @@ function Library (ronin) { return { x, y, w, h, t } } - this.circle = (x, y, r, t = 'circle') => { // Returns a circle shape. - return { x, y, r, t } + this.circle = (cx, cy, r, t = 'circle') => { // Returns a circle shape. + return { cx, cy, r, t } } this.line = (a, b, t = 'line') => { // Returns a line shape. @@ -345,6 +345,11 @@ function Library (ronin) { return args } + this.table = (arg) => { + console.table(arg) + return arg + } + this.time = (rate = 1) => { // Returns timestamp in milliseconds. return (Date.now() * rate) } diff --git a/desktop/sources/scripts/surface.js b/desktop/sources/scripts/surface.js index b2ee463..78ec8c9 100644 --- a/desktop/sources/scripts/surface.js +++ b/desktop/sources/scripts/surface.js @@ -100,7 +100,7 @@ function Surface (ronin) { } this.traceCircle = function (circle, context) { - context.arc(circle.x, circle.y, circle.r, 0, 2 * Math.PI) + context.arc(circle.cx, circle.cy, circle.r, 0, 2 * Math.PI) } this.traceText = function (text, context) { diff --git a/examples/stars.lisp b/examples/stars.lisp new file mode 100644 index 0000000..920843d --- /dev/null +++ b/examples/stars.lisp @@ -0,0 +1,51 @@ +; stars +(clear) +; +(defn deg-rad + (deg) + (mul deg + (div PI 180))) +; +(defn circle-pos + (cx cy r a) {:x + (add cx + (mul r + (cos a))) :y + (add cy + (mul r + (sin a)))}) +; +(defn draw-spoke + (cx cy r a) + ( + (stroke + (line + (pos cx cy) + (circle-pos cx cy r a)) 2 "white"))) +; +(defn draw-star + (cx cy r c) + ( + (times c + (lambda + (i) + ( + (draw-spoke cx cy r + (deg-rad + (mul i + (div 360 c))))))))) +; main +(times 100 + (λ + () + ( + (draw-star + (random 100 + (of + (frame) :w)) + (random 100 + (of + (frame) :h)) + (random 10 100) + (floor + (random 3 32)))))) \ No newline at end of file From 07ff69e14a93bd6f6c8bcd9bfd4a24c2f76d5d0a Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 21 Jul 2019 16:55:22 +0900 Subject: [PATCH 17/22] Starting orca x ronin example --- desktop/package-lock.json | 1262 ++++++++++++++++++++++++++-- desktop/sources/scripts/library.js | 4 +- desktop/sources/scripts/lisp.js | 1 - desktop/sources/scripts/osc.js | 34 +- desktop/sources/scripts/ronin.js | 4 +- examples/{osc1.lisp => osc.lisp} | 0 examples/stars.lisp | 2 +- 7 files changed, 1237 insertions(+), 70 deletions(-) rename examples/{osc1.lisp => osc.lisp} (100%) diff --git a/desktop/package-lock.json b/desktop/package-lock.json index 661f152..4f1de11 100644 --- a/desktop/package-lock.json +++ b/desktop/package-lock.json @@ -4,12 +4,144 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@serialport/binding-abstract": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@serialport/binding-abstract/-/binding-abstract-2.0.5.tgz", + "integrity": "sha512-oRg0QRsXJFKHQbQjmo0regKLZ9JhjLmTqc47ocJgYM5UtU9Q1VFrVPh0B2lr2pfm/tr3aNvTLX1eiVAvXyZ/bg==", + "optional": true, + "requires": { + "debug": "^4.1.1" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "optional": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "@serialport/binding-mock": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-2.0.5.tgz", + "integrity": "sha512-1kD1qI686pIIolGZ6TPjAtvy8c3XIUlE4OXRZf7ZHaZgGaOUHAUMLKZt4tNTxsfedRTFyiYyHoe5QAbx82R9pQ==", + "optional": true, + "requires": { + "@serialport/binding-abstract": "^2.0.5", + "debug": "^4.1.1" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "optional": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "@serialport/bindings": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@serialport/bindings/-/bindings-2.0.8.tgz", + "integrity": "sha512-paKLa9JkoH5FAy2sATTdXLCiKpuKn0pN15/etcCqzX8vi25fnQgJ8Yx9Z6zdbcKe1No7s/9PuH9yfjDR61fbOQ==", + "optional": true, + "requires": { + "@serialport/binding-abstract": "^2.0.5", + "@serialport/parser-readline": "^2.0.2", + "bindings": "^1.3.0", + "debug": "^4.1.1", + "nan": "^2.13.2", + "prebuild-install": "^5.2.1" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "optional": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "@serialport/parser-byte-length": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@serialport/parser-byte-length/-/parser-byte-length-2.0.2.tgz", + "integrity": "sha512-cUOprk1uRLucCJy6m+wAM4pwdBaB5D4ySi6juwRScP9DTjKUvGWYj5jzuqvftFBvYFmFza89aLj5K23xiiqj7Q==", + "optional": true + }, + "@serialport/parser-cctalk": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@serialport/parser-cctalk/-/parser-cctalk-2.0.2.tgz", + "integrity": "sha512-5LMysRv7De+TeeoKzi4+sgouD4tqZEAn1agAVevw+7ILM0m30i1zgZLtchgxtCH7OoQRAkENEVEPc0OwhghKgw==", + "optional": true + }, + "@serialport/parser-delimiter": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-2.0.2.tgz", + "integrity": "sha512-zB02LahFfyZmJqak9l37vP/F1K+KCUxd1KQj35OhD1+0q/unMjVTZmsfkxFSM4gkaxP9j7+8USk+LQJ3V8U26Q==", + "optional": true + }, + "@serialport/parser-readline": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-2.0.2.tgz", + "integrity": "sha512-thL26dGEHB+eINNydJmzcLLhiqcBQkF+wNTbRaYblTP/6dm7JsfjYSud7bTkN63AgE0xpe9tKXBFqc8zgJ1VKg==", + "optional": true, + "requires": { + "@serialport/parser-delimiter": "^2.0.2" + } + }, + "@serialport/parser-ready": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@serialport/parser-ready/-/parser-ready-2.0.2.tgz", + "integrity": "sha512-6ynQ+HIIkFQcEO2Hrq4Qmdz+hlJ7kjTHGQ1E7SRN7f70nnys1v3HSke8mjK3RzVw+SwL0rBYjftUdCTrU+7c+Q==", + "optional": true + }, + "@serialport/parser-regex": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@serialport/parser-regex/-/parser-regex-2.0.2.tgz", + "integrity": "sha512-7qjYd7AdHUK8fJOmHpXlMRipqRCVMMyDFyf/5TQQiOt6q+BiFjLOtSpVXhakHwgnXanzDYKeRSB8zM0pZZg+LA==", + "optional": true + }, + "@serialport/stream": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@serialport/stream/-/stream-2.0.5.tgz", + "integrity": "sha512-9gc3zPoAqs/04mvq8TdZ7GxtnacCDuw3/u0u18UXXHgC/5tNDYkY+hXFIJB1fQFnP5yyNB1L2XLfX974ySJg9Q==", + "optional": true, + "requires": { + "@serialport/binding-mock": "^2.0.5", + "debug": "^4.1.1" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "optional": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, "@types/node": { "version": "10.14.12", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.12.tgz", "integrity": "sha512-QcAKpaO6nhHLlxWBvpc4WeLrTvPqlHOvaj0s5GriKkA1zq+bsFBPpfYCvQhLqLgYlIko8A9YrPdaMHCo5mBcpg==", "dev": true }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, "ajv": { "version": "6.10.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", @@ -25,8 +157,64 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "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" + } + }, + "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==" + }, + "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==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } }, "array-find-index": { "version": "1.0.2", @@ -73,6 +261,11 @@ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true }, + "async-limiter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -118,6 +311,73 @@ "tweetnacl": "^0.14.3" } }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "optional": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "optional": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "optional": true, + "requires": { + "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" + }, + "dependencies": { + "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==", + "optional": true + } + } + }, + "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==", + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "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==", + "optional": true + } + } + } + } + }, "bluebird": { "version": "3.5.5", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz", @@ -138,7 +398,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dev": true, "requires": { "buffer-alloc-unsafe": "^1.1.0", "buffer-fill": "^1.0.0" @@ -147,14 +406,12 @@ "buffer-alloc-unsafe": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" }, "buffer-fill": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", - "dev": true + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" }, "buffer-from": { "version": "1.1.1", @@ -184,16 +441,118 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chownr": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.2.tgz", + "integrity": "sha512-GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A==" + }, "chromium-pickle-js": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz", "integrity": "sha1-BKEGZywYsIWrd02YPfo+oTjyIgU=", "dev": true }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-spinners": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.2.0.tgz", + "integrity": "sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, "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=", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colors": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", + "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", "dev": true }, "combined-stream": { @@ -273,11 +632,15 @@ } } }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cuint": { "version": "0.2.2", @@ -318,11 +681,28 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "optional": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, "deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "^1.0.2" + } }, "delayed-stream": { "version": "1.0.0", @@ -330,6 +710,16 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -484,6 +874,60 @@ } } }, + "electron-rebuild": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/electron-rebuild/-/electron-rebuild-1.8.5.tgz", + "integrity": "sha512-gDwRA3utfiPnFwBZ1z8M4SEMwsdsy6Bg4VGO2ohelMOIO0vxiCrDQ/FVdLk3h2g7fLb06QFUsQU+86jiTSmZxw==", + "dev": true, + "requires": { + "colors": "^1.3.3", + "debug": "^4.1.1", + "detect-libc": "^1.0.3", + "fs-extra": "^7.0.1", + "node-abi": "^2.8.0", + "node-gyp": "^4.0.0", + "ora": "^3.4.0", + "spawn-rx": "^3.0.0", + "yargs": "^13.2.2" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + } + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "optional": true, + "requires": { + "once": "^1.4.0" + } + }, "env-paths": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz", @@ -499,6 +943,18 @@ "is-arrayish": "^0.2.1" } }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "optional": true + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -561,6 +1017,12 @@ "pend": "~1.2.0" } }, + "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==", + "optional": true + }, "find-up": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", @@ -631,6 +1093,12 @@ "mime-types": "^2.1.12" } }, + "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==", + "optional": true + }, "fs-extra": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", @@ -642,6 +1110,15 @@ "universalify": "^0.1.0" } }, + "fs-minipass": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.6.tgz", + "integrity": "sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ==", + "dev": true, + "requires": { + "minipass": "^2.2.1" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -659,6 +1136,27 @@ "fs-extra": "^4.0.0" } }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, "get-package-info": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-package-info/-/get-package-info-1.0.0.tgz", @@ -760,6 +1258,12 @@ "assert-plus": "^1.0.0" } }, + "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=", + "optional": true + }, "glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", @@ -796,6 +1300,17 @@ "har-schema": "^2.0.0" } }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, "hosted-git-info": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", @@ -835,14 +1350,12 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "is-arrayish": { "version": "0.2.1", @@ -863,7 +1376,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, "requires": { "number-is-nan": "^1.0.0" } @@ -895,6 +1407,12 @@ "buffer-alloc": "^1.2.0" } }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", @@ -969,12 +1487,32 @@ "path-exists": "^3.0.0" } }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", + "dev": true + }, "lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, "loud-rejection": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", @@ -1024,6 +1562,18 @@ "mime-db": "1.40.0" } }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "optional": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -1036,14 +1586,31 @@ "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "minipass": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", + "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", + "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", + "dev": true, + "requires": { + "minipass": "^2.2.1" + } }, "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, "requires": { "minimist": "0.0.8" }, @@ -1051,16 +1618,76 @@ "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" } } }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "optional": true + }, + "napi-build-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.1.tgz", + "integrity": "sha512-boQj1WFgQH3v4clhu3mTNfP+vOBxorDlE8EKiMjUlLG3C4qAESnn9AxIOkFgTR2c9LtzNjPrjS60cT27ZKBhaA==", + "optional": true + }, + "node-abi": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.9.0.tgz", + "integrity": "sha512-jmEOvv0eanWjhX8dX1pmjb7oJl1U1oR4FOh0b2GnvALwSYoOdU7sj+kLDSAyjo4pfC9aj/IxkloxdLJQhSSQBA==", + "requires": { + "semver": "^5.4.1" + } + }, + "node-gyp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-4.0.0.tgz", + "integrity": "sha512-2XiryJ8sICNo6ej8d0idXDEMKfVfFK7kekGCtJAuelGsYHQxhj13KTf95swTCN2dZ/4lTfZ84Fu31jqJEEgjWA==", + "dev": true, + "requires": { + "glob": "^7.0.3", + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2 || 3 || 4", + "osenv": "0", + "request": "^2.87.0", + "rimraf": "2", + "semver": "~5.3.0", + "tar": "^4.4.8", + "which": "1" + }, + "dependencies": { + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true + } + } + }, + "noop-logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", + "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=", + "optional": true + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } }, "normalize-package-data": { "version": "2.5.0", @@ -1074,6 +1701,17 @@ "validate-npm-package-license": "^3.0.1" } }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, "nugget": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz", @@ -1109,8 +1747,7 @@ "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=", - "dev": true + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "oauth-sign": { "version": "0.9.0", @@ -1121,8 +1758,7 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-keys": { "version": "0.4.0", @@ -1134,11 +1770,83 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, "requires": { "wrappy": "1" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "ora": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-3.4.0.tgz", + "integrity": "sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-spinners": "^2.0.0", + "log-symbols": "^2.2.0", + "strip-ansi": "^5.2.0", + "wcwidth": "^1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "osc": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/osc/-/osc-2.3.1.tgz", + "integrity": "sha512-7kT91FXuCQBpy0NVcXZRLAqBHJlDA3ECXZBMTLwQdgF7N+M2ODVMR06Hp9Yr/qsIl7K3A60Z3rpDJizW9BGvQQ==", + "requires": { + "long": "4.0.0", + "serialport": "7.1.5", + "slip": "1.0.2", + "wolfy87-eventemitter": "5.2.6", + "ws": "7.0.0" + } + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -1254,6 +1962,30 @@ "xmldom": "0.1.x" } }, + "prebuild-install": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.0.tgz", + "integrity": "sha512-aaLVANlj4HgZweKttFNUVNRxDukytuIuxeK2boIMHjagNJCiVKWFsKF4tCE3ql3GbrD2tExPQ7/pwtEJcHNZeg==", + "optional": true, + "requires": { + "detect-libc": "^1.0.3", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "napi-build-utils": "^1.0.1", + "node-abi": "^2.7.0", + "noop-logger": "^0.1.1", + "npmlog": "^4.0.1", + "os-homedir": "^1.0.1", + "pump": "^2.0.1", + "rc": "^1.2.7", + "simple-get": "^2.7.0", + "tar-fs": "^1.13.0", + "tunnel-agent": "^0.6.0", + "which-pm-runs": "^1.0.0" + } + }, "pretty-bytes": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", @@ -1267,8 +1999,7 @@ "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "progress-stream": { "version": "1.2.0", @@ -1286,6 +2017,16 @@ "integrity": "sha512-GEn74ZffufCmkDDLNcl3uuyF/aSD6exEyh1v/ZSdAomB82t6G9hzJVRx0jBmLDW+VfZqks3aScmMw9DszwUalA==", "dev": true }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "optional": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -1302,7 +2043,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, "requires": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -1396,6 +2136,18 @@ "uuid": "^3.3.2" } }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, "resolve": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", @@ -1405,6 +2157,16 @@ "path-parse": "^1.0.6" } }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, "rimraf": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", @@ -1414,11 +2176,19 @@ "glob": "^7.1.3" } }, + "rxjs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", + "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, "safe-buffer": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", - "dev": true + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" }, "safer-buffer": { "version": "2.1.2", @@ -1438,14 +2208,63 @@ "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" + }, + "serialport": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/serialport/-/serialport-7.1.5.tgz", + "integrity": "sha512-NplGdqaY+ZL8t3t5egbT+3oqLW4d7WvDT/x1ACxAyWa1fSnx+KTAmlDHeCls39lXwu8voaOr3bPOW4bwM7PdAA==", + "optional": true, + "requires": { + "@serialport/binding-mock": "^2.0.5", + "@serialport/bindings": "^2.0.8", + "@serialport/parser-byte-length": "^2.0.2", + "@serialport/parser-cctalk": "^2.0.2", + "@serialport/parser-delimiter": "^2.0.2", + "@serialport/parser-readline": "^2.0.2", + "@serialport/parser-ready": "^2.0.2", + "@serialport/parser-regex": "^2.0.2", + "@serialport/stream": "^2.0.5", + "debug": "^4.1.1" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "optional": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", + "optional": true + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "optional": true, + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } }, "single-line-log": { "version": "1.1.2", @@ -1456,6 +2275,39 @@ "string-width": "^1.0.1" } }, + "slip": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/slip/-/slip-1.0.2.tgz", + "integrity": "sha1-ukWpIwNNbPQbGieuvnEoKCyNVR8=" + }, + "spawn-rx": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spawn-rx/-/spawn-rx-3.0.0.tgz", + "integrity": "sha512-dw4Ryg/KMNfkKa5ezAR5aZe9wNwPdKlnHEXtHOjVnyEDSPQyOpIPPRtcIiu7127SmtHhaCjw21yC43HliW0iIg==", + "dev": true, + "requires": { + "debug": "^2.5.1", + "lodash.assign": "^4.2.0", + "rxjs": "^6.3.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, "spdx-correct": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", @@ -1515,7 +2367,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -1532,7 +2383,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, "requires": { "ansi-regex": "^2.0.0" } @@ -1558,8 +2408,7 @@ "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=", - "dev": true + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" }, "sumchecker": { "version": "2.0.2", @@ -1587,6 +2436,113 @@ } } }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "tar": { + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.10.tgz", + "integrity": "sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA==", + "dev": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.5", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + } + }, + "tar-fs": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", + "integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==", + "optional": true, + "requires": { + "chownr": "^1.0.1", + "mkdirp": "^0.5.1", + "pump": "^1.0.0", + "tar-stream": "^1.1.2" + }, + "dependencies": { + "pump": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", + "optional": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "optional": true, + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "optional": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "optional": true, + "requires": { + "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" + } + }, + "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==", + "optional": true + }, + "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==", + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "optional": true + } + } + }, "throttleit": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", @@ -1622,6 +2578,12 @@ "tmp": "0.1.0" } }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "optional": true + }, "tough-cookie": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", @@ -1655,11 +2617,16 @@ "utf8-byte-length": "^1.0.1" } }, + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", + "dev": true + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, "requires": { "safe-buffer": "^5.0.1" } @@ -1700,8 +2667,7 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { "version": "3.3.2", @@ -1730,11 +2696,106 @@ "extsprintf": "^1.2.0" } }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "which-pm-runs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wolfy87-eventemitter": { + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/wolfy87-eventemitter/-/wolfy87-eventemitter-5.2.6.tgz", + "integrity": "sha512-n+bSucT1j9ZEoosxnfuH81bWqtZG4QEtZ9WEuiXz9YQAHEktGYKoSoMTKWTJEcYux8lWoqp1KqHPBpwvJKFFTw==" + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "ws": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.0.0.tgz", + "integrity": "sha512-cknCal4k0EAOrh1SHHPPWWh4qm93g1IuGGGwBjWkXmCG7LsDtL8w9w+YVfaF+KSVwiHQKDIMsSLBVftKf9d1pg==", + "requires": { + "async-limiter": "^1.0.0" + } }, "xmlbuilder": { "version": "9.0.7", @@ -1757,6 +2818,113 @@ "object-keys": "~0.4.0" } }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yallist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "dev": true + }, + "yargs": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", + "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "yargs-parser": { "version": "13.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", diff --git a/desktop/sources/scripts/library.js b/desktop/sources/scripts/library.js index 3ace57e..5aea1ea 100644 --- a/desktop/sources/scripts/library.js +++ b/desktop/sources/scripts/library.js @@ -382,9 +382,9 @@ function Library (ronin) { this.osc = (...args) => { // Returns a rect of the frame. if (args.length >= 1) { - return ronin.getOsc()[args[0]] + return ronin.getOsc()[args[0]] } else { - return ronin.getOsc(); + return ronin.getOsc() } } } diff --git a/desktop/sources/scripts/lisp.js b/desktop/sources/scripts/lisp.js index 1eebdd8..a6cc74f 100644 --- a/desktop/sources/scripts/lisp.js +++ b/desktop/sources/scripts/lisp.js @@ -1,7 +1,6 @@ 'use strict' function Lisp (lib = {}, includes = []) { - console.log(includes) const path = require('path') const fs = require('fs') diff --git a/desktop/sources/scripts/osc.js b/desktop/sources/scripts/osc.js index 1f0eb65..08b609f 100644 --- a/desktop/sources/scripts/osc.js +++ b/desktop/sources/scripts/osc.js @@ -1,26 +1,26 @@ 'use strict' function Osc (ronin) { - const osc = require('osc') + const osc = require('osc') - this.oscMsg = {} + this.oscMsg = {} - this.start = function () { - var udpPort = new osc.UDPPort({ - localAddress: "0.0.0.0", - localPort: 12940, - metadata: true - }); + this.start = function () { + var udpPort = new osc.UDPPort({ + localAddress: '0.0.0.0', + localPort: 49162, + metadata: true + }) - udpPort.on("message", this.onOscMsg) + udpPort.on('message', this.onOscMsg) - udpPort.open(); - ronin.log("osc started") - } + udpPort.open() + ronin.log('osc started') + } - this.onOscMsg = (oscMsg, timeTag, info) => { - this.oscMsg[oscMsg.address] = oscMsg; - ronin.log("An OSC message just arrived!", oscMsg) - ronin.log("Remote info is: ", info); - } + this.onOscMsg = (oscMsg, timeTag, info) => { + this.oscMsg[oscMsg.address] = oscMsg + ronin.log('An OSC message just arrived!', oscMsg) + ronin.log('Remote info is: ', info) + } } diff --git a/desktop/sources/scripts/ronin.js b/desktop/sources/scripts/ronin.js index 22718d9..0124172 100644 --- a/desktop/sources/scripts/ronin.js +++ b/desktop/sources/scripts/ronin.js @@ -49,8 +49,8 @@ function Ronin () { this.osc.start() } - this.getOsc = function() { - return this.osc.oscMsg; + this.getOsc = function () { + return this.osc.oscMsg } this.reset = function () { diff --git a/examples/osc1.lisp b/examples/osc.lisp similarity index 100% rename from examples/osc1.lisp rename to examples/osc.lisp diff --git a/examples/stars.lisp b/examples/stars.lisp index 920843d..c2aa750 100644 --- a/examples/stars.lisp +++ b/examples/stars.lisp @@ -27,7 +27,7 @@ (cx cy r c) ( (times c - (lambda + (λ (i) ( (draw-spoke cx cy r From 76994ad3738ab7d27d4dac4ee5fca2beab014d0e Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 21 Jul 2019 17:54:46 +0900 Subject: [PATCH 18/22] Improving OSC reading --- desktop/sources/scripts/commander.js | 2 +- desktop/sources/scripts/library.js | 17 +++++++++-------- desktop/sources/scripts/osc.js | 17 +++++++---------- desktop/sources/scripts/ronin.js | 4 ---- examples/orca.lisp | 1 + 5 files changed, 18 insertions(+), 23 deletions(-) create mode 100644 examples/orca.lisp diff --git a/desktop/sources/scripts/commander.js b/desktop/sources/scripts/commander.js index 658c34a..48aa1e5 100644 --- a/desktop/sources/scripts/commander.js +++ b/desktop/sources/scripts/commander.js @@ -72,7 +72,7 @@ function Commander (ronin) { // Logs if (msg && msg !== this._log.textContent) { this._log.textContent = `${msg}` - console.log(msg) + // console.log(msg) } // Source const _source = `${ronin.source} ${this._input.value.split('\n').length} lines` diff --git a/desktop/sources/scripts/library.js b/desktop/sources/scripts/library.js index 5aea1ea..34dfcc8 100644 --- a/desktop/sources/scripts/library.js +++ b/desktop/sources/scripts/library.js @@ -7,7 +7,7 @@ function Library (ronin) { this.export = (path, format = 'image/png', quality = 1.0) => { // Exports a graphic file with format. if (!path) { console.warn('Missing export path'); return path } - var dataUrl = ronin.surface.el.toDataURL(format, quality) + const dataUrl = ronin.surface.el.toDataURL(format, quality) const data = dataUrl.replace(/^data:image\/png;base64,/, '').replace(/^data:image\/jpeg;base64,/, '') fs.writeFileSync(path, data, 'base64') return path @@ -350,6 +350,11 @@ function Library (ronin) { return arg } + this.log = (arg) => { + console.log(arg) + return arg + } + this.time = (rate = 1) => { // Returns timestamp in milliseconds. return (Date.now() * rate) } @@ -378,13 +383,9 @@ function Library (ronin) { return result } - // osc + // IO - this.osc = (...args) => { // Returns a rect of the frame. - if (args.length >= 1) { - return ronin.getOsc()[args[0]] - } else { - return ronin.getOsc() - } + this.osc = (path) => { // Returns the latest osc message at path + return path ? ronin.osc.msg[path] : ronin.osc.msg } } diff --git a/desktop/sources/scripts/osc.js b/desktop/sources/scripts/osc.js index 08b609f..6202be2 100644 --- a/desktop/sources/scripts/osc.js +++ b/desktop/sources/scripts/osc.js @@ -3,24 +3,21 @@ function Osc (ronin) { const osc = require('osc') - this.oscMsg = {} + this.msg = {} this.start = function () { - var udpPort = new osc.UDPPort({ + const udpPort = new osc.UDPPort({ localAddress: '0.0.0.0', localPort: 49162, metadata: true }) - - udpPort.on('message', this.onOscMsg) - + udpPort.on('message', this.onMsg) udpPort.open() - ronin.log('osc started') + ronin.log('OSC','Started.') } - this.onOscMsg = (oscMsg, timeTag, info) => { - this.oscMsg[oscMsg.address] = oscMsg - ronin.log('An OSC message just arrived!', oscMsg) - ronin.log('Remote info is: ', info) + this.onMsg = (msg, timeTag, info) => { + this.msg[msg.address] = msg.args + // ronin.log(`${info.address}:${info.port} > ${msg.args}`, info) } } diff --git a/desktop/sources/scripts/ronin.js b/desktop/sources/scripts/ronin.js index 0124172..8d247ee 100644 --- a/desktop/sources/scripts/ronin.js +++ b/desktop/sources/scripts/ronin.js @@ -49,10 +49,6 @@ function Ronin () { this.osc.start() } - this.getOsc = function () { - return this.osc.oscMsg - } - this.reset = function () { this.theme.reset() } diff --git a/examples/orca.lisp b/examples/orca.lisp new file mode 100644 index 0000000..16ee567 --- /dev/null +++ b/examples/orca.lisp @@ -0,0 +1 @@ +(log (of (osc "/a") 0 "value")) \ No newline at end of file From a482000c79752e95237d9d10d95ffa21365648b9 Mon Sep 17 00:00:00 2001 From: ngradwohl Date: Sun, 21 Jul 2019 12:15:36 +0200 Subject: [PATCH 19/22] fix endless running loops in anim mode --- desktop/sources/scripts/commander.js | 15 +++++++++++++-- desktop/sources/scripts/ronin.js | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/desktop/sources/scripts/commander.js b/desktop/sources/scripts/commander.js index 852b2b9..0009196 100644 --- a/desktop/sources/scripts/commander.js +++ b/desktop/sources/scripts/commander.js @@ -31,10 +31,21 @@ function Commander (ronin) { this.hide() } + + this._current_txt = '' + this.run = (txt = this._input.value) => { if (txt.indexOf('$') > -1) { ronin.log('Present: $'); return } - ronin.interpreter.run(txt) - ronin.always === true && requestAnimationFrame(() => this.run(txt)) + this._current_txt = txt; + + if ( ronin.always !== true ) { + ronin.interpreter.run(this._current_txt) + } + } + + this.loop = () => { + ronin.interpreter.run(this._current_txt) + ronin.always === true && requestAnimationFrame(() => this.loop()) } this.load = function (txt) { diff --git a/desktop/sources/scripts/ronin.js b/desktop/sources/scripts/ronin.js index 927d388..7fd5ca9 100644 --- a/desktop/sources/scripts/ronin.js +++ b/desktop/sources/scripts/ronin.js @@ -64,7 +64,7 @@ function Ronin () { this.animate = (b = true) => { if (this.always === b) { return } this.always = b - this.commander.run() + this.commander.loop() } // Zoom From 70fa2b420f5eae439b0f4e286b1aebf083dde6d5 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 21 Jul 2019 19:27:45 +0900 Subject: [PATCH 20/22] * --- desktop/sources/scripts/commander.js | 14 ++++++-------- desktop/sources/scripts/library.js | 2 +- desktop/sources/scripts/osc.js | 2 +- examples/orca.lisp | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/desktop/sources/scripts/commander.js b/desktop/sources/scripts/commander.js index 31e9cad..3e5c4ad 100644 --- a/desktop/sources/scripts/commander.js +++ b/desktop/sources/scripts/commander.js @@ -31,22 +31,20 @@ function Commander (ronin) { this.hide() } - - this._current_txt = '' + this.cache = '' this.run = (txt = this._input.value) => { if (txt.indexOf('$') > -1) { ronin.log('Present: $'); return } - this._current_txt = txt; - - if ( ronin.always !== true ) { - ronin.surface.maximize() - ronin.interpreter.run(this._current_txt) + this.cache = txt + if (ronin.always !== true) { + ronin.surface.maximize() + ronin.interpreter.run(this.cache) } } this.loop = () => { ronin.surface.maximize() - ronin.interpreter.run(this._current_txt) + ronin.interpreter.run(this.cache) ronin.always === true && requestAnimationFrame(() => this.loop()) } diff --git a/desktop/sources/scripts/library.js b/desktop/sources/scripts/library.js index 34dfcc8..52eb929 100644 --- a/desktop/sources/scripts/library.js +++ b/desktop/sources/scripts/library.js @@ -350,7 +350,7 @@ function Library (ronin) { return arg } - this.log = (arg) => { + this.debug = (arg) => { console.log(arg) return arg } diff --git a/desktop/sources/scripts/osc.js b/desktop/sources/scripts/osc.js index 6202be2..7c5389d 100644 --- a/desktop/sources/scripts/osc.js +++ b/desktop/sources/scripts/osc.js @@ -13,7 +13,7 @@ function Osc (ronin) { }) udpPort.on('message', this.onMsg) udpPort.open() - ronin.log('OSC','Started.') + ronin.log('OSC', 'Started.') } this.onMsg = (msg, timeTag, info) => { diff --git a/examples/orca.lisp b/examples/orca.lisp index 16ee567..4e61054 100644 --- a/examples/orca.lisp +++ b/examples/orca.lisp @@ -1 +1 @@ -(log (of (osc "/a") 0 "value")) \ No newline at end of file +(debug (of (osc "/a") :0 :value)) \ No newline at end of file From bb887ae6c38f6540cc13c146c0072f543aecfbaf Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 21 Jul 2019 20:12:10 +0900 Subject: [PATCH 21/22] Redoing the animation example --- desktop/sources/links/main.css | 2 +- desktop/sources/lisp/prelude.lisp | 16 +++++++++- desktop/sources/scripts/surface.js | 2 +- examples/animate.lisp | 51 ++++++++++++++++++++---------- examples/stars.lisp | 14 -------- 5 files changed, 51 insertions(+), 34 deletions(-) diff --git a/desktop/sources/links/main.css b/desktop/sources/links/main.css index 4a9d7de..460de1c 100644 --- a/desktop/sources/links/main.css +++ b/desktop/sources/links/main.css @@ -14,4 +14,4 @@ body { margin:0px; padding:0px; overflow:hidden; font-family:"input_mono_regular #ronin canvas#guide { background:none; } #ronin canvas#surface { border-radius: 2px } -#ronin.hidden canvas#surface, #ronin.hidden canvas#guide { left:10px; } \ No newline at end of file +#ronin.hidden canvas#surface, #ronin.hidden canvas#guide { left:0px; } \ No newline at end of file diff --git a/desktop/sources/lisp/prelude.lisp b/desktop/sources/lisp/prelude.lisp index ef8b670..ebca107 100644 --- a/desktop/sources/lisp/prelude.lisp +++ b/desktop/sources/lisp/prelude.lisp @@ -17,4 +17,18 @@ (if (gt v 1) (times - (sub v 1) f)))) \ No newline at end of file + (sub v 1) f)))) +; convert deg to radians +(defn deg-rad + (deg) + (mul deg + (div PI 180))) +; position on a circle from angle +(defn circle-pos + (cx cy r a) {:x + (add cx + (mul r + (cos a))) :y + (add cy + (mul r + (sin a)))}) \ No newline at end of file diff --git a/desktop/sources/scripts/surface.js b/desktop/sources/scripts/surface.js index 78ec8c9..32dd5e0 100644 --- a/desktop/sources/scripts/surface.js +++ b/desktop/sources/scripts/surface.js @@ -185,7 +185,7 @@ function Surface (ronin) { } this.maximize = function () { - this.resize({ x: 0, y: 0, w: (window.innerWidth * this.ratio) - 60, h: (window.innerHeight * this.ratio) - 60, t: 'rect' }) + this.resize({ x: 0, y: 0, w: ((window.innerWidth - 60) * this.ratio), h: ((window.innerHeight - 60) * this.ratio), t: 'rect' }) } this.onResize = function () { diff --git a/examples/animate.lisp b/examples/animate.lisp index 9621338..98e6c41 100644 --- a/examples/animate.lisp +++ b/examples/animate.lisp @@ -1,17 +1,34 @@ -; animate - -(clear) -(def t - (sin - (div - (time) 100))) -(def pos - (add 200 30 - (mul 30 t))) -(defn square - (a) - (rect a a a a)) -(stroke - (square pos) 1 "red") -; set false to stop -(animate true) \ No newline at end of file +; +(clear) +; +(def seg-count 20) +; +(def center + (div + (of + (frame) :h) 2)) +; +(def seg-width + (div + (of + (frame) :w) count)) +; +(defn draw-dash + (i) + ( + (def x + (mul + (sub i 1) seg-width)) + (def y + (add + (mul + (sin + (add + (time 0.01) i)) 15) center)) + (stroke + (line + (pos x y) + (pos + (add x seg-width) y)) 4 "red"))) +; +(times seg-count draw-dash) \ No newline at end of file diff --git a/examples/stars.lisp b/examples/stars.lisp index c2aa750..bff89e3 100644 --- a/examples/stars.lisp +++ b/examples/stars.lisp @@ -1,20 +1,6 @@ ; stars (clear) ; -(defn deg-rad - (deg) - (mul deg - (div PI 180))) -; -(defn circle-pos - (cx cy r a) {:x - (add cx - (mul r - (cos a))) :y - (add cy - (mul r - (sin a)))}) -; (defn draw-spoke (cx cy r a) ( From f994ae30d36d183597f008ef0f2d9b6e5bd3f9ef Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 21 Jul 2019 20:35:00 +0900 Subject: [PATCH 22/22] Better animate --- examples/animate.lisp | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/examples/animate.lisp b/examples/animate.lisp index 98e6c41..7943d97 100644 --- a/examples/animate.lisp +++ b/examples/animate.lisp @@ -1,9 +1,9 @@ ; (clear) ; -(def seg-count 20) +(def seg-count 50) ; -(def center +(def frame-middle (div (of (frame) :h) 2)) @@ -11,7 +11,19 @@ (def seg-width (div (of - (frame) :w) count)) + (frame) :w) seg-count)) +; +(defn elevation + (i) + (add + (mul + (sin + (add + (time 0.001) + (div i 5))) + (div + (of + (frame) :h) 5)) frame-middle)) ; (defn draw-dash (i) @@ -20,15 +32,19 @@ (mul (sub i 1) seg-width)) (def y - (add - (mul - (sin - (add - (time 0.01) i)) 15) center)) + (elevation i)) (stroke (line - (pos x y) + (pos x + (elevation + (sub i 1))) (pos - (add x seg-width) y)) 4 "red"))) + (add x seg-width) + (elevation i))) 4 + (gradient + (50 0 + (of + (frame) :w) 0) + ("rgba(255,255,255,0)" "white" "#72dec2" "red"))))) ; (times seg-count draw-dash) \ No newline at end of file