diff options
-rwxr-xr-x | app.mjs | 566 | ||||
-rw-r--r-- | eslint.config.mjs | 8 | ||||
-rw-r--r-- | package-lock.json | 1055 | ||||
-rw-r--r-- | package.json | 9 |
4 files changed, 1345 insertions, 293 deletions
@@ -1,15 +1,12 @@ #!/usr/bin/env node -import { registerFont } from "canvas"; - +//import { registerFont } from "canvas"; //registerFont("./ocr-a-ext.ttf", { family: "OCR A Extended" }); import { discover, HAPTIC } from "loupedeck"; import { readFile } from "fs/promises"; import { parse } from "yaml"; import { XPlane } from "./xplane.mjs"; -import { isArray } from "util"; -import { platform } from "process"; const labelFont = "OCR A Extended"; const labelSize = 22; @@ -68,7 +65,7 @@ const getKeyConf = (i) => { const getTextStyles = (conf) => { // conf must be non-null - let font; + let font = []; let color_bg = []; let color_fg = []; @@ -80,12 +77,11 @@ const getTextStyles = (conf) => { color_fg = Array.isArray(conf.color_fg) ? conf.color_fg : [conf.color_fg]; - font = []; for (let i = 0; i < size.length; i++) { font.push(`${size[i] ? size[i] : labelSize}px '${labelFont}'`); } } else { - font = [`${labelSize}px '${labelFont}'`]; + font.push(`${labelSize}px '${labelFont}'`); } return { font, @@ -94,6 +90,101 @@ const getTextStyles = (conf) => { }; }; +const getLabels = (conf) => { + let text; + if (isObject(conf)) { + text = Array.isArray(conf.label) ? conf.label : [conf.label]; + } else { + text = [conf.toString()]; + } + return text; +}; + +const formatValues = (conf, values, n = 1) => { + const f = (fmt) => { + if (fmt) { + return Function("$d", `"use strict"; return(\`${fmt}\`);`)(values); + } + if (isNaN(values[0])) { + return "X"; + } + return values[0].toFixed(0).toString(); + }; + + let last; + let text = []; + const formatter = Array.isArray(conf.formatter) + ? conf.formatter + : [conf.formatter]; + for (let i = 0; i < n; i++) { + let fmt = formatter[i] || last; + text.push(f(fmt)); + last = fmt; + } + return text; +}; + +const formatColors = (color_name, conf, values, n = 1) => { + const f = (fmt) => { + if (fmt) { + return Function("$d", `"use strict"; return(\`${fmt}\`);`)(values); + } + return "#fff"; + }; + + let last; + let color = []; + const formatter = Array.isArray(conf[color_name]) + ? conf[color_name] + : [conf[color_name]]; + for (let i = 0; i < n; i++) { + let fmt = formatter[i] || last; + color.push(f(fmt)); + last = fmt; + } + return color; +}; + +const renderMultiLineText = (c, x0, y0, w, h, text, styles, conf) => { + const { font, color_fg } = styles; + c.save(); + let sep = conf.sep; + if (sep == null) { + c.font = font[0]; + const mx = c.measureText("x"); + sep = mx.actualBoundingBoxAscent - mx.actualBoundingBoxDescent; + } + let ms = []; + let totalHeight = 0; + for (let i = 0; i < text.length; i++) { + c.font = font[i]; + const m = c.measureText(text[i]); + ms.push(m); + totalHeight += m.actualBoundingBoxAscent - m.actualBoundingBoxDescent; + } + totalHeight += (text.length - 1) * sep; + let yBase = y0 + (h - totalHeight) / 2; + for (let i = 0; i < text.length; i++) { + const x = + x0 + + Math.max( + 0, + w - + (ms[i].actualBoundingBoxRight - + ms[i].actualBoundingBoxLeft), + ) / + 2; + const textHeight = + ms[i].actualBoundingBoxAscent - ms[i].actualBoundingBoxDescent; + const y = yBase + textHeight; + c.font = font[i]; + c.fillStyle = color_fg[i] || "#fff"; + c.fillText(text[i], x, y); + yBase += textHeight + sep; + } + c.restore(); +}; + const drawKey = async (id, conf, pressed) => { if (conf && conf.display != null) { // not an input, but a display gauge @@ -118,7 +209,11 @@ const drawKey = async (id, conf, pressed) => { if (conf != null) { renderMultiLineText( c, - getLabelText(conf), + 0, + 0, + w, + h, + getLabels(conf), getTextStyles(conf), conf, ); @@ -157,7 +252,7 @@ const drawSideKnobs = async (side, confs, highlight) => { ); if (Array.isArray(confs) && confs.length > i && confs[i] != null) { const { font, color_bg, color_fg } = getTextStyles(confs[i]); - const text = getLabelText(confs[i]); + const text = getLabels(confs[i]); if (color_bg[0]) { c.fillStyle = color_bg[0]; c.fillRect( @@ -167,129 +262,116 @@ const drawSideKnobs = async (side, confs, highlight) => { h - y_padding * 2 - 2, ); } - c.font = font[0]; - const { - width, - actualBoundingBoxAscent, - actualBoundingBoxDescent, - } = c.measureText(text[0]); - const x_axis = (h - width) / 2; - const y_axis = - w / 2 + - (actualBoundingBoxAscent - actualBoundingBoxDescent) / 2; - c.rotate((90 * Math.PI) / 180); - c.fillStyle = hl ? "black" : "white"; - c.fillText(text[0], x_axis + y_offset, -(w - y_axis)); + c.translate(w, y_offset); + c.rotate(Math.PI / 2); + renderMultiLineText( + c, + 0, + 0, + h, + w, + text, + { font, color_bg, color_fg }, + confs[i], + ); c.resetTransform(); } } }); }; -const renderMultiLineText = (c, text, styles, conf) => { +const renderTextGauge = (c, display, values) => { + const bg = "black"; const w = c.canvas.width; const h = c.canvas.height; - const { font, color_fg } = styles; + // draw background + c.fillStyle = bg; + c.fillRect(0, 0, w, h); - c.save(); - c.font = font[0]; - let ms = []; - let text_h = 0; - const mx = c.measureText("x"); - const sep = conf.sep - ? conf.sep - : mx.actualBoundingBoxAscent - mx.actualBoundingBoxDescent; - for (let i = 0; i < text.length; i++) { - c.font = font[i]; - const m = c.measureText(text[i]); - ms.push(m); - text_h += m.actualBoundingBoxAscent - m.actualBoundingBoxDescent; - } - text_h += (text.length - 1) * sep; - let y0 = (h - text_h) / 2; - for (let i = 0; i < text.length; i++) { - const x = - Math.max( - 0, - w - - (ms[i].actualBoundingBoxRight - - ms[i].actualBoundingBoxLeft), - ) / 2; - const hh = - ms[i].actualBoundingBoxAscent - ms[i].actualBoundingBoxDescent; - const y = y0 + hh; - c.font = font[i]; - if (color_fg[i]) { - c.fillStyle = color_fg[i]; - } - c.fillText(text[i], x, y); - y0 += hh + sep; - } - c.restore(); + const text = formatValues(display, values, display.formatter.length); + // TODO: cache this + const styles = getTextStyles({ + size: display.size, + color_fg: formatColors( + "color_fg", + display, + values, + display.formatter.length, + ), + }); + renderMultiLineText(c, 0, 0, w, h, text, styles, {}); }; -const getLabelText = (conf) => { - let text; - if (isObject(conf)) { - text = Array.isArray(conf.label) ? conf.label : [conf.label]; - } else { - text = [conf.toString()]; - } - return text; -}; +const renderMeterGauge = (c, display, values) => { + const bg = "black"; + const fg = "white"; + const w = c.canvas.width; + const h = c.canvas.height; -const formatValues = (conf, values, n = 1) => { - const f = (fmt) => { - if (fmt) { - return Function("$d", `"use strict"; return(\`${fmt}\`);`)(values); - } - if (isNaN(values[0])) { - return "X"; - } - return values[0].toFixed(0).toString(); - }; + const { min, max, stops } = display || {}; - let last; - let text = []; - const formatter = Array.isArray(conf.formatter) - ? conf.formatter - : [conf.formatter]; - for (let i = 0; i < n; i++) { - let fmt = formatter[i] || last; - text.push(f(fmt)); - last = fmt; + if (min == null) { + return; } - return text; -}; -const formatColors = (color_name, conf, values, n = 1) => { - const f = (fmt, v) => { - if (fmt) { - return Function("$d", `"use strict"; return(\`${fmt}\`);`)(values); - } - return "#fff"; - }; + let reading = (values[0] - min) / (max - min); + if (isNaN(reading)) { + reading = min; + } - let last; - let color = []; - const formatter = Array.isArray(conf[color_name]) - ? conf[color_name] - : [conf[color_name]]; - for (let i = 0; i < n; i++) { - let fmt = formatter[i] || last; - color.push(f(fmt)); - last = fmt; + // draw background + c.fillStyle = bg; + c.fillRect(0, 0, w, h); + c.strokeStyle = fg; + c.lineWidth = 1; + + const x0 = w / 2; + const y0 = h / 2 + 5; + const outer = 40; + const width = 5; + const inner = outer - width; + + // draw each arc segments + for (let i = 0; i < stops.length; i++) { + const theta0 = + Math.PI * (1 + (stops[i].value_begin - min) / (max - min)) + 0.05; + const theta1 = Math.PI * (1 + (stops[i].value_end - min) / (max - min)); + + c.beginPath(); + c.lineWidth = width; + c.strokeStyle = stops[i].color; + c.arc(x0, y0, outer - width / 2, theta0, theta1); + c.stroke(); + + c.beginPath(); + c.lineWidth = 2; + const cos = Math.cos(theta1); + const sin = Math.sin(theta1); + c.moveTo(x0 + cos * (inner - 2), y0 + sin * (inner - 2)); + c.lineTo(x0 + cos * (outer + 2), y0 + sin * (outer + 2)); + c.stroke(); } - return color; + + // draw the needle + c.strokeStyle = fg; + c.lineWidth = 2; + c.beginPath(); + c.moveTo(x0, y0); + const theta = Math.PI * (1 + reading); + c.lineTo(x0 + Math.cos(theta) * inner, y0 + Math.sin(theta) * inner); + c.stroke(); + + // show the value text + const text = formatValues(display, values); + const size = display.font ? display.font : labelSize; + c.font = `${size * 0.9}px '${labelFont}'`; + c.fillStyle = fg; + const m = c.measureText(text); + c.fillText(text, (w - m.width) / 2, h / 2 + 25); }; const renderAttitudeIndicator = (c, display, values) => { - const pitch = values[0]; - const roll = values[1]; - const src = display.src[values[2]]; - const cdi = src ? values[src.def] : null; - const received = src ? values[src.received] : null; const bg = "black"; const fg = "white"; const w = c.canvas.width; @@ -298,8 +380,12 @@ const renderAttitudeIndicator = (c, display, values) => { // draw background c.fillStyle = bg; c.fillRect(0, 0, w, h); - c.fillStyle = fg; - c.strokeStyle = fg; + + const pitch = values[0]; + const roll = values[1]; + const src = display.src[values[2]]; + const cdi = src ? values[src.def] : null; + const received = src ? values[src.received] : null; const x0 = w / 2; const y0 = h / 2; @@ -309,14 +395,17 @@ const renderAttitudeIndicator = (c, display, values) => { const shortSep = longSep / 2; c.translate(x0, y0); + c.save(); c.rotate((-roll * Math.PI) / 180); c.translate(0, (pitch / 10) * longSep); + // draw horizon c.fillStyle = "#0077b6"; c.fillRect(-w, -2 * h, 2 * w, 4 * h); c.fillStyle = "#99582a"; c.fillRect(-w, 0, 2 * w, 4 * h); + // draw pitch marks c.lineWidth = 1; c.strokeStyle = fg; c.beginPath(); @@ -339,40 +428,41 @@ const renderAttitudeIndicator = (c, display, values) => { } } c.stroke(); - c.resetTransform(); + c.restore(); + // draw center mark c.lineWidth = 2; c.strokeStyle = "yellow"; c.beginPath(); - c.moveTo(x0 - 30, y0); - c.lineTo(x0 - 10, y0); - c.lineTo(x0 - 10, y0 + 8); + c.moveTo(-30, 0); + c.lineTo(-10, 0); + c.lineTo(-10, 8); - c.moveTo(x0 + 30, y0); - c.lineTo(x0 + 10, y0); - c.lineTo(x0 + 10, y0 + 8); + c.moveTo(30, 0); + c.lineTo(10, 0); + c.lineTo(10, 8); c.stroke(); - // draw vertical deflection + // draw vertical deflection dots const pi2 = 2 * Math.PI; const vdef_x = w - 10; - const vdef_r = 3; + const vdefR = 3; c.strokeStyle = "white"; c.lineWidth = 1; c.beginPath(); for (let i = -2; i <= 2; i++) { if (i != 0) { - const vdef_y = y0 + 13 * i; - c.moveTo(vdef_x + vdef_r, vdef_y); - c.arc(vdef_x, vdef_y, vdef_r, 0, pi2); + const vdef_y = 13 * i; + c.moveTo(vdef_x + vdefR, vdef_y); + c.arc(vdef_x, vdef_y, vdefR, 0, pi2); } } c.stroke(); if (received == 0) { // draw CDI diamond - const cdi_y = y0 + 13 * cdi; + const cdi_y = 13 * cdi; const cdi_h = 7; const cdi_w = 4; c.fillStyle = "#2dfe54"; @@ -387,97 +477,6 @@ const renderAttitudeIndicator = (c, display, values) => { } }; -const renderTextGauge = (c, display, values) => { - const value = values[0]; - const bg = "black"; - const fg = "white"; - const w = c.canvas.width; - const h = c.canvas.height; - - // draw background - c.fillStyle = bg; - c.fillRect(0, 0, w, h); - c.fillStyle = fg; - c.strokeStyle = fg; - c.lineWidth = 1; - - const text = formatValues(display, values, display.formatter.length); - // TODO: cache this - const styles = getTextStyles({ - size: display.size, - color_fg: formatColors( - "color_fg", - display, - values, - display.formatter.length, - ), - }); - renderMultiLineText(c, text, styles, {}); -}; - -const renderMeterGauge = (c, display, values) => { - const bg = "black"; - const fg = "white"; - const w = c.canvas.width; - const h = c.canvas.height; - - const { min, max, stops } = display || {}; - - if (min == null) { - return; - } - - let reading = (values[0] - min) / (max - min); - if (isNaN(reading)) { - reading = min; - } - - const text = formatValues(display, values); - - // draw background - c.fillStyle = bg; - c.fillRect(0, 0, w, h); - c.strokeStyle = fg; - c.lineWidth = 1; - const x0 = w / 2; - const y0 = h / 2 + 5; - const outer = 40; - const width = 5; - const inner = outer - width; - for (let i = 0; i < stops.length; i++) { - const theta0 = - Math.PI * (1 + (stops[i].value_begin - min) / (max - min)) + 0.05; - const theta1 = Math.PI * (1 + (stops[i].value_end - min) / (max - min)); - - c.beginPath(); - c.lineWidth = width; - c.strokeStyle = stops[i].color; - c.arc(x0, y0, outer - width / 2, theta0, theta1); - c.stroke(); - - c.beginPath(); - c.lineWidth = 2; - const cos = Math.cos(theta1); - const sin = Math.sin(theta1); - c.moveTo(x0 + cos * (inner - 2), y0 + sin * (inner - 2)); - c.lineTo(x0 + cos * (outer + 2), y0 + sin * (outer + 2)); - c.stroke(); - } - c.strokeStyle = fg; - c.lineWidth = 2; - c.beginPath(); - c.moveTo(x0, y0); - const theta = Math.PI * (1 + reading); - c.lineTo(x0 + Math.cos(theta) * inner, y0 + Math.sin(theta) * inner); - c.stroke(); - - const size = display.font ? display.font : labelSize; - c.font = `${size * 0.9}px '${labelFont}'`; - c.fillStyle = fg; - const m = c.measureText(text); - c.fillText(text, (w - m.width) / 2, h / 2 + 25); -}; - const mechanicalStyleNumber = (value, lowDigitStep = 1) => { const split = (x) => { const int = Math.trunc(x); @@ -522,7 +521,7 @@ const renderMechanicalDisplay = ( value, padding = 20, right = true, - bigger_window_width = 2, + wideWinWidth = 2, lowDigitStep = 1, size = labelSize, ) => { @@ -534,32 +533,24 @@ const renderMechanicalDisplay = ( const m = c.measureText("x"); const y0 = h / 2 + (m.actualBoundingBoxAscent - m.actualBoundingBoxDescent) / 2; - let digit_height = - (m.actualBoundingBoxAscent - m.actualBoundingBoxDescent) * 2; - let digit_width = - (m.actualBoundingBoxRight - m.actualBoundingBoxLeft) * 1.2; + let digitH = (m.actualBoundingBoxAscent - m.actualBoundingBoxDescent) * 2; + let digitW = (m.actualBoundingBoxRight - m.actualBoundingBoxLeft) * 1.2; const sign = right ? -1 : 1; let x = (right ? w : 0) + sign * padding; c.strokeStyle = bg; - const narrow_window_y = y0 - digit_height * 0.95; - const narrow_window_h = digit_height * 1.25; - const bigger_window_x = - x + sign * (bigger_window_width + (right ? -1 : 0)) * digit_width; - const bigger_window_y = y0 - digit_height * 1.5; - const bigger_window_w = bigger_window_width * digit_width; - const bigger_window_h = digit_height * 2.25; + const narrowWinY = y0 - digitH * 0.95; + const narrowWinH = digitH * 1.25; + const wideWinX = x + sign * (wideWinWidth + (right ? -1 : 0)) * digitW; + const wideWinY = y0 - digitH * 1.5; + const wideWinW = wideWinWidth * digitW; + const wideWinH = digitH * 2.25; c.fillStyle = bg; - c.fillRect(0, narrow_window_y, w, narrow_window_h); - c.fillRect( - bigger_window_x, - bigger_window_y, - bigger_window_w, - bigger_window_h, - ); + c.fillRect(0, narrowWinY, w, narrowWinH); + c.fillRect(wideWinX, wideWinY, wideWinW, wideWinH); - c.rect(0, narrow_window_y, w, narrow_window_h); - c.rect(bigger_window_x, bigger_window_y, bigger_window_w, bigger_window_h); + c.rect(0, narrowWinY, w, narrowWinH); + c.rect(wideWinX, wideWinY, wideWinW, wideWinH); c.stroke(); c.clip(); c.strokeStyle = fg; @@ -567,8 +558,8 @@ const renderMechanicalDisplay = ( if (isNaN(value)) { c.beginPath(); - const y0 = narrow_window_y; - const y1 = narrow_window_y + narrow_window_h; + const y0 = narrowWinY; + const y1 = narrowWinY + narrowWinH; c.moveTo(0, y0); c.lineTo(w, y1); c.moveTo(0, y1); @@ -585,7 +576,7 @@ const renderMechanicalDisplay = ( const formatLowDigits = (x) => x.toFixed(0).padStart(lowDigits, "0"); for (let i = 0; i < digits.length; i++) { const p = right ? i : digits.length - i - 1; - const y = y0 + scroll[p] * digit_height; + const y = y0 + scroll[p] * digitH; let d, m1, m2, p1; if (p == 0) { d = digits[p] * lowDigitStep; @@ -604,7 +595,7 @@ const renderMechanicalDisplay = ( m2 = formatLowDigits(m2); p1 = formatLowDigits(p1); p2 = formatLowDigits(p2); - c.fillText(p2, x, y - digit_height * 2); + c.fillText(p2, x, y - digitH * 2); } else { d = digits[p]; m1 = d == 0 ? 9 : d - 1; @@ -612,33 +603,27 @@ const renderMechanicalDisplay = ( p1 = d == 9 ? 0 : d + 1; } c.fillText(d, x, y); - c.fillText(m1, x, y + digit_height); - c.fillText(m2, x, y + digit_height * 2); - c.fillText(p1, x, y - digit_height); - x += sign * digit_width; + c.fillText(m1, x, y + digitH); + c.fillText(m2, x, y + digitH * 2); + c.fillText(p1, x, y - digitH); + x += sign * digitW; } c.restore(); }; const renderIAS = (c, display, values) => { - const value = values[0]; const bg = "#555"; - const fg = "white"; const w = c.canvas.width; const h = c.canvas.height; // draw background c.fillStyle = bg; c.fillRect(0, 0, w, h); - c.fillStyle = fg; - c.strokeStyle = fg; - c.lineWidth = 1; renderMechanicalDisplay(c, w, h, values[0], 20, true, 1); }; const renderAltimeter = (c, display, values) => { - const value = values[0]; const bg = "#555"; const fg = "white"; const w = c.canvas.width; @@ -647,23 +632,26 @@ const renderAltimeter = (c, display, values) => { // draw background c.fillStyle = bg; c.fillRect(0, 0, w, h); + renderMechanicalDisplay(c, w, h, values[0], 5, false, 2, 20, 18); + + // draw floating vsi window const vsi = values[1]; - const vsi_bg_x = w / 2 + 4; - c.fillRect(vsi_bg_x, 0, w - vsi_bg_x, h); + const vsiBgX = w / 2 + 4; + c.fillRect(vsiBgX, 0, w - vsiBgX, h); c.fillStyle = "#000"; - const vsi_h = 20; - const vsi_x = vsi_bg_x + 2; - const vsi_y = + const vsiH = 20; + const vsiX = vsiBgX + 2; + const vsiY = (1 - (Math.min(Math.max(isNumber(vsi) ? vsi : 0, -2000), 2000) + 2000) / 4000) * - (h - vsi_h); - c.fillRect(vsi_x, vsi_y, w - vsi_x, vsi_h); + (h - vsiH); + c.fillRect(vsiX, vsiY, w - vsiX, vsiH); c.fillStyle = fg; if (isNumber(vsi)) { c.font = `12px '${labelFont}'`; - c.fillText(Math.trunc(vsi / 10) * 10, vsi_x + 2, vsi_y + vsi_h * 0.8); + c.fillText(Math.trunc(vsi / 10) * 10, vsiX + 2, vsiY + vsiH * 0.8); } const selected = values[2]; if (isNumber(selected)) { @@ -682,24 +670,23 @@ const renderHSI = (c, display, values) => { // draw background c.fillStyle = bg; c.fillRect(0, 0, w, h); - c.fillStyle = fg; - c.strokeStyle = fg; - c.lineWidth = 1; const x0 = w / 2; const y0 = h / 2; const r = w / 2 - 5; const f1 = 0.8; const f2 = 0.9; - const cdi_r = 0.4 * r; - const vdef_r = 3; + const cdiR = 0.4 * r; + const vdefR = 3; const deg2Rad = (x) => (x / 180) * Math.PI; + const hdg = deg2Rad(values[0]); - const hdg_bug = deg2Rad(values[1]); + const hdgB = deg2Rad(values[1]); const src = display.navs[values[2]]; const crs = src ? deg2Rad(values[src.crs]) : null; let def = src ? Math.min(Math.max(values[src.def], -3), 3) : null; const received = src ? values[src.received] : null; + if (isNaN(def)) { def = 0; } @@ -713,6 +700,8 @@ const renderHSI = (c, display, values) => { c.translate(x0, y0); c.rotate(-hdg); + c.strokeStyle = fg; + c.lineWidth = 1; c.beginPath(); for (let i = 0; i < 36; i++) { const { dx, dy } = polarXY(deg2Rad(i * 10), r); @@ -721,25 +710,26 @@ const renderHSI = (c, display, values) => { c.lineTo(dx * f, dy * f); } + c.fillStyle = fg; c.font = `16px '${labelFont}'`; c.fillText("N", -5, -0.5 * r); - if (isNumber(hdg_bug)) { - const bug_w = 4; - const bug_y1 = -(r - 3); - const bug_y0 = -(r - 8); + if (isNumber(hdgB)) { + const bugW = 4; + const bugY1 = -(r - 3); + const bugY0 = -(r - 8); c.stroke(); - c.rotate(hdg_bug); + c.rotate(hdgB); c.fillStyle = "cyan"; c.beginPath(); - c.moveTo(0, bug_y1); - c.lineTo(-bug_w, -(r + 1)); - c.lineTo(-bug_w, bug_y0); - c.lineTo(bug_w, bug_y0); - c.lineTo(bug_w, -(r + 1)); - c.lineTo(0, bug_y1); + c.moveTo(0, bugY1); + c.lineTo(-bugW, -(r + 1)); + c.lineTo(-bugW, bugY0); + c.lineTo(bugW, bugY0); + c.lineTo(bugW, -(r + 1)); + c.lineTo(0, bugY1); c.fill(); - c.rotate(-hdg_bug); + c.rotate(-hdgB); } if (crs != null) { @@ -748,8 +738,8 @@ const renderHSI = (c, display, values) => { for (let i = -2; i <= 2; i++) { if (i != 0) { const x = 13 * i; - c.moveTo(x + vdef_r, 0); - c.arc(x, 0, vdef_r, 0, pi2); + c.moveTo(x + vdefR, 0); + c.arc(x, 0, vdefR, 0, pi2); } } c.stroke(); @@ -759,13 +749,13 @@ const renderHSI = (c, display, values) => { c.strokeStyle = src.color ? src.color : "magenta"; if (received != 0) { - const cdi_x = 13 * def; - c.moveTo(cdi_x, -(cdi_r - 1)); - c.lineTo(cdi_x, cdi_r - 1); + const cdiX = 13 * def; + c.moveTo(cdiX, -(cdiR - 1)); + c.lineTo(cdiX, cdiR - 1); } c.moveTo(0, -r); - c.lineTo(0, -(cdi_r + 1)); + c.lineTo(0, -(cdiR + 1)); c.moveTo(0, -r); // crs arrowhead @@ -774,7 +764,7 @@ const renderHSI = (c, display, values) => { c.lineTo(0, -r); c.moveTo(0, r); - c.lineTo(0, cdi_r + 1); + c.lineTo(0, cdiR + 1); } c.stroke(); }; @@ -788,16 +778,13 @@ const renderBarGauge = (c, display, values) => { // draw background c.fillStyle = bg; c.fillRect(0, 0, w, h); - c.fillStyle = fg; - c.strokeStyle = fg; const slotWidth = 10; const slotHeight = 60; const barWidth = slotWidth * 0.6; - const barD = (slotWidth - barWidth) / 2; const text = formatValues(display, values, 4); - const label = getLabelText(display); + const label = getLabels(display); // TODO: cache this const { font, color_fg } = getTextStyles({ size: display.size, @@ -808,6 +795,7 @@ const renderBarGauge = (c, display, values) => { let y = -(w - (slotWidth + 10) * text.length) / 2; let x = (h - slotHeight) / 2; + c.strokeStyle = fg; for (let i = 0; i < text.length; i++) { c.lineWidth = 1; c.strokeRect(x, y - barWidth, slotHeight, barWidth); diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..01bd2ad --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,8 @@ +import globals from "globals"; +import pluginJs from "@eslint/js"; + + +export default [ + {languageOptions: { globals: globals.node }}, + pluginJs.configs.recommended, +]; diff --git a/package-lock.json b/package-lock.json index 03b3530..0ee9a5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "loupe-flightdeck", - "version": "0.0.3", + "version": "0.0.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "loupe-flightdeck", - "version": "0.0.3", + "version": "0.0.4", "dependencies": { "canvas": "^2.11.2", "loupedeck": "^6.0.1", @@ -15,10 +15,154 @@ "bin": { "loupe-flightdeck": "app.mjs" }, + "devDependencies": { + "@eslint/js": "^9.9.1", + "eslint": "^9.9.1", + "globals": "^15.9.0" + }, "engines": { "node": ">=16.0.0" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", + "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.4", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "9.9.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.9.1.tgz", + "integrity": "sha512-xIDQRsfg5hNBqHz04H1R3scSVwmI+KUbqjsQKHKQ1DAUSaUjYPReZZmS/5PNiKu1fUvzDd6H7DEDKACSEhu+TQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", + "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@mapbox/node-pre-gyp": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", @@ -38,6 +182,44 @@ "node-pre-gyp": "bin/node-pre-gyp" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@serialport/binding-mock": { "version": "10.2.2", "resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-10.2.2.tgz", @@ -264,6 +446,29 @@ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -275,6 +480,23 @@ "node": ">= 6.0.0" } }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -283,6 +505,22 @@ "node": ">=8" } }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/aproba": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", @@ -301,6 +539,13 @@ "node": ">=10" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -315,6 +560,16 @@ "concat-map": "0.0.1" } }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/canvas": { "version": "2.11.2", "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.11.2.tgz", @@ -329,6 +584,23 @@ "node": ">=6" } }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/chownr": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", @@ -337,6 +609,26 @@ "node": ">=10" } }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-convert/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, "node_modules/color-name": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/color-name/-/color-name-2.0.0.tgz", @@ -385,6 +677,21 @@ "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/debug": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", @@ -412,6 +719,13 @@ "node": ">=8" } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, "node_modules/delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", @@ -430,6 +744,173 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.9.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.9.1.tgz", + "integrity": "sha512-dHvhrbfr4xFQ9/dq+jcVneZMyRYLjggWjk6RVsIiHsP8Rz6yZ8LvZ//iU4TrZF+SXWG+JkNF2OyiZRvzgRDqMg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.18.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.9.1", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.3.0", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.0.2", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.1.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", + "integrity": "sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", + "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.12.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", @@ -438,6 +919,88 @@ "node": ">=0.8.x" } }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true, + "license": "ISC" + }, "node_modules/fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -505,6 +1068,42 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "15.9.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.9.0.tgz", + "integrity": "sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", @@ -522,6 +1121,43 @@ "node": ">= 6" } }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -537,6 +1173,16 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -545,6 +1191,117 @@ "node": ">=8" } }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, "node_modules/loupedeck": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/loupedeck/-/loupedeck-6.0.1.tgz", @@ -665,6 +1422,13 @@ "resolved": "https://registry.npmjs.org/nan/-/nan-2.20.0.tgz", "integrity": "sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw==" }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, "node_modules/node-addon-api": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.0.0.tgz", @@ -741,6 +1505,79 @@ "wrappy": "1" } }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -749,6 +1586,57 @@ "node": ">=0.10.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -762,6 +1650,27 @@ "node": ">= 6" } }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -777,6 +1686,30 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -855,6 +1788,29 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -926,6 +1882,32 @@ "node": ">=8" } }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/tar": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", @@ -942,11 +1924,41 @@ "node": ">=10" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT" + }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -966,6 +1978,22 @@ "webidl-conversions": "^3.0.0" } }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/wide-align": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", @@ -974,6 +2002,16 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -1014,6 +2052,19 @@ "engines": { "node": ">= 14" } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index 8109812..8048f93 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "loupe-flightdeck", - "version": "0.0.3", + "version": "0.0.4", "description": "Turn your stream deck into a flight deck!", "repository": { "type": "git", @@ -14,5 +14,10 @@ "loupedeck": "^6.0.1", "yaml": "^2.5.0" }, - "bin": "./app.mjs" + "bin": "./app.mjs", + "devDependencies": { + "@eslint/js": "^9.9.1", + "eslint": "^9.9.1", + "globals": "^15.9.0" + } } |